# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).

import oci

# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()


# Initialize service client with default config file
database_migration_client = oci.database_migration.DatabaseMigrationClient(
    config)


# Send the request to service, some parameters are not required, see API
# doc for more info
clone_migration_response = database_migration_client.clone_migration(
    migration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-migrationId-Value",
    clone_migration_details=oci.database_migration.models.CloneMigrationDetails(
        source_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceDatabaseConnectionId-Value",
        target_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-targetDatabaseConnectionId-Value",
        display_name="EXAMPLE-displayName-Value",
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        agent_id="ocid1.test.oc1..<unique_ID>EXAMPLE-agentId-Value",
        source_container_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceContainerDatabaseConnectionId-Value",
        exclude_objects=[
            oci.database_migration.models.DatabaseObject(
                owner="EXAMPLE-owner-Value",
                object_name="EXAMPLE-objectName-Value",
                type="EXAMPLE-type-Value",
                is_omit_excluded_table_from_replication=True)],
        include_objects=[
            oci.database_migration.models.DatabaseObject(
                owner="EXAMPLE-owner-Value",
                object_name="EXAMPLE-objectName-Value",
                type="EXAMPLE-type-Value",
                is_omit_excluded_table_from_replication=True)],
        vault_details=oci.database_migration.models.CreateVaultDetails(
            compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
            vault_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vaultId-Value",
            key_id="ocid1.test.oc1..<unique_ID>EXAMPLE-keyId-Value"),
        freeform_tags={
            'EXAMPLE_KEY_8A1MT': 'EXAMPLE_VALUE_wTS77yqd675fKsdwQFo9'},
        defined_tags={
            'EXAMPLE_KEY_tXvjV': {
                'EXAMPLE_KEY_Mw0Lu': 'EXAMPLE--Value'}}),
    if_match="EXAMPLE-ifMatch-Value",
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="ZP6HQBNEATD8SQ5HSI5R<unique_ID>")

# Get the data from response
print(clone_migration_response.data)