# 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="OFFLINE",
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_j0Ybg': 'EXAMPLE_VALUE_jGtqieQPavMwCUQ1Mxy2'},
defined_tags={
'EXAMPLE_KEY_YBYUT': {
'EXAMPLE_KEY_RODMW': '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="FULL",
is_consistent=False,
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="CREATE_INVISIBLE_PKS",
is_ignore_existing_objects=False,
handle_grant_errors="ABORT"),
advisor_settings=oci.database_migration.models.UpdateMySqlAdvisorSettings(
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=472),
replicat=oci.database_migration.models.UpdateReplicat(
performance_profile="HIGH"),
acceptable_lag=22),
ggs_details=oci.database_migration.models.UpdateMySqlGgsDeploymentDetails(
replicat=oci.database_migration.models.UpdateReplicat(
performance_profile="HIGH"),
acceptable_lag=10)),
opc_request_id="OFMJE0X9OJEFTYKXC61H<unique_ID>",
if_match="EXAMPLE-ifMatch-Value")
# Get the data from response
print(update_migration_response.headers)