// 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{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"),
			FreeformTags:          map[string]string{"EXAMPLE_KEY_NeRKd": "EXAMPLE_VALUE_zbYdIGBZb6wShcsnmnE4"},
			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_SAHdP": map[string]interface{}{"EXAMPLE_KEY_mCm1M": "EXAMPLE--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")}},
			Variables: &mysql.ConfigurationVariables{ConnectionMemoryChunkSize: common.Int(9.2755314e+07),
				ReplicaNetTimeout:                      common.Int(2.4833839e+07),
				SortBufferSize:                         common.Int64(8.431583150254109e+18),
				TemptableMaxRam:                        common.Int64(4.518051779076576e+18),
				InnodbFtMinTokenSize:                   common.Int(9),
				MysqlxMinWorkerThreads:                 common.Int(50),
				RequireSecureTransport:                 common.Bool(false),
				BlockEncryptionMode:                    common.String("EXAMPLE-blockEncryptionMode-Value"),
				NetReadTimeout:                         common.Int(1.7906571e+07),
				OptimizerSwitch:                        common.String("EXAMPLE-optimizerSwitch-Value"),
				SkipNameResolve:                        common.Bool(false),
				InteractiveTimeout:                     common.Int(2.7582068e+07),
				ExplainFormat:                          mysql.ConfigurationVariablesExplainFormatJson,
				GeneratedRandomPasswordLength:          common.Int(159),
				InnodbAdaptiveHashIndex:                common.Bool(true),
				InnodbRollbackOnTimeout:                common.Bool(false),
				NetWriteTimeout:                        common.Int(2.4036767e+07),
				ThreadPoolQueryThreadsPerGroup:         common.Int(2454),
				ThreadPoolSize:                         common.Int(328),
				ConnectionMemoryLimit:                  common.Int64(2.923109944108245e+18),
				MaxAllowedPacket:                       common.Int(5.55898941e+08),
				TimeZone:                               common.String("EXAMPLE-timeZone-Value"),
				InnodbNumaInterleave:                   common.Bool(true),
				GlobalConnectionMemoryLimit:            common.Int64(9.102692157044662e+18),
				GlobalConnectionMemoryTracking:         common.Bool(true),
				InnodbBufferPoolDumpPct:                common.Int(5),
				MysqlxConnectTimeout:                   common.Int(8.40690594e+08),
				MysqlxLz4MaxClientCompressionLevel:     common.Int(8),
				SqlRequirePrimaryKey:                   common.Bool(true),
				InnodbOnlineAlterLogMaxSize:            common.Int64(8.532617150532645e+18),
				BinlogTransactionCompression:           common.Bool(false),
				MysqlxWriteTimeout:                     common.Int(1.419839e+06),
				SqlWarnings:                            common.Bool(false),
				InnodbFtMaxTokenSize:                   common.Int(45),
				InnodbFtResultCacheLimit:               common.Int64(2.923745329e+09),
				MaxUserConnections:                     common.Int64(9.741495e+08),
				MysqlZstdDefaultCompressionLevel:       common.Int(8),
				RangeOptimizerMaxMemSize:               common.Int64(8.650047051117569e+18),
				ThreadPoolDedicatedListeners:           common.Bool(true),
				InformationSchemaStatsExpiry:           common.Int(2.391259e+07),
				ThreadPoolMaxTransactionsLimit:         common.Int(50950),
				WaitTimeout:                            common.Int(818688),
				InnodbSortBufferSize:                   common.Int(4.8556232e+07),
				InnodbStatsTransientSamplePages:        common.Int64(2.2851254259699732e+18),
				MysqlxDeflateMaxClientCompressionLevel: common.Int(8),
				ParserMaxMemSize:                       common.Int64(1.866953448859852e+17),
				TableOpenCache:                         common.Int(134718),
				CollationServer:                        mysql.ConfigurationVariablesCollationServerUtf8mb4SlovenianCi,
				GroupReplicationConsistency:            mysql.ConfigurationVariablesGroupReplicationConsistencyBeforeAndAfter,
				InnodbMaxPurgeLag:                      common.Int64(1.795165031e+09),
				MandatoryRoles:                         common.String("EXAMPLE-mandatoryRoles-Value"),
				Autocommit:                             common.Bool(false),
				CteMaxRecursionDepth:                   common.Int64(2.791764552e+09),
				DefaultAuthenticationPlugin:            mysql.ConfigurationVariablesDefaultAuthenticationPluginCachingSha2Password,
				ExplicitDefaultsForTimestamp:           common.Bool(false),
				InnodbLogWriterThreads:                 common.Bool(false),
				LongQueryTime:                          common.Int(976981),
				MysqlxDocumentIdUniquePrefix:           common.Int(31037),
				MaxConnections:                         common.Int(57797),
				MysqlxDeflateDefaultCompressionLevel:   common.Int(1),
				QueryAllocBlockSize:                    common.Int64(3.840468961e+09),
				RelayLogSpaceLimit:                     common.Int64(4.3306744232685056e+18),
				BinlogRowMetadata:                      mysql.ConfigurationVariablesBinlogRowMetadataMinimal,
				ConnectTimeout:                         common.Int(1.5070965e+07),
				InnodbFtEnableStopword:                 common.Bool(true),
				InnodbRedoLogCapacity:                  common.Int64(1.0119801358e+10),
				InnodbStatsPersistentSamplePages:       common.Int64(6.161190238214515e+18),
				QueryPreallocSize:                      common.Int64(6.79588221425306e+17),
				AutoIncrementIncrement:                 common.Int(29782),
				CompletionType:                         mysql.ConfigurationVariablesCompletionTypeRelease,
				InnodbChangeBuffering:                  mysql.ConfigurationVariablesInnodbChangeBufferingChanges,
				InnodbFtServerStopwordTable:            common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
				BinlogExpireLogsSeconds:                common.Int(225),
				BinlogGroupCommitSyncDelay:             common.Int(99214),
				CharacterSetServer:                     mysql.ConfigurationVariablesCharacterSetServerCp852,
				InnodbMaxPurgeLagDelay:                 common.Int(924069),
				InnodbUndoLogTruncate:                  common.Bool(true),
				MysqlxMaxAllowedPacket:                 common.Int(1.93090376e+08),
				MysqlxWaitTimeout:                      common.Int(1.420173e+06),
				TmpTableSize:                           common.Int64(2.6612992799533993e+18),
				BinlogGroupCommitSyncNoDelayCount:      common.Int(16435),
				InnodbLockWaitTimeout:                  common.Int(6.79510976e+08),
				MysqlxIdleWorkerThreadTimeout:          common.Int(2936),
				MysqlxZstdMaxClientCompressionLevel:    common.Int(10),
				ReplicaParallelWorkers:                 common.Int(686),
				TableDefinitionCache:                   common.Int(13464),
				InnodbStrictMode:                       common.Bool(true),
				SqlMode:                                common.String("EXAMPLE-sqlMode-Value"),
				MysqlxEnableHelloNotice:                common.Bool(true),
				RegexpTimeLimit:                        common.Int(1.643799217e+09),
				InnodbDdlBufferSize:                    common.Int64(3.142220385e+09),
				LocalInfile:                            common.Bool(false),
				MaxExecutionTime:                       common.Int64(8.074249315760883e+18),
				MaxPreparedStmtCount:                   common.Int(2.354002e+06),
				TransactionIsolation:                   mysql.ConfigurationVariablesTransactionIsolationRepeatableRead,
				BigTables:                              common.Bool(false),
				GroupConcatMaxLen:                      common.Int64(2.735370721453347e+18),
				MaxBinlogCacheSize:                     common.Int64(6.502440930954e+12),
				MaxHeapTableSize:                       common.Int64(1.8138032801156083e+18),
				SqlGenerateInvisiblePrimaryKey:         common.Bool(true),
				MaxConnectErrors:                       common.Int64(8.025160299892604e+18),
				MaxSeeksForKey:                         common.Int64(5.263875255063705e+18),
				MysqlxZstdDefaultCompressionLevel:      common.Int(11),
				ThreadPoolTransactionDelay:             common.Int(229558),
				BinlogRowValueOptions:                  common.String("EXAMPLE-binlogRowValueOptions-Value"),
				InnodbBufferPoolSize:                   common.Int64(1.8686416862387064e+18),
				InnodbDdlThreads:                       common.Int(37),
				JoinBufferSize:                         common.Int64(8.507356597694859e+18),
				MysqlxInteractiveTimeout:               common.Int(1.476948e+06),
				ReplicaTypeConversions:                 common.String("EXAMPLE-replicaTypeConversions-Value"),
				ForeignKeyChecks:                       common.Bool(false),
				MysqlxLz4DefaultCompressionLevel:       common.Int(13),
				AutoIncrementOffset:                    common.Int(22032),
				InnodbBufferPoolInstances:              common.Int(16),
				InnodbFtNumWordOptimize:                common.Int(165),
				MysqlFirewallMode:                      common.Bool(false),
				InnodbAutoincLockMode:                  common.Int(248),
				MysqlxReadTimeout:                      common.Int(1.717675e+06)}},
		OpcRequestId: common.String("EKGH6VBLRGDMD4QMGXW8<unique_ID>")}

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