# 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="NO_CHAIN",
            big_tables=False,
            character_set_server="UTF8MB3",
            collation_server="UTF8MB4_POLISH_CI",
            connection_memory_chunk_size=439074619,
            connection_memory_limit=991873679405397760,
            default_authentication_plugin="sha256_password",
            global_connection_memory_limit=4196347450026856448,
            global_connection_memory_tracking=True,
            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=5792007813775219716,
            innodb_ft_enable_stopword=False,
            innodb_log_writer_threads=False,
            local_infile=True,
            mysql_firewall_mode=False,
            mysqlx_enable_hello_notice=False,
            sql_require_primary_key=True,
            sql_warnings=True,
            binlog_expire_logs_seconds=610,
            binlog_row_metadata="MINIMAL",
            binlog_row_value_options="EXAMPLE-binlogRowValueOptions-Value",
            binlog_transaction_compression=False,
            innodb_buffer_pool_size=4440027020449949184,
            innodb_ft_result_cache_limit=2913335660,
            max_binlog_cache_size=30684415183347,
            max_connect_errors=5900083532039778305,
            max_heap_table_size=352958389003912576,
            max_connections=66034,
            max_prepared_stmt_count=3101822,
            connect_timeout=18461780,
            cte_max_recursion_depth=1435524633,
            generated_random_password_length=34,
            information_schema_stats_expiry=315035,
            innodb_buffer_pool_dump_pct=66,
            innodb_buffer_pool_instances=4,
            innodb_ddl_buffer_size=1813180864,
            innodb_ddl_threads=17,
            innodb_ft_max_token_size=58,
            innodb_ft_min_token_size=3,
            innodb_ft_num_word_optimize=645,
            innodb_lock_wait_timeout=986970645,
            innodb_max_purge_lag=2646228185,
            innodb_max_purge_lag_delay=419196,
            interactive_timeout=1930054,
            innodb_stats_persistent_sample_pages=1764416213168915457,
            innodb_stats_transient_sample_pages=17768295026013185,
            innodb_strict_mode=False,
            max_allowed_packet=1023039104,
            max_execution_time=3337775827647546368,
            mysqlx_connect_timeout=478347,
            mysqlx_document_id_unique_prefix=50873,
            mysqlx_idle_worker_thread_timeout=2098,
            mysqlx_interactive_timeout=401230,
            mysqlx_max_allowed_packet=711271272,
            mysqlx_min_worker_threads=42,
            mysqlx_read_timeout=911471,
            mysqlx_wait_timeout=864349,
            mysqlx_write_timeout=84782,
            net_read_timeout=6502555,
            net_write_timeout=18578968,
            parser_max_mem_size=7722825702335067776,
            query_alloc_block_size=153079144,
            query_prealloc_size=4741450298773463040,
            regexp_time_limit=165851513,
            sql_mode="EXAMPLE-sqlMode-Value",
            tmp_table_size=7888971895194528768,
            mysqlx_deflate_default_compression_level=8,
            mysqlx_deflate_max_client_compression_level=8,
            mysqlx_lz4_max_client_compression_level=5,
            mysqlx_lz4_default_compression_level=11,
            mysqlx_zstd_max_client_compression_level=11,
            mysqlx_zstd_default_compression_level=5,
            mysql_zstd_default_compression_level=12,
            sort_buffer_size=2089275558312037120,
            wait_timeout=1229591,
            thread_pool_dedicated_listeners=False,
            thread_pool_max_transactions_limit=27534,
            time_zone="EXAMPLE-timeZone-Value",
            block_encryption_mode="EXAMPLE-blockEncryptionMode-Value",
            binlog_group_commit_sync_delay=692239,
            binlog_group_commit_sync_no_delay_count=63406,
            replica_net_timeout=3353071,
            require_secure_transport=True,
            innodb_redo_log_capacity=129528944746,
            thread_pool_transaction_delay=67166,
            thread_pool_query_threads_per_group=200,
            explain_format="TREE",
            explicit_defaults_for_timestamp=True,
            sql_generate_invisible_primary_key=True,
            temptable_max_ram=3452351565133616640,
            innodb_change_buffering="ALL",
            innodb_adaptive_hash_index=False,
            innodb_undo_log_truncate=False,
            table_definition_cache=494083,
            table_open_cache=80082,
            relay_log_space_limit=6386733185330492416,
            optimizer_switch="EXAMPLE-optimizerSwitch-Value",
            replica_type_conversions="EXAMPLE-replicaTypeConversions-Value",
            replica_parallel_workers=32,
            skip_name_resolve=True,
            max_user_connections=4075157237,
            join_buffer_size=3952437418244301952,
            max_seeks_for_key=6643595411043345409,
            range_optimizer_max_mem_size=8341581637783845888,
            auto_increment_increment=41060,
            auto_increment_offset=30626,
            innodb_autoinc_lock_mode=482,
            innodb_rollback_on_timeout=False,
            innodb_online_alter_log_max_size=5676549725411195904,
            innodb_sort_buffer_size=22879284,
            innodb_numa_interleave=False,
            thread_pool_size=273,
            long_query_time=1288078),
        parent_configuration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value",
        freeform_tags={
            'EXAMPLE_KEY_rGwqY': 'EXAMPLE_VALUE_cdkci1MCz1SIt4x9dSLk'},
        defined_tags={
            'EXAMPLE_KEY_Ps7be': {
                'EXAMPLE_KEY_JBlqR': 'EXAMPLE--Value'}}),
    opc_request_id="FYHKRN3S9UUYTK10HPIJ<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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

Was this article helpful?