# 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
create_migration_response = database_migration_client.create_migration(
    create_migration_details=oci.database_migration.models.CreateOracleMigrationDetails(
        database_combination="ORACLE",
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        type="ONLINE",
        source_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceDatabaseConnectionId-Value",
        target_database_connection_id="ocid1.test.oc1..<unique_ID>EXAMPLE-targetDatabaseConnectionId-Value",
        description="EXAMPLE-description-Value",
        display_name="EXAMPLE-displayName-Value",
        freeform_tags={
            'EXAMPLE_KEY_HWcoc': 'EXAMPLE_VALUE_TU5LFGu8B0ASRNwmwzQ9'},
        defined_tags={
            'EXAMPLE_KEY_Zx4X2': {
                'EXAMPLE_KEY_6z452': 'EXAMPLE--Value'}},
        data_transfer_medium_details=oci.database_migration.models.CreateOracleNfsDataTransferMediumDetails(
            type="NFS",
            object_storage_bucket=oci.database_migration.models.CreateObjectStoreBucket(
                namespace_name="EXAMPLE-namespaceName-Value",
                bucket_name="EXAMPLE-bucketName-Value"),
            source=oci.database_migration.models.CurlTransferDetails(
                kind="CURL",
                wallet_location="EXAMPLE-walletLocation-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.CreateOracleInitialLoadSettings(
            job_mode="TRANSPORTABLE",
            data_pump_parameters=oci.database_migration.models.CreateDataPumpParameters(
                is_cluster=False,
                estimate="BLOCKS",
                table_exists_action="SKIP",
                exclude_parameters=[
                    "INDEX",
                    "MATERIALIZED_VIEW",
                    "MATERIALIZED_VIEW_LOG"],
                import_parallelism_degree=14,
                export_parallelism_degree=90),
            tablespace_details=oci.database_migration.models.CreateADBDedicatedAutoCreateTablespaceDetails(
                target_type="ADB_D_AUTOCREATE",
                is_auto_create=False,
                is_big_file=False,
                extend_size_in_mbs=82181516,
                block_size_in_kbs="SIZE_32K"),
            export_directory_object=oci.database_migration.models.CreateDirectoryObject(
                name="EXAMPLE-name-Value",
                path="EXAMPLE-path-Value"),
            import_directory_object=oci.database_migration.models.CreateDirectoryObject(
                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.CreateOracleAdvisorSettings(
            is_skip_advisor=True,
            is_ignore_errors=True),
        hub_details=oci.database_migration.models.CreateGoldenGateHubDetails(
            rest_admin_credentials=oci.database_migration.models.CreateAdminCredentials(
                username="EXAMPLE-username-Value",
                password="EXAMPLE-password-Value"),
            url="EXAMPLE-url-Value",
            vault_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vaultId-Value",
            key_id="ocid1.test.oc1..<unique_ID>EXAMPLE-keyId-Value",
            compute_id="ocid1.test.oc1..<unique_ID>EXAMPLE-computeId-Value",
            extract=oci.database_migration.models.CreateExtract(
                performance_profile="LOW",
                long_trans_duration=701),
            replicat=oci.database_migration.models.CreateReplicat(
                performance_profile="LOW"),
            acceptable_lag=10),
        ggs_details=oci.database_migration.models.CreateOracleGgsDeploymentDetails(
            extract=oci.database_migration.models.CreateExtract(
                performance_profile="LOW",
                long_trans_duration=622),
            replicat=oci.database_migration.models.CreateReplicat(
                performance_profile="HIGH"),
            acceptable_lag=19),
        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",
        exclude_objects=[
            oci.database_migration.models.OracleDatabaseObject(
                owner="EXAMPLE-owner-Value",
                object_name="EXAMPLE-objectName-Value",
                type="EXAMPLE-type-Value",
                is_omit_excluded_table_from_replication=False)],
        include_objects=[
            oci.database_migration.models.OracleDatabaseObject(
                owner="EXAMPLE-owner-Value",
                object_name="EXAMPLE-objectName-Value",
                type="EXAMPLE-type-Value",
                is_omit_excluded_table_from_replication=False)],
        bulk_include_exclude_data="EXAMPLE-bulkIncludeExcludeData-Value"),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="0LKU0Q7BVBS8ICHFVF2G<unique_ID>")

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