Rule¶
- class oci.log_analytics.models.Rule(**kwargs)¶
Bases:
objectA generic rule object - represents an ingest time rule or a scheduled task.
Attributes:
A constant which can be used with the kind property of a Rule.
A constant which can be used with the kind property of a Rule.
A constant which can be used with the last_execution_status property of a Rule.
A constant which can be used with the last_execution_status property of a Rule.
A constant which can be used with the lifecycle_state property of a Rule.
A constant which can be used with the lifecycle_state property of a Rule.
[Required] Gets the compartment_id of this Rule.
Gets the defined_tags of this Rule.
Gets the description of this Rule.
[Required] Gets the display_name of this Rule.
Gets the freeform_tags of this Rule.
[Required] Gets the id of this Rule.
Gets the is_enabled of this Rule.
[Required] Gets the kind of this Rule.
Gets the last_execution_status of this Rule.
Gets the lifecycle_state of this Rule.
Gets the target_service of this Rule.
Gets the time_created of this Rule.
Gets the time_last_executed of this Rule.
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”
- KIND_SAVED_SEARCH = 'SAVED_SEARCH'¶
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.
- property compartment_id¶
[Required] Gets the compartment_id of this Rule. Compartment Identifier OCID].
- Returns
The compartment_id of this Rule.
- Return type
str
- property 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))
- property description¶
Gets the description of this Rule. Description for this resource.
- Returns
The description of this Rule.
- Return type
str
- property 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
- property 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)
- property 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
- property 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
- property 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
- property 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
- property lifecycle_state¶
Gets the lifecycle_state of this Rule. The current state of the Log Analytics rule.
Allowed values for this property are: “ACTIVE”, “DELETED”
- Returns
The lifecycle_state of this Rule.
- Return type
str
- property target_service¶
Gets the target_service of this Rule. The target service.
- Returns
The target_service of this Rule.
- Return type
str
- property 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
- property 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
- property 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