1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LogAnalytics
  5. LogAnalyticsResourceCategoriesManagement
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.LogAnalytics.LogAnalyticsResourceCategoriesManagement

Explore with Pulumi AI

This resource provides the Log Analytics Resource Categories Management resource in Oracle Cloud Infrastructure Log Analytics service.

Updates the category assignments of DASHBOARD and SAVEDSEARCH resources.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testLogAnalyticsResourceCategoriesManagement = new oci.loganalytics.LogAnalyticsResourceCategoriesManagement("test_log_analytics_resource_categories_management", {
    namespace: logAnalyticsResourceCategoriesManagementNamespace,
    resourceId: ociLogAnalyticsResourceCategoriesManagementResourceId,
    resourceType: logAnalyticsResourceCategoriesManagementResourceType,
    resourceCategories: logAnalyticsResourceCategoriesManagementResourceCategories,
});
Copy
import pulumi
import pulumi_oci as oci

test_log_analytics_resource_categories_management = oci.log_analytics.LogAnalyticsResourceCategoriesManagement("test_log_analytics_resource_categories_management",
    namespace=log_analytics_resource_categories_management_namespace,
    resource_id=oci_log_analytics_resource_categories_management_resource_id,
    resource_type=log_analytics_resource_categories_management_resource_type,
    resource_categories=log_analytics_resource_categories_management_resource_categories)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/loganalytics"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := loganalytics.NewLogAnalyticsResourceCategoriesManagement(ctx, "test_log_analytics_resource_categories_management", &loganalytics.LogAnalyticsResourceCategoriesManagementArgs{
			Namespace:          pulumi.Any(logAnalyticsResourceCategoriesManagementNamespace),
			ResourceId:         pulumi.Any(ociLogAnalyticsResourceCategoriesManagementResourceId),
			ResourceType:       pulumi.Any(logAnalyticsResourceCategoriesManagementResourceType),
			ResourceCategories: pulumi.Any(logAnalyticsResourceCategoriesManagementResourceCategories),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testLogAnalyticsResourceCategoriesManagement = new Oci.LogAnalytics.LogAnalyticsResourceCategoriesManagement("test_log_analytics_resource_categories_management", new()
    {
        Namespace = logAnalyticsResourceCategoriesManagementNamespace,
        ResourceId = ociLogAnalyticsResourceCategoriesManagementResourceId,
        ResourceType = logAnalyticsResourceCategoriesManagementResourceType,
        ResourceCategories = logAnalyticsResourceCategoriesManagementResourceCategories,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.LogAnalytics.LogAnalyticsResourceCategoriesManagement;
import com.pulumi.oci.LogAnalytics.LogAnalyticsResourceCategoriesManagementArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var testLogAnalyticsResourceCategoriesManagement = new LogAnalyticsResourceCategoriesManagement("testLogAnalyticsResourceCategoriesManagement", LogAnalyticsResourceCategoriesManagementArgs.builder()
            .namespace(logAnalyticsResourceCategoriesManagementNamespace)
            .resourceId(ociLogAnalyticsResourceCategoriesManagementResourceId)
            .resourceType(logAnalyticsResourceCategoriesManagementResourceType)
            .resourceCategories(logAnalyticsResourceCategoriesManagementResourceCategories)
            .build());

    }
}
Copy
resources:
  testLogAnalyticsResourceCategoriesManagement:
    type: oci:LogAnalytics:LogAnalyticsResourceCategoriesManagement
    name: test_log_analytics_resource_categories_management
    properties:
      namespace: ${logAnalyticsResourceCategoriesManagementNamespace}
      resourceId: ${ociLogAnalyticsResourceCategoriesManagementResourceId}
      resourceType: ${logAnalyticsResourceCategoriesManagementResourceType}
      resourceCategories: ${logAnalyticsResourceCategoriesManagementResourceCategories}
Copy

Create LogAnalyticsResourceCategoriesManagement Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LogAnalyticsResourceCategoriesManagement(name: string, args: LogAnalyticsResourceCategoriesManagementArgs, opts?: CustomResourceOptions);
@overload
def LogAnalyticsResourceCategoriesManagement(resource_name: str,
                                             args: LogAnalyticsResourceCategoriesManagementArgs,
                                             opts: Optional[ResourceOptions] = None)

@overload
def LogAnalyticsResourceCategoriesManagement(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             namespace: Optional[str] = None,
                                             resource_categories: Optional[Sequence[str]] = None,
                                             resource_id: Optional[str] = None,
                                             resource_type: Optional[str] = None)
