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=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)
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:
- Display
Name string - (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
- Log
Group stringId - (Updatable) OCID of a log group to work with.
- Log
Type string - The logType that the log object is for, whether custom or service.
- Configuration
Log
Configuration - Log object configuration.
- 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"}
- 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"}
- 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
- Display
Name string - (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
- Log
Group stringId - (Updatable) OCID of a log group to work with.
- Log
Type string - The logType that the log object is for, whether custom or service.
- Configuration
Log
Configuration Args - Log object configuration.
- 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"}
- 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"}
- 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
- display
Name String - (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
- log
Group StringId - (Updatable) OCID of a log group to work with.
- log
Type String - The logType that the log object is for, whether custom or service.
- configuration
Log
Configuration - Log object configuration.
- 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"}
- 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"}
- is
Enabled Boolean - (Updatable) Whether or not this resource is currently enabled.
- retention
Duration 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
- display
Name string - (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
- log
Group stringId - (Updatable) OCID of a log group to work with.
- log
Type string - The logType that the log object is for, whether custom or service.
- configuration
Log
Configuration - Log object configuration.
- {[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"}
- {[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"}
- is
Enabled boolean - (Updatable) Whether or not this resource is currently enabled.
- retention
Duration 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
logging.
Log Configuration Args - Log object configuration.
- 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"}
- 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
- display
Name String - (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
- log
Group StringId - (Updatable) OCID of a log group to work with.
- log
Type String - The logType that the log object is for, whether custom or service.
- configuration Property Map
- Log object configuration.
- 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"}
- 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"}
- is
Enabled Boolean - (Updatable) Whether or not this resource is currently enabled.
- retention
Duration 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:
- Compartment
Id 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.
- Tenancy
Id string - The OCID of the tenancy.
- Time
Created string - Time the resource was created.
- Time
Last stringModified - Time the resource was last modified.
- Compartment
Id 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.
- Tenancy
Id string - The OCID of the tenancy.
- Time
Created string - Time the resource was created.
- Time
Last stringModified - Time the resource was last modified.
- compartment
Id 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.
- tenancy
Id String - The OCID of the tenancy.
- time
Created String - Time the resource was created.
- time
Last StringModified - Time the resource was last modified.
- compartment
Id 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.
- tenancy
Id string - The OCID of the tenancy.
- time
Created string - Time the resource was created.
- time
Last 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.
- compartment
Id 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.
- tenancy
Id String - The OCID of the tenancy.
- time
Created String - Time the resource was created.
- time
Last 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[_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.
- Compartment
Id string - The OCID of the compartment that the resource belongs to.
- Configuration
Log
Configuration - Log object configuration.
- 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"}
- Display
Name 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, 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"}
- Is
Enabled bool - (Updatable) Whether or not this resource is currently enabled.
- Log
Group stringId - (Updatable) OCID of a log group to work with.
- Log
Type string - 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 string
- The pipeline state.
- Tenancy
Id string - The OCID of the tenancy.
- Time
Created string - Time the resource was created.
- Time
Last stringModified - Time the resource was last modified.
- Compartment
Id string - The OCID of the compartment that the resource belongs to.
- Configuration
Log
Configuration Args - Log object configuration.
- 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"}
- Display
Name 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]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"}
- Is
Enabled bool - (Updatable) Whether or not this resource is currently enabled.
- Log
Group stringId - (Updatable) OCID of a log group to work with.
- Log
Type string - 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 string
- The pipeline state.
- Tenancy
Id string - The OCID of the tenancy.
- Time
Created string - Time the resource was created.
- Time
Last stringModified - Time the resource was last modified.
- compartment
Id String - The OCID of the compartment that the resource belongs to.
- configuration
Log
Configuration - Log object configuration.
- 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"}
- display
Name 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,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"}
- is
Enabled Boolean - (Updatable) Whether or not this resource is currently enabled.
- log
Group StringId - (Updatable) OCID of a log group to work with.
- log
Type String - The logType that the log object is for, whether custom or service.
- retention
Duration 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.
- tenancy
Id String - The OCID of the tenancy.
- time
Created String - Time the resource was created.
- time
Last StringModified - Time the resource was last modified.
- compartment
Id string - The OCID of the compartment that the resource belongs to.
- configuration
Log
Configuration - Log object configuration.
- {[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"}
- display
Name 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]: 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 boolean - (Updatable) Whether or not this resource is currently enabled.
- log
Group stringId - (Updatable) OCID of a log group to work with.
- log
Type string - The logType that the log object is for, whether custom or service.
- retention
Duration 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.
- tenancy
Id string - The OCID of the tenancy.
- time
Created string - Time the resource was created.
- time
Last stringModified - Time the resource was last modified.
- compartment_
id str - The OCID of the compartment that the resource belongs to.
- configuration
logging.
Log Configuration Args - Log object configuration.
- 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.
- 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_ 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.
- compartment
Id String - The OCID of the compartment that the resource belongs to.
- configuration Property Map
- Log object configuration.
- 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"}
- display
Name String - (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
- 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"}
- is
Enabled Boolean - (Updatable) Whether or not this resource is currently enabled.
- log
Group StringId - (Updatable) OCID of a log group to work with.
- log
Type String - The logType that the log object is for, whether custom or service.
- retention
Duration 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.
- tenancy
Id String - The OCID of the tenancy.
- time
Created String - Time the resource was created.
- time
Last StringModified - Time the resource was last modified.
Supporting Types
LogConfiguration, LogConfigurationArgs
- Source
Log
Configuration Source - The source the log object comes from.
- Compartment
Id string - The OCID of the compartment that the resource belongs to.
- Source
Log
Configuration Source - The source the log object comes from.
- Compartment
Id string - The OCID of the compartment that the resource belongs to.
- source
Log
Configuration Source - The source the log object comes from.
- compartment
Id String - The OCID of the compartment that the resource belongs to.
- source
Log
Configuration Source - The source the log object comes from.
- compartment
Id string - The OCID of the compartment that the resource belongs to.
- source
logging.
Log Configuration 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.
- compartment
Id 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.
- Source
Type 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.
- Source
Type 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.
- source
Type 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.
- source
Type 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.
- source
Type 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.