oracle.oci.oci_database_migration_migration_facts – Fetches details about one or multiple Migration resources 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_database_migration_migration_facts.

New in version 2.9.0: of oracle.oci

Synopsis

  • Fetches details about one or multiple Migration resources in Oracle Cloud Infrastructure

  • List all Migrations.

  • If migration_id is specified, the details of a single Migration will be returned.

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.
compartment_id
string
The ID of the compartment in which to list resources.
Required to list multiple migrations.
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.
display_name
string
A filter to return only resources that match the entire display name given.

aliases: name
lifecycle_details
string
    Choices:
  • READY
  • ABORTING
  • VALIDATING
  • VALIDATED
  • WAITING
  • MIGRATING
  • DONE
The lifecycle detailed status of the Migration.
lifecycle_state
string
    Choices:
  • CREATING
  • UPDATING
  • ACTIVE
  • IN_PROGRESS
  • ACCEPTED
  • SUCCEEDED
  • CANCELED
  • WAITING
  • NEEDS_ATTENTION
  • INACTIVE
  • DELETING
  • DELETED
  • FAILED
The lifecycle state of the Migration.
migration_id
string
The OCID of the migration
Required to get a specific migration.

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.
sort_by
string
    Choices:
  • timeCreated
  • displayName
The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use, either 'asc' or 'desc'.
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: Get a specific migration
  oci_database_migration_migration_facts:
    # required
    migration_id: "ocid1.migration.oc1..xxxxxxEXAMPLExxxxxx"

- name: List migrations
  oci_database_migration_migration_facts:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    display_name: display_name_example
    sort_by: timeCreated
    sort_order: ASC
    lifecycle_state: CREATING
    lifecycle_details: READY

Return Values

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

Key Returned Description
migrations
complex
on success
List of Migration resources

