# 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.MysqlaasClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
create_configuration_response = mysql_client.create_configuration(
    create_configuration_details=oci.mysql.models.CreateConfigurationDetails(
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        shape_name="EXAMPLE-shapeName-Value",
        description="EXAMPLE-description-Value",
        display_name="EXAMPLE-displayName-Value",
        init_variables=oci.mysql.models.InitializationVariables(
            lower_case_table_names="CASE_SENSITIVE"),
        variables=oci.mysql.models.ConfigurationVariables(
            completion_type="RELEASE",
            big_tables=False,
            character_set_server="UTF16",
            collation_server="CP852_GENERAL_CI",
            connection_memory_chunk_size=52978123,
            connection_memory_limit=976096029393088768,
            default_authentication_plugin="mysql_native_password",
            global_connection_memory_limit=4678125720314825728,
            global_connection_memory_tracking=True,
            transaction_isolation="READ-UNCOMMITTED",
            innodb_ft_server_stopword_table="EXAMPLE-innodbFtServerStopwordTable-Value",
            mandatory_roles="EXAMPLE-mandatoryRoles-Value",
            autocommit=False,
            foreign_key_checks=True,
            group_replication_consistency="AFTER",
            group_concat_max_len=191360210924881924,
            innodb_ft_enable_stopword=False,
            innodb_log_writer_threads=False,
            local_infile=False,
            mysql_firewall_mode=True,
            mysqlx_enable_hello_notice=False,
            sql_require_primary_key=True,
            sql_warnings=False,
            binlog_expire_logs_seconds=613,
            binlog_row_metadata="MINIMAL",
            binlog_row_value_options="EXAMPLE-binlogRowValueOptions-Value",
            binlog_transaction_compression=True,
            innodb_buffer_pool_size=8386645630862638080,
            innodb_ft_result_cache_limit=317719410,
            max_binlog_cache_size=26325852843508,
            max_connect_errors=3508592953998054401,
            max_heap_table_size=2453742574949022208,
            max_connections=46245,
            max_prepared_stmt_count=2577561,
            connect_timeout=17653462,
            cte_max_recursion_depth=2783770122,
            generated_random_password_length=187,
            information_schema_stats_expiry=30446026,
            innodb_buffer_pool_dump_pct=49,
            innodb_buffer_pool_instances=6,
            innodb_ddl_buffer_size=2898186238,
            innodb_ddl_threads=52,
            innodb_ft_max_token_size=69,
            innodb_ft_min_token_size=1,
            innodb_ft_num_word_optimize=536,
            innodb_lock_wait_timeout=539391443,
            innodb_max_purge_lag=2657030771,
            innodb_max_purge_lag_delay=147875,
            interactive_timeout=27403860,
            innodb_stats_persistent_sample_pages=3198730243437723649,
            innodb_stats_transient_sample_pages=5552129909501743105,
            innodb_strict_mode=True,
            max_allowed_packet=119169994,
            max_execution_time=1210037467709086720,
            mysqlx_connect_timeout=957501876,
            mysqlx_document_id_unique_prefix=33675,
            mysqlx_idle_worker_thread_timeout=2263,
            mysqlx_interactive_timeout=2019089,
            mysqlx_max_allowed_packet=230303952,
            mysqlx_min_worker_threads=56,
            mysqlx_read_timeout=1387195,
            mysqlx_wait_timeout=1001874,
            mysqlx_write_timeout=1087015,
            net_read_timeout=13811415,
            net_write_timeout=23681241,
            parser_max_mem_size=5972624002617375360,
            query_alloc_block_size=1493422621,
            query_prealloc_size=690863299824277888,
            regexp_time_limit=353669685,
            sql_mode="EXAMPLE-sqlMode-Value",
            tmp_table_size=4725821029931419648,
            mysqlx_deflate_default_compression_level=1,
            mysqlx_deflate_max_client_compression_level=2,
            mysqlx_lz4_max_client_compression_level=11,
            mysqlx_lz4_default_compression_level=8,
            mysqlx_zstd_max_client_compression_level=4,
            mysqlx_zstd_default_compression_level=12,
            mysql_zstd_default_compression_level=6,
            sort_buffer_size=1166526411803185152,
            wait_timeout=2078772,
            thread_pool_dedicated_listeners=False,
            thread_pool_max_transactions_limit=84404,
            time_zone="EXAMPLE-timeZone-Value",
            block_encryption_mode="EXAMPLE-blockEncryptionMode-Value",
            binlog_group_commit_sync_delay=678595,
            binlog_group_commit_sync_no_delay_count=2454,
            replica_net_timeout=2290879,
            require_secure_transport=True,
            innodb_redo_log_capacity=86889359092,
            thread_pool_transaction_delay=142747,
            thread_pool_query_threads_per_group=1479,
            explain_format="JSON",
            explicit_defaults_for_timestamp=True,
            sql_generate_invisible_primary_key=False,
            temptable_max_ram=149996579839193792,
            innodb_change_buffering="INSERTS",
            innodb_adaptive_hash_index=True,
            innodb_undo_log_truncate=True,
            table_definition_cache=516377,
            table_open_cache=306692,
            relay_log_space_limit=5362169235711153152,
            optimizer_switch="EXAMPLE-optimizerSwitch-Value",
            replica_type_conversions="EXAMPLE-replicaTypeConversions-Value",
            replica_parallel_workers=196,
            skip_name_resolve=True,
            max_user_connections=2137790614,
            join_buffer_size=548643068586809472,
            max_seeks_for_key=5917052598348518401,
            range_optimizer_max_mem_size=8855980614714472448,
            auto_increment_increment=42479,
            auto_increment_offset=3216,
            innodb_autoinc_lock_mode=891,
            innodb_rollback_on_timeout=True,
            innodb_online_alter_log_max_size=4876220099847488512,
            innodb_sort_buffer_size=50074203,
            innodb_numa_interleave=True,
            thread_pool_size=502,
            long_query_time=16299501),
        parent_configuration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value",
        freeform_tags={
            'EXAMPLE_KEY_hXnft': 'EXAMPLE_VALUE_iZsm6YGQHLbMuyQEsfMP'},
        defined_tags={
            'EXAMPLE_KEY_1Rjan': {
                'EXAMPLE_KEY_rYUHx': 'EXAMPLE--Value'}}),
    opc_request_id="QOVMKQ1Y8NRSDUZABXMC<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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

Was this article helpful?