oracle.oci.oci_data_connectivity_connection – Manage a Connection 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_data_connectivity_connection
.
New in version 2.9.0: of oracle.oci
Synopsis¶
This module allows the user to create, update and delete a Connection resource in Oracle Cloud Infrastructure
For state=present, creates a connection under an existing data asset.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 3.6
Python SDK for Oracle Cloud Infrastructure https://oracle-cloud-infrastructure-python-sdk.readthedocs.io
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
|
|
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
|
|
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.
|
||||
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 . |
||||
connection_key
string
|
The connection key.
Required for update using state=present when environment variable
OCI_USE_NAME_AS_IDENTIFIER is not set.Required for delete using state=absent when environment variable
OCI_USE_NAME_AS_IDENTIFIER is not set. |
||||
connection_properties
list
/ elements=dictionary
|
The properties of the connection.
This parameter is updatable.
|
||||
name
string
|
Free form text without any restriction on the permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters.
|
||||
value
string
|
The value for the connection name property.
|
||||
data_asset_key
string
|
Used to filter by the data asset key of the object.
Required for create using state=present.
Required for update when environment variable
OCI_USE_NAME_AS_IDENTIFIER is set.Required for delete when environment variable
OCI_USE_NAME_AS_IDENTIFIER is set. |
||||
description
string
|
User-defined description of the connection.
This parameter is updatable.
|
||||
force_create
boolean
|
|
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.
|
|||
identifier
string
|
Value can only contain upper case letters, underscore, and numbers. It should begin with an upper case letter or underscore. The value can be modified.
Required for create using state=present.
This parameter is updatable.
|
||||
is_default
boolean
|
|
The default property of the connection.
This parameter is updatable.
|
|||
key
string
|
Generated key that can be used in API calls to identify the connection. In scenarios where reference to the connection is required, a value can be passed in create.
|
||||
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.
|
||||
metadata
dictionary
|
This parameter is updatable.
|
||||
aggregator
dictionary
|
|||||
description
string
|
The description of the aggregator.
|
||||
identifier
string
|
The identifier of the aggregator.
|
||||
key
string
|
The key of the aggregator object.
|
||||
name
string
|
The name of the aggregator.
|
||||
type
string
|
The type of the aggregator.
|
||||
aggregator_key
string
|
The owning object key for this object.
|
||||
created_by
string
|
The user that created the object.
|
||||
created_by_name
string
|
The user that created the object.
|
||||
identifier_path
string
|
The full path to identify the object.
|
||||
info_fields
dictionary
|
Information property fields.
|
||||
is_favorite
boolean
|
|
Specifies whether this object is a favorite.
|
|||
labels
list
/ elements=string
|
Labels are keywords or tags that you can add to data assets, dataflows, and so on. You can define your own labels and use them to categorize content.
|
||||
registry_version
integer
|
The registry version of the object.
|
||||
time_created
string
|
The date and time that the object was created.
|
||||
time_updated
string
|
The date and time that the object was updated.
|
||||
updated_by
string
|
The user that updated the object.
|
||||
updated_by_name
string
|
The user that updated the object.
|
||||
model_type
string
|
The type of the object.
This parameter is updatable.
|
||||
model_version
string
|
The model version of an object.
This parameter is updatable.
|
||||
name
string
|
Free form text without any restriction on the permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters.
Required for create using state=present.
Required for update, delete when environment variable
OCI_USE_NAME_AS_IDENTIFIER is set.This parameter is updatable when
OCI_USE_NAME_AS_IDENTIFIER is not set. |
||||
object_status
integer
|
The status of an object that can be set to value 1 for shallow references across objects, other values reserved.
This parameter is updatable.
|
||||
object_version
integer
|
The version of the object that is used to track changes in the object instance.
This parameter is updatable.
|
||||
primary_schema
dictionary
|
This parameter is updatable.
|
||||
default_connection
string
|
The default connection key.
|
||||
description
string
|
User-defined description for the schema.
|
||||
external_key
string
|
The external key of the object.
|
||||
identifier
string
/ required
|
Value can only contain upper case letters, underscore, and numbers. It should begin with an upper case letter or underscore. The value can be modified.
|
||||
is_has_containers
boolean
|
|
Specifies whether the schema has containers.
|
|||
key
string
/ required
|
The object key.
|
||||
metadata
dictionary
|
|||||
aggregator
dictionary
|
|||||
description
string
|
The description of the aggregator.
|
||||
identifier
string
|
The identifier of the aggregator.
|
||||
key
string
|
The key of the aggregator object.
|
||||
name
string
|
The name of the aggregator.
|
||||
type
string
|
The type of the aggregator.
|
||||
aggregator_key
string
|
The owning object key for this object.
|
||||
created_by
string
|
The user that created the object.
|
||||
created_by_name
string
|
The user that created the object.
|
||||
identifier_path
string
|
The full path to identify the object.
|
||||
info_fields
dictionary
|
Information property fields.
|
||||
is_favorite
boolean
|
|
Specifies whether this object is a favorite.
|
|||
labels
list
/ elements=string
|
Labels are keywords or tags that you can add to data assets, dataflows, and so on. You can define your own labels and use them to categorize content.
|
||||
registry_version
integer
|
The registry version of the object.
|
||||
time_created
string
|
The date and time that the object was created.
|
||||
time_updated
string
|
The date and time that the object was updated.
|
||||
updated_by
string
|
The user that updated the object.
|
||||
updated_by_name
string
|
The user that updated the object.
|
||||
model_type
string
/ required
|
The object type.
|
||||
model_version
string
|
The model version of the object.
|
||||
name
string
/ required
|
Free form text without any restriction on the permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters.
|
||||
object_status
integer
|
The status of an object that can be set to value 1 for shallow references across objects, other values reserved.
|
||||
object_version
integer
|
The version of the object that is used to track changes in the object instance.
|
||||
parent_ref
dictionary
|
|||||
parent
string
|
Key of the parent object.
|
||||
resource_name
string
|
A resource name can have letters, numbers, and special characters. The value is editable and is restricted to 4000 characters.
|
||||
properties
dictionary
|
All the properties of the connection in a key-value map format.
Required for create using state=present, update using state=present with connection_key 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. |
||||
registry_id
string
/ required
|
The registry OCID.
|
||||
registry_metadata
dictionary
|
This parameter is updatable.
|
||||
aggregator_key
string
|
The owning object's key for this object.
|
||||
created_by_user_id
string
|
The ID of the user who created the object.
|
||||
created_by_user_name
string
|
The name of the user who created the object.
|
||||
is_favorite
boolean
|
|
Specifies whether the object is a favorite.
|
|||
key
string
|
The identifying key for the object.
|
||||
labels
list
/ elements=string
|
Labels are keywords or labels that you can add to data assets, dataflows, and so on. You can define your own labels and use them to categorize content.
|
||||
registry_version
integer
|
The registry version.
|
||||
time_created
string
|
The date and time that the object was created.
|
||||
time_updated
string
|
The date and time that the object was updated.
|
||||
updated_by_user_id
string
|
The ID of the user who updated the object.
|
||||
updated_by_user_name
string
|
The name of the user who updated the object.
|
||||
state
string
|
|
The state of the Connection.
Use state=present to create or update a Connection.
Use state=absent to delete a Connection.
|
|||
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 |
||||
type
string
|
Specific Connection Type
Required for create using state=present, update using state=present with connection_key present.
|
Notes¶
Note
For OCI python sdk configuration, please refer to https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html
Examples¶
- name: Create connection
oci_data_connectivity_connection:
# required
name: name_example
identifier: identifier_example
properties: null
type: type_example
registry_id: "ocid1.registry.oc1..xxxxxxEXAMPLExxxxxx"
# optional
key: key_example
model_version: model_version_example
model_type: model_type_example
description: description_example
object_version: 56
object_status: 56
primary_schema:
# required
key: key_example
model_type: model_type_example
name: name_example
identifier: identifier_example
# optional
model_version: model_version_example
parent_ref:
# optional
parent: parent_example
resource_name: resource_name_example
description: description_example
object_version: 56
external_key: external_key_example
is_has_containers: true
default_connection: default_connection_example
object_status: 56
metadata:
# optional
created_by: created_by_example
created_by_name: created_by_name_example
updated_by: updated_by_example
updated_by_name: updated_by_name_example
time_created: time_created_example
time_updated: time_updated_example
aggregator_key: aggregator_key_example
aggregator:
# optional
type: type_example
key: key_example
name: name_example
identifier: identifier_example
description: description_example
identifier_path: identifier_path_example
info_fields: null
registry_version: 56
labels: [ "labels_example" ]
is_favorite: true
connection_properties:
- # optional
name: name_example
value: value_example
is_default: true
metadata:
# optional
created_by: created_by_example
created_by_name: created_by_name_example
updated_by: updated_by_example
updated_by_name: updated_by_name_example
time_created: time_created_example
time_updated: time_updated_example
aggregator_key: aggregator_key_example
aggregator:
# optional
type: type_example
key: key_example
name: name_example
identifier: identifier_example
description: description_example
identifier_path: identifier_path_example
info_fields: null
registry_version: 56
labels: [ "labels_example" ]
is_favorite: true
registry_metadata:
# optional
aggregator_key: aggregator_key_example
labels: [ "labels_example" ]
registry_version: 56
key: key_example
is_favorite: true
created_by_user_id: "ocid1.createdbyuser.oc1..xxxxxxEXAMPLExxxxxx"
created_by_user_name: created_by_user_name_example
updated_by_user_id: "ocid1.updatedbyuser.oc1..xxxxxxEXAMPLExxxxxx"
updated_by_user_name: updated_by_user_name_example
time_created: time_created_example
time_updated: time_updated_example
- name: Update connection
oci_data_connectivity_connection:
# required
properties: null
type: type_example
registry_id: "ocid1.registry.oc1..xxxxxxEXAMPLExxxxxx"
connection_key: connection_key_example
# optional
model_version: model_version_example
model_type: model_type_example
name: name_example
description: description_example
object_version: 56
object_status: 56
identifier: identifier_example
primary_schema:
# required
key: key_example
model_type: model_type_example
name: name_example
identifier: identifier_example
# optional
model_version: model_version_example
parent_ref:
# optional
parent: parent_example
resource_name: resource_name_example
description: description_example
object_version: 56
external_key: external_key_example
is_has_containers: true
default_connection: default_connection_example
object_status: 56
metadata:
# optional
created_by: created_by_example
created_by_name: created_by_name_example
updated_by: updated_by_example
updated_by_name: updated_by_name_example
time_created: time_created_example
time_updated: time_updated_example
aggregator_key: aggregator_key_example
aggregator:
# optional
type: type_example
key: key_example
name: name_example
identifier: identifier_example
description: description_example
identifier_path: identifier_path_example
info_fields: null
registry_version: 56
labels: [ "labels_example" ]
is_favorite: true
connection_properties:
- # optional
name: name_example
value: value_example
is_default: true
metadata:
# optional
created_by: created_by_example
created_by_name: created_by_name_example
updated_by: updated_by_example
updated_by_name: updated_by_name_example
time_created: time_created_example
time_updated: time_updated_example
aggregator_key: aggregator_key_example
aggregator:
# optional
type: type_example
key: key_example
name: name_example
identifier: identifier_example
description: description_example
identifier_path: identifier_path_example
info_fields: null
registry_version: 56
labels: [ "labels_example" ]
is_favorite: true
registry_metadata:
# optional
aggregator_key: aggregator_key_example
labels: [ "labels_example" ]
registry_version: 56
key: key_example
is_favorite: true
created_by_user_id: "ocid1.createdbyuser.oc1..xxxxxxEXAMPLExxxxxx"
created_by_user_name: created_by_user_name_example
updated_by_user_id: "ocid1.updatedbyuser.oc1..xxxxxxEXAMPLExxxxxx"
updated_by_user_name: updated_by_user_name_example
time_created: time_created_example
time_updated: time_updated_example
- name: Update connection using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
oci_data_connectivity_connection:
# required
name: name_example
registry_id: "ocid1.registry.oc1..xxxxxxEXAMPLExxxxxx"
data_asset_key: data_asset_key_example
# optional
model_version: model_version_example
model_type: model_type_example
description: description_example
object_version: 56
object_status: 56
identifier: identifier_example
primary_schema:
# required
key: key_example
model_type: model_type_example
name: name_example
identifier: identifier_example
# optional
model_version: model_version_example
parent_ref:
# optional
parent: parent_example
resource_name: resource_name_example
description: description_example
object_version: 56
external_key: external_key_example
is_has_containers: true
default_connection: default_connection_example
object_status: 56
metadata:
# optional
created_by: created_by_example
created_by_name: created_by_name_example
updated_by: updated_by_example
updated_by_name: updated_by_name_example
time_created: time_created_example
time_updated: time_updated_example
aggregator_key: aggregator_key_example
aggregator:
# optional
type: type_example
key: key_example
name: name_example
identifier: identifier_example
description: description_example
identifier_path: identifier_path_example
info_fields: null
registry_version: 56
labels: [ "labels_example" ]
is_favorite: true
connection_properties:
- # optional
name: name_example
value: value_example
properties: null
type: type_example
is_default: true
metadata:
# optional
created_by: created_by_example
created_by_name: created_by_name_example
updated_by: updated_by_example
updated_by_name: updated_by_name_example
time_created: time_created_example
time_updated: time_updated_example
aggregator_key: aggregator_key_example
aggregator:
# optional
type: type_example
key: key_example
name: name_example
identifier: identifier_example
description: description_example
identifier_path: identifier_path_example
info_fields: null
registry_version: 56
labels: [ "labels_example" ]
is_favorite: true
registry_metadata:
# optional
aggregator_key: aggregator_key_example
labels: [ "labels_example" ]
registry_version: 56
key: key_example
is_favorite: true
created_by_user_id: "ocid1.createdbyuser.oc1..xxxxxxEXAMPLExxxxxx"
created_by_user_name: created_by_user_name_example
updated_by_user_id: "ocid1.updatedbyuser.oc1..xxxxxxEXAMPLExxxxxx"
updated_by_user_name: updated_by_user_name_example
time_created: time_created_example
time_updated: time_updated_example
- name: Delete connection
oci_data_connectivity_connection:
# required
registry_id: "ocid1.registry.oc1..xxxxxxEXAMPLExxxxxx"
connection_key: connection_key_example
state: absent
- name: Delete connection using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
oci_data_connectivity_connection:
# required
name: name_example
registry_id: "ocid1.registry.oc1..xxxxxxEXAMPLExxxxxx"
data_asset_key: data_asset_key_example
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Oracle (@oracle)