func NewLogAnalyticsResourceCategoriesManagement(ctx *Context, name string, args LogAnalyticsResourceCategoriesManagementArgs, opts ...ResourceOption) (*LogAnalyticsResourceCategoriesManagement, error)
public LogAnalyticsResourceCategoriesManagement(string name, LogAnalyticsResourceCategoriesManagementArgs args, CustomResourceOptions? opts = null)
public LogAnalyticsResourceCategoriesManagement(String name, LogAnalyticsResourceCategoriesManagementArgs args)
public LogAnalyticsResourceCategoriesManagement(String name, LogAnalyticsResourceCategoriesManagementArgs args, CustomResourceOptions options)
type: oci:LogAnalytics:LogAnalyticsResourceCategoriesManagement
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LogAnalyticsResourceCategoriesManagementArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LogAnalyticsResourceCategoriesManagementArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LogAnalyticsResourceCategoriesManagementArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LogAnalyticsResourceCategoriesManagementArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LogAnalyticsResourceCategoriesManagementArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var logAnalyticsResourceCategoriesManagementResource = new Oci.LogAnalytics.LogAnalyticsResourceCategoriesManagement("logAnalyticsResourceCategoriesManagementResource", new()
{
    Namespace = "string",
    ResourceCategories = new[]
    {
        "string",
    },
    ResourceId = "string",
    ResourceType = "string",
});
Copy
example, err := LogAnalytics.NewLogAnalyticsResourceCategoriesManagement(ctx, "logAnalyticsResourceCategoriesManagementResource", &LogAnalytics.LogAnalyticsResourceCategoriesManagementArgs{
	Namespace: pulumi.String("string"),
	ResourceCategories: pulumi.StringArray{
		pulumi.String("string"),
	},
	ResourceId:   pulumi.String("string"),
	ResourceType: pulumi.String("string"),
})
Copy
var logAnalyticsResourceCategoriesManagementResource = new LogAnalyticsResourceCategoriesManagement("logAnalyticsResourceCategoriesManagementResource", LogAnalyticsResourceCategoriesManagementArgs.builder()
    .namespace("string")
    .resourceCategories("string")
    .resourceId("string")
    .resourceType("string")
    .build());
Copy
log_analytics_resource_categories_management_resource = oci.log_analytics.LogAnalyticsResourceCategoriesManagement("logAnalyticsResourceCategoriesManagementResource",
    namespace="string",
    resource_categories=["string"],
    resource_id="string",
    resource_type="string")
Copy
const logAnalyticsResourceCategoriesManagementResource = new oci.loganalytics.LogAnalyticsResourceCategoriesManagement("logAnalyticsResourceCategoriesManagementResource", {
    namespace: "string",
    resourceCategories: ["string"],
    resourceId: "string",
    resourceType: "string",
});
Copy
type: oci:LogAnalytics:LogAnalyticsResourceCategoriesManagement
properties:
    namespace: string
    resourceCategories:
        - string
    resourceId: string
    resourceType: string
Copy

LogAnalyticsResourceCategoriesManagement Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LogAnalyticsResourceCategoriesManagement resource accepts the following input properties:

Namespace
This property is required.
Changes to this property will trigger replacement.
string
The Logging Analytics namespace used for the request.
ResourceCategories This property is required. List<string>
The list of categories to be assigned to the resource.
ResourceId
This property is required.
Changes to this property will trigger replacement.
string
The resource unique identifier for which catagories are managed.
ResourceType
This property is required.
Changes to this property will trigger replacement.
string

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Namespace
This property is required.
Changes to this property will trigger replacement.
string
The Logging Analytics namespace used for the request.
ResourceCategories This property is required. []string
The list of categories to be assigned to the resource.
ResourceId
This property is required.
Changes to this property will trigger replacement.
string
The resource unique identifier for which catagories are managed.
ResourceType
This property is required.
Changes to this property will trigger replacement.
string

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace
This property is required.
Changes to this property will trigger replacement.
String
The Logging Analytics namespace used for the request.
resourceCategories This property is required. List<String>
The list of categories to be assigned to the resource.
resourceId
This property is required.
Changes to this property will trigger replacement.
String
The resource unique identifier for which catagories are managed.
resourceType
This property is required.
Changes to this property will trigger replacement.
String

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace
This property is required.
Changes to this property will trigger replacement.
string
The Logging Analytics namespace used for the request.
resourceCategories This property is required. string[]
The list of categories to be assigned to the resource.
resourceId
This property is required.
Changes to this property will trigger replacement.
string
The resource unique identifier for which catagories are managed.
resourceType
This property is required.
Changes to this property will trigger replacement.
string

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace
This property is required.
Changes to this property will trigger replacement.
str
The Logging Analytics namespace used for the request.
resource_categories This property is required. Sequence[str]
The list of categories to be assigned to the resource.
resource_id
This property is required.
Changes to this property will trigger replacement.
str
The resource unique identifier for which catagories are managed.
resource_type
This property is required.
Changes to this property will trigger replacement.
str

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace
This property is required.
Changes to this property will trigger replacement.
String
The Logging Analytics namespace used for the request.
resourceCategories This property is required. List<String>
The list of categories to be assigned to the resource.
resourceId
This property is required.
Changes to this property will trigger replacement.
String
The resource unique identifier for which catagories are managed.
resourceType
This property is required.
Changes to this property will trigger replacement.
String

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Outputs