Sample:
[{'advisor_settings': {'is_ignore_errors': True, 'is_skip_advisor': True}, 'agent_id': 'ocid1.agent.oc1..xxxxxxEXAMPLExxxxxx', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'credentials_secret_id': 'ocid1.credentialssecret.oc1..xxxxxxEXAMPLExxxxxx', 'data_transfer_medium_details': {'aws_s3_details': {'name': 'name_example', 'region': 'us-phoenix-1'}, 'database_link_details': {'name': 'name_example', 'wallet_bucket': {'bucket_name': 'bucket_name_example', 'namespace_name': 'namespace_name_example'}}, 'object_storage_details': {'bucket_name': 'bucket_name_example', 'namespace_name': 'namespace_name_example'}}, 'datapump_settings': {'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'}, 'import_directory_object': {'name': 'name_example', 'path': 'path_example'}, 'job_mode': 'FULL', 'metadata_remaps': [{'new_value': 'new_value_example', 'old_value': 'old_value_example', 'type': 'SCHEMA'}], 'tablespace_details': {'extend_size_in_mbs': 56, 'is_auto_create': True, 'is_big_file': True, 'remap_target': 'remap_target_example', 'target_type': 'ADB_S_REMAP'}}, 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'display_name': 'display_name_example', 'dump_transfer_details': {'source': {'kind': 'CURL', 'oci_home': 'oci_home_example'}, 'target': {'kind': 'CURL', 'oci_home': 'oci_home_example'}}, 'exclude_objects': [{'object_name': 'object_name_example', 'owner': 'owner_example', 'type': 'type_example'}], 'executing_job_id': 'ocid1.executingjob.oc1..xxxxxxEXAMPLExxxxxx', 'freeform_tags': {'Department': 'Finance'}, 'golden_gate_details': {'hub': {'compute_id': 'ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx', 'rest_admin_credentials': {'username': 'username_example'}, 'source_container_db_admin_credentials': {'username': 'username_example'}, 'source_db_admin_credentials': {'username': 'username_example'}, 'source_microservices_deployment_name': 'source_microservices_deployment_name_example', 'target_db_admin_credentials': {'username': 'username_example'}, 'target_microservices_deployment_name': 'target_microservices_deployment_name_example', 'url': 'url_example'}, 'settings': {'acceptable_lag': 56, 'extract': {'long_trans_duration': 56, 'performance_profile': 'LOW'}, 'replicat': {'map_parallelism': 56, 'max_apply_parallelism': 56, 'min_apply_parallelism': 56}}}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'include_objects': [{'object_name': 'object_name_example', 'owner': 'owner_example', 'type': 'type_example'}], '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', 'vault_details': {'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'key_id': 'ocid1.key.oc1..xxxxxxEXAMPLExxxxxx', 'vault_id': 'ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx'}, 'wait_after': 'ODMS_VALIDATE_TGT'}]
 
advisor_settings
complex
on success
Returned for get operation

   
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
 
agent_id
string
on success
The OCID of the registered on-premises ODMS Agent. Only valid for Offline Migrations.

Sample:
ocid1.agent.oc1..xxxxxxEXAMPLExxxxxx
 
compartment_id
string
on success
OCID of the compartment

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
credentials_secret_id
string
on success
OCID of the Secret in the OCI vault containing the Migration credentials. Used to store GoldenGate administrator user credentials.
Returned for get operation

Sample:
ocid1.credentialssecret.oc1..xxxxxxEXAMPLExxxxxx
 
data_transfer_medium_details
complex
on success
Returned for get operation

   
aws_s3_details
complex
on success

     
name
string
on success
S3 bucket name.

Sample:
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
    database_link_details
complex
on success

      name
string
on success
Name of database link from OCI database to on-premise database. ODMS will create link, if the link does not already exist.

Sample:
name_example
      wallet_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
   
object_storage_details
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
 
datapump_settings
complex
on success
Returned for get operation

   
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 processes 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
   
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
   
job_mode
string
on success
Data Pump job mode. Refer to Data Pump Export Modes

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

     
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
   
tablespace_details
complex
on success

     
extend_size_in_mbs
integer
on success
Size of extend in MB. Can only be specified if 'isBigFile' property is set to true.

Sample:
56
     
is_auto_create
boolean
on success
True to auto-create tablespace in the target Database.

Sample:
True
     
is_big_file
boolean
on success
True set tablespace to big file.

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

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

Sample:
ADB_S_REMAP
 
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'}}
 
display_name
string
on success
Migration Display Name

Sample:
display_name_example
 
dump_transfer_details
complex
on success
Returned for get operation

   
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
   
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
 
exclude_objects
complex
on success
Database objects to exclude from migration. If 'includeObjects' are specified, only exclude object types can be specified with general wildcards (.*) for owner and objectName.
Returned for get operation

   
object_name
string
on success
Name of the object (regular expression is allowed)

Sample:
object_name_example
   
owner
string
on success
Owner of the object (regular expression is allowed)

Sample:
owner_example
   
type
string
on success
Type of object to exclude. If not specified, matching owners and object names of type TABLE would be excluded.

Sample:
type_example
 
executing_job_id
string
on success
OCID of the current ODMS Job in execution for the Migration, if any.

Sample:
ocid1.executingjob.oc1..xxxxxxEXAMPLExxxxxx
 
freeform_tags
dictionary
on success
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`

Sample:
{'Department': 'Finance'}
 
golden_gate_details
complex
on success
Returned for get operation

   
hub
complex
on success

     
compute_id
string
on success
OCID of GoldenGate compute instance.

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

       
username
string
on success
Administrator username

Sample:
username_example
     
source_container_db_admin_credentials
complex
on success

       
username
string
on success
Administrator username

Sample:
username_example
     
source_db_admin_credentials
complex
on success

       
username
string
on success
Administrator username

Sample:
username_example
     
source_microservices_deployment_name
string
on success
Name of GoldenGate deployment to operate on source database

Sample:
source_microservices_deployment_name_example
     
target_db_admin_credentials
complex
on success

       
username
string
on success
Administrator username

Sample:
username_example
     
target_microservices_deployment_name
string
on success
Name of GoldenGate deployment to operate on target database

Sample:
target_microservices_deployment_name_example
     
url
string
on success
Oracle GoldenGate hub's REST endpoint. Refer to https://docs.oracle.com/en/middleware/goldengate/core/19.1/securing/network.html#GUID-A709DA55-111D-455E-8942-C9BDD1E38CAA

Sample:
url_example
   
settings
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
     
replicat
complex
on success

       
map_parallelism
integer
on success
Number of threads used to read trail files (valid for Parallel Replicat)

Sample:
56
       
max_apply_parallelism
integer
on success
Defines the range in which Replicat automatically adjusts its apply parallelism (valid for Parallel Replicat)

Sample:
56
       
min_apply_parallelism
integer
on success
Defines the range in which Replicat automatically adjusts its apply parallelism (valid for Parallel Replicat)

Sample:
56
 
id
string
on success
The OCID of the resource

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
include_objects
complex
on success
Database objects to include from migration.
Returned for get operation

   
object_name
string
on success
Name of the object (regular expression is allowed)

Sample:
object_name_example
   
owner
string
on success
Owner of the object (regular expression is allowed)

Sample:
owner_example
   
type
string
on success
Type of object to exclude. If not specified, matching owners and object names of type TABLE would be excluded.

Sample:
type_example
 
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 Source Container Database Connection.

Sample:
ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
source_database_connection_id
string
on success
The OCID of the Source Database Connection.

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 Target Database Connection.

Sample:
ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
time_created
string
on success
The time the Migration was created. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
time_last_migration
string
on success
The time of last Migration. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
The time of the last Migration details update. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
type
string
on success
Migration type.

Sample:
ONLINE
 
vault_details
complex
on success

   
compartment_id
string
on success
OCID of the compartment where the secret containing the credentials will be created.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
   
key_id
string
on success
OCID of the vault encryption key

Sample:
ocid1.key.oc1..xxxxxxEXAMPLExxxxxx
   
vault_id
string
on success
OCID of the vault

Sample:
ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx
 
wait_after
string
on success
Name of a migration phase. The Job will wait after executing this phase until the Resume Job endpoint is called.
Returned for get operation

Sample:
ODMS_VALIDATE_TGT


Authors

  • Oracle (@oracle)