# 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).

require '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::ConfigFileLoader.load_config

# Initialize service client with default config file
mysql_client = OCI::Mysql::MysqlaasClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
create_configuration_response =
  mysql_client.create_configuration(
    OCI::Mysql::Models::CreateConfigurationDetails.new(
      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.new(
          lower_case_table_names: 'CASE_INSENSITIVE_LOWERCASE'
        ),
      variables:
        OCI::Mysql::Models::ConfigurationVariables.new(
          completion_type: 'NO_CHAIN',
          big_tables: false,
          connection_memory_chunk_size: 264_656_567,
          connection_memory_limit: 5_082_413_452_996_207_616,
          default_authentication_plugin: 'sha256_password',
          global_connection_memory_limit: 5_848_263_798_121_863_168,
          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: 'EVENTUAL',
          innodb_ft_enable_stopword: false,
          innodb_log_writer_threads: true,
          local_infile: true,
          mysql_firewall_mode: false,
          mysqlx_enable_hello_notice: true,
          sql_require_primary_key: false,
          sql_warnings: true,
          binlog_expire_logs_seconds: 755,
          binlog_row_metadata: 'MINIMAL',
          binlog_row_value_options: 'EXAMPLE-binlogRowValueOptions-Value',
          binlog_transaction_compression: true,
          innodb_buffer_pool_size: 8_960_721_187_112_890_368,
          innodb_ft_result_cache_limit: 2_804_949_353,
          max_binlog_cache_size: 65_657_598_380_079,
          max_connect_errors: 6_055_925_199_060_217_857,
          max_heap_table_size: 6_459_870_808_769_727_488,
          max_connections: 35_742,
          max_prepared_stmt_count: 2_382_156,
          connect_timeout: 22_150_952,
          cte_max_recursion_depth: 2_861_293_450,
          generated_random_password_length: 101,
          information_schema_stats_expiry: 19_092_921,
          innodb_buffer_pool_dump_pct: 99,
          innodb_buffer_pool_instances: 11,
          innodb_ddl_buffer_size: 600_391_474,
          innodb_ddl_threads: 4,
          innodb_ft_max_token_size: 72,
          innodb_ft_min_token_size: 12,
          innodb_ft_num_word_optimize: 607,
          innodb_lock_wait_timeout: 701_613_807,
          innodb_max_purge_lag: 4_249_995_245,
          innodb_max_purge_lag_delay: 97_434,
          interactive_timeout: 3_669_345,
          innodb_stats_persistent_sample_pages: 2_889_306_246_261_959_681,
          innodb_stats_transient_sample_pages: 5_548_173_996_507_821_057,
          max_allowed_packet: 353_657_050,
          max_execution_time: 1_775_319_325_852_203_008,
          mysqlx_connect_timeout: 455_362_753,
          mysqlx_document_id_unique_prefix: 41_339,
          mysqlx_idle_worker_thread_timeout: 2578,
          mysqlx_interactive_timeout: 2_129_559,
          mysqlx_max_allowed_packet: 955_788_917,
          mysqlx_min_worker_threads: 17,
          mysqlx_read_timeout: 1_303_861,
          mysqlx_wait_timeout: 431_757,
          mysqlx_write_timeout: 218_352,
          net_read_timeout: 30_864_174,
          net_write_timeout: 20_578_789,
          parser_max_mem_size: 998_391_481_485_091_328,
          query_alloc_block_size: 4_152_372_630,
          query_prealloc_size: 8_712_992_094_385_236_992,
          regexp_time_limit: 1_556_007_583,
          sql_mode: 'EXAMPLE-sqlMode-Value',
          tmp_table_size: 6_098_776_025_655_454_720,
          mysqlx_deflate_default_compression_level: 1,
          mysqlx_deflate_max_client_compression_level: 4,
          mysqlx_lz4_max_client_compression_level: 14,
          mysqlx_lz4_default_compression_level: 3,
          mysqlx_zstd_max_client_compression_level: 3,
          mysqlx_zstd_default_compression_level: 7,
          mysql_zstd_default_compression_level: 17,
          sort_buffer_size: 658_425_459_337_262_848,
          wait_timeout: 559_867,
          thread_pool_dedicated_listeners: true,
          thread_pool_max_transactions_limit: 20_139,
          time_zone: 'EXAMPLE-timeZone-Value'
        ),
      parent_configuration_id:
        'ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value',
      freeform_tags: {
        'EXAMPLE_KEY_LmtkX' => 'EXAMPLE_VALUE_oBLrbPg8WPZN7tJ8VUCA'
      },
      defined_tags: {
        'EXAMPLE_KEY_tkEjg' => { 'EXAMPLE_KEY_LP0GB' => 'EXAMPLE--Value' }
      }
    )
  )

# Get the data from response
puts "#{create_configuration_response.data}"