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

package main

import (
	"context"
	"fmt"

	"github.com/oracle/oci-go-sdk/v65/common"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
	"github.com/oracle/oci-go-sdk/v65/mysql"
)

func ExampleCreateConfiguration() {
	// Create a default authentication provider that uses the DEFAULT
	// profile in the configuration file.
	// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
	client, err := mysql.NewMysqlaasClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

	// Create a request and dependent object(s).

	req := mysql.CreateConfigurationRequest{CreateConfigurationDetails: mysql.CreateConfigurationDetails{Description: common.String("EXAMPLE-description-Value"),
		ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
		ShapeName:             common.String("EXAMPLE-shapeName-Value"),
		DefinedTags:           map[string]map[string]interface{}{"EXAMPLE_KEY_JSRoK": map[string]interface{}{"EXAMPLE_KEY_kqdPj": "EXAMPLE--Value"}},
		DisplayName:           common.String("EXAMPLE-displayName-Value"),
		FreeformTags:          map[string]string{"EXAMPLE_KEY_oGyyv": "EXAMPLE_VALUE_bxkF16GohsErWyG7EfR5"},
		InitVariables:         &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesSensitive},
		Variables: &mysql.ConfigurationVariables{MysqlFirewallMode: common.Bool(true),
			MysqlxInteractiveTimeout:               common.Int(904093),
			MysqlxWaitTimeout:                      common.Int(2.026556e+06),
			ParserMaxMemSize:                       common.Int64(7.771838754230604e+18),
			TmpTableSize:                           common.Int64(3.3950058705619727e+18),
			BinlogRowMetadata:                      mysql.ConfigurationVariablesBinlogRowMetadataFull,
			InnodbStatsTransientSamplePages:        common.Int64(8.821421618552895e+18),
			InnodbMaxPurgeLag:                      common.Int64(1.310028006e+09),
			TimeZone:                               common.String("EXAMPLE-timeZone-Value"),
			InnodbAutoincLockMode:                  common.Int(151),
			SkipNameResolve:                        common.Bool(false),
			RegexpTimeLimit:                        common.Int(1.137164756e+09),
			MaxUserConnections:                     common.Int64(2.91264833e+08),
			MysqlxWriteTimeout:                     common.Int(2.116039e+06),
			MaxSeeksForKey:                         common.Int64(6.202411587545295e+18),
			QueryAllocBlockSize:                    common.Int64(9.48501806e+08),
			BinlogTransactionCompression:           common.Bool(true),
			InnodbDdlBufferSize:                    common.Int64(2.860470699e+09),
			TableOpenCache:                         common.Int(30565),
			CteMaxRecursionDepth:                   common.Int64(1.01849092e+09),
			GlobalConnectionMemoryTracking:         common.Bool(false),
			ThreadPoolSize:                         common.Int(114),
			BlockEncryptionMode:                    common.String("EXAMPLE-blockEncryptionMode-Value"),
			MysqlxMinWorkerThreads:                 common.Int(10),
			MysqlxLz4MaxClientCompressionLevel:     common.Int(1),
			SqlRequirePrimaryKey:                   common.Bool(true),
			CharacterSetServer:                     mysql.ConfigurationVariablesCharacterSetServerGb2312,
			JoinBufferSize:                         common.Int64(5.862063719092583e+18),
			NetWriteTimeout:                        common.Int(1.9273196e+07),
			DefaultAuthenticationPlugin:            mysql.ConfigurationVariablesDefaultAuthenticationPluginCachingSha2Password,
			InnodbFtResultCacheLimit:               common.Int64(1.540179228e+09),
			BinlogRowValueOptions:                  common.String("EXAMPLE-binlogRowValueOptions-Value"),
			GeneratedRandomPasswordLength:          common.Int(135),
			ConnectionMemoryChunkSize:              common.Int(3.6881597e+07),
			InnodbNumaInterleave:                   common.Bool(true),
			InteractiveTimeout:                     common.Int(1.6104561e+07),
			LongQueryTime:                          common.Int(1.158467e+07),
			RangeOptimizerMaxMemSize:               common.Int64(1.7453705123827702e+18),
			ThreadPoolDedicatedListeners:           common.Bool(true),
			BigTables:                              common.Bool(true),
			ConnectTimeout:                         common.Int(2.618088e+07),
			ReplicaNetTimeout:                      common.Int(1.7269341e+07),
			InnodbBufferPoolSize:                   common.Int64(7.695051886928831e+18),
			InnodbDdlThreads:                       common.Int(37),
			MysqlxDeflateMaxClientCompressionLevel: common.Int(2),
			ThreadPoolMaxTransactionsLimit:         common.Int(12119),
			ForeignKeyChecks:                       common.Bool(true),
			InnodbStatsPersistentSamplePages:       common.Int64(6.248000654268617e+18),
			MysqlxMaxAllowedPacket:                 common.Int(6.26487754e+08),
			BinlogGroupCommitSyncNoDelayCount:      common.Int(53282),
			MysqlxDocumentIdUniquePrefix:           common.Int(60745),
			ReplicaTypeConversions:                 common.String("EXAMPLE-replicaTypeConversions-Value"),
			SortBufferSize:                         common.Int64(7.615073827395146e+18),
			InnodbBufferPoolDumpPct:                common.Int(52),
			MaxConnectErrors:                       common.Int64(9.366865872631603e+16),
			InnodbSortBufferSize:                   common.Int(3.9752317e+07),
			MaxBinlogCacheSize:                     common.Int64(2.2954837482867e+13),
			MysqlxDeflateDefaultCompressionLevel:   common.Int(2),
			SqlMode:                                common.String("EXAMPLE-sqlMode-Value"),
			InnodbMaxPurgeLagDelay:                 common.Int(251704),
			LocalInfile:                            common.Bool(false),
			InnodbUndoLogTruncate:                  common.Bool(true),
			MaxAllowedPacket:                       common.Int(3.91571978e+08),
			MysqlxZstdDefaultCompressionLevel:      common.Int(15),
			RequireSecureTransport:                 common.Bool(false),
			ThreadPoolTransactionDelay:             common.Int(140435),
			InnodbLogWriterThreads:                 common.Bool(true),
			InnodbStrictMode:                       common.Bool(false),
			SqlGenerateInvisiblePrimaryKey:         common.Bool(false),
			SqlWarnings:                            common.Bool(true),
			ExplicitDefaultsForTimestamp:           common.Bool(true),
			OptimizerSwitch:                        common.String("EXAMPLE-optimizerSwitch-Value"),
			TemptableMaxRam:                        common.Int64(8.363906330034978e+18),
			AutoIncrementOffset:                    common.Int(54696),
			ExplainFormat:                          mysql.ConfigurationVariablesExplainFormatJson,
			MysqlZstdDefaultCompressionLevel:       common.Int(9),
			CollationServer:                        mysql.ConfigurationVariablesCollationServerTis620ThaiCi,
			CompletionType:                         mysql.ConfigurationVariablesCompletionTypeRelease,
			InnodbFtServerStopwordTable:            common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
			QueryPreallocSize:                      common.Int64(3.320993280551985e+18),
			MaxHeapTableSize:                       common.Int64(6.597831097333497e+18),
			MandatoryRoles:                         common.String("EXAMPLE-mandatoryRoles-Value"),
			MaxConnections:                         common.Int(27809),
			InnodbChangeBuffering:                  mysql.ConfigurationVariablesInnodbChangeBufferingNone,
			InnodbFtEnableStopword:                 common.Bool(true),
			InnodbOnlineAlterLogMaxSize:            common.Int64(1.886754808296844e+17),
			MysqlxConnectTimeout:                   common.Int(3.68255825e+08),
			TableDefinitionCache:                   common.Int(501816),
			AutoIncrementIncrement:                 common.Int(48915),
			GlobalConnectionMemoryLimit:            common.Int64(2.0769999102608218e+18),
			InnodbLockWaitTimeout:                  common.Int(8.5379216e+07),
			InnodbRollbackOnTimeout:                common.Bool(false),
			MysqlxZstdMaxClientCompressionLevel:    common.Int(3),
			NetReadTimeout:                         common.Int(2.8264542e+07),
			Autocommit:                             common.Bool(false),
			InnodbFtMinTokenSize:                   common.Int(2),
			ThreadPoolQueryThreadsPerGroup:         common.Int(340),
			InformationSchemaStatsExpiry:           common.Int(1.6035741e+07),
			ReplicaParallelWorkers:                 common.Int(725),
			TransactionIsolation:                   mysql.ConfigurationVariablesTransactionIsolationReadCommited,
			BinlogGroupCommitSyncDelay:             common.Int(570598),
			ConnectionMemoryLimit:                  common.Int64(8.029317824441387e+18),
			InnodbFtMaxTokenSize:                   common.Int(37),
			MysqlxReadTimeout:                      common.Int(134732),
			WaitTimeout:                            common.Int(1.567862e+06),
			BinlogExpireLogsSeconds:                common.Int(781),
			GroupConcatMaxLen:                      common.Int64(4.2466327675506545e+18),
			MaxPreparedStmtCount:                   common.Int(3.287918e+06),
			MysqlxIdleWorkerThreadTimeout:          common.Int(243),
			MysqlxLz4DefaultCompressionLevel:       common.Int(14),
			RelayLogSpaceLimit:                     common.Int64(5.692745904210125e+17),
			GroupReplicationConsistency:            mysql.ConfigurationVariablesGroupReplicationConsistencyBefore,
			InnodbAdaptiveHashIndex:                common.Bool(true),
			InnodbRedoLogCapacity:                  common.Int64(3.251955963e+10),
			MysqlxEnableHelloNotice:                common.Bool(false),
			InnodbBufferPoolInstances:              common.Int(20),
			InnodbFtNumWordOptimize:                common.Int(106),
			MaxExecutionTime:                       common.Int64(8.517009763873467e+18)},
		CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value")},
		OpcRequestId:  common.String("KKOTWXXGOKUVHIM7TX9A<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value")}

	// Send the request using the service client
	resp, err := client.CreateConfiguration(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}