// 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{OpcRequestId: common.String("EEJMMFY6Z5Z9JVLHGJOY<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		CreateConfigurationDetails: mysql.CreateConfigurationDetails{CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
			Description:   common.String("EXAMPLE-description-Value"),
			DisplayName:   common.String("EXAMPLE-displayName-Value"),
			ShapeName:     common.String("EXAMPLE-shapeName-Value"),
			DefinedTags:   map[string]map[string]interface{}{"EXAMPLE_KEY_y8InL": map[string]interface{}{"EXAMPLE_KEY_hPpIu": "EXAMPLE--Value"}},
			FreeformTags:  map[string]string{"EXAMPLE_KEY_p3zDk": "EXAMPLE_VALUE_pu5Z94qaExTvFtgRooYj"},
			InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesInsensitiveLowercase},
			Options: []mysql.Option{mysql.Option{Value: common.String("EXAMPLE-value-Value"),
				Name: common.String("EXAMPLE-name-Value")}},
			ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
			Variables: &mysql.ConfigurationVariables{ThreadPoolDedicatedListeners: common.Bool(false),
				InnodbFtMaxTokenSize:                   common.Int(71),
				AutoIncrementOffset:                    common.Int(1176),
				BinlogRowValueOptions:                  common.String("EXAMPLE-binlogRowValueOptions-Value"),
				InnodbBufferPoolDumpPct:                common.Int(31),
				MaxAllowedPacket:                       common.Int(6.81308034e+08),
				MysqlxReadTimeout:                      common.Int(1.818803e+06),
				CteMaxRecursionDepth:                   common.Int64(1.100459801e+09),
				MaxHeapTableSize:                       common.Int64(6.756216397491087e+18),
				InnodbStrictMode:                       common.Bool(true),
				MysqlFirewallMode:                      common.Bool(true),
				MysqlZstdDefaultCompressionLevel:       common.Int(10),
				RegexpTimeLimit:                        common.Int(9.7263987e+07),
				TableOpenCache:                         common.Int(388640),
				MysqlxLz4MaxClientCompressionLevel:     common.Int(13),
				CharacterSetServer:                     mysql.ConfigurationVariablesCharacterSetServerGreek,
				InnodbNumaInterleave:                   common.Bool(false),
				LongQueryTime:                          common.Int(1.2496061e+07),
				MysqlxDeflateDefaultCompressionLevel:   common.Int(5),
				InteractiveTimeout:                     common.Int(1.142544e+07),
				ForeignKeyChecks:                       common.Bool(false),
				AutoIncrementIncrement:                 common.Int(28995),
				InnodbBufferPoolSize:                   common.Int64(7.652005598453521e+18),
				InnodbChangeBuffering:                  mysql.ConfigurationVariablesInnodbChangeBufferingInserts,
				InnodbLockWaitTimeout:                  common.Int(1.018327348e+09),
				InnodbStatsPersistentSamplePages:       common.Int64(2.773084887133525e+18),
				MysqlxDocumentIdUniquePrefix:           common.Int(62186),
				InnodbAutoincLockMode:                  common.Int(901),
				InnodbUndoLogTruncate:                  common.Bool(true),
				MysqlxDeflateMaxClientCompressionLevel: common.Int(8),
				MysqlxInteractiveTimeout:               common.Int(775779),
				RelayLogSpaceLimit:                     common.Int64(8.139164391184299e+18),
				SqlMode:                                common.String("EXAMPLE-sqlMode-Value"),
				ParserMaxMemSize:                       common.Int64(5.510306916160673e+18),
				WaitTimeout:                            common.Int(2.093257e+06),
				BinlogGroupCommitSyncDelay:             common.Int(560700),
				InnodbBufferPoolInstances:              common.Int(48),
				MysqlxWaitTimeout:                      common.Int(1.900148e+06),
				SqlGenerateInvisiblePrimaryKey:         common.Bool(true),
				MysqlxConnectTimeout:                   common.Int(3.08246748e+08),
				NetWriteTimeout:                        common.Int(2.001597e+07),
				SqlWarnings:                            common.Bool(true),
				GroupReplicationConsistency:            mysql.ConfigurationVariablesGroupReplicationConsistencyBeforeAndAfter,
				NetReadTimeout:                         common.Int(3.634663e+06),
				InnodbRedoLogCapacity:                  common.Int64(1.13450800337e+11),
				MysqlxMinWorkerThreads:                 common.Int(79),
				BlockEncryptionMode:                    common.String("EXAMPLE-blockEncryptionMode-Value"),
				InnodbLogWriterThreads:                 common.Bool(true),
				MysqlxIdleWorkerThreadTimeout:          common.Int(2464),
				MysqlxZstdDefaultCompressionLevel:      common.Int(3),
				TableDefinitionCache:                   common.Int(80992),
				BinlogExpireLogsSeconds:                common.Int(230),
				InnodbFtNumWordOptimize:                common.Int(840),
				MaxConnectErrors:                       common.Int64(8.737900424138653e+18),
				MysqlxLz4DefaultCompressionLevel:       common.Int(12),
				QueryAllocBlockSize:                    common.Int64(4.241561787e+09),
				ReplicaTypeConversions:                 common.String("EXAMPLE-replicaTypeConversions-Value"),
				TmpTableSize:                           common.Int64(6.029654210432236e+18),
				ConnectTimeout:                         common.Int(1.8179975e+07),
				InnodbSortBufferSize:                   common.Int(5.3970829e+07),
				MysqlxMaxAllowedPacket:                 common.Int(9.84201637e+08),
				InnodbMaxPurgeLag:                      common.Int64(1.464471547e+09),
				InformationSchemaStatsExpiry:           common.Int(2.7195254e+07),
				Autocommit:                             common.Bool(false),
				DefaultAuthenticationPlugin:            mysql.ConfigurationVariablesDefaultAuthenticationPluginMysqlNativePassword,
				TimeZone:                               common.String("EXAMPLE-timeZone-Value"),
				ThreadPoolQueryThreadsPerGroup:         common.Int(968),
				InnodbFtEnableStopword:                 common.Bool(false),
				BigTables:                              common.Bool(false),
				MysqlxWriteTimeout:                     common.Int(753578),
				RequireSecureTransport:                 common.Bool(true),
				CollationServer:                        mysql.ConfigurationVariablesCollationServerKoi8rGeneralCi,
				MaxPreparedStmtCount:                   common.Int(3.240994e+06),
				QueryPreallocSize:                      common.Int64(6.15271755670074e+18),
				OptimizerSwitch:                        common.String("EXAMPLE-optimizerSwitch-Value"),
				BinlogRowMetadata:                      mysql.ConfigurationVariablesBinlogRowMetadataMinimal,
				MaxBinlogCacheSize:                     common.Int64(5.8532038242775e+13),
				MysqlxEnableHelloNotice:                common.Bool(true),
				SqlRequirePrimaryKey:                   common.Bool(false),
				InnodbAdaptiveHashIndex:                common.Bool(true),
				InnodbDdlBufferSize:                    common.Int64(1.266170961e+09),
				InnodbFtServerStopwordTable:            common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
				InnodbMaxPurgeLagDelay:                 common.Int(462620),
				InnodbStatsTransientSamplePages:        common.Int64(4.509648343962838e+18),
				LocalInfile:                            common.Bool(false),
				TemptableMaxRam:                        common.Int64(3.6510672110405965e+18),
				ConnectionMemoryChunkSize:              common.Int(1.55587256e+08),
				InnodbFtResultCacheLimit:               common.Int64(1.167584162e+09),
				GeneratedRandomPasswordLength:          common.Int(126),
				GroupConcatMaxLen:                      common.Int64(6.94278274605226e+17),
				BinlogGroupCommitSyncNoDelayCount:      common.Int(79859),
				ConnectionMemoryLimit:                  common.Int64(1.0109131393829002e+18),
				ExplicitDefaultsForTimestamp:           common.Bool(true),
				ReplicaNetTimeout:                      common.Int(2.0438916e+07),
				TransactionIsolation:                   mysql.ConfigurationVariablesTransactionIsolationRepeatableRead,
				InnodbDdlThreads:                       common.Int(36),
				InnodbRollbackOnTimeout:                common.Bool(false),
				GlobalConnectionMemoryLimit:            common.Int64(5.576825818880092e+18),
				MaxConnections:                         common.Int(78931),
				MysqlxZstdMaxClientCompressionLevel:    common.Int(10),
				SortBufferSize:                         common.Int64(1.4382471814024315e+18),
				ThreadPoolTransactionDelay:             common.Int(117899),
				InnodbFtMinTokenSize:                   common.Int(13),
				InnodbOnlineAlterLogMaxSize:            common.Int64(8.969711164800224e+18),
				ReplicaParallelWorkers:                 common.Int(718),
				SkipNameResolve:                        common.Bool(true),
				BinlogTransactionCompression:           common.Bool(true),
				CompletionType:                         mysql.ConfigurationVariablesCompletionTypeChain,
				ExplainFormat:                          mysql.ConfigurationVariablesExplainFormatTraditional,
				RangeOptimizerMaxMemSize:               common.Int64(3.0696726186820096e+18),
				MaxSeeksForKey:                         common.Int64(3.442381487526021e+18),
				GlobalConnectionMemoryTracking:         common.Bool(true),
				JoinBufferSize:                         common.Int64(5.404115377216539e+18),
				MandatoryRoles:                         common.String("EXAMPLE-mandatoryRoles-Value"),
				MaxUserConnections:                     common.Int64(3.78878413e+09),
				ThreadPoolMaxTransactionsLimit:         common.Int(75913),
				ThreadPoolSize:                         common.Int(47),
				MaxExecutionTime:                       common.Int64(8.4347329708496e+18)}}}

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