CreateLogAnalyticsObjectCollectionRuleDetails

class oci.log_analytics.models.CreateLogAnalyticsObjectCollectionRuleDetails(**kwargs)

Bases: object

The configuration details of collection rule to enable automatic log collection from an object storage bucket.

Attributes:

COLLECTION_TYPE_HISTORIC

A constant which can be used with the collection_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

COLLECTION_TYPE_HISTORIC_LIVE

A constant which can be used with the collection_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

COLLECTION_TYPE_LIVE

A constant which can be used with the collection_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

LOG_SET_KEY_OBJECT_PATH

A constant which can be used with the log_set_key property of a CreateLogAnalyticsObjectCollectionRuleDetails.

LOG_TYPE_LOG

A constant which can be used with the log_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

LOG_TYPE_LOG_EVENTS

A constant which can be used with the log_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

STREAM_CURSOR_TYPE_AT_TIME

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

STREAM_CURSOR_TYPE_DEFAULT

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

STREAM_CURSOR_TYPE_LATEST

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

STREAM_CURSOR_TYPE_TRIM_HORIZON

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails.

char_encoding

Gets the char_encoding of this CreateLogAnalyticsObjectCollectionRuleDetails.

collection_type

Gets the collection_type of this CreateLogAnalyticsObjectCollectionRuleDetails.

compartment_id

[Required] Gets the compartment_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

defined_tags

Gets the defined_tags of this CreateLogAnalyticsObjectCollectionRuleDetails.

description

Gets the description of this CreateLogAnalyticsObjectCollectionRuleDetails.

entity_id

Gets the entity_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

freeform_tags

Gets the freeform_tags of this CreateLogAnalyticsObjectCollectionRuleDetails.

is_enabled

Gets the is_enabled of this CreateLogAnalyticsObjectCollectionRuleDetails.

is_force_historic_collection

Gets the is_force_historic_collection of this CreateLogAnalyticsObjectCollectionRuleDetails.

log_group_id

[Required] Gets the log_group_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

log_set

Gets the log_set of this CreateLogAnalyticsObjectCollectionRuleDetails.

log_set_ext_regex

Gets the log_set_ext_regex of this CreateLogAnalyticsObjectCollectionRuleDetails.

log_set_key

Gets the log_set_key of this CreateLogAnalyticsObjectCollectionRuleDetails.

log_source_name

Gets the log_source_name of this CreateLogAnalyticsObjectCollectionRuleDetails.

log_type

Gets the log_type of this CreateLogAnalyticsObjectCollectionRuleDetails.

name

[Required] Gets the name of this CreateLogAnalyticsObjectCollectionRuleDetails.

object_name_filters

Gets the object_name_filters of this CreateLogAnalyticsObjectCollectionRuleDetails.

os_bucket_name

[Required] Gets the os_bucket_name of this CreateLogAnalyticsObjectCollectionRuleDetails.

os_namespace

[Required] Gets the os_namespace of this CreateLogAnalyticsObjectCollectionRuleDetails.

overrides

Gets the overrides of this CreateLogAnalyticsObjectCollectionRuleDetails.

poll_since

Gets the poll_since of this CreateLogAnalyticsObjectCollectionRuleDetails.

poll_till

Gets the poll_till of this CreateLogAnalyticsObjectCollectionRuleDetails.

stream_cursor_time

Gets the stream_cursor_time of this CreateLogAnalyticsObjectCollectionRuleDetails.

stream_cursor_type

Gets the stream_cursor_type of this CreateLogAnalyticsObjectCollectionRuleDetails.

stream_id

Gets the stream_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

timezone

Gets the timezone of this CreateLogAnalyticsObjectCollectionRuleDetails.

Methods:

__init__(**kwargs)

Initializes a new CreateLogAnalyticsObjectCollectionRuleDetails object with values from keyword arguments.

COLLECTION_TYPE_HISTORIC = 'HISTORIC'

A constant which can be used with the collection_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “HISTORIC”

COLLECTION_TYPE_HISTORIC_LIVE = 'HISTORIC_LIVE'

A constant which can be used with the collection_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “HISTORIC_LIVE”

COLLECTION_TYPE_LIVE = 'LIVE'

A constant which can be used with the collection_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “LIVE”

LOG_SET_KEY_OBJECT_PATH = 'OBJECT_PATH'

