# 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: 'CHAIN',
          big_tables: false,
          character_set_server: 'GEOSTD8',
          collation_server: 'UTF8_UNICODE_CI',
          connection_memory_chunk_size: 513_077_494,
          connection_memory_limit: 278_183_918_774_485_216,
          default_authentication_plugin: 'caching_sha2_password',
          global_connection_memory_limit: 7_780_853_812_187_881_472,
          global_connection_memory_tracking: false,
          transaction_isolation: 'REPEATABLE-READ',
          innodb_ft_server_stopword_table:
            'EXAMPLE-innodbFtServerStopwordTable-Value',
          mandatory_roles: 'EXAMPLE-mandatoryRoles-Value',
          autocommit: false,
          foreign_key_checks: false,
          group_replication_consistency: 'EVENTUAL',
          group_concat_max_len: 4_068_005_291_902_911_492,
          innodb_ft_enable_stopword: true,
          innodb_log_writer_threads: false,
          local_infile: false,
          mysql_firewall_mode: false,
          mysqlx_enable_hello_notice: false,
          sql_require_primary_key: true,
          sql_warnings: false,
          binlog_expire_logs_seconds: 795,
          binlog_row_metadata: 'MINIMAL',
          binlog_row_value_options: 'EXAMPLE-binlogRowValueOptions-Value',
          binlog_transaction_compression: false,
          innodb_buffer_pool_size: 1_383_393_501_658_505_216,
          innodb_ft_result_cache_limit: 3_121_124_215,
          max_binlog_cache_size: 7_275_315_026_122,
          max_connect_errors: 5_827_156_992_757_895_169,
          max_heap_table_size: 5_953_856_887_816_675_328,
          max_connections: 12_798,
          max_prepared_stmt_count: 3_301_237,
          connect_timeout: 6_311_443,
          cte_max_recursion_depth: 4_291_649_597,
          generated_random_password_length: 172,
          information_schema_stats_expiry: 27_678_777,
          innodb_buffer_pool_dump_pct: 7,
          innodb_buffer_pool_instances: 60,
          innodb_ddl_buffer_size: 2_204_555_946,
          innodb_ddl_threads: 41,
          innodb_ft_max_token_size: 68,
          innodb_ft_min_token_size: 2,
          innodb_ft_num_word_optimize: 84,
          innodb_lock_wait_timeout: 928_354_321,
          innodb_max_purge_lag: 365_524_474,
          innodb_max_purge_lag_delay: 458_941,
          interactive_timeout: 15_951_172,
          innodb_stats_persistent_sample_pages: 4_160_827_126_621_297_665,
          innodb_stats_transient_sample_pages: 6_120_678_734_011_977_729,
          innodb_strict_mode: true,
          max_allowed_packet: 260_641_622,
          max_execution_time: 8_230_662_133_533_297_664,
          mysqlx_connect_timeout: 800_017_173,
          mysqlx_document_id_unique_prefix: 9069,
          mysqlx_idle_worker_thread_timeout: 2900,
          mysqlx_interactive_timeout: 836_491,
          mysqlx_max_allowed_packet: 969_665_002,
          mysqlx_min_worker_threads: 61,
          mysqlx_read_timeout: 1_313_151,
          mysqlx_wait_timeout: 1_843_557,
          mysqlx_write_timeout: 841_251,
          net_read_timeout: 523_260,
          net_write_timeout: 12_771_226,
          parser_max_mem_size: 8_726_709_853_136_100_992,
          query_alloc_block_size: 1_703_628_361,
          query_prealloc_size: 5_696_603_593_825_029_120,
          regexp_time_limit: 176_075_938,
          sql_mode: 'EXAMPLE-sqlMode-Value',
          tmp_table_size: 8_673_875_313_668_121_600,
          mysqlx_deflate_default_compression_level: 5,
          mysqlx_deflate_max_client_compression_level: 6,
          mysqlx_lz4_max_client_compression_level: 0,
          mysqlx_lz4_default_compression_level: 2,
          mysqlx_zstd_max_client_compression_level: 3,
          mysqlx_zstd_default_compression_level: 7,
          mysql_zstd_default_compression_level: 14,
          sort_buffer_size: 3_896_382_931_926_648_320,
          wait_timeout: 55_419,
          thread_pool_dedicated_listeners: false,
          thread_pool_max_transactions_limit: 46_711,
          time_zone: 'EXAMPLE-timeZone-Value',
          block_encryption_mode: 'EXAMPLE-blockEncryptionMode-Value',
          binlog_group_commit_sync_delay: 279_224,
          binlog_group_commit_sync_no_delay_count: 39_823,
          replica_net_timeout: 20_474_302,
          require_secure_transport: false,
          innodb_redo_log_capacity: 89_476_224_832,
          thread_pool_transaction_delay: 193_047,
          thread_pool_query_threads_per_group: 3193,
          explain_format: 'TREE',
          explicit_defaults_for_timestamp: true,
          sql_generate_invisible_primary_key: false,
          temptable_max_ram: 4_433_026_728_186_823_168,
          innodb_change_buffering: 'INSERTS',
          innodb_adaptive_hash_index: true,
          innodb_undo_log_truncate: true,
          table_definition_cache: 233_113,
          table_open_cache: 272_682,
          relay_log_space_limit: 3_468_140_067_493_939_200,
          optimizer_switch: 'EXAMPLE-optimizerSwitch-Value',
          replica_type_conversions: 'EXAMPLE-replicaTypeConversions-Value',
          replica_parallel_workers: 1014,
          skip_name_resolve: true,
          max_user_connections: 792_299_178,
          join_buffer_size: 1_350_762_844_281_136_256,
          max_seeks_for_key: 5_063_811_302_309_806_081,
          range_optimizer_max_mem_size: 1_938_158_235_583_880_192,
          auto_increment_increment: 31_706,
          auto_increment_offset: 27_912,
          innodb_autoinc_lock_mode: 783,
          innodb_rollback_on_timeout: false,
          innodb_online_alter_log_max_size: 5_615_837_326_355_737_600,
          innodb_sort_buffer_size: 27_600_266,
          innodb_numa_interleave: false,
          thread_pool_size: 340,
          long_query_time: 30_289_643
        ),
      options: [
        OCI::Mysql::Models::Option.new(
          name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
        )
      ],
      parent_configuration_id:
        'ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value',
      freeform_tags: {
        'EXAMPLE_KEY_Kbec4' => 'EXAMPLE_VALUE_syxukP6zHaka5rEkOSXC'
      },
      defined_tags: {
        'EXAMPLE_KEY_wpM8g' => { 'EXAMPLE_KEY_nRmGG' => 'EXAMPLE--Value' }
      }
    )
  )

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