import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Log Analytics Object Collection Rule resource in Oracle Cloud Infrastructure Log Analytics service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/logan-api-spec/latest/LogAnalyticsObjectCollectionRule * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/log_analytics * * Create a configuration to collect logs from object storage bucket. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testLogAnalyticsObjectCollectionRule = new oci.loganalytics.LogAnalyticsObjectCollectionRule("test_log_analytics_object_collection_rule", { * compartmentId: compartmentId, * logGroupId: testLogAnalyticsLogGroup.id, * name: logAnalyticsObjectCollectionRuleName, * namespace: logAnalyticsObjectCollectionRuleNamespace, * osBucketName: testBucket.name, * osNamespace: logAnalyticsObjectCollectionRuleOsNamespace, * charEncoding: logAnalyticsObjectCollectionRuleCharEncoding, * collectionType: logAnalyticsObjectCollectionRuleCollectionType, * definedTags: { * "foo-namespace.bar-key": "value", * }, * description: logAnalyticsObjectCollectionRuleDescription, * entityId: testEntity.id, * freeformTags: { * "bar-key": "value", * }, * isEnabled: logAnalyticsObjectCollectionRuleIsEnabled === "true", * isForceHistoricCollection: logAnalyticsObjectCollectionRuleIsForceHistoricCollection === "true", * logSet: logAnalyticsObjectCollectionRuleLogSet, * logSetExtRegex: logAnalyticsObjectCollectionRuleLogSetExtRegex, * logSetKey: logAnalyticsObjectCollectionRuleLogSetKey, * logSourceName: logAnalyticsObjectCollectionRuleLogSourceName, * logType: logAnalyticsObjectCollectionRuleLogType, * objectNameFilters: logAnalyticsObjectCollectionRuleObjectNameFilters, * overrides: logAnalyticsObjectCollectionRuleOverrides, * pollSince: logAnalyticsObjectCollectionRulePollSince, * pollTill: logAnalyticsObjectCollectionRulePollTill, * streamCursorTime: logAnalyticsObjectCollectionRuleStreamCursorTime, * streamCursorType: logAnalyticsObjectCollectionRuleStreamCursorType, * streamId: testStream.id, * timezone: logAnalyticsObjectCollectionRuleTimezone, * }); * ``` * * ## Import * * LogAnalyticsObjectCollectionRules can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:LogAnalytics/logAnalyticsObjectCollectionRule:LogAnalyticsObjectCollectionRule test_log_analytics_object_collection_rule "namespaces/{namespaceName}/logAnalyticsObjectCollectionRules/{logAnalyticsObjectCollectionRuleId}" * ``` */ export declare class LogAnalyticsObjectCollectionRule extends pulumi.CustomResource { /** * Get an existing LogAnalyticsObjectCollectionRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: LogAnalyticsObjectCollectionRuleState, opts?: pulumi.CustomResourceOptions): LogAnalyticsObjectCollectionRule; /** * Returns true if the given object is an instance of LogAnalyticsObjectCollectionRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LogAnalyticsObjectCollectionRule; /** * (Updatable) An optional character encoding to aid in detecting the character encoding of the contents of the objects while processing. It is recommended to set this value as ISO_8589_1 when configuring content of the objects having more numeric characters, and very few alphabets. For e.g. this applies when configuring VCN Flow Logs. */ readonly charEncoding: pulumi.Output; /** * The type of collection. Supported collection types: LIVE, HISTORIC, HISTORIC_LIVE */ readonly collectionType: pulumi.Output; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this rule belongs. */ readonly compartmentId: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A string that describes the details of the rule. It does not have to be unique, and can be changed. Avoid entering confidential information. */ readonly description: pulumi.Output; /** * (Updatable) Log Analytics entity OCID. Associates the processed logs with the given entity (optional). */ readonly entityId: pulumi.Output; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) Whether or not this rule is currently enabled. */ readonly isEnabled: pulumi.Output; /** * Flag to allow historic collection if poll period overlaps with existing ACTIVE collection rule */ readonly isForceHistoricCollection: pulumi.Output; /** * Last Collected Object for the rule */ readonly lastCollectedObject: pulumi.Output; /** * A detailed status of the life cycle state. */ readonly lifecycleDetails: pulumi.Output; /** * (Updatable) Log Analytics Log group OCID to associate the processed logs with. */ readonly logGroupId: pulumi.Output; /** * (Updatable) The logSet to be associated with the processed logs. The logSet feature can be used by customers with high volume of data and this feature has to be enabled for a given tenancy prior to its usage. When logSetExtRegex value is provided, it will take precedence over this logSet value and logSet will be computed dynamically using logSetKey and logSetExtRegex. */ readonly logSet: pulumi.Output; /** * (Updatable) The regex to be applied against given logSetKey. Regex has to be in string escaped format. */ readonly logSetExtRegex: pulumi.Output; /** * (Updatable) An optional parameter to indicate from where the logSet to be extracted using logSetExtRegex. Default value is OBJECT_PATH (e.g. /n//b//o/). */ readonly logSetKey: pulumi.Output; /** * (Updatable) Name of the Log Analytics Source to use for the processing. */ readonly logSourceName: pulumi.Output; /** * Type of files/objects in this object collection rule. */ readonly logType: pulumi.Output; /** * A unique name given to the rule. The name must be unique within the tenancy, and cannot be modified. */ readonly name: pulumi.Output; /** * The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get' */ readonly namespace: pulumi.Output; /** * (Updatable) When the filters are provided, only the objects matching the filters are picked up for processing. The matchType supported is exact match and accommodates wildcard "*". For more information on filters, see [Event Filters](https://docs.oracle.com/en-us/iaas/Content/Events/Concepts/filterevents.htm). */ readonly objectNameFilters: pulumi.Output; /** * Name of the Object Storage bucket. */ readonly osBucketName: pulumi.Output; /** * Object Storage namespace. */ readonly osNamespace: pulumi.Output; /** * (Updatable) The override is used to modify some important configuration properties for objects matching a specific pattern inside the bucket. Supported propeties for override are: logSourceName, charEncoding, entityId. Supported matchType for override are "contains". */ readonly overrides: pulumi.Output; /** * The oldest time of the file in the bucket to consider for collection. Accepted values are: BEGINNING or CURRENT_TIME or RFC3339 formatted datetime string. Use this for HISTORIC or HISTORIC_LIVE collection types. When collectionType is LIVE, specifying pollSince value other than CURRENT_TIME will result in error. */ readonly pollSince: pulumi.Output; /** * The newest time of the file in the bucket to consider for collection. Accepted values are: CURRENT_TIME or RFC3339 formatted datetime string. Use this for HISTORIC collection type. When collectionType is LIVE or HISTORIC_LIVE, specifying pollTill will result in error. */ readonly pollTill: pulumi.Output; /** * The current state of the rule. */ readonly state: pulumi.Output; /** * (Updatable) The time from which to consume the objects, if streamCursorType is AT_TIME. */ readonly streamCursorTime: pulumi.Output; /** * (Updatable) Cursor type used to fetch messages from stream. When the streamCursorType is set to DEFAULT, the existing cursor position will be used if already set by any previous objection collection rule(s) using the same stream. Otherwise, the behaviour is to consume from the oldest available message in the stream. When the streamCursorType is set to TRIM_HORIZON, the behaviour is to start consuming from the oldest available message in the stream. When the streamCursorType is set to LATEST, the behavior is to start consuming messages that were published after the creation of this rule. When the streamCursorType is set to AT_TIME, the behavior is to start consuming from a given time. For more information on cursor types, see [Stream Consumer Groups](https://docs.oracle.com/en-us/iaas/Content/Streaming/Tasks/using_consumer_groups.htm). */ readonly streamCursorType: pulumi.Output; /** * (Updatable) A Stream OCID is required for Object Collection rules of type LIVE or HISTORIC_LIVE, which will be used by Log Analytics while creating Event Rule and consume the event notifications created by the Object Storage. */ readonly streamId: pulumi.Output; /** * The time when this rule was created. An RFC3339 formatted datetime string. */ readonly timeCreated: pulumi.Output; /** * The time when this rule was last updated. An RFC3339 formatted datetime string. */ readonly timeUpdated: pulumi.Output; /** * (Updatable) Timezone to be used when processing log entries whose timestamps do not include an explicit timezone. When this property is not specified, the timezone of the entity specified is used. If the entity is also not specified or do not have a valid timezone then UTC is used. * * ** 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 */ readonly timezone: pulumi.Output; /** * Create a LogAnalyticsObjectCollectionRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LogAnalyticsObjectCollectionRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LogAnalyticsObjectCollectionRule resources. */ export interface LogAnalyticsObjectCollectionRuleState { /** * (Updatable) An optional character encoding to aid in detecting the character encoding of the contents of the objects while processing. It is recommended to set this value as ISO_8589_1 when configuring content of the objects having more numeric characters, and very few alphabets. For e.g. this applies when configuring VCN Flow Logs. */ charEncoding?: pulumi.Input; /** * The type of collection. Supported collection types: LIVE, HISTORIC, HISTORIC_LIVE */ collectionType?: pulumi.Input; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this rule belongs. */ compartmentId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A string that describes the details of the rule. It does not have to be unique, and can be changed. Avoid entering confidential information. */ description?: pulumi.Input; /** * (Updatable) Log Analytics entity OCID. Associates the processed logs with the given entity (optional). */ entityId?: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Whether or not this rule is currently enabled. */ isEnabled?: pulumi.Input; /** * Flag to allow historic collection if poll period overlaps with existing ACTIVE collection rule */ isForceHistoricCollection?: pulumi.Input; /** * Last Collected Object for the rule */ lastCollectedObject?: pulumi.Input; /** * A detailed status of the life cycle state. */ lifecycleDetails?: pulumi.Input; /** * (Updatable) Log Analytics Log group OCID to associate the processed logs with. */ logGroupId?: pulumi.Input; /** * (Updatable) The logSet to be associated with the processed logs. The logSet feature can be used by customers with high volume of data and this feature has to be enabled for a given tenancy prior to its usage. When logSetExtRegex value is provided, it will take precedence over this logSet value and logSet will be computed dynamically using logSetKey and logSetExtRegex. */ logSet?: pulumi.Input; /** * (Updatable) The regex to be applied against given logSetKey. Regex has to be in string escaped format. */ logSetExtRegex?: pulumi.Input; /** * (Updatable) An optional parameter to indicate from where the logSet to be extracted using logSetExtRegex. Default value is OBJECT_PATH (e.g. /n//b//o/). */ logSetKey?: pulumi.Input; /** * (Updatable) Name of the Log Analytics Source to use for the processing. */ logSourceName?: pulumi.Input; /** * Type of files/objects in this object collection rule. */ logType?: pulumi.Input; /** * A unique name given to the rule. The name must be unique within the tenancy, and cannot be modified. */ name?: pulumi.Input; /** * The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get' */ namespace?: pulumi.Input; /** * (Updatable) When the filters are provided, only the objects matching the filters are picked up for processing. The matchType supported is exact match and accommodates wildcard "*". For more information on filters, see [Event Filters](https://docs.oracle.com/en-us/iaas/Content/Events/Concepts/filterevents.htm). */ objectNameFilters?: pulumi.Input[] | undefined>; /** * Name of the Object Storage bucket. */ osBucketName?: pulumi.Input; /** * Object Storage namespace. */ osNamespace?: pulumi.Input; /** * (Updatable) The override is used to modify some important configuration properties for objects matching a specific pattern inside the bucket. Supported propeties for override are: logSourceName, charEncoding, entityId. Supported matchType for override are "contains". */ overrides?: pulumi.Input[] | undefined>; /** * The oldest time of the file in the bucket to consider for collection. Accepted values are: BEGINNING or CURRENT_TIME or RFC3339 formatted datetime string. Use this for HISTORIC or HISTORIC_LIVE collection types. When collectionType is LIVE, specifying pollSince value other than CURRENT_TIME will result in error. */ pollSince?: pulumi.Input; /** * The newest time of the file in the bucket to consider for collection. Accepted values are: CURRENT_TIME or RFC3339 formatted datetime string. Use this for HISTORIC collection type. When collectionType is LIVE or HISTORIC_LIVE, specifying pollTill will result in error. */ pollTill?: pulumi.Input; /** * The current state of the rule. */ state?: pulumi.Input; /** * (Updatable) The time from which to consume the objects, if streamCursorType is AT_TIME. */ streamCursorTime?: pulumi.Input; /** * (Updatable) Cursor type used to fetch messages from stream. When the streamCursorType is set to DEFAULT, the existing cursor position will be used if already set by any previous objection collection rule(s) using the same stream. Otherwise, the behaviour is to consume from the oldest available message in the stream. When the streamCursorType is set to TRIM_HORIZON, the behaviour is to start consuming from the oldest available message in the stream. When the streamCursorType is set to LATEST, the behavior is to start consuming messages that were published after the creation of this rule. When the streamCursorType is set to AT_TIME, the behavior is to start consuming from a given time. For more information on cursor types, see [Stream Consumer Groups](https://docs.oracle.com/en-us/iaas/Content/Streaming/Tasks/using_consumer_groups.htm). */ streamCursorType?: pulumi.Input; /** * (Updatable) A Stream OCID is required for Object Collection rules of type LIVE or HISTORIC_LIVE, which will be used by Log Analytics while creating Event Rule and consume the event notifications created by the Object Storage. */ streamId?: pulumi.Input; /** * The time when this rule was created. An RFC3339 formatted datetime string. */ timeCreated?: pulumi.Input; /** * The time when this rule was last updated. An RFC3339 formatted datetime string. */ timeUpdated?: pulumi.Input; /** * (Updatable) Timezone to be used when processing log entries whose timestamps do not include an explicit timezone. When this property is not specified, the timezone of the entity specified is used. If the entity is also not specified or do not have a valid timezone then UTC is used. * * ** 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 */ timezone?: pulumi.Input; } /** * The set of arguments for constructing a LogAnalyticsObjectCollectionRule resource. */ export interface LogAnalyticsObjectCollectionRuleArgs { /** * (Updatable) An optional character encoding to aid in detecting the character encoding of the contents of the objects while processing. It is recommended to set this value as ISO_8589_1 when configuring content of the objects having more numeric characters, and very few alphabets. For e.g. this applies when configuring VCN Flow Logs. */ charEncoding?: pulumi.Input; /** * The type of collection. Supported collection types: LIVE, HISTORIC, HISTORIC_LIVE */ collectionType?: pulumi.Input; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to which this rule belongs. */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A string that describes the details of the rule. It does not have to be unique, and can be changed. Avoid entering confidential information. */ description?: pulumi.Input; /** * (Updatable) Log Analytics entity OCID. Associates the processed logs with the given entity (optional). */ entityId?: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Whether or not this rule is currently enabled. */ isEnabled?: pulumi.Input; /** * Flag to allow historic collection if poll period overlaps with existing ACTIVE collection rule */ isForceHistoricCollection?: pulumi.Input; /** * (Updatable) Log Analytics Log group OCID to associate the processed logs with. */ logGroupId: pulumi.Input; /** * (Updatable) The logSet to be associated with the processed logs. The logSet feature can be used by customers with high volume of data and this feature has to be enabled for a given tenancy prior to its usage. When logSetExtRegex value is provided, it will take precedence over this logSet value and logSet will be computed dynamically using logSetKey and logSetExtRegex. */ logSet?: pulumi.Input; /** * (Updatable) The regex to be applied against given logSetKey. Regex has to be in string escaped format. */ logSetExtRegex?: pulumi.Input; /** * (Updatable) An optional parameter to indicate from where the logSet to be extracted using logSetExtRegex. Default value is OBJECT_PATH (e.g. /n//b//o/). */ logSetKey?: pulumi.Input; /** * (Updatable) Name of the Log Analytics Source to use for the processing. */ logSourceName?: pulumi.Input; /** * Type of files/objects in this object collection rule. */ logType?: pulumi.Input; /** * A unique name given to the rule. The name must be unique within the tenancy, and cannot be modified. */ name?: pulumi.Input; /** * The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get' */ namespace: pulumi.Input; /** * (Updatable) When the filters are provided, only the objects matching the filters are picked up for processing. The matchType supported is exact match and accommodates wildcard "*". For more information on filters, see [Event Filters](https://docs.oracle.com/en-us/iaas/Content/Events/Concepts/filterevents.htm). */ objectNameFilters?: pulumi.Input[] | undefined>; /** * Name of the Object Storage bucket. */ osBucketName: pulumi.Input; /** * Object Storage namespace. */ osNamespace: pulumi.Input; /** * (Updatable) The override is used to modify some important configuration properties for objects matching a specific pattern inside the bucket. Supported propeties for override are: logSourceName, charEncoding, entityId. Supported matchType for override are "contains". */ overrides?: pulumi.Input[] | undefined>; /** * The oldest time of the file in the bucket to consider for collection. Accepted values are: BEGINNING or CURRENT_TIME or RFC3339 formatted datetime string. Use this for HISTORIC or HISTORIC_LIVE collection types. When collectionType is LIVE, specifying pollSince value other than CURRENT_TIME will result in error. */ pollSince?: pulumi.Input; /** * The newest time of the file in the bucket to consider for collection. Accepted values are: CURRENT_TIME or RFC3339 formatted datetime string. Use this for HISTORIC collection type. When collectionType is LIVE or HISTORIC_LIVE, specifying pollTill will result in error. */ pollTill?: pulumi.Input; /** * (Updatable) The time from which to consume the objects, if streamCursorType is AT_TIME. */ streamCursorTime?: pulumi.Input; /** * (Updatable) Cursor type used to fetch messages from stream. When the streamCursorType is set to DEFAULT, the existing cursor position will be used if already set by any previous objection collection rule(s) using the same stream. Otherwise, the behaviour is to consume from the oldest available message in the stream. When the streamCursorType is set to TRIM_HORIZON, the behaviour is to start consuming from the oldest available message in the stream. When the streamCursorType is set to LATEST, the behavior is to start consuming messages that were published after the creation of this rule. When the streamCursorType is set to AT_TIME, the behavior is to start consuming from a given time. For more information on cursor types, see [Stream Consumer Groups](https://docs.oracle.com/en-us/iaas/Content/Streaming/Tasks/using_consumer_groups.htm). */ streamCursorType?: pulumi.Input; /** * (Updatable) A Stream OCID is required for Object Collection rules of type LIVE or HISTORIC_LIVE, which will be used by Log Analytics while creating Event Rule and consume the event notifications created by the Object Storage. */ streamId?: pulumi.Input; /** * (Updatable) Timezone to be used when processing log entries whose timestamps do not include an explicit timezone. When this property is not specified, the timezone of the entity specified is used. If the entity is also not specified or do not have a valid timezone then UTC is used. * * ** 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 */ timezone?: pulumi.Input; } //# sourceMappingURL=logAnalyticsObjectCollectionRule.d.ts.map