# 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.UpdateOracleMigrationDetails(
        database_combination="ORACLE",
        description="EXAMPLE-description-Value",
        type="ONLINE",
        display_name="EXAMPLE-displayName-Value",
        source_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceDatabaseConnectionId-Value",
        target_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-targetDatabaseConnectionId-Value",
        freeform_tags={
            'EXAMPLE_KEY_7lNsG': 'EXAMPLE_VALUE_uIJPTbb5iSnzRjGAwvpH'},
        defined_tags={
            'EXAMPLE_KEY_xsrzg': {
                'EXAMPLE_KEY_Q7NV9': 'EXAMPLE--Value'}},
        data_transfer_medium_details=oci.database_migration.models.UpdateOracleNfsDataTransferMediumDetails(
            type="NFS",
            object_storage_bucket=oci.database_migration.models.UpdateObjectStoreBucket(
                namespace_name="EXAMPLE-namespaceName-Value",
                bucket_name="EXAMPLE-bucketName-Value"),
            source=oci.database_migration.models.OciCliDumpTransferDetails(
                kind="OCI_CLI",
                wallet_location="EXAMPLE-walletLocation-Value",
                oci_home="EXAMPLE-ociHome-Value"),
            target=oci.database_migration.models.CurlTransferDetails(
                kind="CURL",
                wallet_location="EXAMPLE-walletLocation-Value"),
            shared_storage_mount_target_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sharedStorageMountTargetId-Value"),
        initial_load_settings=oci.database_migration.models.UpdateOracleInitialLoadSettings(
            job_mode="TRANSPORTABLE",
            data_pump_parameters=oci.database_migration.models.UpdateDataPumpParameters(
                is_cluster=False,
                estimate="STATISTICS",
                table_exists_action="APPEND",
                exclude_parameters=[
                    "INDEX",
                    "MATERIALIZED_VIEW",
                    "MATERIALIZED_VIEW_LOG"],
                import_parallelism_degree=45,
                export_parallelism_degree=24),
            tablespace_details=oci.database_migration.models.UpdateNonADBAutoCreateTablespaceDetails(
                target_type="NON_ADB_AUTOCREATE",
                is_auto_create=False,
                is_big_file=False,
                extend_size_in_mbs=13068900,
                block_size_in_kbs="SIZE_2K"),
            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"),
            metadata_remaps=[
                oci.database_migration.models.MetadataRemap(
                    type="TABLESPACE",
                    old_value="EXAMPLE-oldValue-Value",
                    new_value="EXAMPLE-newValue-Value")]),
        advisor_settings=oci.database_migration.models.UpdateOracleAdvisorSettings(
            is_skip_advisor=True,
            is_ignore_errors=False),
        hub_details=oci.database_migration.models.UpdateGoldenGateHubDetails(
            rest_admin_credentials=oci.database_migration.models.UpdateAdminCredentials(
                username="EXAMPLE-username-Value",
                password="EXAMPLE-password-Value"),
            url="EXAMPLE-url-Value",
            compute_id="ocid1.test.oc1..<unique_ID>EXAMPLE-computeId-Value",
            vault_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vaultId-Value",
            key_id="ocid1.test.oc1..<unique_ID>EXAMPLE-keyId-Value",
            extract=oci.database_migration.models.UpdateExtract(
                performance_profile="HIGH",
                long_trans_duration=492),
            replicat=oci.database_migration.models.UpdateReplicat(
                performance_profile="LOW"),
            acceptable_lag=28),
        ggs_details=oci.database_migration.models.UpdateOracleGgsDeploymentDetails(
            extract=oci.database_migration.models.UpdateExtract(
                performance_profile="MEDIUM",
                long_trans_duration=121),
            replicat=oci.database_migration.models.UpdateReplicat(
                performance_profile="LOW"),
            acceptable_lag=18),
        advanced_parameters=[
            oci.database_migration.models.MigrationParameterDetails(
                value="EXAMPLE-value-Value",
                name="EXAMPLE-name-Value",
                data_type="INTEGER")],
        source_container_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceContainerDatabaseConnectionId-Value",
        source_standby_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceStandbyDatabaseConnectionId-Value"),
    opc_request_id="UHBLKPD8MEB3WWGPDWYK<unique_ID>",
    if_match="EXAMPLE-ifMatch-Value")

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