oracle.oci.oci_oda_channel_actions – Perform actions on a Channel resource in Oracle Cloud Infrastructure

Note

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

New in version 2.9.0: of oracle.oci

Synopsis

  • Perform actions on a Channel resource in Oracle Cloud Infrastructure

  • For action=rotate_channel_keys, this will generate new keys for any generated keys in the Channel (eg. secretKey, verifyToken). If a Channel has no generated keys then no changes will be made. Ensure that you take note of the newly generated keys in the response as they will not be returned again.

  • For action=start, starts a Channel so that it will begin accepting messages.

  • For action=stop, stops a Channel so that it will no longer accept messages.

Requirements

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

Parameters

Parameter Choices/Defaults Comments
action
string / required
    Choices:
  • rotate_channel_keys
  • start
  • stop
The action to perform on the Channel.
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.
channel_id
string / required
Unique Channel identifier.

aliases: id
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.
oda_instance_id
string / required
Unique Digital Assistant instance identifier.
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
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: Perform action rotate_channel_keys on channel
  oci_oda_channel_actions:
    # required
    oda_instance_id: "ocid1.odainstance.oc1..xxxxxxEXAMPLExxxxxx"
    channel_id: "ocid1.channel.oc1..xxxxxxEXAMPLExxxxxx"
    action: rotate_channel_keys

- name: Perform action start on channel
  oci_oda_channel_actions:
    # required
    oda_instance_id: "ocid1.odainstance.oc1..xxxxxxEXAMPLExxxxxx"
    channel_id: "ocid1.channel.oc1..xxxxxxEXAMPLExxxxxx"
    action: start

- name: Perform action stop on channel
  oci_oda_channel_actions:
    # required
    oda_instance_id: "ocid1.odainstance.oc1..xxxxxxEXAMPLExxxxxx"
    channel_id: "ocid1.channel.oc1..xxxxxxEXAMPLExxxxxx"
    action: stop

Return Values

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

Key Returned Description
channel
complex
on success
Details of the Channel resource acted upon by the current operation