A constant which can be used with the log_set_key property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “OBJECT_PATH”

LOG_TYPE_LOG = 'LOG'

A constant which can be used with the log_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “LOG”

LOG_TYPE_LOG_EVENTS = 'LOG_EVENTS'

A constant which can be used with the log_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “LOG_EVENTS”

STREAM_CURSOR_TYPE_AT_TIME = 'AT_TIME'

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “AT_TIME”

STREAM_CURSOR_TYPE_DEFAULT = 'DEFAULT'

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “DEFAULT”

STREAM_CURSOR_TYPE_LATEST = 'LATEST'

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “LATEST”

STREAM_CURSOR_TYPE_TRIM_HORIZON = 'TRIM_HORIZON'

A constant which can be used with the stream_cursor_type property of a CreateLogAnalyticsObjectCollectionRuleDetails. This constant has a value of “TRIM_HORIZON”

__init__(**kwargs)

Initializes a new CreateLogAnalyticsObjectCollectionRuleDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • name (str) – The value to assign to the name property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • description (str) – The value to assign to the description property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • compartment_id (str) – The value to assign to the compartment_id property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • os_namespace (str) – The value to assign to the os_namespace property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • os_bucket_name (str) – The value to assign to the os_bucket_name property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • collection_type (str) – The value to assign to the collection_type property of this CreateLogAnalyticsObjectCollectionRuleDetails. Allowed values for this property are: “LIVE”, “HISTORIC”, “HISTORIC_LIVE”

  • poll_since (str) – The value to assign to the poll_since property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • poll_till (str) – The value to assign to the poll_till property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • log_group_id (str) – The value to assign to the log_group_id property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • log_source_name (str) – The value to assign to the log_source_name property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • entity_id (str) – The value to assign to the entity_id property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • char_encoding (str) – The value to assign to the char_encoding property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • is_enabled (bool) – The value to assign to the is_enabled property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • timezone (str) – The value to assign to the timezone property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • log_set (str) – The value to assign to the log_set property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • log_set_key (str) – The value to assign to the log_set_key property of this CreateLogAnalyticsObjectCollectionRuleDetails. Allowed values for this property are: “OBJECT_PATH”

  • log_set_ext_regex (str) – The value to assign to the log_set_ext_regex property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • overrides (dict(str, list[PropertyOverride])) – The value to assign to the overrides property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • object_name_filters (list[str]) – The value to assign to the object_name_filters property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • log_type (str) – The value to assign to the log_type property of this CreateLogAnalyticsObjectCollectionRuleDetails. Allowed values for this property are: “LOG”, “LOG_EVENTS”

  • is_force_historic_collection (bool) – The value to assign to the is_force_historic_collection property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • stream_id (str) – The value to assign to the stream_id property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • stream_cursor_type (str) – The value to assign to the stream_cursor_type property of this CreateLogAnalyticsObjectCollectionRuleDetails. Allowed values for this property are: “DEFAULT”, “TRIM_HORIZON”, “LATEST”, “AT_TIME”

  • stream_cursor_time (datetime) – The value to assign to the stream_cursor_time property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateLogAnalyticsObjectCollectionRuleDetails.

  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateLogAnalyticsObjectCollectionRuleDetails.

property char_encoding

Gets the char_encoding of this CreateLogAnalyticsObjectCollectionRuleDetails. 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_8859_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.

Returns

The char_encoding of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property collection_type

Gets the collection_type of this CreateLogAnalyticsObjectCollectionRuleDetails. The type of collection.

Allowed values for this property are: “LIVE”, “HISTORIC”, “HISTORIC_LIVE”

Returns

The collection_type of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property compartment_id

[Required] Gets the compartment_id of this CreateLogAnalyticsObjectCollectionRuleDetails. The OCID of the compartment to which this rule belongs.

Returns

The compartment_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property defined_tags

Gets the defined_tags of this CreateLogAnalyticsObjectCollectionRuleDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}

Returns

The defined_tags of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

dict(str, dict(str, object))

property description

Gets the description of this CreateLogAnalyticsObjectCollectionRuleDetails. A string that describes the details of the rule. It does not have to be unique, and can be changed. Avoid entering confidential information.

Returns

The description of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property entity_id

