// 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("EWZZGXYXBRGEGCY0NDGO<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		CreateConfigurationDetails: mysql.CreateConfigurationDetails{FreeformTags: map[string]string{"EXAMPLE_KEY_Jwsky": "EXAMPLE_VALUE_FebYZvqy0aBxL6Sdiz9j"},
			CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
			DisplayName:   common.String("EXAMPLE-displayName-Value"),
			InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesInsensitiveLowercase},
			Options: []mysql.Option{mysql.Option{Name: common.String("EXAMPLE-name-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
			ShapeName:             common.String("EXAMPLE-shapeName-Value"),
			Variables: &mysql.ConfigurationVariables{MysqlxEnableHelloNotice: common.Bool(true),
				TmpTableSize:                           common.Int64(7.420685828326979e+18),
				ReplicaTypeConversions:                 common.String("EXAMPLE-replicaTypeConversions-Value"),
				GeneratedRandomPasswordLength:          common.Int(27),
				CompletionType:                         mysql.ConfigurationVariablesCompletionTypeNoChain,
				InnodbDdlBufferSize:                    common.Int64(1.742062615e+09),
				InnodbFtResultCacheLimit:               common.Int64(2.467072078e+09),
				MaxExecutionTime:                       common.Int64(2.515809402232957e+18),
				MysqlxConnectTimeout:                   common.Int(6.30795672e+08),
				BinlogExpireLogsSeconds:                common.Int(923),
				MaxConnections:                         common.Int(37656),
				SqlWarnings:                            common.Bool(true),
				MaxSeeksForKey:                         common.Int64(4.780470942100387e+18),
				RequireSecureTransport:                 common.Bool(false),
				WaitTimeout:                            common.Int(1.012066e+06),
				InnodbAutoincLockMode:                  common.Int(621),
				InnodbBufferPoolInstances:              common.Int(40),
				InnodbMaxPurgeLag:                      common.Int64(3.041542029e+09),
				OptimizerSwitch:                        common.String("EXAMPLE-optimizerSwitch-Value"),
				TimeZone:                               common.String("EXAMPLE-timeZone-Value"),
				AutoIncrementIncrement:                 common.Int(33755),
				BinlogRowMetadata:                      mysql.ConfigurationVariablesBinlogRowMetadataFull,
				CharacterSetServer:                     mysql.ConfigurationVariablesCharacterSetServerGeostd8,
				CteMaxRecursionDepth:                   common.Int64(3.46436675e+09),
				ExplainFormat:                          mysql.ConfigurationVariablesExplainFormatTraditional,
				MysqlxWriteTimeout:                     common.Int(1.637095e+06),
				TableDefinitionCache:                   common.Int(180882),
				ExplicitDefaultsForTimestamp:           common.Bool(false),
				InnodbOnlineAlterLogMaxSize:            common.Int64(8.941577504901864e+18),
				MysqlxReadTimeout:                      common.Int(1.857964e+06),
				InnodbStatsPersistentSamplePages:       common.Int64(4.548184915912741e+18),
				BinlogTransactionCompression:           common.Bool(false),
				InnodbFtNumWordOptimize:                common.Int(83),
				MysqlZstdDefaultCompressionLevel:       common.Int(6),
				MysqlxLz4MaxClientCompressionLevel:     common.Int(10),
				AutoIncrementOffset:                    common.Int(56174),
				BigTables:                              common.Bool(true),
				InnodbBufferPoolSize:                   common.Int64(6.20774910036867e+18),
				InnodbFtServerStopwordTable:            common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
				MysqlxMinWorkerThreads:                 common.Int(85),
				RelayLogSpaceLimit:                     common.Int64(4.3320403667876045e+18),
				TableOpenCache:                         common.Int(470054),
				TransactionIsolation:                   mysql.ConfigurationVariablesTransactionIsolationReadCommited,
				JoinBufferSize:                         common.Int64(2.0550680431957107e+17),
				MysqlFirewallMode:                      common.Bool(false),
				MysqlxIdleWorkerThreadTimeout:          common.Int(740),
				RegexpTimeLimit:                        common.Int(1.361750399e+09),
				ConnectTimeout:                         common.Int(1.602022e+06),
				InnodbFtMinTokenSize:                   common.Int(9),
				ParserMaxMemSize:                       common.Int64(4.307493214573338e+17),
				InnodbRollbackOnTimeout:                common.Bool(false),
				GlobalConnectionMemoryLimit:            common.Int64(2.30415138694914e+18),
				BinlogRowValueOptions:                  common.String("EXAMPLE-binlogRowValueOptions-Value"),
				MaxConnectErrors:                       common.Int64(6.178770100217243e+18),
				SkipNameResolve:                        common.Bool(true),
				SqlMode:                                common.String("EXAMPLE-sqlMode-Value"),
				MaxBinlogCacheSize:                     common.Int64(1.2033362272632e+13),
				MysqlxLz4DefaultCompressionLevel:       common.Int(4),
				MysqlxMaxAllowedPacket:                 common.Int(2.66973087e+08),
				ThreadPoolSize:                         common.Int(358),
				InteractiveTimeout:                     common.Int(1.092478e+06),
				ConnectionMemoryChunkSize:              common.Int(2.81600798e+08),
				GlobalConnectionMemoryTracking:         common.Bool(false),
				InnodbFtEnableStopword:                 common.Bool(true),
				InnodbStrictMode:                       common.Bool(false),
				InnodbUndoLogTruncate:                  common.Bool(false),
				MysqlxDocumentIdUniquePrefix:           common.Int(33429),
				NetWriteTimeout:                        common.Int(9.871521e+06),
				BinlogGroupCommitSyncDelay:             common.Int(247004),
				ConnectionMemoryLimit:                  common.Int64(6.011738433163517e+18),
				MaxAllowedPacket:                       common.Int(8.17922352e+08),
				RangeOptimizerMaxMemSize:               common.Int64(1.7665297477114112e+18),
				BinlogGroupCommitSyncNoDelayCount:      common.Int(8606),
				InnodbSortBufferSize:                   common.Int(5.7049549e+07),
				MaxUserConnections:                     common.Int64(2.190805421e+09),
				InformationSchemaStatsExpiry:           common.Int(1.8591656e+07),
				InnodbStatsTransientSamplePages:        common.Int64(4.4282445370988104e+18),
				MaxPreparedStmtCount:                   common.Int(827285),
				MysqlxWaitTimeout:                      common.Int(763372),
				CollationServer:                        mysql.ConfigurationVariablesCollationServerCp852Bin,
				ForeignKeyChecks:                       common.Bool(true),
				InnodbAdaptiveHashIndex:                common.Bool(true),
				InnodbBufferPoolDumpPct:                common.Int(76),
				InnodbLogWriterThreads:                 common.Bool(true),
				MysqlxDeflateMaxClientCompressionLevel: common.Int(6),
				ReplicaNetTimeout:                      common.Int(1.0658491e+07),
				InnodbChangeBuffering:                  mysql.ConfigurationVariablesInnodbChangeBufferingPurges,
				MysqlxInteractiveTimeout:               common.Int(407984),
				BlockEncryptionMode:                    common.String("EXAMPLE-blockEncryptionMode-Value"),
				QueryPreallocSize:                      common.Int64(2.2767363613305354e+18),
				TemptableMaxRam:                        common.Int64(6.04293561997716e+18),
				DefaultAuthenticationPlugin:            mysql.ConfigurationVariablesDefaultAuthenticationPluginCachingSha2Password,
				MysqlxZstdDefaultCompressionLevel:      common.Int(13),
				InnodbFtMaxTokenSize:                   common.Int(41),
				ThreadPoolDedicatedListeners:           common.Bool(false),
				ThreadPoolQueryThreadsPerGroup:         common.Int(1370),
				MysqlxDeflateDefaultCompressionLevel:   common.Int(5),
				MysqlxZstdMaxClientCompressionLevel:    common.Int(17),
				NetReadTimeout:                         common.Int(2.6338513e+07),
				SortBufferSize:                         common.Int64(4.1315067521400264e+18),
				SqlGenerateInvisiblePrimaryKey:         common.Bool(false),
				SqlRequirePrimaryKey:                   common.Bool(false),
				ThreadPoolTransactionDelay:             common.Int(7849),
				Autocommit:                             common.Bool(true),
				GroupReplicationConsistency:            mysql.ConfigurationVariablesGroupReplicationConsistencyBefore,
				InnodbDdlThreads:                       common.Int(58),
				QueryAllocBlockSize:                    common.Int64(1.43172228e+09),
				GroupConcatMaxLen:                      common.Int64(7.590169435829819e+18),
				InnodbLockWaitTimeout:                  common.Int(1.84538924e+08),
				LocalInfile:                            common.Bool(true),
				LongQueryTime:                          common.Int(4.612292e+06),
				MandatoryRoles:                         common.String("EXAMPLE-mandatoryRoles-Value"),
				MaxHeapTableSize:                       common.Int64(8.578684187076666e+18),
				ReplicaParallelWorkers:                 common.Int(570),
				ThreadPoolMaxTransactionsLimit:         common.Int(13193),
				InnodbMaxPurgeLagDelay:                 common.Int(969163),
				InnodbNumaInterleave:                   common.Bool(true),
				InnodbRedoLogCapacity:                  common.Int64(1.03124310447e+11)},
			DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_zPzPe": map[string]interface{}{"EXAMPLE_KEY_STxUP": "EXAMPLE--Value"}},
			Description: common.String("EXAMPLE-description-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)
}