# 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
mysql_client = oci.mysql.BlueGreenDeploymentsClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
create_blue_green_deployment_response = mysql_client.create_blue_green_deployment(
    create_blue_green_deployment_details=oci.mysql.models.CreateBlueGreenDeploymentDetails(
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        display_name="EXAMPLE-displayName-Value",
        source_db_system_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceDbSystemId-Value",
        target_db_system_details=oci.mysql.models.CreateBlueGreenDeploymentTargetDbSystemDetails(
            mysql_version="EXAMPLE-mysqlVersion-Value",
            shape_name="EXAMPLE-shapeName-Value",
            configuration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-configurationId-Value",
            data_storage_size_in_gbs=26854),
        channel_details=oci.mysql.models.CreateBlueGreenDeploymentChannelDetails(
            source_username="EXAMPLE-sourceUsername-Value",
            source_password="EXAMPLE-sourcePassword-Value",
            ssl_mode="VERIFY_CA",
            applier_username="EXAMPLE-applierUsername-Value",
            ssl_ca_certificate=oci.mysql.models.PemCaCertificate(
                certificate_type="PEM",
                contents="EXAMPLE-contents-Value")),
        freeform_tags={
            'EXAMPLE_KEY_psoGF': 'EXAMPLE_VALUE_9FLkZT39mHBPX50MNK52'},
        defined_tags={
            'EXAMPLE_KEY_gFcwE': {
                'EXAMPLE_KEY_ten4v': 'EXAMPLE--Value'}}),
    opc_request_id="MB8BTY5I0GI8LVZZQWCZ<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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