// 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{CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
		DefinedTags:           map[string]map[string]interface{}{"EXAMPLE_KEY_HVYr7": map[string]interface{}{"EXAMPLE_KEY_sV7g8": "EXAMPLE--Value"}},
		Description:           common.String("EXAMPLE-description-Value"),
		InitVariables:         &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesInsensitiveLowercase},
		ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
		ShapeName:             common.String("EXAMPLE-shapeName-Value"),
		Variables: &mysql.ConfigurationVariables{ExplicitDefaultsForTimestamp: common.Bool(false),
			CharacterSetServer:                     mysql.ConfigurationVariablesCharacterSetServerCp1251,
			InnodbStatsPersistentSamplePages:       common.Int64(7.253012352300535e+18),
			ThreadPoolSize:                         common.Int(127),
			MaxPreparedStmtCount:                   common.Int(3.273398e+06),
			ThreadPoolTransactionDelay:             common.Int(81318),
			TimeZone:                               common.String("EXAMPLE-timeZone-Value"),
			ConnectionMemoryLimit:                  common.Int64(4.778489152188312e+17),
			DefaultAuthenticationPlugin:            mysql.ConfigurationVariablesDefaultAuthenticationPluginMysqlNativePassword,
			MysqlxLz4DefaultCompressionLevel:       common.Int(11),
			RangeOptimizerMaxMemSize:               common.Int64(1.5474669879268762e+18),
			InformationSchemaStatsExpiry:           common.Int(2.2119951e+07),
			CteMaxRecursionDepth:                   common.Int64(3.521134524e+09),
			ExplainFormat:                          mysql.ConfigurationVariablesExplainFormatTree,
			InnodbAdaptiveHashIndex:                common.Bool(false),
			InnodbFtMaxTokenSize:                   common.Int(77),
			MaxExecutionTime:                       common.Int64(6.555685071564592e+18),
			MysqlxMaxAllowedPacket:                 common.Int(3.89958864e+08),
			ThreadPoolMaxTransactionsLimit:         common.Int(79619),
			CollationServer:                        mysql.ConfigurationVariablesCollationServerCp850Bin,
			BinlogRowMetadata:                      mysql.ConfigurationVariablesBinlogRowMetadataFull,
			LongQueryTime:                          common.Int(6.922852e+06),
			WaitTimeout:                            common.Int(525904),
			BlockEncryptionMode:                    common.String("EXAMPLE-blockEncryptionMode-Value"),
			MaxBinlogCacheSize:                     common.Int64(5.063618446075e+13),
			MysqlxConnectTimeout:                   common.Int(2.20362923e+08),
			MysqlxIdleWorkerThreadTimeout:          common.Int(3022),
			ReplicaParallelWorkers:                 common.Int(518),
			SqlWarnings:                            common.Bool(false),
			ThreadPoolDedicatedListeners:           common.Bool(true),
			ThreadPoolQueryThreadsPerGroup:         common.Int(1391),
			InnodbFtEnableStopword:                 common.Bool(false),
			MysqlxZstdMaxClientCompressionLevel:    common.Int(13),
			BinlogGroupCommitSyncDelay:             common.Int(613126),
			ConnectTimeout:                         common.Int(7.507995e+06),
			ConnectionMemoryChunkSize:              common.Int(2.79042593e+08),
			InnodbStatsTransientSamplePages:        common.Int64(3.2510165876234035e+17),
			TransactionIsolation:                   mysql.ConfigurationVariablesTransactionIsolationReadUncommitted,
			InnodbFtNumWordOptimize:                common.Int(449),
			JoinBufferSize:                         common.Int64(3.865286888329576e+17),
			SortBufferSize:                         common.Int64(3.6708974915790433e+18),
			MaxUserConnections:                     common.Int64(3.823837368e+09),
			MysqlxEnableHelloNotice:                common.Bool(false),
			ForeignKeyChecks:                       common.Bool(false),
			InnodbFtMinTokenSize:                   common.Int(12),
			MaxConnectErrors:                       common.Int64(7.821268590769159e+18),
			RelayLogSpaceLimit:                     common.Int64(2.9962618785294623e+18),
			GroupReplicationConsistency:            mysql.ConfigurationVariablesGroupReplicationConsistencyBeforeAndAfter,
			BinlogRowValueOptions:                  common.String("EXAMPLE-binlogRowValueOptions-Value"),
			InnodbRedoLogCapacity:                  common.Int64(8.0336442496e+10),
			ReplicaNetTimeout:                      common.Int(2.8463355e+07),
			AutoIncrementOffset:                    common.Int(5560),
			BigTables:                              common.Bool(true),
			InnodbLogWriterThreads:                 common.Bool(true),
			MysqlxDocumentIdUniquePrefix:           common.Int(16827),
			GlobalConnectionMemoryTracking:         common.Bool(true),
			InnodbBufferPoolInstances:              common.Int(63),
			InnodbDdlBufferSize:                    common.Int64(2.178272381e+09),
			LocalInfile:                            common.Bool(false),
			RegexpTimeLimit:                        common.Int(1.315498325e+09),
			InnodbNumaInterleave:                   common.Bool(true),
			MysqlxInteractiveTimeout:               common.Int(1.612743e+06),
			NetWriteTimeout:                        common.Int(2.521134e+06),
			SqlMode:                                common.String("EXAMPLE-sqlMode-Value"),
			TableOpenCache:                         common.Int(414742),
			GroupConcatMaxLen:                      common.Int64(7.506641831764787e+16),
			MandatoryRoles:                         common.String("EXAMPLE-mandatoryRoles-Value"),
			MaxSeeksForKey:                         common.Int64(8.830923228614679e+18),
			MysqlxZstdDefaultCompressionLevel:      common.Int(16),
			QueryPreallocSize:                      common.Int64(8.080673374037384e+17),
			GeneratedRandomPasswordLength:          common.Int(5),
			MysqlxDeflateMaxClientCompressionLevel: common.Int(5),
			InnodbAutoincLockMode:                  common.Int(933),
			InnodbChangeBuffering:                  mysql.ConfigurationVariablesInnodbChangeBufferingInserts,
			MaxConnections:                         common.Int(67021),
			MysqlxMinWorkerThreads:                 common.Int(61),
			OptimizerSwitch:                        common.String("EXAMPLE-optimizerSwitch-Value"),
			GlobalConnectionMemoryLimit:            common.Int64(5.5012068737849434e+17),
			InnodbSortBufferSize:                   common.Int(4.3471508e+07),
			MysqlxWriteTimeout:                     common.Int(282862),
			SqlRequirePrimaryKey:                   common.Bool(true),
			InteractiveTimeout:                     common.Int(1.4968117e+07),
			CompletionType:                         mysql.ConfigurationVariablesCompletionTypeRelease,
			MysqlZstdDefaultCompressionLevel:       common.Int(4),
			MysqlxLz4MaxClientCompressionLevel:     common.Int(12),
			NetReadTimeout:                         common.Int(2.228495e+06),
			ReplicaTypeConversions:                 common.String("EXAMPLE-replicaTypeConversions-Value"),
			InnodbMaxPurgeLag:                      common.Int64(2.60394112e+08),
			TmpTableSize:                           common.Int64(1.5048193857175396e+18),
			MysqlFirewallMode:                      common.Bool(false),
			MysqlxWaitTimeout:                      common.Int(2.018701e+06),
			QueryAllocBlockSize:                    common.Int64(3.98147489e+08),
			AutoIncrementIncrement:                 common.Int(1232),
			Autocommit:                             common.Bool(true),
			InnodbLockWaitTimeout:                  common.Int(7.61527608e+08),
			InnodbStrictMode:                       common.Bool(true),
			InnodbMaxPurgeLagDelay:                 common.Int(277712),
			SqlGenerateInvisiblePrimaryKey:         common.Bool(true),
			BinlogTransactionCompression:           common.Bool(true),
			SkipNameResolve:                        common.Bool(true),
			BinlogExpireLogsSeconds:                common.Int(227),
			BinlogGroupCommitSyncNoDelayCount:      common.Int(13601),
			InnodbOnlineAlterLogMaxSize:            common.Int64(5.415194644790186e+18),
			InnodbUndoLogTruncate:                  common.Bool(true),
			MaxAllowedPacket:                       common.Int(8.2452387e+08),
			MaxHeapTableSize:                       common.Int64(6.920224048638328e+18),
			RequireSecureTransport:                 common.Bool(false),
			TableDefinitionCache:                   common.Int(139061),
			InnodbFtResultCacheLimit:               common.Int64(3.14022824e+09),
			InnodbFtServerStopwordTable:            common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
			TemptableMaxRam:                        common.Int64(5.899006109813893e+17),
			InnodbBufferPoolDumpPct:                common.Int(75),
			InnodbDdlThreads:                       common.Int(18),
			MysqlxReadTimeout:                      common.Int(488533),
			ParserMaxMemSize:                       common.Int64(8.452393448934284e+18),
			InnodbBufferPoolSize:                   common.Int64(7.703591186239923e+18),
			MysqlxDeflateDefaultCompressionLevel:   common.Int(8),
			InnodbRollbackOnTimeout:                common.Bool(true)},
		DisplayName:  common.String("EXAMPLE-displayName-Value"),
		FreeformTags: map[string]string{"EXAMPLE_KEY_vuuwI": "EXAMPLE_VALUE_RlJKtqT3X4XhMGvPc3Ii"}},
		OpcRequestId:  common.String("RYZGEVHEH9FJFQBKMT6G<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)
}