oracle.oci.oci_operator_access_control_operator_control_assignment_actions – Perform actions on an OperatorControlAssignment 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_operator_access_control_operator_control_assignment_actions.

New in version 2.9.0: of oracle.oci

Synopsis

  • Perform actions on an OperatorControlAssignment resource in Oracle Cloud Infrastructure

  • For action=change_compartment, changes the compartment of the specified Operator Control assignment ID.

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 OperatorControlAssignment.
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
The OCID of the new compartment to contain the operator contol assignment.
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.
operator_control_assignment_id
string / required
unique OperatorControl identifier

aliases: id
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 operator_control_assignment
  oci_operator_access_control_operator_control_assignment_actions:
    # required
    operator_control_assignment_id: "ocid1.operatorcontrolassignment.oc1..xxxxxxEXAMPLExxxxxx"
    action: change_compartment

    # optional
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

Return Values

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

Key Returned Description
operator_control_assignment
complex
on success
Details of the OperatorControlAssignment resource acted upon by the current operation

Sample:
{'assigner_id': 'ocid1.assigner.oc1..xxxxxxEXAMPLExxxxxx', 'comment': 'comment_example', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'detachment_description': 'detachment_description_example', 'error_code': 56, 'error_message': 'error_message_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_auto_approve_during_maintenance': True, 'is_enforced_always': True, 'is_log_forwarded': True, 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'CREATED', 'operator_control_id': 'ocid1.operatorcontrol.oc1..xxxxxxEXAMPLExxxxxx', 'remote_syslog_server_address': 'remote_syslog_server_address_example', 'remote_syslog_server_ca_cert': 'remote_syslog_server_ca_cert_example', 'remote_syslog_server_port': 56, 'resource_compartment_id': 'ocid1.resourcecompartment.oc1..xxxxxxEXAMPLExxxxxx', 'resource_id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'resource_name': 'resource_name_example', 'resource_type': 'EXACC', 'time_assignment_from': '2013-10-20T19:20:30+01:00', 'time_assignment_to': '2013-10-20T19:20:30+01:00', 'time_of_assignment': '2013-10-20T19:20:30+01:00', 'time_of_deletion': '2013-10-20T19:20:30+01:00', 'unassigner_id': 'ocid1.unassigner.oc1..xxxxxxEXAMPLExxxxxx'}
 
assigner_id
string
on success
The OCID of the user who created this operator control assignment.

Sample:
ocid1.assigner.oc1..xxxxxxEXAMPLExxxxxx
 
comment
string
on success
Comment about the assignment of the operator control to this target resource.

Sample:
comment_example
 
compartment_id
string
on success
The OCID of the comparment that contains the operator control assignment.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace.

Sample:
{'Operations': {'CostCenter': 'US'}}
 
detachment_description
string
on success
description containing reason for releasing of OperatorControl.

Sample:
detachment_description_example
 
error_code
integer
on success
The code identifying the error occurred during Assignment operation.

Sample:
56
 
error_message
string
on success
The message describing the error occurred during Assignment operation.

Sample:
error_message_example
 
freeform_tags
dictionary
on success
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.

Sample:
{'Department': 'Finance'}
 
id
string
on success
The OCID of the operator control assignment.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_auto_approve_during_maintenance
boolean
on success
The boolean if true would autoApprove during maintenance.

Sample:
True
 
is_enforced_always
boolean
on success
If set, then the target resource is always governed by the operator control.

Sample:
True
 
is_log_forwarded
boolean
on success
If set indicates that the audit logs are being forwarded to the relevant remote logging server

Sample:
True
 
lifecycle_details
string
on success
More in detail about the lifeCycleState.

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

Sample:
CREATED
 
operator_control_id
string
on success
The OCID of the operator control.

Sample:
ocid1.operatorcontrol.oc1..xxxxxxEXAMPLExxxxxx
 
remote_syslog_server_address
string
on success
The address of the remote syslog server where the audit logs are being forwarded to. Address in host or IP format.

Sample:
remote_syslog_server_address_example
 
remote_syslog_server_ca_cert
string
on success
The CA certificate of the remote syslog server.

Sample:
remote_syslog_server_ca_cert_example
 
remote_syslog_server_port
integer
on success
The listening port of the remote syslog server. The port range is 0 - 65535. Only TCP supported.

Sample:
56
 
resource_compartment_id
string
on success
The OCID of the compartment that contains the target resource.

Sample:
ocid1.resourcecompartment.oc1..xxxxxxEXAMPLExxxxxx
 
resource_id
string
on success
The OCID of the target resource.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
resource_name
string
on success
Name of the target resource.

Sample:
resource_name_example
 
resource_type
string
on success
resourceType for which the OperatorControlAssignment is applicable

Sample:
EXACC
 
time_assignment_from
string
on success
The time at which the target resource will be brought under the governance of the operator control expressed in RFC 3339 timestamp format. Example: '2020-05-22T21:10:29.600Z'

Sample:
2013-10-20T19:20:30+01:00
 
time_assignment_to
string
on success
The time at which the target resource will leave the governance of the operator control expressed in RFC 3339 timestamp format. Example: '2020-05-22T21:10:29.600Z'

Sample:
2013-10-20T19:20:30+01:00
 
time_of_assignment
string
on success
Time when the operator control assignment is created in RFC 3339 timestamp format. Example: '2020-05-22T21:10:29.600Z'

Sample:
2013-10-20T19:20:30+01:00
 
time_of_deletion
string
on success
Time on which the operator control assignment was deleted in RFC 3339timestamp format.Example: '2020-05-22T21:10:29.600Z'

Sample:
2013-10-20T19:20:30+01:00
 
unassigner_id
string
on success
User id who released the operatorControl.

Sample:
ocid1.unassigner.oc1..xxxxxxEXAMPLExxxxxx


Authors

  • Oracle (@oracle)