// 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("HR8CDY3JFIARLYYQ7PUN<unique_ID>"),
OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
CreateConfigurationDetails: mysql.CreateConfigurationDetails{Description: common.String("EXAMPLE-description-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"),
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_LDiOY": map[string]interface{}{"EXAMPLE_KEY_gPu7S": "EXAMPLE--Value"}},
FreeformTags: map[string]string{"EXAMPLE_KEY_bFGG2": "EXAMPLE_VALUE_HEwTgu0IsYjAnunpiSRP"},
ShapeName: common.String("EXAMPLE-shapeName-Value"),
Variables: &mysql.ConfigurationVariables{BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
ConnectionMemoryLimit: common.Int64(4.535887233147313e+18),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginCachingSha2Password,
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyBeforeOnPrimaryFailover,
InformationSchemaStatsExpiry: common.Int(2.6494051e+07),
InnodbStatsTransientSamplePages: common.Int64(4.693389852321451e+18),
MaxPreparedStmtCount: common.Int(2.813756e+06),
MysqlxReadTimeout: common.Int(1.246984e+06),
ExplicitDefaultsForTimestamp: common.Bool(true),
InnodbFtResultCacheLimit: common.Int64(1.740936595e+09),
ParserMaxMemSize: common.Int64(8.452961434313551e+18),
QueryPreallocSize: common.Int64(7.694962497643258e+17),
ThreadPoolTransactionDelay: common.Int(205704),
ReplicaParallelWorkers: common.Int(656),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
TemptableMaxRam: common.Int64(1.234843570939827e+18),
ConnectTimeout: common.Int(2.360891e+06),
InnodbRedoLogCapacity: common.Int64(3.7454534569e+10),
MaxAllowedPacket: common.Int(1.4596812e+08),
TmpTableSize: common.Int64(3.0633690275765344e+17),
BinlogExpireLogsSeconds: common.Int(711),
ThreadPoolMaxTransactionsLimit: common.Int(24774),
InnodbDdlBufferSize: common.Int64(4.248917659e+09),
InnodbStatsPersistentSamplePages: common.Int64(9.068272854687136e+18),
GlobalConnectionMemoryLimit: common.Int64(2.1548536871222636e+18),
BigTables: common.Bool(true),
BinlogGroupCommitSyncDelay: common.Int(106816),
ConnectionMemoryChunkSize: common.Int(2.2962945e+07),
CteMaxRecursionDepth: common.Int64(1.122819488e+09),
InnodbBufferPoolDumpPct: common.Int(51),
GeneratedRandomPasswordLength: common.Int(137),
GroupConcatMaxLen: common.Int64(8.17178270001625e+18),
MysqlxDeflateDefaultCompressionLevel: common.Int(6),
MysqlxInteractiveTimeout: common.Int(890423),
MysqlxWaitTimeout: common.Int(335191),
RangeOptimizerMaxMemSize: common.Int64(8.683482441382567e+18),
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
SkipNameResolve: common.Bool(true),
ThreadPoolSize: common.Int(262),
WaitTimeout: common.Int(1.239937e+06),
AutoIncrementIncrement: common.Int(54425),
BinlogTransactionCompression: common.Bool(true),
InnodbMaxPurgeLag: common.Int64(2.197845304e+09),
MaxHeapTableSize: common.Int64(1.6071603888281428e+18),
NetReadTimeout: common.Int(1.909586e+06),
AutoIncrementOffset: common.Int(32218),
InnodbAdaptiveHashIndex: common.Bool(true),
InnodbLockWaitTimeout: common.Int(6.8894507e+07),
InnodbUndoLogTruncate: common.Bool(false),
MysqlxDeflateMaxClientCompressionLevel: common.Int(6),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
CollationServer: mysql.ConfigurationVariablesCollationServerEucjpmsBin,
MysqlxLz4DefaultCompressionLevel: common.Int(6),
MysqlxZstdDefaultCompressionLevel: common.Int(16),
RegexpTimeLimit: common.Int(7.9014387e+07),
InnodbFtEnableStopword: common.Bool(true),
InnodbStrictMode: common.Bool(false),
InteractiveTimeout: common.Int(2.579791e+06),
LongQueryTime: common.Int(2.8223644e+07),
MysqlxLz4MaxClientCompressionLevel: common.Int(14),
MysqlZstdDefaultCompressionLevel: common.Int(2),
MysqlxMinWorkerThreads: common.Int(56),
MysqlxZstdMaxClientCompressionLevel: common.Int(8),
SqlWarnings: common.Bool(false),
InnodbFtMinTokenSize: common.Int(13),
MaxSeeksForKey: common.Int64(4.0381831466890926e+18),
InnodbFtMaxTokenSize: common.Int(70),
InnodbLogWriterThreads: common.Bool(true),
InnodbOnlineAlterLogMaxSize: common.Int64(6.408091733271306e+18),
JoinBufferSize: common.Int64(1.829961648565166e+18),
MaxUserConnections: common.Int64(1.291701965e+09),
NetWriteTimeout: common.Int(1.8405839e+07),
ThreadPoolDedicatedListeners: common.Bool(true),
ThreadPoolQueryThreadsPerGroup: common.Int(3937),
SqlRequirePrimaryKey: common.Bool(true),
TableOpenCache: common.Int(314861),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerArmscii8,
GlobalConnectionMemoryTracking: common.Bool(true),
MaxExecutionTime: common.Int64(8.238720083855444e+18),
QueryAllocBlockSize: common.Int64(1.193024868e+09),
InnodbBufferPoolInstances: common.Int(12),
SortBufferSize: common.Int64(8.647596805367231e+18),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatJson,
MaxConnections: common.Int(40249),
MysqlxIdleWorkerThreadTimeout: common.Int(440),
InnodbFtNumWordOptimize: common.Int(789),
InnodbMaxPurgeLagDelay: common.Int(548158),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
RelayLogSpaceLimit: common.Int64(8.969785359265581e+18),
TableDefinitionCache: common.Int(328181),
InnodbBufferPoolSize: common.Int64(7.800092847453232e+18),
InnodbSortBufferSize: common.Int(5.7258402e+07),
MysqlxMaxAllowedPacket: common.Int(1.056773022e+09),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationReadCommitted,
SqlGenerateInvisiblePrimaryKey: common.Bool(false),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataFull,
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingChanges,
MysqlFirewallMode: common.Bool(false),
Autocommit: common.Bool(false),
InnodbDdlThreads: common.Int(22),
MaxConnectErrors: common.Int64(1.719369702728024e+18),
MysqlxEnableHelloNotice: common.Bool(true),
InnodbNumaInterleave: common.Bool(false),
CompletionType: mysql.ConfigurationVariablesCompletionTypeNoChain,
LocalInfile: common.Bool(false),
MaxBinlogCacheSize: common.Int64(2.7328089591608e+13),
MysqlxDocumentIdUniquePrefix: common.Int(31089),
ReplicaNetTimeout: common.Int(1.2215607e+07),
ForeignKeyChecks: common.Bool(false),
MysqlxConnectTimeout: common.Int(7.91298321e+08),
RequireSecureTransport: common.Bool(true),
BinlogGroupCommitSyncNoDelayCount: common.Int(35855),
InnodbAutoincLockMode: common.Int(547),
InnodbRollbackOnTimeout: common.Bool(false),
MysqlxWriteTimeout: common.Int(39799)},
CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-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)
}