1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Logging
  5. Log
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Logging.Log

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This resource provides the Log resource in Oracle Cloud Infrastructure Logging service.

    Creates a log within the specified log group. This call fails if a log group has already been created with the same displayName or (service, resource, category) triplet.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLog = new oci.logging.Log("test_log", {
        displayName: logDisplayName,
        logGroupId: testLogGroup.id,
        logType: logLogType,
        configuration: {
            source: {
                category: logConfigurationSourceCategory,
                resource: logConfigurationSourceResource,
                service: logConfigurationSourceService,
                sourceType: logConfigurationSourceSourceType,
                parameters: logConfigurationSourceParameters,
            },
            compartmentId: compartmentId,
        },
        definedTags: {
            "Operations.CostCenter": "42",
        },
        freeformTags: {
            Department: "Finance",
        },
        isEnabled: logIsEnabled,
        retentionDuration: logRetentionDuration,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_log = oci.logging.Log("test_log",
        display_name=log_display_name,
        log_group_id=test_log_group["id"],
        log_type=log_log_type,
        configuration=oci.logging.LogConfigurationArgs(
            source=oci.logging.LogConfigurationSourceArgs(
                category=log_configuration_source_category,
                resource=log_configuration_source_resource,
                service=log_configuration_source_service,
                source_type=log_configuration_source_source_type,
                parameters=log_configuration_source_parameters,
            ),
            compartment_id=compartment_id,
        ),
        defined_tags={
            "Operations.CostCenter": "42",
        },
        freeform_tags={
            "Department": "Finance",
        },
        is_enabled=log_is_enabled,
        retention_duration=log_retention_duration)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Logging"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Logging.NewLog(ctx, "test_log", &Logging.LogArgs{
    			DisplayName: pulumi.Any(logDisplayName),
    			LogGroupId:  pulumi.Any(testLogGroup.Id),
    			LogType:     pulumi.Any(logLogType),
    			Configuration: &logging.LogConfigurationArgs{
    				Source: &logging.LogConfigurationSourceArgs{
    					Category:   pulumi.Any(logConfigurationSourceCategory),
    					Resource:   pulumi.Any(logConfigurationSourceResource),
    					Service:    pulumi.Any(logConfigurationSourceService),
    					SourceType: pulumi.Any(logConfigurationSourceSourceType),
    					Parameters: pulumi.Any(logConfigurationSourceParameters),
    				},
    				CompartmentId: pulumi.Any(compartmentId),
    			},
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    			IsEnabled:         pulumi.Any(logIsEnabled),
    			RetentionDuration: pulumi.Any(logRetentionDuration),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testLog = new Oci.Logging.Log("test_log", new()
        {
            DisplayName = logDisplayName,
            LogGroupId = testLogGroup.Id,
            LogType = logLogType,
            Configuration = new Oci.Logging.Inputs.LogConfigurationArgs
            {
                Source = new Oci.Logging.Inputs.LogConfigurationSourceArgs
                {
                    Category = logConfigurationSourceCategory,
                    Resource = logConfigurationSourceResource,
                    Service = logConfigurationSourceService,
                    SourceType = logConfigurationSourceSourceType,
                    Parameters = logConfigurationSourceParameters,
                },
                CompartmentId = compartmentId,
            },
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            IsEnabled = logIsEnabled,
            RetentionDuration = logRetentionDuration,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Logging.Log;
    import com.pulumi.oci.Logging.LogArgs;
    import com.pulumi.oci.Logging.inputs.LogConfigurationArgs;
    import com.pulumi.oci.Logging.inputs.LogConfigurationSourceArgs;
    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 testLog = new Log("testLog", LogArgs.builder()
                .displayName(logDisplayName)
                .logGroupId(testLogGroup.id())
                .logType(logLogType)
                .configuration(LogConfigurationArgs.builder()
                    .source(LogConfigurationSourceArgs.builder()
                        .category(logConfigurationSourceCategory)
                        .resource(logConfigurationSourceResource)
                        .service(logConfigurationSourceService)
                        .sourceType(logConfigurationSourceSourceType)
                        .parameters(logConfigurationSourceParameters)
                        .build())
                    .compartmentId(compartmentId)
                    .build())
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .freeformTags(Map.of("Department", "Finance"))
                .isEnabled(logIsEnabled)
                .retentionDuration(logRetentionDuration)
                .build());
    
        }
    }
    
    resources:
      testLog:
        type: oci:Logging:Log
        name: test_log
        properties:
          displayName: ${logDisplayName}
          logGroupId: ${testLogGroup.id}
          logType: ${logLogType}
          configuration:
            source:
              category: ${logConfigurationSourceCategory}
              resource: ${logConfigurationSourceResource}
              service: ${logConfigurationSourceService}
              sourceType: ${logConfigurationSourceSourceType}
              parameters: ${logConfigurationSourceParameters}
            compartmentId: ${compartmentId}
          definedTags:
            Operations.CostCenter: '42'
          freeformTags:
            Department: Finance
          isEnabled: ${logIsEnabled}
          retentionDuration: ${logRetentionDuration}
    

    Create Log Resource

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

    Constructor syntax

    new Log(name: string, args: LogArgs, opts?: CustomResourceOptions);
    @overload
    def Log(resource_name: str,
            args: LogArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Log(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            log_group_id: Optional[str] = None,
            log_type: Optional[str] = None,
            configuration: Optional[_logging.LogConfigurationArgs] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            is_enabled: Optional[bool] = None,
            retention_duration: Optional[int] = None)
    func NewLog(ctx *Context, name string, args LogArgs, opts ...ResourceOption) (*Log, error)
    public Log(string name, LogArgs args, CustomResourceOptions? opts = null)
    public Log(String name, LogArgs args)
    public Log(String name, LogArgs args, CustomResourceOptions options)
    
    type: oci:Logging:Log
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args LogArgs
    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 LogArgs
    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 LogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogArgs
    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 logResource = new Oci.Logging.Log("logResource", new()
    {
        DisplayName = "string",
        LogGroupId = "string",
        LogType = "string",
        Configuration = new Oci.Logging.Inputs.LogConfigurationArgs
        {
            Source = new Oci.Logging.Inputs.LogConfigurationSourceArgs
            {
                Category = "string",
                Resource = "string",
                Service = "string",
                SourceType = "string",
                Parameters = 
                {
                    { "string", "any" },
                },
            },
            CompartmentId = "string",
        },
        DefinedTags = 
        {
            { "string", "any" },
        },
        FreeformTags = 
        {
            { "string", "any" },
        },
        IsEnabled = false,
        RetentionDuration = 0,
    });
    
    example, err := Logging.NewLog(ctx, "logResource", &Logging.LogArgs{
    	DisplayName: pulumi.String("string"),
    	LogGroupId:  pulumi.String("string"),
    	LogType:     pulumi.String("string"),
    	Configuration: &logging.LogConfigurationArgs{
    		Source: &logging.LogConfigurationSourceArgs{
    			Category:   pulumi.String("string"),
    			Resource:   pulumi.String("string"),
    			Service:    pulumi.String("string"),
    			SourceType: pulumi.String("string"),
    			Parameters: pulumi.Map{
    				"string": pulumi.Any("any"),
    			},
    		},
    		CompartmentId: pulumi.String("string"),
    	},
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	IsEnabled:         pulumi.Bool(false),
    	RetentionDuration: pulumi.Int(0),
    })
    
    var logResource = new Log("logResource", LogArgs.builder()
        .displayName("string")
        .logGroupId("string")
        .logType("string")
        .configuration(LogConfigurationArgs.builder()
            .source(LogConfigurationSourceArgs.builder()
                .category("string")
                .resource("string")
                .service("string")
                .sourceType("string")
                .parameters(Map.of("string", "any"))
                .build())
            .compartmentId("string")
            .build())
        .definedTags(Map.of("string", "any"))
        .freeformTags(Map.of("string", "any"))
        .isEnabled(false)
        .retentionDuration(0)
        .build());
    
    log_resource = oci.logging.Log("logResource",
        display_name="string",
        log_group_id="string",
        log_type="string",
        configuration=oci.logging.LogConfigurationArgs(
            source=oci.logging.LogConfigurationSourceArgs(
                category="string",
                resource="string",
                service="string",
                source_type="string",
                parameters={
                    "string": "any",
                },
            ),
            compartment_id="string",
        ),
        defined_tags={
            "string": "any",
        },
        freeform_tags={
            "string": "any",
        },
        is_enabled=False,
        retention_duration=0)
    
    const logResource = new oci.logging.Log("logResource", {
        displayName: "string",
        logGroupId: "string",
        logType: "string",
        configuration: {
            source: {
                category: "string",
                resource: "string",
                service: "string",
                sourceType: "string",
                parameters: {
                    string: "any",
                },
            },
            compartmentId: "string",
        },
        definedTags: {
            string: "any",
        },
        freeformTags: {
            string: "any",
        },
        isEnabled: false,
        retentionDuration: 0,
    });
    
    type: oci:Logging:Log
    properties:
        configuration:
            compartmentId: string
            source:
                category: string
                parameters:
                    string: any
                resource: string
                service: string
                sourceType: string
        definedTags:
            string: any
        displayName: string
        freeformTags:
            string: any
        isEnabled: false
        logGroupId: string
        logType: string
        retentionDuration: 0
    

    Log 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 Log resource accepts the following input properties:

    DisplayName string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    LogGroupId string
    (Updatable) OCID of a log group to work with.
    LogType string
    The logType that the log object is for, whether custom or service.
    Configuration LogConfiguration
    Log object configuration.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    FreeformTags Dictionary<string, object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether or not this resource is currently enabled.
    RetentionDuration int

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    DisplayName string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    LogGroupId string
    (Updatable) OCID of a log group to work with.
    LogType string
    The logType that the log object is for, whether custom or service.
    Configuration LogConfigurationArgs
    Log object configuration.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    FreeformTags map[string]interface{}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether or not this resource is currently enabled.
    RetentionDuration int

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    displayName String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    logGroupId String
    (Updatable) OCID of a log group to work with.
    logType String
    The logType that the log object is for, whether custom or service.
    configuration LogConfiguration
    Log object configuration.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    freeformTags Map<String,Object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether or not this resource is currently enabled.
    retentionDuration Integer

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    displayName string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    logGroupId string
    (Updatable) OCID of a log group to work with.
    logType string
    The logType that the log object is for, whether custom or service.
    configuration LogConfiguration
    Log object configuration.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    freeformTags {[key: string]: any}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isEnabled boolean
    (Updatable) Whether or not this resource is currently enabled.
    retentionDuration number

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    display_name str
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    log_group_id str
    (Updatable) OCID of a log group to work with.
    log_type str
    The logType that the log object is for, whether custom or service.
    configuration logging.LogConfigurationArgs
    Log object configuration.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    freeform_tags Mapping[str, Any]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    is_enabled bool
    (Updatable) Whether or not this resource is currently enabled.
    retention_duration int

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    displayName String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    logGroupId String
    (Updatable) OCID of a log group to work with.
    logType String
    The logType that the log object is for, whether custom or service.
    configuration Property Map
    Log object configuration.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    freeformTags Map<Any>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether or not this resource is currently enabled.
    retentionDuration Number

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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 Log resource produces the following output properties:

    CompartmentId string
    The OCID of the compartment that the resource belongs to.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The pipeline state.
    TenancyId string
    The OCID of the tenancy.
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    CompartmentId string
    The OCID of the compartment that the resource belongs to.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The pipeline state.
    TenancyId string
    The OCID of the tenancy.
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    compartmentId String
    The OCID of the compartment that the resource belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The pipeline state.
    tenancyId String
    The OCID of the tenancy.
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.
    compartmentId string
    The OCID of the compartment that the resource belongs to.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The pipeline state.
    tenancyId string
    The OCID of the tenancy.
    timeCreated string
    Time the resource was created.
    timeLastModified string
    Time the resource was last modified.
    compartment_id str
    The OCID of the compartment that the resource belongs to.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The pipeline state.
    tenancy_id str
    The OCID of the tenancy.
    time_created str
    Time the resource was created.
    time_last_modified str
    Time the resource was last modified.
    compartmentId String
    The OCID of the compartment that the resource belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The pipeline state.
    tenancyId String
    The OCID of the tenancy.
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.

    Look up Existing Log Resource

    Get an existing Log 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?: LogState, opts?: CustomResourceOptions): Log
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            configuration: Optional[_logging.LogConfigurationArgs] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            is_enabled: Optional[bool] = None,
            log_group_id: Optional[str] = None,
            log_type: Optional[str] = None,
            retention_duration: Optional[int] = None,
            state: Optional[str] = None,
            tenancy_id: Optional[str] = None,
            time_created: Optional[str] = None,
            time_last_modified: Optional[str] = None) -> Log
    func GetLog(ctx *Context, name string, id IDInput, state *LogState, opts ...ResourceOption) (*Log, error)
    public static Log Get(string name, Input<string> id, LogState? state, CustomResourceOptions? opts = null)
    public static Log get(String name, Output<String> id, LogState 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
    The OCID of the compartment that the resource belongs to.
    Configuration LogConfiguration
    Log object configuration.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether or not this resource is currently enabled.
    LogGroupId string
    (Updatable) OCID of a log group to work with.
    LogType string
    The logType that the log object is for, whether custom or service.
    RetentionDuration int

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    State string
    The pipeline state.
    TenancyId string
    The OCID of the tenancy.
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    CompartmentId string
    The OCID of the compartment that the resource belongs to.
    Configuration LogConfigurationArgs
    Log object configuration.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether or not this resource is currently enabled.
    LogGroupId string
    (Updatable) OCID of a log group to work with.
    LogType string
    The logType that the log object is for, whether custom or service.
    RetentionDuration int

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    State string
    The pipeline state.
    TenancyId string
    The OCID of the tenancy.
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    compartmentId String
    The OCID of the compartment that the resource belongs to.
    configuration LogConfiguration
    Log object configuration.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether or not this resource is currently enabled.
    logGroupId String
    (Updatable) OCID of a log group to work with.
    logType String
    The logType that the log object is for, whether custom or service.
    retentionDuration Integer

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    state String
    The pipeline state.
    tenancyId String
    The OCID of the tenancy.
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.
    compartmentId string
    The OCID of the compartment that the resource belongs to.
    configuration LogConfiguration
    Log object configuration.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isEnabled boolean
    (Updatable) Whether or not this resource is currently enabled.
    logGroupId string
    (Updatable) OCID of a log group to work with.
    logType string
    The logType that the log object is for, whether custom or service.
    retentionDuration number

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    state string
    The pipeline state.
    tenancyId string
    The OCID of the tenancy.
    timeCreated string
    Time the resource was created.
    timeLastModified string
    Time the resource was last modified.
    compartment_id str
    The OCID of the compartment that the resource belongs to.
    configuration logging.LogConfigurationArgs
    Log object configuration.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    is_enabled bool
    (Updatable) Whether or not this resource is currently enabled.
    log_group_id str
    (Updatable) OCID of a log group to work with.
    log_type str
    The logType that the log object is for, whether custom or service.
    retention_duration int

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    state str
    The pipeline state.
    tenancy_id str
    The OCID of the tenancy.
    time_created str
    Time the resource was created.
    time_last_modified str
    Time the resource was last modified.
    compartmentId String
    The OCID of the compartment that the resource belongs to.
    configuration Property Map
    Log object configuration.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether or not this resource is currently enabled.
    logGroupId String
    (Updatable) OCID of a log group to work with.
    logType String
    The logType that the log object is for, whether custom or service.
    retentionDuration Number

    (Updatable) Log retention duration in 30-day increments (30, 60, 90 and so on until 180).

    ** 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

    state String
    The pipeline state.
    tenancyId String
    The OCID of the tenancy.
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.

    Supporting Types

    LogConfiguration, LogConfigurationArgs

    Source LogConfigurationSource
    The source the log object comes from.
    CompartmentId string
    The OCID of the compartment that the resource belongs to.
    Source LogConfigurationSource
    The source the log object comes from.
    CompartmentId string
    The OCID of the compartment that the resource belongs to.
    source LogConfigurationSource
    The source the log object comes from.
    compartmentId String
    The OCID of the compartment that the resource belongs to.
    source LogConfigurationSource
    The source the log object comes from.
    compartmentId string
    The OCID of the compartment that the resource belongs to.
    source logging.LogConfigurationSource
    The source the log object comes from.
    compartment_id str
    The OCID of the compartment that the resource belongs to.
    source Property Map
    The source the log object comes from.
    compartmentId String
    The OCID of the compartment that the resource belongs to.

    LogConfigurationSource, LogConfigurationSourceArgs

    Category string
    Log object category.
    Resource string
    The unique identifier of the resource emitting the log.
    Service string
    Service generating log.
    SourceType string
    The log source.

    • OCISERVICE: Oracle Service.
    Parameters Dictionary<string, object>
    (Updatable) Log category parameters are stored here.
    Category string
    Log object category.
    Resource string
    The unique identifier of the resource emitting the log.
    Service string
    Service generating log.
    SourceType string
    The log source.

    • OCISERVICE: Oracle Service.
    Parameters map[string]interface{}
    (Updatable) Log category parameters are stored here.
    category String
    Log object category.
    resource String
    The unique identifier of the resource emitting the log.
    service String
    Service generating log.
    sourceType String
    The log source.

    • OCISERVICE: Oracle Service.
    parameters Map<String,Object>
    (Updatable) Log category parameters are stored here.
    category string
    Log object category.
    resource string
    The unique identifier of the resource emitting the log.
    service string
    Service generating log.
    sourceType string
    The log source.

    • OCISERVICE: Oracle Service.
    parameters {[key: string]: any}
    (Updatable) Log category parameters are stored here.
    category str
    Log object category.
    resource str
    The unique identifier of the resource emitting the log.
    service str
    Service generating log.
    source_type str
    The log source.

    • OCISERVICE: Oracle Service.
    parameters Mapping[str, Any]
    (Updatable) Log category parameters are stored here.
    category String
    Log object category.
    resource String
    The unique identifier of the resource emitting the log.
    service String
    Service generating log.
    sourceType String
    The log source.

    • OCISERVICE: Oracle Service.
    parameters Map<Any>
    (Updatable) Log category parameters are stored here.

    Import

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

    $ pulumi import oci:Logging/log:Log test_log "logGroupId/{logGroupId}/logId/{logId}"
    

    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.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi