oci logo
Oracle Cloud Infrastructure v0.12.0, Mar 17 23

oci.LogAnalytics.LogAnalyticsLogGroup

This resource provides the Log Analytics Log Group resource in Oracle Cloud Infrastructure Log Analytics service.

Creates a new log group in the specified compartment with the input display name. You may also specify optional information such as description, defined tags, and free-form tags.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testLogAnalyticsLogGroup = new Oci.LogAnalytics.LogAnalyticsLogGroup("testLogAnalyticsLogGroup", new()
    {
        CompartmentId = @var.Compartment_id,
        DisplayName = @var.Log_analytics_log_group_display_name,
        Namespace = @var.Log_analytics_log_group_namespace,
        DefinedTags = 
        {
            { "foo-namespace.bar-key", "value" },
        },
        Description = @var.Log_analytics_log_group_description,
        FreeformTags = 
        {
            { "bar-key", "value" },
        },
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := LogAnalytics.NewLogAnalyticsLogGroup(ctx, "testLogAnalyticsLogGroup", &LogAnalytics.LogAnalyticsLogGroupArgs{
			CompartmentId: pulumi.Any(_var.Compartment_id),
			DisplayName:   pulumi.Any(_var.Log_analytics_log_group_display_name),
			Namespace:     pulumi.Any(_var.Log_analytics_log_group_namespace),
			DefinedTags: pulumi.AnyMap{
				"foo-namespace.bar-key": pulumi.Any("value"),
			},
			Description: pulumi.Any(_var.Log_analytics_log_group_description),
			FreeformTags: pulumi.AnyMap{
				"bar-key": pulumi.Any("value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.LogAnalytics.LogAnalyticsLogGroup;
import com.pulumi.oci.LogAnalytics.LogAnalyticsLogGroupArgs;
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 testLogAnalyticsLogGroup = new LogAnalyticsLogGroup("testLogAnalyticsLogGroup", LogAnalyticsLogGroupArgs.builder()        
            .compartmentId(var_.compartment_id())
            .displayName(var_.log_analytics_log_group_display_name())
            .namespace(var_.log_analytics_log_group_namespace())
            .definedTags(Map.of("foo-namespace.bar-key", "value"))
            .description(var_.log_analytics_log_group_description())
            .freeformTags(Map.of("bar-key", "value"))
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_log_analytics_log_group = oci.log_analytics.LogAnalyticsLogGroup("testLogAnalyticsLogGroup",
    compartment_id=var["compartment_id"],
    display_name=var["log_analytics_log_group_display_name"],
    namespace=var["log_analytics_log_group_namespace"],
    defined_tags={
        "foo-namespace.bar-key": "value",
    },
    description=var["log_analytics_log_group_description"],
    freeform_tags={
        "bar-key": "value",
    })
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testLogAnalyticsLogGroup = new oci.loganalytics.LogAnalyticsLogGroup("testLogAnalyticsLogGroup", {
    compartmentId: _var.compartment_id,
    displayName: _var.log_analytics_log_group_display_name,
    namespace: _var.log_analytics_log_group_namespace,
    definedTags: {
        "foo-namespace.bar-key": "value",
    },
    description: _var.log_analytics_log_group_description,
    freeformTags: {
        "bar-key": "value",
    },
});
resources:
  testLogAnalyticsLogGroup:
    type: oci:LogAnalytics:LogAnalyticsLogGroup
    properties:
      #Required
      compartmentId: ${var.compartment_id}
      displayName: ${var.log_analytics_log_group_display_name}
      namespace: ${var.log_analytics_log_group_namespace}
      #Optional
      definedTags:
        foo-namespace.bar-key: value
      description: ${var.log_analytics_log_group_description}
      freeformTags:
        bar-key: value

Create LogAnalyticsLogGroup Resource

new LogAnalyticsLogGroup(name: string, args: LogAnalyticsLogGroupArgs, opts?: CustomResourceOptions);
@overload
def LogAnalyticsLogGroup(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         compartment_id: Optional[str] = None,
                         defined_tags: Optional[Mapping[str, Any]] = None,
                         description: Optional[str] = None,
                         display_name: Optional[str] = None,
                         freeform_tags: Optional[Mapping[str, Any]] = None,
                         namespace: Optional[str] = None)
@overload
def LogAnalyticsLogGroup(resource_name: str,
                         args: LogAnalyticsLogGroupArgs,
                         opts: Optional[ResourceOptions] = None)
func NewLogAnalyticsLogGroup(ctx *Context, name string, args LogAnalyticsLogGroupArgs, opts ...ResourceOption) (*LogAnalyticsLogGroup, error)
public LogAnalyticsLogGroup(string name, LogAnalyticsLogGroupArgs args, CustomResourceOptions? opts = null)
public LogAnalyticsLogGroup(String name, LogAnalyticsLogGroupArgs args)
public LogAnalyticsLogGroup(String name, LogAnalyticsLogGroupArgs args, CustomResourceOptions options)
type: oci:LogAnalytics:LogAnalyticsLogGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

LogAnalyticsLogGroup Resource Properties

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

Inputs

The LogAnalyticsLogGroup resource accepts the following input properties:

CompartmentId string

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

DisplayName string

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

Namespace string

The Logging Analytics namespace used for the request.

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

(Updatable) Description for this resource.

FreeformTags Dictionary<string, object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

CompartmentId string

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

DisplayName string

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

Namespace string

The Logging Analytics namespace used for the request.

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

(Updatable) Description for this resource.

FreeformTags map[string]interface{}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

compartmentId String

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

displayName String

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

namespace String

The Logging Analytics namespace used for the request.

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

(Updatable) Description for this resource.

freeformTags Map<String,Object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

compartmentId string

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

displayName string

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

namespace string

The Logging Analytics namespace used for the request.

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description string

(Updatable) Description for this resource.

freeformTags {[key: string]: any}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

compartment_id str

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

display_name str

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

namespace str

The Logging Analytics namespace used for the request.

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description str

(Updatable) Description for this resource.

freeform_tags Mapping[str, Any]

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

compartmentId String

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

displayName String

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

namespace String

The Logging Analytics namespace used for the request.

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

(Updatable) Description for this resource.

freeformTags Map<Any>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

TimeCreated string

The date and time the resource was created, in the format defined by RFC3339.

TimeUpdated string

The date and time the resource was last updated, in the format defined by RFC3339.

Id string

The provider-assigned unique ID for this managed resource.

TimeCreated string

The date and time the resource was created, in the format defined by RFC3339.

TimeUpdated string

The date and time the resource was last updated, in the format defined by RFC3339.

id String

The provider-assigned unique ID for this managed resource.

timeCreated String

The date and time the resource was created, in the format defined by RFC3339.

timeUpdated String

The date and time the resource was last updated, in the format defined by RFC3339.

id string

The provider-assigned unique ID for this managed resource.

timeCreated string

The date and time the resource was created, in the format defined by RFC3339.

timeUpdated string

The date and time the resource was last updated, in the format defined by RFC3339.

id str

The provider-assigned unique ID for this managed resource.

time_created str

The date and time the resource was created, in the format defined by RFC3339.

time_updated str

The date and time the resource was last updated, in the format defined by RFC3339.

id String

The provider-assigned unique ID for this managed resource.

timeCreated String

The date and time the resource was created, in the format defined by RFC3339.

timeUpdated String

The date and time the resource was last updated, in the format defined by RFC3339.

Look up Existing LogAnalyticsLogGroup Resource

Get an existing LogAnalyticsLogGroup 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?: LogAnalyticsLogGroupState, opts?: CustomResourceOptions): LogAnalyticsLogGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None,
        namespace: Optional[str] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None) -> LogAnalyticsLogGroup
func GetLogAnalyticsLogGroup(ctx *Context, name string, id IDInput, state *LogAnalyticsLogGroupState, opts ...ResourceOption) (*LogAnalyticsLogGroup, error)
public static LogAnalyticsLogGroup Get(string name, Input<string> id, LogAnalyticsLogGroupState? state, CustomResourceOptions? opts = null)
public static LogAnalyticsLogGroup get(String name, Output<String> id, LogAnalyticsLogGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:
CompartmentId string

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

(Updatable) Description for this resource.

DisplayName string

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

FreeformTags Dictionary<string, object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

Namespace string

The Logging Analytics namespace used for the request.

TimeCreated string

The date and time the resource was created, in the format defined by RFC3339.

TimeUpdated string

The date and time the resource was last updated, in the format defined by RFC3339.

CompartmentId string

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

(Updatable) Description for this resource.

DisplayName string

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

FreeformTags map[string]interface{}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

Namespace string

The Logging Analytics namespace used for the request.

TimeCreated string

The date and time the resource was created, in the format defined by RFC3339.

TimeUpdated string

The date and time the resource was last updated, in the format defined by RFC3339.

compartmentId String

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

(Updatable) Description for this resource.

displayName String

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

freeformTags Map<String,Object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

namespace String

The Logging Analytics namespace used for the request.

timeCreated String

The date and time the resource was created, in the format defined by RFC3339.

timeUpdated String

The date and time the resource was last updated, in the format defined by RFC3339.

compartmentId string

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description string

(Updatable) Description for this resource.

displayName string

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

freeformTags {[key: string]: any}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

namespace string

The Logging Analytics namespace used for the request.

timeCreated string

The date and time the resource was created, in the format defined by RFC3339.

timeUpdated string

The date and time the resource was last updated, in the format defined by RFC3339.

compartment_id str

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description str

(Updatable) Description for this resource.

display_name str

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

freeform_tags Mapping[str, Any]

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

namespace str

The Logging Analytics namespace used for the request.

time_created str

The date and time the resource was created, in the format defined by RFC3339.

time_updated str

The date and time the resource was last updated, in the format defined by RFC3339.

compartmentId String

(Updatable) Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

(Updatable) Description for this resource.

displayName String

(Updatable) A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.

freeformTags Map<Any>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

namespace String

The Logging Analytics namespace used for the request.

timeCreated String

The date and time the resource was created, in the format defined by RFC3339.

timeUpdated String

The date and time the resource was last updated, in the format defined by RFC3339.

Import

LogAnalyticsLogGroups can be imported using the id, e.g.

 $ pulumi import oci:LogAnalytics/logAnalyticsLogGroup:LogAnalyticsLogGroup test_log_analytics_log_group "namespaces/{namespaceName}/logAnalyticsLogGroups/{logAnalyticsLogGroupId}"

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.