All input properties are implicitly available as output properties. Additionally, the LogAnalyticsResourceCategoriesManagement resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing LogAnalyticsResourceCategoriesManagement Resource

Get an existing LogAnalyticsResourceCategoriesManagement resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LogAnalyticsResourceCategoriesManagementState, opts?: CustomResourceOptions): LogAnalyticsResourceCategoriesManagement
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        namespace: Optional[str] = None,
        resource_categories: Optional[Sequence[str]] = None,
        resource_id: Optional[str] = None,
        resource_type: Optional[str] = None) -> LogAnalyticsResourceCategoriesManagement
func GetLogAnalyticsResourceCategoriesManagement(ctx *Context, name string, id IDInput, state *LogAnalyticsResourceCategoriesManagementState, opts ...ResourceOption) (*LogAnalyticsResourceCategoriesManagement, error)
public static LogAnalyticsResourceCategoriesManagement Get(string name, Input<string> id, LogAnalyticsResourceCategoriesManagementState? state, CustomResourceOptions? opts = null)
public static LogAnalyticsResourceCategoriesManagement get(String name, Output<String> id, LogAnalyticsResourceCategoriesManagementState state, CustomResourceOptions options)
resources:  _:    type: oci:LogAnalytics:LogAnalyticsResourceCategoriesManagement    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Namespace Changes to this property will trigger replacement. string
The Logging Analytics namespace used for the request.
ResourceCategories List<string>
The list of categories to be assigned to the resource.
ResourceId Changes to this property will trigger replacement. string
The resource unique identifier for which catagories are managed.
ResourceType Changes to this property will trigger replacement. string

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Namespace Changes to this property will trigger replacement. string
The Logging Analytics namespace used for the request.
ResourceCategories []string
The list of categories to be assigned to the resource.
ResourceId Changes to this property will trigger replacement. string
The resource unique identifier for which catagories are managed.
ResourceType Changes to this property will trigger replacement. string

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace Changes to this property will trigger replacement. String
The Logging Analytics namespace used for the request.
resourceCategories List<String>
The list of categories to be assigned to the resource.
resourceId Changes to this property will trigger replacement. String
The resource unique identifier for which catagories are managed.
resourceType Changes to this property will trigger replacement. String

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace Changes to this property will trigger replacement. string
The Logging Analytics namespace used for the request.
resourceCategories string[]
The list of categories to be assigned to the resource.
resourceId Changes to this property will trigger replacement. string
The resource unique identifier for which catagories are managed.
resourceType Changes to this property will trigger replacement. string

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace Changes to this property will trigger replacement. str
The Logging Analytics namespace used for the request.
resource_categories Sequence[str]
The list of categories to be assigned to the resource.
resource_id Changes to this property will trigger replacement. str
The resource unique identifier for which catagories are managed.
resource_type Changes to this property will trigger replacement. str

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

namespace Changes to this property will trigger replacement. String
The Logging Analytics namespace used for the request.
resourceCategories List<String>
The list of categories to be assigned to the resource.
resourceId Changes to this property will trigger replacement. String
The resource unique identifier for which catagories are managed.
resourceType Changes to this property will trigger replacement. String

The resource type of the resource for which categories are managed.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Import

LogAnalyticsResourceCategoriesManagement cannot be imported.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.