oracle.oci.oci_operator_access_control_operator_control_assignment – Manage an OperatorControlAssignment resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.13.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.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to create, update and delete an OperatorControlAssignment resource in Oracle Cloud Infrastructure

  • For state=present, creates an Operator Control Assignment resource. In effect, this brings the target resource under the governance of the Operator Control for specified time duration.

  • This resource has the following action operations in the oracle.oci.oci_operator_access_control_operator_control_assignment_actions module: change_compartment.

Requirements

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

Parameters

Parameter Choices/Defaults Comments
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.
comment
string
Comment about the assignment of the operator control to this target resource.
This parameter is updatable.
compartment_id
string
The OCID of the compartment that contains the operator control assignment.
Required for create using state=present.
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.
defined_tags
dictionary
Defined tags for this resource. Each key is predefined and scoped to a namespace.
This parameter is updatable.
description
string
reason for detachment of OperatorAssignment.
force_create
boolean
    Choices:
  • no ←
  • yes
Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with key_by.
freeform_tags
dictionary
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
This parameter is updatable.
is_auto_approve_during_maintenance
boolean
    Choices:
  • no
  • yes
The boolean if true would autoApprove during maintenance.
This parameter is updatable.
is_enforced_always
boolean
    Choices:
  • no
  • yes
If set, then the target resource is always governed by the operator control.
Required for create using state=present, update using state=present with operator_control_assignment_id present.
is_log_forwarded
boolean
    Choices:
  • no
  • yes
If set, then the audit logs will be forwarded to the relevant remote logging server
This parameter is updatable.
key_by
list / elements=string
The list of attributes of this resource which should be used to uniquely identify an instance of the resource. By default, all the attributes of a resource are used to uniquely identify a resource.
operator_control_assignment_id
string
unique OperatorControl identifier
Required for update using state=present.
Required for delete using state=absent.

aliases: id
operator_control_id
string
The OCID of the operator control that is being assigned to a target resource.
Required for create using state=present.
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.
remote_syslog_server_address
string
The address of the remote syslog server where the audit logs will be forwarded to. Address in host or IP format.
This parameter is updatable.
remote_syslog_server_ca_cert
string
The CA certificate of the remote syslog server. Identity of the remote syslog server will be asserted based on this certificate.
This parameter is updatable.
remote_syslog_server_port
integer
The listening port of the remote syslog server. The port range is 0 - 65535. Only TCP supported.
This parameter is updatable.
resource_compartment_id
string
The OCID of the compartment that contains the target resource.
Required for create using state=present.
resource_id
string
The OCID of the target resource being brought under the governance of the operator control.
Required for create using state=present.
resource_name
string
Name of the target resource.
Required for create using state=present.
resource_type
string
    Choices:
  • EXACC
  • EXADATAINFRASTRUCTURE
  • AUTONOMOUSVMCLUSTER
  • CLOUDAUTONOMOUSVMCLUSTER
Type of the target resource.
Required for create using state=present.
state
string
    Choices:
  • present ←
  • absent
The state of the OperatorControlAssignment.
Use state=present to create or update an OperatorControlAssignment.
Use state=absent to delete an OperatorControlAssignment.
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
time_assignment_from
string
The time at which the target resource will be brought under the governance of the operator control in RFC 3339 timestamp format. Example: '2020-05-22T21:10:29.600Z'
This parameter is updatable.
time_assignment_to
string
The time at which the target resource will leave the governance of the operator control in RFC 3339timestamp format.Example: '2020-05-22T21:10:29.600Z'
This parameter is updatable.
wait
boolean
    Choices:
  • no
  • yes ←
Whether to wait for create or delete operation to complete.
wait_timeout
integer
Time, in seconds, to wait when wait=yes. Defaults to 1200 for most of the services but some services might have a longer wait timeout.

Examples

- name: Create operator_control_assignment
  oci_operator_access_control_operator_control_assignment:
    # required
    operator_control_id: "ocid1.operatorcontrol.oc1..xxxxxxEXAMPLExxxxxx"
    resource_id: "ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx"
    resource_name: resource_name_example
    resource_type: EXACC
    resource_compartment_id: "ocid1.resourcecompartment.oc1..xxxxxxEXAMPLExxxxxx"
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    is_enforced_always: true

    # optional
    time_assignment_from: time_assignment_from_example
    time_assignment_to: time_assignment_to_example
    comment: comment_example
    is_log_forwarded: true
    remote_syslog_server_address: remote_syslog_server_address_example
    remote_syslog_server_port: 56
    remote_syslog_server_ca_cert: remote_syslog_server_ca_cert_example
    is_auto_approve_during_maintenance: true
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Update operator_control_assignment
  oci_operator_access_control_operator_control_assignment:
    # required
    is_enforced_always: true
    operator_control_assignment_id: "ocid1.operatorcontrolassignment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    time_assignment_from: time_assignment_from_example
    time_assignment_to: time_assignment_to_example
    comment: comment_example
    is_log_forwarded: true
    remote_syslog_server_address: remote_syslog_server_address_example
    remote_syslog_server_port: 56
    remote_syslog_server_ca_cert: remote_syslog_server_ca_cert_example
    is_auto_approve_during_maintenance: true
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Delete operator_control_assignment
  oci_operator_access_control_operator_control_assignment:
    # required
    operator_control_assignment_id: "ocid1.operatorcontrolassignment.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

    # optional
    description: description_example

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)