// 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{DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_1ahwY": map[string]interface{}{"EXAMPLE_KEY_cYn9l": "EXAMPLE--Value"}},
Description: common.String("EXAMPLE-description-Value"),
DisplayName: common.String("EXAMPLE-displayName-Value"),
FreeformTags: map[string]string{"EXAMPLE_KEY_UMpbP": "EXAMPLE_VALUE_iRr44PxcZUie1mmLkSBT"},
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{InnodbBufferPoolSize: common.Int64(8.602150342671764e+18),
InnodbStatsPersistentSamplePages: common.Int64(8.869767954428354e+18),
MysqlxWriteTimeout: common.Int(748470),
RelayLogSpaceLimit: common.Int64(8.127422354396001e+18),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataMinimal,
BinlogTransactionCompression: common.Bool(false),
InnodbDdlBufferSize: common.Int64(2.257735091e+09),
MysqlxZstdMaxClientCompressionLevel: common.Int(15),
TableDefinitionCache: common.Int(501776),
TemptableMaxRam: common.Int64(5.62087667740724e+18),
CteMaxRecursionDepth: common.Int64(2.408414948e+09),
MaxUserConnections: common.Int64(1.731766034e+09),
RangeOptimizerMaxMemSize: common.Int64(8.688455613288131e+18),
RequireSecureTransport: common.Bool(false),
BinlogExpireLogsSeconds: common.Int(307),
InnodbUndoLogTruncate: common.Bool(false),
MaxExecutionTime: common.Int64(8.67994901585099e+18),
MysqlxIdleWorkerThreadTimeout: common.Int(3222),
GroupConcatMaxLen: common.Int64(4.818423346108953e+18),
InnodbDdlThreads: common.Int(20),
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
JoinBufferSize: common.Int64(9.108603613891809e+18),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerBig5,
ConnectionMemoryLimit: common.Int64(6.794665999996442e+18),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginCachingSha2Password,
MysqlxDeflateMaxClientCompressionLevel: common.Int(4),
MysqlxReadTimeout: common.Int(450827),
TableOpenCache: common.Int(150497),
MysqlFirewallMode: common.Bool(true),
MysqlxInteractiveTimeout: common.Int(145897),
BinlogGroupCommitSyncDelay: common.Int(72987),
NetReadTimeout: common.Int(1.3843852e+07),
ThreadPoolMaxTransactionsLimit: common.Int(55263),
MaxBinlogCacheSize: common.Int64(1.8685793413035e+13),
Autocommit: common.Bool(false),
ExplicitDefaultsForTimestamp: common.Bool(true),
InteractiveTimeout: common.Int(1.5515062e+07),
MysqlZstdDefaultCompressionLevel: common.Int(7),
ParserMaxMemSize: common.Int64(1.7959788072367995e+18),
AutoIncrementOffset: common.Int(35820),
MaxConnections: common.Int(36488),
CompletionType: mysql.ConfigurationVariablesCompletionTypeNoChain,
InnodbRedoLogCapacity: common.Int64(1.27364254292e+11),
InnodbAdaptiveHashIndex: common.Bool(true),
MaxAllowedPacket: common.Int(2.49301338e+08),
MysqlxMinWorkerThreads: common.Int(93),
SkipNameResolve: common.Bool(false),
MysqlxLz4MaxClientCompressionLevel: common.Int(15),
ForeignKeyChecks: common.Bool(true),
BigTables: common.Bool(true),
ConnectTimeout: common.Int(1.9654985e+07),
InnodbSortBufferSize: common.Int(5.122517e+07),
MaxConnectErrors: common.Int64(1.932320583002707e+18),
ThreadPoolTransactionDelay: common.Int(128297),
InnodbFtResultCacheLimit: common.Int64(2.210688374e+09),
ThreadPoolQueryThreadsPerGroup: common.Int(699),
LocalInfile: common.Bool(true),
MysqlxConnectTimeout: common.Int(8.87663923e+08),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationReadCommitted,
WaitTimeout: common.Int(1.710033e+06),
ReplicaParallelWorkers: common.Int(475),
ConnectionMemoryChunkSize: common.Int(1.89474889e+08),
MysqlxWaitTimeout: common.Int(2.126283e+06),
MysqlxDocumentIdUniquePrefix: common.Int(45826),
MysqlxZstdDefaultCompressionLevel: common.Int(15),
ThreadPoolSize: common.Int(201),
InnodbNumaInterleave: common.Bool(true),
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyAfter,
QueryPreallocSize: common.Int64(1.1893268313764393e+18),
RegexpTimeLimit: common.Int(8.00393342e+08),
SqlRequirePrimaryKey: common.Bool(false),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
AutoIncrementIncrement: common.Int(17792),
CollationServer: mysql.ConfigurationVariablesCollationServerGb18030ChineseCi,
InnodbFtNumWordOptimize: common.Int(593),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
InnodbAutoincLockMode: common.Int(313),
InnodbMaxPurgeLag: common.Int64(1.596484495e+09),
InnodbOnlineAlterLogMaxSize: common.Int64(7.493572556568284e+18),
InnodbRollbackOnTimeout: common.Bool(false),
MaxHeapTableSize: common.Int64(3.0523187775225236e+18),
MaxSeeksForKey: common.Int64(8.942941478686596e+18),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
SqlWarnings: common.Bool(true),
InnodbFtEnableStopword: common.Bool(true),
MysqlxDeflateDefaultCompressionLevel: common.Int(8),
NetWriteTimeout: common.Int(7.911286e+06),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
TmpTableSize: common.Int64(9.047608257704214e+18),
InnodbBufferPoolDumpPct: common.Int(35),
ReplicaNetTimeout: common.Int(2.7988797e+07),
SortBufferSize: common.Int64(7.481396639029683e+18),
InformationSchemaStatsExpiry: common.Int(2.9824563e+07),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingAll,
InnodbFtMaxTokenSize: common.Int(66),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
MysqlxMaxAllowedPacket: common.Int(1.54750834e+08),
QueryAllocBlockSize: common.Int64(1.211837308e+09),
SqlGenerateInvisiblePrimaryKey: common.Bool(false),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatJson,
InnodbStatsTransientSamplePages: common.Int64(6.227804618707211e+18),
MysqlxEnableHelloNotice: common.Bool(false),
ThreadPoolDedicatedListeners: common.Bool(true),
BinlogGroupCommitSyncNoDelayCount: common.Int(81962),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
InnodbMaxPurgeLagDelay: common.Int(871722),
InnodbLockWaitTimeout: common.Int(4.35186152e+08),
InnodbLogWriterThreads: common.Bool(false),
GlobalConnectionMemoryTracking: common.Bool(true),
GeneratedRandomPasswordLength: common.Int(33),
GlobalConnectionMemoryLimit: common.Int64(3.4174641155584625e+18),
InnodbFtMinTokenSize: common.Int(8),
MysqlxLz4DefaultCompressionLevel: common.Int(9),
InnodbBufferPoolInstances: common.Int(5),
InnodbStrictMode: common.Bool(true),
LongQueryTime: common.Int(1.5997235e+07),
MaxPreparedStmtCount: common.Int(2.610363e+06)},
CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value")},
OpcRequestId: common.String("T7OV2LVTAEMDZDHMFJ2H<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)
}