// 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{Variables: &mysql.ConfigurationVariables{InformationSchemaStatsExpiry: common.Int(1.9092921e+07),
		MaxConnections:                         common.Int(35742),
		MaxPreparedStmtCount:                   common.Int(2.382156e+06),
		MysqlFirewallMode:                      common.Bool(false),
		MysqlxDeflateMaxClientCompressionLevel: common.Int(4),
		ForeignKeyChecks:                       common.Bool(true),
		MaxBinlogCacheSize:                     common.Int64(6.5657598380079e+13),
		NetReadTimeout:                         common.Int(3.0864174e+07),
		ThreadPoolDedicatedListeners:           common.Bool(true),
		InnodbBufferPoolSize:                   common.Int64(8.96072118711289e+18),
		InnodbStatsTransientSamplePages:        common.Int64(5.548173996507821e+18),
		MandatoryRoles:                         common.String("EXAMPLE-mandatoryRoles-Value"),
		TmpTableSize:                           common.Int64(6.098776025655455e+18),
		WaitTimeout:                            common.Int(559867),
		InnodbFtNumWordOptimize:                common.Int(607),
		ConnectionMemoryChunkSize:              common.Int(2.64656567e+08),
		ConnectionMemoryLimit:                  common.Int64(5.082413452996208e+18),
		InnodbMaxPurgeLag:                      common.Int64(4.249995245e+09),
		RegexpTimeLimit:                        common.Int(1.556007583e+09),
		SortBufferSize:                         common.Int64(6.584254593372628e+17),
		SqlRequirePrimaryKey:                   common.Bool(false),
		BinlogExpireLogsSeconds:                common.Int(755),
		InnodbBufferPoolInstances:              common.Int(11),
		InnodbFtResultCacheLimit:               common.Int64(2.804949353e+09),
		MysqlxInteractiveTimeout:               common.Int(2.129559e+06),
		MysqlxZstdMaxClientCompressionLevel:    common.Int(3),
		DefaultAuthenticationPlugin:            mysql.ConfigurationVariablesDefaultAuthenticationPluginSha256Password,
		MaxHeapTableSize:                       common.Int64(6.459870808769727e+18),
		MaxConnectErrors:                       common.Int64(6.055925199060218e+18),
		GlobalConnectionMemoryLimit:            common.Int64(5.848263798121863e+18),
		InnodbDdlBufferSize:                    common.Int64(6.00391474e+08),
		InnodbFtEnableStopword:                 common.Bool(false),
		MysqlxEnableHelloNotice:                common.Bool(true),
		TransactionIsolation:                   mysql.ConfigurationVariablesTransactionIsolationReadCommitted,
		BinlogTransactionCompression:           common.Bool(true),
		InnodbFtMinTokenSize:                   common.Int(12),
		NetWriteTimeout:                        common.Int(2.0578789e+07),
		InnodbBufferPoolDumpPct:                common.Int(99),
		CteMaxRecursionDepth:                   common.Int64(2.86129345e+09),
		GlobalConnectionMemoryTracking:         common.Bool(false),
		MaxAllowedPacket:                       common.Int(3.5365705e+08),
		MysqlxConnectTimeout:                   common.Int(4.55362753e+08),
		MysqlxWriteTimeout:                     common.Int(218352),
		MysqlxZstdDefaultCompressionLevel:      common.Int(7),
		QueryAllocBlockSize:                    common.Int64(4.15237263e+09),
		BigTables:                              common.Bool(false),
		InnodbFtMaxTokenSize:                   common.Int(72),
		MysqlZstdDefaultCompressionLevel:       common.Int(17),
		MysqlxIdleWorkerThreadTimeout:          common.Int(2578),
		MysqlxLz4MaxClientCompressionLevel:     common.Int(14),
		ParserMaxMemSize:                       common.Int64(9.983914814850913e+17),
		QueryPreallocSize:                      common.Int64(8.712992094385237e+18),
		SqlMode:                                common.String("EXAMPLE-sqlMode-Value"),
		GeneratedRandomPasswordLength:          common.Int(101),
		ThreadPoolMaxTransactionsLimit:         common.Int(20139),
		InteractiveTimeout:                     common.Int(3.669345e+06),
		MysqlxDocumentIdUniquePrefix:           common.Int(41339),
		MysqlxMinWorkerThreads:                 common.Int(17),
		GroupReplicationConsistency:            mysql.ConfigurationVariablesGroupReplicationConsistencyEventual,
		InnodbStatsPersistentSamplePages:       common.Int64(2.8893062462619597e+18),
		MysqlxDeflateDefaultCompressionLevel:   common.Int(1),
		MysqlxReadTimeout:                      common.Int(1.303861e+06),
		InnodbDdlThreads:                       common.Int(4),
		TimeZone:                               common.String("EXAMPLE-timeZone-Value"),
		InnodbFtServerStopwordTable:            common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
		InnodbLockWaitTimeout:                  common.Int(7.01613807e+08),
		MaxExecutionTime:                       common.Int64(1.775319325852203e+18),
		MysqlxMaxAllowedPacket:                 common.Int(9.55788917e+08),
		SqlWarnings:                            common.Bool(true),
		BinlogRowValueOptions:                  common.String("EXAMPLE-binlogRowValueOptions-Value"),
		InnodbLogWriterThreads:                 common.Bool(true),
		MysqlxLz4DefaultCompressionLevel:       common.Int(3),
		MysqlxWaitTimeout:                      common.Int(431757),
		BinlogRowMetadata:                      mysql.ConfigurationVariablesBinlogRowMetadataMinimal,
		CompletionType:                         mysql.ConfigurationVariablesCompletionTypeNoChain,
		ConnectTimeout:                         common.Int(2.2150952e+07),
		InnodbMaxPurgeLagDelay:                 common.Int(97434),
		LocalInfile:                            common.Bool(true),
		Autocommit:                             common.Bool(false)},
		CompartmentId:         common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
		Description:           common.String("EXAMPLE-description-Value"),
		DisplayName:           common.String("EXAMPLE-displayName-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_tkEjg": map[string]interface{}{"EXAMPLE_KEY_LP0GB": "EXAMPLE--Value"}},
		FreeformTags:          map[string]string{"EXAMPLE_KEY_LmtkX": "EXAMPLE_VALUE_oBLrbPg8WPZN7tJ8VUCA"},
		InitVariables:         &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesInsensitiveLowercase}},
		OpcRequestId:  common.String("SGTICKNNBZHXZYUN5XVM<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)
}