Gets the entity_id of this CreateLogAnalyticsObjectCollectionRuleDetails. Log Analytics entity OCID. Associates the processed logs with the given entity (optional).

Returns

The entity_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property freeform_tags

Gets the freeform_tags of this CreateLogAnalyticsObjectCollectionRuleDetails. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {“bar-key”: “value”}

Returns

The freeform_tags of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

dict(str, str)

property is_enabled

Gets the is_enabled of this CreateLogAnalyticsObjectCollectionRuleDetails. Whether or not this rule is currently enabled.

Returns

The is_enabled of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

bool

property is_force_historic_collection

Gets the is_force_historic_collection of this CreateLogAnalyticsObjectCollectionRuleDetails. Flag to allow historic collection if poll period overlaps with existing ACTIVE collection rule

Returns

The is_force_historic_collection of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

bool

property log_group_id

[Required] Gets the log_group_id of this CreateLogAnalyticsObjectCollectionRuleDetails. Log Analytics Log group OCID to associate the processed logs with.

Returns

The log_group_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property log_set

Gets the log_set of this CreateLogAnalyticsObjectCollectionRuleDetails. 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.

Returns

The log_set of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property log_set_ext_regex

Gets the log_set_ext_regex of this CreateLogAnalyticsObjectCollectionRuleDetails. The regex to be applied against given logSetKey. Regex has to be in string escaped format.

Returns

The log_set_ext_regex of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property log_set_key

Gets the log_set_key of this CreateLogAnalyticsObjectCollectionRuleDetails. An optional parameter to indicate from where the logSet to be extracted using logSetExtRegex. Default value is OBJECT_PATH (e.g. /n/<namespace>/b/<bucketname>/o/<objectname>).

Allowed values for this property are: “OBJECT_PATH”

Returns

The log_set_key of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property log_source_name

Gets the log_source_name of this CreateLogAnalyticsObjectCollectionRuleDetails. Name of the Log Analytics Source to use for the processing.

Returns

The log_source_name of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property log_type

Gets the log_type of this CreateLogAnalyticsObjectCollectionRuleDetails. Type of files/objects in this object collection rule.

Allowed values for this property are: “LOG”, “LOG_EVENTS”

Returns

The log_type of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property name

[Required] Gets the name of this CreateLogAnalyticsObjectCollectionRuleDetails. A unique name given to the rule. The name must be unique within the tenancy, and cannot be modified.

Returns

The name of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property object_name_filters

Gets the object_name_filters of this CreateLogAnalyticsObjectCollectionRuleDetails. 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.

Returns

The object_name_filters of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

list[str]

property os_bucket_name

[Required] Gets the os_bucket_name of this CreateLogAnalyticsObjectCollectionRuleDetails. Name of the Object Storage bucket.

Returns

The os_bucket_name of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property os_namespace

[Required] Gets the os_namespace of this CreateLogAnalyticsObjectCollectionRuleDetails. Object Storage namespace.

Returns

The os_namespace of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property overrides

Gets the overrides of this CreateLogAnalyticsObjectCollectionRuleDetails. 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”.

Returns

The overrides of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

dict(str, list[PropertyOverride])

property poll_since

Gets the poll_since of this CreateLogAnalyticsObjectCollectionRuleDetails. 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.

Returns

The poll_since of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property poll_till

Gets the poll_till of this CreateLogAnalyticsObjectCollectionRuleDetails. 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.

Returns

The poll_till of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property stream_cursor_time

Gets the stream_cursor_time of this CreateLogAnalyticsObjectCollectionRuleDetails. The time from which to consume the objects, if streamCursorType is AT_TIME.

Returns

The stream_cursor_time of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

datetime

property stream_cursor_type

Gets the stream_cursor_type of this CreateLogAnalyticsObjectCollectionRuleDetails. 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.

Allowed values for this property are: “DEFAULT”, “TRIM_HORIZON”, “LATEST”, “AT_TIME”

Returns

The stream_cursor_type of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property stream_id

Gets the stream_id of this CreateLogAnalyticsObjectCollectionRuleDetails. 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.

Returns

The stream_id of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str

property timezone

Gets the timezone of this CreateLogAnalyticsObjectCollectionRuleDetails. 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.

Returns

The timezone of this CreateLogAnalyticsObjectCollectionRuleDetails.

Return type

str