oracle.oci.oci_log_analytics_object_collection_rule_actions – Perform actions on a LogAnalyticsObjectCollectionRule resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.14.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_log_analytics_object_collection_rule_actions.

New in version 2.9.0: of oracle.oci

Synopsis

  • Perform actions on a LogAnalyticsObjectCollectionRule resource in Oracle Cloud Infrastructure

  • For action=change_compartment, move the rule from it’s current compartment to the given compartment.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
action
string / required
    Choices:
  • change_compartment
The action to perform on the LogAnalyticsObjectCollectionRule.
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string / required
The OCID of the compartment to which the rule have to be moved.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
log_analytics_object_collection_rule_id
string / required
The Logging Analytics Object Collection Rule OCID.

aliases: id
namespace_name
string / required
The Logging Analytics namespace used for the request.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm

Examples

- name: Perform action change_compartment on log_analytics_object_collection_rule
  oci_log_analytics_object_collection_rule_actions:
    # required
    namespace_name: namespace_name_example
    log_analytics_object_collection_rule_id: "ocid1.loganalyticsobjectcollectionrule.oc1..xxxxxxEXAMPLExxxxxx"
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    action: change_compartment

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
log_analytics_object_collection_rule
complex
on success
Details of the LogAnalyticsObjectCollectionRule resource acted upon by the current operation

Sample:
{'char_encoding': 'char_encoding_example', 'collection_type': 'LIVE', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'entity_id': 'ocid1.entity.oc1..xxxxxxEXAMPLExxxxxx', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_enabled': True, 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'ACTIVE', 'log_group_id': 'ocid1.loggroup.oc1..xxxxxxEXAMPLExxxxxx', 'log_set': 'log_set_example', 'log_set_ext_regex': 'log_set_ext_regex_example', 'log_set_key': 'OBJECT_PATH', 'log_source_name': 'log_source_name_example', 'name': 'name_example', 'object_name_filters': [], 'os_bucket_name': 'os_bucket_name_example', 'os_namespace': 'os_namespace_example', 'overrides': {}, 'poll_since': 'poll_since_example', 'poll_till': 'poll_till_example', 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'timezone': 'timezone_example'}
 
char_encoding
string
on success
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.

Sample:
char_encoding_example
 
collection_type
string
on success
The type of log collection.

Sample:
LIVE
 
compartment_id
string
on success
The OCID of the compartment to which this rule belongs.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
description
string
on success
A string that describes the details of the rule. It does not have to be unique, and can be changed. Avoid entering confidential information.

Sample:
description_example
 
entity_id
string
on success
Logging Analytics entity OCID to associate the processed logs with.

Sample:
ocid1.entity.oc1..xxxxxxEXAMPLExxxxxx
 
freeform_tags
dictionary
on success
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`

Sample:
{'Department': 'Finance'}
 
id
string
on success
The OCID of this rule.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_enabled
boolean
on success
Whether or not this rule is currently enabled.

Sample:
True
 
lifecycle_details
string
on success
A detailed status of the life cycle state.

Sample:
lifecycle_details_example
 
lifecycle_state
string
on success
The current state of the rule.

Sample:
ACTIVE
 
log_group_id
string
on success
Logging Analytics Log group OCID to associate the processed logs with.

Sample:
ocid1.loggroup.oc1..xxxxxxEXAMPLExxxxxx
 
log_set
string
on success
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.

Sample:
log_set_example
 
log_set_ext_regex
string
on success
The regex to be applied against given logSetKey. Regex has to be in string escaped format.

Sample:
log_set_ext_regex_example
 
log_set_key
string
on success
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>).

Sample:
OBJECT_PATH
 
log_source_name
string
on success
Name of the Logging Analytics Source to use for the processing.

Sample:
log_source_name_example
 
name
string
on success
A unique name to the rule. The name must be unique, within the tenancy, and cannot be changed.

Sample:
name_example
 
object_name_filters
list / elements=string
on success
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.

 
os_bucket_name
string
on success
Name of the Object Storage bucket.

Sample:
os_bucket_name_example
 
os_namespace
string
on success
Object Storage namespace.

Sample:
os_namespace_example
 
overrides
dictionary
on success
Use this to override some property values which are defined at bucket level to the scope of object. Supported propeties for override are: logSourceName, charEncoding, entityId. Supported matchType for override are "contains".

 
poll_since
string
on success
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.

Sample:
poll_since_example
 
poll_till
string
on success
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.

Sample:
poll_till_example
 
time_created
string
on success
The time when this rule was created. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
The time when this rule was last updated. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
timezone
string
on success
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.

Sample:
timezone_example


Authors

  • Oracle (@oracle)