# 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_INSENSITIVE_LOWERCASE"),
        variables=oci.mysql.models.ConfigurationVariables(
            completion_type="RELEASE",
            big_tables=False,
            character_set_server="GB2312",
            collation_server="CP852_GENERAL_CI",
            connection_memory_chunk_size=147237689,
            connection_memory_limit=3318273348883191808,
            default_authentication_plugin="mysql_native_password",
            global_connection_memory_limit=3133168668647917056,
            global_connection_memory_tracking=False,
            transaction_isolation="READ-COMMITTED",
            innodb_ft_server_stopword_table="EXAMPLE-innodbFtServerStopwordTable-Value",
            mandatory_roles="EXAMPLE-mandatoryRoles-Value",
            autocommit=False,
            foreign_key_checks=True,
            group_replication_consistency="BEFORE_AND_AFTER",
            group_concat_max_len=3795067413701709828,
            innodb_ft_enable_stopword=True,
            innodb_log_writer_threads=False,
            local_infile=True,
            mysql_firewall_mode=True,
            mysqlx_enable_hello_notice=False,
            sql_require_primary_key=False,
            sql_warnings=True,
            binlog_expire_logs_seconds=371,
            binlog_row_metadata="MINIMAL",
            binlog_row_value_options="EXAMPLE-binlogRowValueOptions-Value",
            binlog_transaction_compression=False,
            innodb_buffer_pool_size=8029317824441794560,
            innodb_ft_result_cache_limit=3211348500,
            max_binlog_cache_size=20563640230002,
            max_connect_errors=3693237311285521409,
            max_heap_table_size=5300389921740675072,
            max_connections=51752,
            max_prepared_stmt_count=3485480,
            connect_timeout=23061636,
            cte_max_recursion_depth=1977492480,
            generated_random_password_length=55,
            information_schema_stats_expiry=12649959,
            innodb_buffer_pool_dump_pct=28,
            innodb_buffer_pool_instances=58,
            innodb_ddl_buffer_size=96606086,
            innodb_ddl_threads=9,
            innodb_ft_max_token_size=17,
            innodb_ft_min_token_size=4,
            innodb_ft_num_word_optimize=11,
            innodb_lock_wait_timeout=936163127,
            innodb_max_purge_lag=2157533509,
            innodb_max_purge_lag_delay=62501,
            interactive_timeout=5002788,
            innodb_stats_persistent_sample_pages=1191242876147713,
            innodb_stats_transient_sample_pages=4652224439613929473,
            innodb_strict_mode=False,
            max_allowed_packet=616519307,
            max_execution_time=3209318888751297536,
            mysqlx_connect_timeout=21808943,
            mysqlx_document_id_unique_prefix=63751,
            mysqlx_idle_worker_thread_timeout=3276,
            mysqlx_interactive_timeout=1589412,
            mysqlx_max_allowed_packet=692990054,
            mysqlx_min_worker_threads=7,
            mysqlx_read_timeout=905383,
            mysqlx_wait_timeout=292217,
            mysqlx_write_timeout=962953,
            net_read_timeout=19978913,
            net_write_timeout=16035770,
            parser_max_mem_size=2506748784574963328,
            query_alloc_block_size=2860449152,
            query_prealloc_size=6199451371151029248,
            regexp_time_limit=377389786,
            sql_mode="EXAMPLE-sqlMode-Value",
            tmp_table_size=1867800056073167616,
            mysqlx_deflate_default_compression_level=3,
            mysqlx_deflate_max_client_compression_level=5,
            mysqlx_lz4_max_client_compression_level=10,
            mysqlx_lz4_default_compression_level=15,
            mysqlx_zstd_max_client_compression_level=6,
            mysqlx_zstd_default_compression_level=5,
            mysql_zstd_default_compression_level=16,
            sort_buffer_size=7318120572478824448,
            wait_timeout=162952,
            thread_pool_dedicated_listeners=True,
            thread_pool_max_transactions_limit=84441,
            time_zone="EXAMPLE-timeZone-Value",
            block_encryption_mode="EXAMPLE-blockEncryptionMode-Value",
            binlog_group_commit_sync_delay=255823,
            binlog_group_commit_sync_no_delay_count=31545,
            replica_net_timeout=27651856,
            require_secure_transport=True,
            innodb_redo_log_capacity=133568743158,
            thread_pool_transaction_delay=230869,
            thread_pool_query_threads_per_group=1804,
            explain_format="TREE",
            explicit_defaults_for_timestamp=True,
            sql_generate_invisible_primary_key=False,
            temptable_max_ram=2481779075358249984,
            innodb_change_buffering="ALL",
            innodb_adaptive_hash_index=False,
            innodb_undo_log_truncate=False,
            table_definition_cache=200447,
            table_open_cache=37008,
            relay_log_space_limit=8565427549927251968,
            optimizer_switch="EXAMPLE-optimizerSwitch-Value",
            replica_type_conversions="EXAMPLE-replicaTypeConversions-Value",
            replica_parallel_workers=287,
            skip_name_resolve=True,
            max_user_connections=1705121777,
            join_buffer_size=7494367961072252032,
            max_seeks_for_key=433414153087330305,
            range_optimizer_max_mem_size=6852849238462925824,
            auto_increment_increment=5731,
            auto_increment_offset=20688,
            innodb_autoinc_lock_mode=52,
            innodb_rollback_on_timeout=True,
            innodb_online_alter_log_max_size=1639263179493137152,
            innodb_sort_buffer_size=45908316,
            innodb_numa_interleave=True,
            thread_pool_size=491,
            long_query_time=23677679),
        parent_configuration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value",
        freeform_tags={
            'EXAMPLE_KEY_CocIR': 'EXAMPLE_VALUE_z8xEA1i8iyhpLuaW6lLE'},
        defined_tags={
            'EXAMPLE_KEY_VDioG': {
                'EXAMPLE_KEY_CjzxO': 'EXAMPLE--Value'}}),
    opc_request_id="YYVBXKF16GOHSERWYG7E<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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

Was this article helpful?