oci.Logging.Log
Explore with Pulumi AI
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={
        "source": {
            "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/v2/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.StringMap{
				"Operations.CostCenter": pulumi.String("42"),
			},
			FreeformTags: pulumi.StringMap{
				"Department": pulumi.String("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[LogConfigurationArgs] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        freeform_tags: Optional[Mapping[str, str]] = 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)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", "string" },
            },
        },
        CompartmentId = "string",
    },
    DefinedTags = 
    {
        { "string", "string" },
    },
    FreeformTags = 
    {
        { "string", "string" },
    },
    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.StringMap{
				"string": pulumi.String("string"),
			},
		},
		CompartmentId: pulumi.String("string"),
	},
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	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", "string"))
            .build())
        .compartmentId("string")
        .build())
    .definedTags(Map.of("string", "string"))
    .freeformTags(Map.of("string", "string"))
    .isEnabled(false)
    .retentionDuration(0)
    .build());
log_resource = oci.logging.Log("logResource",
    display_name="string",
    log_group_id="string",
    log_type="string",
    configuration={
        "source": {
            "category": "string",
            "resource": "string",
            "service": "string",
            "source_type": "string",
            "parameters": {
                "string": "string",
            },
        },
        "compartment_id": "string",
    },
    defined_tags={
        "string": "string",
    },
    freeform_tags={
        "string": "string",
    },
    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: "string",
            },
        },
        compartmentId: "string",
    },
    definedTags: {
        string: "string",
    },
    freeformTags: {
        string: "string",
    },
    isEnabled: false,
    retentionDuration: 0,
});
type: oci:Logging:Log
properties:
    configuration:
        compartmentId: string
        source:
            category: string
            parameters:
                string: string
            resource: string
            service: string
            sourceType: string
    definedTags:
        string: string
    displayName: string
    freeformTags:
        string: string
    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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- LogGroup stringId 
- (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.
- Dictionary<string, string>
- (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"}
- Dictionary<string, string>
- (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.
- LogGroup stringId 
- (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 Args 
- Log object configuration.
- map[string]string
- (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"}
- map[string]string
- (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.
- logGroup StringId 
- (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.
- Map<String,String>
- (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"}
- Map<String,String>
- (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.
- logGroup stringId 
- (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.
- {[key: string]: string}
- (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"}
- {[key: string]: string}
- (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_ strid 
- (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
LogConfiguration Args 
- Log object configuration.
- Mapping[str, str]
- (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"}
- Mapping[str, str]
- (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.
- logGroup StringId 
- (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.
- Map<String>
- (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"}
- Map<String>
- (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.
- TimeLast stringModified 
- 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.
- TimeLast stringModified 
- 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.
- timeLast StringModified 
- 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.
- timeLast stringModified 
- 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_ strmodified 
- 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.
- timeLast StringModified 
- 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[LogConfigurationArgs] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = 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) -> Logfunc 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)resources:  _:    type: oci:Logging:Log    get:      id: ${id}- 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.
- CompartmentId string
- The OCID of the compartment that the resource belongs to.
- Configuration
LogConfiguration 
- Log object configuration.
- Dictionary<string, string>
- (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.
- Dictionary<string, string>
- (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.
- LogGroup stringId 
- (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.
- TimeLast stringModified 
- Time the resource was last modified.
- CompartmentId string
- The OCID of the compartment that the resource belongs to.
- Configuration
LogConfiguration Args 
- Log object configuration.
- map[string]string
- (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.
- map[string]string
- (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.
- LogGroup stringId 
- (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.
- TimeLast stringModified 
- Time the resource was last modified.
- compartmentId String
- The OCID of the compartment that the resource belongs to.
- configuration
LogConfiguration 
- Log object configuration.
- Map<String,String>
- (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.
- Map<String,String>
- (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.
- logGroup StringId 
- (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.
- timeLast StringModified 
- Time the resource was last modified.
- compartmentId string
- The OCID of the compartment that the resource belongs to.
- configuration
LogConfiguration 
- Log object configuration.
- {[key: string]: string}
- (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.
- {[key: string]: string}
- (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.
- logGroup stringId 
- (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.
- timeLast stringModified 
- Time the resource was last modified.
- compartment_id str
- The OCID of the compartment that the resource belongs to.
- configuration
LogConfiguration Args 
- Log object configuration.
- Mapping[str, str]
- (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.
- Mapping[str, str]
- (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_ strid 
- (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_ strmodified 
- Time the resource was last modified.
- compartmentId String
- The OCID of the compartment that the resource belongs to.
- configuration Property Map
- Log object configuration.
- Map<String>
- (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.
- Map<String>
- (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.
- logGroup StringId 
- (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.
- timeLast StringModified 
- Time the resource was last modified.
Supporting Types
LogConfiguration, LogConfigurationArgs    
- Source
LogConfiguration Source 
- The source the log object comes from.
- CompartmentId string
- The OCID of the compartment that the resource belongs to.
- Source
LogConfiguration Source 
- The source the log object comes from.
- CompartmentId string
- The OCID of the compartment that the resource belongs to.
- source
LogConfiguration Source 
- The source the log object comes from.
- compartmentId String
- The OCID of the compartment that the resource belongs to.
- source
LogConfiguration Source 
- The source the log object comes from.
- compartmentId string
- The OCID of the compartment that the resource belongs to.
- source
LogConfiguration Source 
- 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, string>
- (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]string
- (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,String>
- (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]: string}
- (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, str]
- (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>
- (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 ociTerraform Provider.