Rule

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

Bases: object

A generic rule object - represents an ingest time rule or a scheduled task.

Attributes

KIND_INGEST_TIME A constant which can be used with the kind property of a Rule.
KIND_SAVED_SEARCH A constant which can be used with the kind property of a Rule.
LAST_EXECUTION_STATUS_FAILED A constant which can be used with the last_execution_status property of a Rule.
LAST_EXECUTION_STATUS_SUCCEEDED A constant which can be used with the last_execution_status property of a Rule.
LIFECYCLE_STATE_ACTIVE A constant which can be used with the lifecycle_state property of a Rule.
LIFECYCLE_STATE_DELETED A constant which can be used with the lifecycle_state property of a Rule.
compartment_id [Required] Gets the compartment_id of this Rule.
defined_tags Gets the defined_tags of this Rule.
description Gets the description of this Rule.
display_name [Required] Gets the display_name of this Rule.
freeform_tags Gets the freeform_tags of this Rule.
id [Required] Gets the id of this Rule.
is_enabled Gets the is_enabled of this Rule.
kind [Required] Gets the kind of this Rule.
last_execution_status Gets the last_execution_status of this Rule.
lifecycle_state Gets the lifecycle_state of this Rule.
target_service Gets the target_service of this Rule.
time_created Gets the time_created of this Rule.
time_last_executed Gets the time_last_executed of this Rule.
time_updated Gets the time_updated of this Rule.

Methods

__init__(**kwargs) Initializes a new Rule object with values from keyword arguments.
KIND_INGEST_TIME = 'INGEST_TIME'

A constant which can be used with the kind property of a Rule. This constant has a value of “INGEST_TIME”

A constant which can be used with the kind property of a Rule. This constant has a value of “SAVED_SEARCH”

LAST_EXECUTION_STATUS_FAILED = 'FAILED'

A constant which can be used with the last_execution_status property of a Rule. This constant has a value of “FAILED”

LAST_EXECUTION_STATUS_SUCCEEDED = 'SUCCEEDED'

A constant which can be used with the last_execution_status property of a Rule. This constant has a value of “SUCCEEDED”

LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a Rule. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a Rule. This constant has a value of “DELETED”

__init__(**kwargs)

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

Parameters:
  • id (str) – The value to assign to the id property of this Rule.
  • description (str) – The value to assign to the description property of this Rule.
  • compartment_id (str) – The value to assign to the compartment_id property of this Rule.
  • time_created (datetime) – The value to assign to the time_created property of this Rule.
  • time_updated (datetime) – The value to assign to the time_updated property of this Rule.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Rule.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Rule.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this Rule. Allowed values for this property are: “ACTIVE”, “DELETED”
  • kind (str) – The value to assign to the kind property of this Rule. Allowed values for this property are: “INGEST_TIME”, “SAVED_SEARCH”
  • target_service (str) – The value to assign to the target_service property of this Rule.
  • display_name (str) – The value to assign to the display_name property of this Rule.
  • is_enabled (bool) – The value to assign to the is_enabled property of this Rule.
  • last_execution_status (str) – The value to assign to the last_execution_status property of this Rule. Allowed values for this property are: “FAILED”, “SUCCEEDED”
  • time_last_executed (datetime) – The value to assign to the time_last_executed property of this Rule.
compartment_id

[Required] Gets the compartment_id of this Rule. Compartment Identifier OCID].

Returns:The compartment_id of this Rule.
Return type:str
defined_tags

Gets the defined_tags of this Rule. 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 Rule.
Return type:dict(str, dict(str, object))
description

Gets the description of this Rule. Description for this resource.

Returns:The description of this Rule.
Return type:str
display_name

[Required] Gets the display_name of this Rule. The ingest time rule or scheduled task display name.

Returns:The display_name of this Rule.
Return type:str
freeform_tags

Gets the freeform_tags of this Rule. 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 Rule.
Return type:dict(str, str)
id

[Required] Gets the id of this Rule. The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.

Returns:The id of this Rule.
Return type:str
is_enabled

Gets the is_enabled of this Rule. A flag indicating whether or not the ingest time rule or scheduled task is enabled.

Returns:The is_enabled of this Rule.
Return type:bool
kind

[Required] Gets the kind of this Rule. The kind of rule - either an ingest time rule or a scheduled task.

Allowed values for this property are: “INGEST_TIME”, “SAVED_SEARCH”

Returns:The kind of this Rule.
Return type:str
last_execution_status

Gets the last_execution_status of this Rule. The most recent task execution status.

Allowed values for this property are: “FAILED”, “SUCCEEDED”

Returns:The last_execution_status of this Rule.
Return type:str
lifecycle_state

Gets the lifecycle_state of this Rule. The current state of the logging analytics rule.

Allowed values for this property are: “ACTIVE”, “DELETED”

Returns:The lifecycle_state of this Rule.
Return type:str
target_service

Gets the target_service of this Rule. The target service.

Returns:The target_service of this Rule.
Return type:str
time_created

Gets the time_created of this Rule. The date and time the resource was created, in the format defined by RFC3339.

Returns:The time_created of this Rule.
Return type:datetime
time_last_executed

Gets the time_last_executed of this Rule. The date and time the scheduled task last executed, in the format defined by RFC3339.

Returns:The time_last_executed of this Rule.
Return type:datetime
time_updated

Gets the time_updated of this Rule. The date and time the resource was last updated, in the format defined by RFC3339.

Returns:The time_updated of this Rule.
Return type:datetime