oracle.oci.oci_database_migration_migration_actions – Perform actions on a Migration resource in Oracle Cloud Infrastructure

Note

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

New in version 2.9.0: of oracle.oci

Synopsis

  • Perform actions on a Migration resource in Oracle Cloud Infrastructure

  • For action=add_migration_objects, add excluded/included object to the list.

  • For action=change_compartment, used to change the Migration compartment.

  • For action=remove_migration_objects, remove excluded/included objects.

Requirements

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

Parameters

Parameter Choices/Defaults Comments
action
string / required
    Choices:
  • add_migration_objects
  • change_compartment
  • remove_migration_objects
The action to perform on the Migration.
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
  • security_token
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.
bulk_include_exclude_data
string
Specifies the database objects to be excluded from the migration in bulk. The definition accepts input in a CSV format, newline separated for each entry. More details can be found in the documentation.
Applicable only for action=add_migration_objectsaction=remove_migration_objects.
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 resource being referenced.
Required for action=change_compartment.
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.
database_combination
string
    Choices:
  • MYSQL
  • ORACLE
The combination of source and target databases participating in a migration. Example: ORACLE means the migration is meant for migrating Oracle source and target databases.
Required for action=add_migration_objects, action=remove_migration_objects.
items
list / elements=dictionary
An array of database objects that are either included or excluded from the migration.
Required for action=add_migration_objects, action=remove_migration_objects.
is_omit_excluded_table_from_replication
boolean
    Choices:
  • no
  • yes
Whether an excluded table should be omitted from replication. Only valid for database objects that have are of type TABLE and object status EXCLUDE.
Applicable when database_combination is 'ORACLE'
object_name
string / required
Name of the object (regular expression is allowed)
object_status
string
    Choices:
  • EXCLUDE
  • INCLUDE
Object status.
owner
string
Owner of the object (regular expression is allowed)
Required when database_combination is 'ORACLE'
schema
string
Schema of the object (regular expression is allowed)
Required when database_combination is 'MYSQL'
type
string
Type of object to exclude. If not specified, matching owners and object names of type TABLE would be excluded.
migration_id
string / required
The OCID of the migration

aliases: id
realm_specific_endpoint_template_enabled
boolean
    Choices:
  • no
  • yes
Enable/Disable realm specific endpoint template for service client. By Default, realm specific endpoint template is disabled. If not set, then the value of the OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
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 add_migration_objects on migration with database_combination = MYSQL
  oci_database_migration_migration_actions:
    # required
    database_combination: MYSQL
    items:
    - # required
      object_name: object_name_example

      # optional
      schema: schema_example
      object_status: EXCLUDE
      owner: owner_example
      type: type_example
      is_omit_excluded_table_from_replication: true

    # optional
    bulk_include_exclude_data: bulk_include_exclude_data_example

- name: Perform action add_migration_objects on migration with database_combination = ORACLE
  oci_database_migration_migration_actions:
    # required
    database_combination: ORACLE
    items:
    - # required
      object_name: object_name_example

      # optional
      schema: schema_example
      object_status: EXCLUDE
      owner: owner_example
      type: type_example
      is_omit_excluded_table_from_replication: true

    # optional
    bulk_include_exclude_data: bulk_include_exclude_data_example

- name: Perform action change_compartment on migration
  oci_database_migration_migration_actions:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    migration_id: "ocid1.migration.oc1..xxxxxxEXAMPLExxxxxx"
    action: change_compartment

- name: Perform action remove_migration_objects on migration with database_combination = MYSQL
  oci_database_migration_migration_actions:
    # required
    database_combination: MYSQL
    items:
    - # required
      object_name: object_name_example

      # optional
      schema: schema_example
      object_status: EXCLUDE
      owner: owner_example
      type: type_example
      is_omit_excluded_table_from_replication: true

    # optional
    bulk_include_exclude_data: bulk_include_exclude_data_example

- name: Perform action remove_migration_objects on migration with database_combination = ORACLE
  oci_database_migration_migration_actions:
    # required
    database_combination: ORACLE
    items:
    - # required
      object_name: object_name_example

      # optional
      schema: schema_example
      object_status: EXCLUDE
      owner: owner_example
      type: type_example
      is_omit_excluded_table_from_replication: true

    # optional
    bulk_include_exclude_data: bulk_include_exclude_data_example

