// 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{CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
Description: common.String("EXAMPLE-description-Value"),
FreeformTags: map[string]string{"EXAMPLE_KEY_YpCck": "EXAMPLE_VALUE_GT6u4ueE3ACnDwDyOdog"},
InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesSensitive},
Options: []mysql.Option{mysql.Option{Name: common.String("EXAMPLE-name-Value"),
Value: common.String("EXAMPLE-value-Value")}},
Variables: &mysql.ConfigurationVariables{BinlogGroupCommitSyncNoDelayCount: common.Int(40141),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataFull,
InnodbAutoincLockMode: common.Int(914),
InnodbDdlBufferSize: common.Int64(3.634052814e+09),
InnodbOnlineAlterLogMaxSize: common.Int64(6.561029671729853e+18),
JoinBufferSize: common.Int64(9.021189748521306e+18),
RegexpTimeLimit: common.Int(7.93960156e+08),
ThreadPoolMaxTransactionsLimit: common.Int(3542),
ExplicitDefaultsForTimestamp: common.Bool(false),
InnodbFtEnableStopword: common.Bool(true),
InnodbLogWriterThreads: common.Bool(false),
InnodbStatsPersistentSamplePages: common.Int64(8.554043915039152e+18),
MysqlZstdDefaultCompressionLevel: common.Int(10),
MysqlxDeflateDefaultCompressionLevel: common.Int(8),
MysqlxLz4MaxClientCompressionLevel: common.Int(11),
MysqlxMaxAllowedPacket: common.Int(1.000527792e+09),
InnodbLockWaitTimeout: common.Int(5.2387237e+07),
MaxUserConnections: common.Int64(2.19660041e+09),
TemptableMaxRam: common.Int64(7.308156375218361e+18),
GeneratedRandomPasswordLength: common.Int(5),
InnodbNumaInterleave: common.Bool(false),
InteractiveTimeout: common.Int(1.8130667e+07),
BinlogExpireLogsSeconds: common.Int(754),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
InnodbSortBufferSize: common.Int(3.7563283e+07),
MaxSeeksForKey: common.Int64(4.03020006472063e+18),
TableOpenCache: common.Int(334873),
ForeignKeyChecks: common.Bool(false),
InnodbBufferPoolInstances: common.Int(53),
MaxPreparedStmtCount: common.Int(212312),
SortBufferSize: common.Int64(2.886607089284784e+18),
GlobalConnectionMemoryLimit: common.Int64(8.415123663208298e+18),
InnodbFtMinTokenSize: common.Int(7),
InnodbRollbackOnTimeout: common.Bool(false),
SqlRequirePrimaryKey: common.Bool(true),
ThreadPoolTransactionDelay: common.Int(178703),
BigTables: common.Bool(false),
InformationSchemaStatsExpiry: common.Int(7.923069e+06),
MysqlxIdleWorkerThreadTimeout: common.Int(1917),
MysqlxInteractiveTimeout: common.Int(458427),
QueryPreallocSize: common.Int64(8.30887626218618e+18),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
InnodbMaxPurgeLag: common.Int64(1.311368286e+09),
LongQueryTime: common.Int(2.08244e+06),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
TableDefinitionCache: common.Int(188711),
ConnectionMemoryLimit: common.Int64(5.010119284049467e+18),
InnodbDdlThreads: common.Int(27),
RelayLogSpaceLimit: common.Int64(4.820619340698705e+18),
ThreadPoolSize: common.Int(230),
WaitTimeout: common.Int(2.127188e+06),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
GroupConcatMaxLen: common.Int64(9.176724858019129e+18),
MysqlxWaitTimeout: common.Int(941202),
MysqlxZstdMaxClientCompressionLevel: common.Int(12),
SkipNameResolve: common.Bool(false),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
ConnectionMemoryChunkSize: common.Int(1.61972776e+08),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginCachingSha2Password,
MaxBinlogCacheSize: common.Int64(6.3520483059344e+13),
RequireSecureTransport: common.Bool(false),
BinlogTransactionCompression: common.Bool(false),
AutoIncrementOffset: common.Int(20842),
Autocommit: common.Bool(true),
InnodbAdaptiveHashIndex: common.Bool(false),
ThreadPoolDedicatedListeners: common.Bool(true),
ConnectTimeout: common.Int(4.868303e+06),
LocalInfile: common.Bool(false),
MysqlxLz4DefaultCompressionLevel: common.Int(8),
MaxAllowedPacket: common.Int(5.42167231e+08),
ParserMaxMemSize: common.Int64(6.863031301597856e+18),
InnodbFtResultCacheLimit: common.Int64(1.899394366e+09),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
GlobalConnectionMemoryTracking: common.Bool(true),
MysqlxReadTimeout: common.Int(1.509587e+06),
QueryAllocBlockSize: common.Int64(1.866430972e+09),
ReplicaNetTimeout: common.Int(1.2136857e+07),
InnodbFtNumWordOptimize: common.Int(962),
MysqlxEnableHelloNotice: common.Bool(true),
ReplicaParallelWorkers: common.Int(515),
CompletionType: mysql.ConfigurationVariablesCompletionTypeChain,
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingPurges,
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
MysqlxMinWorkerThreads: common.Int(76),
InnodbRedoLogCapacity: common.Int64(1.1074098069e+11),
SqlGenerateInvisiblePrimaryKey: common.Bool(false),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationReadCommited,
InnodbBufferPoolDumpPct: common.Int(69),
MaxHeapTableSize: common.Int64(4.331117714896746e+18),
MysqlxDocumentIdUniquePrefix: common.Int(46332),
ThreadPoolQueryThreadsPerGroup: common.Int(881),
CollationServer: mysql.ConfigurationVariablesCollationServerArmscii8Bin,
NetWriteTimeout: common.Int(2.4409186e+07),
InnodbUndoLogTruncate: common.Bool(true),
MysqlxZstdDefaultCompressionLevel: common.Int(15),
RangeOptimizerMaxMemSize: common.Int64(9.134441312562968e+18),
MysqlxDeflateMaxClientCompressionLevel: common.Int(7),
BinlogGroupCommitSyncDelay: common.Int(349939),
MaxExecutionTime: common.Int64(1.370521424035328e+18),
InnodbFtMaxTokenSize: common.Int(66),
SqlWarnings: common.Bool(false),
CteMaxRecursionDepth: common.Int64(1.748103914e+09),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatJson,
InnodbStatsTransientSamplePages: common.Int64(5.662708563264242e+18),
MaxConnectErrors: common.Int64(5.199338224821375e+18),
NetReadTimeout: common.Int(2.4208178e+07),
AutoIncrementIncrement: common.Int(62923),
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyAfter,
InnodbBufferPoolSize: common.Int64(9.66247376194663e+17),
InnodbMaxPurgeLagDelay: common.Int(688510),
InnodbStrictMode: common.Bool(false),
MaxConnections: common.Int(55168),
MysqlxConnectTimeout: common.Int(4.13910781e+08),
MysqlxWriteTimeout: common.Int(511363),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerKoi8u,
MysqlFirewallMode: common.Bool(false),
TmpTableSize: common.Int64(3.438718071921852e+18)},
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_dfA7u": map[string]interface{}{"EXAMPLE_KEY_M30eE": "EXAMPLE--Value"}},
DisplayName: common.String("EXAMPLE-displayName-Value"),
ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
ShapeName: common.String("EXAMPLE-shapeName-Value")},
OpcRequestId: common.String("VIZBAFUCJ9YJRFNKWMOP<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)
}