# 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.UpdateMySqlMigrationDetails(
database_combination="MYSQL",
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_X24Wh': 'EXAMPLE_VALUE_E9BCyvSjoGAnORg21Odd'},
defined_tags={
'EXAMPLE_KEY_KtNMH': {
'EXAMPLE_KEY_nJUl0': 'EXAMPLE--Value'}},
data_transfer_medium_details=oci.database_migration.models.UpdateMySqlObjectStorageDataTransferMediumDetails(
type="OBJECT_STORAGE",
object_storage_bucket=oci.database_migration.models.UpdateObjectStoreBucket(
namespace_name="EXAMPLE-namespaceName-Value",
bucket_name="EXAMPLE-bucketName-Value")),
initial_load_settings=oci.database_migration.models.UpdateMySqlInitialLoadSettings(
job_mode="SCHEMA",
is_consistent=True,
is_tz_utc=True,
compatibility=[
"FORCE_INNODB",
"SKIP_INVALID_ACCOUNTS",
"STRIP_DEFINERS",
"STRIP_RESTRICTED_GRANTS",
"STRIP_TABLESPACES",
"IGNORE_WILDCARD_GRANTS",
"STRIP_INVALID_GRANTS"],
primary_key_compatibility="IGNORE_MISSING_PKS",
is_ignore_existing_objects=True,
handle_grant_errors="ABORT"),
advisor_settings=oci.database_migration.models.UpdateMySqlAdvisorSettings(
is_skip_advisor=False,
is_ignore_errors=True),
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="MEDIUM",
long_trans_duration=864),
replicat=oci.database_migration.models.UpdateReplicat(
performance_profile="HIGH"),
acceptable_lag=11),
ggs_details=oci.database_migration.models.UpdateMySqlGgsDeploymentDetails(
replicat=oci.database_migration.models.UpdateReplicat(
performance_profile="LOW"),
acceptable_lag=8)),
opc_request_id="6ZUDUZFX1CSIQWLJYGF5<unique_ID>",
if_match="EXAMPLE-ifMatch-Value")
# Get the data from response
print(update_migration_response.headers)