Return Values

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

Key Returned Description
migration
complex
on success
Details of the Migration resource acted upon by the current operation

Sample:
{'advanced_parameters': [{'data_type': 'STRING', 'name': 'name_example', 'value': 'value_example'}], 'advisor_settings': {'is_ignore_errors': True, 'is_skip_advisor': True}, 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'data_transfer_medium_details': {'access_key_id': 'ocid1.accesskey.oc1..xxxxxxEXAMPLExxxxxx', 'name': 'name_example', 'object_storage_bucket': {'bucket_name': 'bucket_name_example', 'namespace_name': 'namespace_name_example'}, 'region': 'us-phoenix-1', 'secret_access_key': 'secret_access_key_example', 'shared_storage_mount_target_id': 'ocid1.sharedstoragemounttarget.oc1..xxxxxxEXAMPLExxxxxx', 'source': {'kind': 'CURL', 'oci_home': 'oci_home_example', 'wallet_location': 'wallet_location_example'}, 'target': {'kind': 'CURL', 'oci_home': 'oci_home_example', 'wallet_location': 'wallet_location_example'}, 'type': 'OBJECT_STORAGE'}, 'database_combination': 'MYSQL', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'display_name': 'display_name_example', 'executing_job_id': 'ocid1.executingjob.oc1..xxxxxxEXAMPLExxxxxx', 'freeform_tags': {'Department': 'Finance'}, 'ggs_details': {'acceptable_lag': 56, 'extract': {'long_trans_duration': 56, 'performance_profile': 'LOW'}, 'ggs_deployment': {'deployment_id': 'ocid1.deployment.oc1..xxxxxxEXAMPLExxxxxx', 'ggs_admin_credentials_secret_id': 'ocid1.ggsadmincredentialssecret.oc1..xxxxxxEXAMPLExxxxxx'}, 'replicat': {'performance_profile': 'LOW'}}, 'hub_details': {'acceptable_lag': 56, 'compute_id': 'ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx', 'extract': {'long_trans_duration': 56, 'performance_profile': 'LOW'}, 'key_id': 'ocid1.key.oc1..xxxxxxEXAMPLExxxxxx', 'replicat': {'performance_profile': 'LOW'}, 'rest_admin_credentials': {'username': 'username_example'}, 'url': 'url_example', 'vault_id': 'ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'initial_load_settings': {'compatibility': [], 'data_pump_parameters': {'estimate': 'BLOCKS', 'exclude_parameters': [], 'export_parallelism_degree': 56, 'import_parallelism_degree': 56, 'is_cluster': True, 'table_exists_action': 'TRUNCATE'}, 'export_directory_object': {'name': 'name_example', 'path': 'path_example'}, 'handle_grant_errors': 'ABORT', 'import_directory_object': {'name': 'name_example', 'path': 'path_example'}, 'is_consistent': True, 'is_ignore_existing_objects': True, 'is_tz_utc': True, 'job_mode': 'FULL', 'metadata_remaps': [{'new_value': 'new_value_example', 'old_value': 'old_value_example', 'type': 'SCHEMA'}], 'primary_key_compatibility': 'NONE', 'tablespace_details': {'block_size_in_kbs': 'SIZE_8K', 'extend_size_in_mbs': 56, 'is_auto_create': True, 'is_big_file': True, 'remap_target': 'remap_target_example', 'target_type': 'ADB_S_REMAP'}}, 'lifecycle_details': 'READY', 'lifecycle_state': 'CREATING', 'source_container_database_connection_id': 'ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx', 'source_database_connection_id': 'ocid1.sourcedatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx', 'system_tags': {}, 'target_database_connection_id': 'ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx', 'time_created': '2013-10-20T19:20:30+01:00', 'time_last_migration': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'type': 'ONLINE', 'wait_after': 'ODMS_VALIDATE_TGT'}
 
advanced_parameters
complex
on success
List of Migration Parameter objects.

   
data_type
string
on success
Parameter data type.

Sample:
STRING
   
name
string
on success
Parameter name.

Sample:
name_example
   
value
string
on success
If a STRING data type then the value should be an array of characters, if a INTEGER data type then the value should be an integer value, if a FLOAT data type then the value should be an float value, if a BOOLEAN data type then the value should be TRUE or FALSE.

Sample:
value_example
 
advisor_settings
complex
on success

   
is_ignore_errors
boolean
on success
True to not interrupt migration execution due to Pre-Migration Advisor errors. Default is false.

Sample:
True
   
is_skip_advisor
boolean
on success
True to skip the Pre-Migration Advisor execution. Default is false.

Sample:
True
 
compartment_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
data_transfer_medium_details
complex
on success

   
access_key_id
string
on success
AWS access key credentials identifier Details: https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys

Sample:
ocid1.accesskey.oc1..xxxxxxEXAMPLExxxxxx
   
name
string
on success
S3 bucket name.

Sample:
name_example
   
object_storage_bucket
complex
on success

     
bucket_name
string
on success
Bucket name.

Sample:
bucket_name_example
     
namespace_name
string
on success
Namespace name of the object store bucket.

Sample:
namespace_name_example
   
region
string
on success
AWS region code where the S3 bucket is located. Region code should match the documented available regions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions

Sample:
us-phoenix-1
   
secret_access_key
string
on success
AWS secret access key credentials Details: https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys

Sample:
secret_access_key_example
   
shared_storage_mount_target_id
string
on success
OCID of the shared storage mount target

Sample:
ocid1.sharedstoragemounttarget.oc1..xxxxxxEXAMPLExxxxxx
   
source
complex
on success

     
kind
string
on success
Type of dump transfer to use during migration in source or target host. Default kind is CURL

Sample:
CURL
     
oci_home
string
on success
Path to the OCI CLI installation in the node.

Sample:
oci_home_example
     
wallet_location
string
on success
Directory path to OCI SSL wallet location on Db server node.

Sample:
wallet_location_example
   
target
complex
on success

     
kind
string
on success
Type of dump transfer to use during migration in source or target host. Default kind is CURL

Sample:
CURL
     
oci_home
string
on success
Path to the OCI CLI installation in the node.

Sample:
oci_home_example
     
wallet_location
string
on success
Directory path to OCI SSL wallet location on Db server node.

Sample:
wallet_location_example
   
type
string
on success
Type of the data transfer medium to use.

Sample:
OBJECT_STORAGE
 
database_combination
string
on success
The combination of source and target databases participating in a migration. Example: ORACLE means the migration is meant for migrating Oracle source and target databases.

Sample:
MYSQL
 
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 user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Sample:
description_example
 
display_name
string
on success
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Sample:
display_name_example
 
executing_job_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.executingjob.oc1..xxxxxxEXAMPLExxxxxx
 
freeform_tags
dictionary
on success
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Sample:
{'Department': 'Finance'}
 
ggs_details
complex
on success

   
acceptable_lag
integer
on success
ODMS will monitor GoldenGate end-to-end latency until the lag time is lower than the specified value in seconds.

Sample:
56
   
extract
complex
on success

     
long_trans_duration
integer
on success
Length of time (in seconds) that a transaction can be open before Extract generates a warning message that the transaction is long-running. If not specified, Extract will not generate a warning on long-running transactions.

Sample:
56
     
performance_profile
string
on success
Extract performance.

Sample:
LOW
   
ggs_deployment
complex
on success

     
deployment_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.deployment.oc1..xxxxxxEXAMPLExxxxxx
     
ggs_admin_credentials_secret_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.ggsadmincredentialssecret.oc1..xxxxxxEXAMPLExxxxxx
   
replicat
complex
on success

     
performance_profile
string
on success
Replicat performance.

Sample:
LOW
 
hub_details
complex
on success

   
acceptable_lag
integer
on success
ODMS will monitor GoldenGate end-to-end latency until the lag time is lower than the specified value in seconds.

Sample:
56
   
compute_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx
   
extract
complex
on success

     
long_trans_duration
integer
on success
Length of time (in seconds) that a transaction can be open before Extract generates a warning message that the transaction is long-running. If not specified, Extract will not generate a warning on long-running transactions.

Sample:
56
     
performance_profile
string
on success
Extract performance.

Sample:
LOW
   
key_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.key.oc1..xxxxxxEXAMPLExxxxxx
   
replicat
complex
on success

     
performance_profile
string
on success
Replicat performance.

Sample:
LOW
   
rest_admin_credentials
complex
on success

     
username
string
on success
Administrator username

Sample:
username_example
   
url
string
on success
Endpoint URL.

Sample:
url_example
   
vault_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx
 
id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
initial_load_settings
complex
on success

   
compatibility
list / elements=string
on success
Apply the specified requirements for compatibility with MySQL Database Service for all tables in the dump output, altering the dump files as necessary.

   
data_pump_parameters
complex
on success

     
estimate
string
on success
Estimate size of dumps that will be generated.

Sample:
BLOCKS
     
exclude_parameters
list / elements=string
on success
Exclude paratemers for Export and Import.

     
export_parallelism_degree
integer
on success
Maximum number of worker processes that can be used for a Data Pump Export job.

Sample:
56
     
import_parallelism_degree
integer
on success
Maximum number of worker processes that can be used for a Data Pump Import job. For an Autonomous Database, ODMS will automatically query its CPU core count and set this property.

Sample:
56
     
is_cluster
boolean
on success
Set to false to force Data Pump worker process to run on one instance.

Sample:
True
     
table_exists_action
string
on success
IMPORT: Specifies the action to be performed when data is loaded into a preexisting table.

Sample:
TRUNCATE
   
export_directory_object
complex
on success

     
name
string
on success
Name of directory object in database

Sample:
name_example
     
path
string
on success
Absolute path of directory on database server

Sample:
path_example
   
handle_grant_errors
string
on success
The action taken in the event of errors related to GRANT or REVOKE errors.

Sample:
ABORT
   
import_directory_object
complex
on success

     
name
string
on success
Name of directory object in database

Sample:
name_example
     
path
string
on success
Absolute path of directory on database server

Sample:
path_example
   
is_consistent
boolean
on success
Enable (true) or disable (false) consistent data dumps by locking the instance for backup during the dump.

Sample:
True
   
is_ignore_existing_objects
boolean
on success
Import the dump even if it contains objects that already exist in the target schema in the MySQL instance.

Sample:
True
   
is_tz_utc
boolean
on success
Include a statement at the start of the dump to set the time zone to UTC.

Sample:
True
   
job_mode
string
on success
MySql Job Mode

Sample:
FULL
   
metadata_remaps
complex
on success
Defines remapping to be applied to objects as they are processed.

     
new_value
string
on success
Specifies the new value that oldValue should be translated into.

Sample:
new_value_example
     
old_value
string
on success
Specifies the value which needs to be reset.

Sample:
old_value_example
     
type
string
on success
Type of remap. Refer to METADATA_REMAP Procedure

Sample:
SCHEMA
   
primary_key_compatibility
string
on success
Primary key compatibility option

Sample:
NONE
   
tablespace_details
complex
on success

     
block_size_in_kbs
string
on success
Size of Oracle database blocks in KB.

Sample:
SIZE_8K
     
extend_size_in_mbs
integer
on success
Size to extend the tablespace in MB. Note: Only applicable if 'isBigFile' property is set to true.

Sample:
56
     
is_auto_create
boolean
on success
Set this property to true to auto-create tablespaces in the target Database. Note: This is not applicable for Autonomous Database Serverless databases.

Sample:
True
     
is_big_file
boolean
on success
Set this property to true to enable tablespace of the type big file.

Sample:
True
     
remap_target
string
on success
Name of the tablespace on the target database to which the source database tablespace is to be remapped.

Sample:
remap_target_example
     
target_type
string
on success
Type of Database Base Migration Target.

Sample:
ADB_S_REMAP
 
lifecycle_details
string
on success
Additional status related to the execution and current state of the Migration.

Sample:
READY
 
lifecycle_state
string
on success
The current state of the Migration resource.

Sample:
CREATING
 
source_container_database_connection_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
source_database_connection_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.sourcedatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
system_tags
dictionary
on success
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`

 
target_database_connection_id
string
on success
The OCID of the resource being referenced.

Sample:
ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
time_created
string
on success
An RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.

Sample:
2013-10-20T19:20:30+01:00
 
time_last_migration
string
on success
An RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
An RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.

Sample:
2013-10-20T19:20:30+01:00
 
type
string
on success
The type of the migration to be performed. Example: ONLINE if no downtime is preferred for a migration. This method uses Oracle GoldenGate for replication.

Sample:
ONLINE
 
wait_after
string
on success
You can optionally pause a migration after a job phase. This property allows you to optionally specify the phase after which you can pause the migration.

Sample:
ODMS_VALIDATE_TGT


Authors

  • Oracle (@oracle)