# 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
update_migration_response = database_migration_client.update_migration(
    migration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-migrationId-Value",
    update_migration_details=oci.database_migration.models.UpdateMigrationDetails(
        type="OFFLINE",
        display_name="EXAMPLE-displayName-Value",
        agent_id="ocid1.test.oc1..<unique_ID>EXAMPLE-agentId-Value",
        source_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceDatabaseConnectionId-Value",
        source_container_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceContainerDatabaseConnectionId-Value",
        target_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-targetDatabaseConnectionId-Value",
        data_transfer_medium_details=oci.database_migration.models.UpdateDataTransferMediumDetails(
            database_link_details=oci.database_migration.models.UpdateDatabaseLinkDetails(
                name="EXAMPLE-name-Value",
                wallet_bucket=oci.database_migration.models.UpdateObjectStoreBucket(
                    namespace_name="EXAMPLE-namespaceName-Value",
                    bucket_name="EXAMPLE-bucketName-Value")),
            object_storage_details=oci.database_migration.models.UpdateObjectStoreBucket(
                namespace_name="EXAMPLE-namespaceName-Value",
                bucket_name="EXAMPLE-bucketName-Value"),
            aws_s3_details=oci.database_migration.models.UpdateAwsS3Details(
                name="EXAMPLE-name-Value",
                region="EXAMPLE-region-Value",
                access_key_id="ocid1.test.oc1..<unique_ID>EXAMPLE-accessKeyId-Value",
                secret_access_key="EXAMPLE-secretAccessKey-Value")),
        dump_transfer_details=oci.database_migration.models.UpdateDumpTransferDetails(
            source=oci.database_migration.models.UpdateCurlTransferDetails(
                kind="CURL"),
            target=oci.database_migration.models.UpdateCurlTransferDetails(
                kind="CURL")),
        datapump_settings=oci.database_migration.models.UpdateDataPumpSettings(
            job_mode="TRANSPORTABLE",
            data_pump_parameters=oci.database_migration.models.UpdateDataPumpParameters(
                is_cluster=True,
                estimate="BLOCKS",
                table_exists_action="APPEND",
                exclude_parameters=[
                    "INDEX",
                    "MATERIALIZED_VIEW",
                    "MATERIALIZED_VIEW_LOG"],
                import_parallelism_degree=701,
                export_parallelism_degree=22),
            metadata_remaps=[
                oci.database_migration.models.MetadataRemap(
                    type="DATAFILE",
                    old_value="EXAMPLE-oldValue-Value",
                    new_value="EXAMPLE-newValue-Value")],
            tablespace_details=oci.database_migration.models.UpdateNonADBRemapTablespaceDetails(
                target_type="NON_ADB_REMAP",
                remap_target="EXAMPLE-remapTarget-Value"),
            export_directory_object=oci.database_migration.models.UpdateDirectoryObject(
                name="EXAMPLE-name-Value",
                path="EXAMPLE-path-Value"),
            import_directory_object=oci.database_migration.models.UpdateDirectoryObject(
                name="EXAMPLE-name-Value",
                path="EXAMPLE-path-Value")),
        advisor_settings=oci.database_migration.models.UpdateAdvisorSettings(
            is_skip_advisor=False,
            is_ignore_errors=False),
        exclude_objects=[
            oci.database_migration.models.DatabaseObject(
                owner="EXAMPLE-owner-Value",
                object_name="EXAMPLE-objectName-Value",
                type="EXAMPLE-type-Value")],
        include_objects=[
            oci.database_migration.models.DatabaseObject(
                owner="EXAMPLE-owner-Value",
                object_name="EXAMPLE-objectName-Value",
                type="EXAMPLE-type-Value")],
        golden_gate_details=oci.database_migration.models.UpdateGoldenGateDetails(
            hub=oci.database_migration.models.UpdateGoldenGateHub(
                rest_admin_credentials=oci.database_migration.models.UpdateAdminCredentials(
                    username="EXAMPLE-username-Value",
                    password="EXAMPLE-password-Value"),
                source_db_admin_credentials=oci.database_migration.models.UpdateAdminCredentials(
                    username="EXAMPLE-username-Value",
                    password="EXAMPLE-password-Value"),
                source_container_db_admin_credentials=oci.database_migration.models.UpdateAdminCredentials(
                    username="EXAMPLE-username-Value",
                    password="EXAMPLE-password-Value"),
                target_db_admin_credentials=oci.database_migration.models.UpdateAdminCredentials(
                    username="EXAMPLE-username-Value",
                    password="EXAMPLE-password-Value"),
                url="EXAMPLE-url-Value",
                source_microservices_deployment_name="EXAMPLE-sourceMicroservicesDeploymentName-Value",
                target_microservices_deployment_name="EXAMPLE-targetMicroservicesDeploymentName-Value",
                compute_id="ocid1.test.oc1..<unique_ID>EXAMPLE-computeId-Value"),
            settings=oci.database_migration.models.UpdateGoldenGateSettings(
                extract=oci.database_migration.models.UpdateExtract(
                    performance_profile="HIGH",
                    long_trans_duration=188),
                replicat=oci.database_migration.models.UpdateReplicat(
                    map_parallelism=44,
                    min_apply_parallelism=874,
                    max_apply_parallelism=376),
                acceptable_lag=17)),
        vault_details=oci.database_migration.models.UpdateVaultDetails(
            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_zIfVJ': 'EXAMPLE_VALUE_NOrjU8TBpEGm1pF9qu1I'},
        defined_tags={
            'EXAMPLE_KEY_Xf8Ec': {
                'EXAMPLE_KEY_t1srh': 'EXAMPLE--Value'}}),
    opc_request_id="PDVXQGLJ84I3SCZ33HVM<unique_ID>",
    if_match="EXAMPLE-ifMatch-Value")

# Get the data from response
print(update_migration_response.headers)