Sample:
{'account_sid': 'account_sid_example', 'allowed_domains': 'allowed_domains_example', 'auth_error_url': 'auth_error_url_example', 'auth_success_url': 'auth_success_url_example', 'authentication_provider_name': 'authentication_provider_name_example', 'bootstrap_servers': 'bootstrap_servers_example', 'bot_id': 'ocid1.bot.oc1..xxxxxxEXAMPLExxxxxx', 'category': 'AGENT', 'channel_service': 'OSVC', 'client_id': 'ocid1.client.oc1..xxxxxxEXAMPLExxxxxx', 'client_type': 'WSDL', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'domain_name': 'domain_name_example', 'event_sink_bot_ids': [], 'freeform_tags': {'Department': 'Finance'}, 'host': 'host_example', 'host_name_prefix': 'host_name_prefix_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'inbound_message_topic': 'inbound_message_topic_example', 'is_authenticated_user_id': True, 'is_client_authentication_enabled': True, 'is_mms_enabled': True, 'lifecycle_state': 'CREATING', 'max_token_expiration_time_in_minutes': 56, 'msa_app_id': 'ocid1.msaapp.oc1..xxxxxxEXAMPLExxxxxx', 'name': 'name_example', 'original_connectors_url': 'original_connectors_url_example', 'outbound_message_topic': 'outbound_message_topic_example', 'outbound_url': 'outbound_url_example', 'payload_version': '1.0', 'phone_number': 'phone_number_example', 'port': 'port_example', 'sasl_mechanism': 'sasl_mechanism_example', 'security_protocol': 'security_protocol_example', 'session_expiry_duration_in_milliseconds': 56, 'stream_pool_id': 'ocid1.streampool.oc1..xxxxxxEXAMPLExxxxxx', 'tenancy_name': 'tenancy_name_example', 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'total_session_count': 56, 'type': 'ANDROID', 'user_name': 'user_name_example', 'webhook_url': 'webhook_url_example'}
 
account_sid
string
on success
The Account SID for the Twilio number.

Sample:
account_sid_example
 
allowed_domains
string
on success
A comma-delimited whitelist of allowed domains.
The channel will only communicate with the sites from the domains that you add to this list. For example, *.corp.example.com, *.hdr.example.com. Entering a single asterisk (*) allows unrestricted access to the channel from any domain.
Typically, you'd only enter a single asterisk during development. For production, you would add an allowlist of domains.

Sample:
allowed_domains_example
 
auth_error_url
string
on success
The URL to redirect to when authentication is unsuccessful.

Sample:
auth_error_url_example
 
auth_success_url
string
on success
The URL to redirect to when authentication is successful.

Sample:
auth_success_url_example
 
authentication_provider_name
string
on success
The name of the Authentication Provider to use to authenticate the user.

Sample:
authentication_provider_name_example
 
bootstrap_servers
string
on success
The Oracle Streaming Service bootstrap servers.

Sample:
bootstrap_servers_example
 
bot_id
string
on success
The ID of the Skill or Digital Assistant that the Channel is routed to.

Sample:
ocid1.bot.oc1..xxxxxxEXAMPLExxxxxx
 
category
string
on success
The category of the Channel.

Sample:
AGENT
 
channel_service
string
on success
The type of OSVC service.

Sample:
OSVC
 
client_id
string
on success
The Slack Client Id for the Slack app.

Sample:
ocid1.client.oc1..xxxxxxEXAMPLExxxxxx
 
client_type
string
on success
The type of Service Cloud client.

Sample:
WSDL
 
defined_tags
dictionary
on success
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{"foo-namespace": {"bar-key": "value"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
description
string
on success
A short description of the Channel.

Sample:
description_example
 
domain_name
string
on success
The domain name.
If you have access to Oracle B2C Service, you can derive this value from the URL that you use to launch the Agent Browser User Interface. For example, if the URL is sitename.exampledomain.com, then the host name prefix is sitename and the domain name is exampledomain.com.
If the channel is connecting to Oracle B2C Service version 19A or later, and you have multiple interfaces, then you must include the interface ID in the host (site) name . For example, for the interface that has an ID of 2, you would use something like sitename-2.exampledomain.com.

Sample:
domain_name_example
 
event_sink_bot_ids
list / elements=string
on success
The IDs of the Skills and Digital Assistants that the Channel is routed to.

 
freeform_tags
dictionary
on success
Simple key-value pair that is applied without any predefined name, type, or scope. Example: `{"bar-key": "value"}`

Sample:
{'Department': 'Finance'}
 
host
string
on success
The host.
For OSVC, you can derive these values from the URL that you use to launch the Agent Browser User Interface or the chat launch page. For example, if the URL is https://sitename.exampledomain.com/app/chat/chat_launch, then the host is sitename.exampledomain.com.
For FUSION, this is the host portion of your Oracle Applications Cloud (Fusion) instance's URL. For example: sitename.exampledomain.com.

Sample:
host_example
 
host_name_prefix
string
on success
The host prefix.
If you have access to Oracle B2C Service, you can derive this value from the URL that you use to launch the Agent Browser User Interface. For example, if the URL is sitename.exampledomain.com, then the host name prefix is sitename and the domain name is exampledomain.com.
If the channel is connecting to Oracle B2C Service version 19A or later, and you have multiple interfaces, then you must include the interface ID in the host (site) name . For example, for the interface that has an ID of 2, you would use something like sitename-2.exampledomain.com.

Sample:
host_name_prefix_example
 
id
string
on success
Unique immutable identifier that was assigned when the Channel was created.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
inbound_message_topic
string
on success
The topic inbound messages are received on.

Sample:
inbound_message_topic_example
 
is_authenticated_user_id
boolean
on success
True if the user id in the AIC message should be treated as an authenticated user id.

Sample:
True
 
is_client_authentication_enabled
boolean
on success
Whether client authentication is enabled or not.

Sample:
True
 
is_mms_enabled
boolean
on success
Whether MMS is enabled for this channel or not.

Sample:
True
 
lifecycle_state
string
on success
The Channel's current state.

Sample:
CREATING
 
max_token_expiration_time_in_minutes
integer
on success
The maximum time until the token expires (in minutes).

Sample:
56
 
msa_app_id
string
on success
The Microsoft App ID that you obtained when you created your bot registration in Azure.

Sample:
ocid1.msaapp.oc1..xxxxxxEXAMPLExxxxxx
 
name
string
on success
The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.

Sample:
name_example
 
original_connectors_url
string
on success
The original connectors URL (used for backward compatibility).

Sample:
original_connectors_url_example
 
outbound_message_topic
string
on success
The topic outbound messages are sent on.

Sample:
outbound_message_topic_example
 
outbound_url
string
on success
The URL for sending errors and responses to.

Sample:
outbound_url_example
 
payload_version
string
on success
The version for payloads.

Sample:
1.0
 
phone_number
string
on success
The Twilio phone number.

Sample:
phone_number_example
 
port
string
on success
The port.

Sample:
port_example
 
sasl_mechanism
string
on success
The SASL mechanmism to use when conecting to the Oracle Streaming Service. See Oracle Streaming Service documentation for a list of valid values.

Sample:
sasl_mechanism_example
 
security_protocol
string
on success
The security protocol to use when conecting to the Oracle Streaming Service. See Oracle Streaming Service documentation for a list of valid values.

Sample:
security_protocol_example
 
session_expiry_duration_in_milliseconds
integer
on success
The number of milliseconds before a session expires.

Sample:
56
 
stream_pool_id
string
on success
The stream pool OCI to use when connecting to the Oracle Streaming Service.

Sample:
ocid1.streampool.oc1..xxxxxxEXAMPLExxxxxx
 
tenancy_name
string
on success
The tenancy to use when connecting to the Oracle Streaming Service.

Sample:
tenancy_name_example
 
time_created
string
on success
When the resource was created. A date-time string as described in RFC 3339, section 14.29.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
When the resource was last updated. A date-time string as described in RFC 3339, section 14.29.

Sample:
2013-10-20T19:20:30+01:00
 
total_session_count
integer
on success
The total session count.

Sample:
56
 
type
string
on success
The Channel type.

Sample:
ANDROID
 
user_name
string
on success
The user name to use when connecting to the Oracle Streaming Service.

Sample:
user_name_example
 
webhook_url
string
on success
The URL to use to send messages to this channel. This will be generally be used to configure a webhook in a 3rd party messaging system to send messages to this channel.

Sample:
webhook_url_example


Authors

  • Oracle (@oracle)