// 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"),
DisplayName: common.String("EXAMPLE-displayName-Value"),
FreeformTags: map[string]string{"EXAMPLE_KEY_rcdDV": "EXAMPLE_VALUE_8rE3lFXdMLzQdC2JCjCy"},
ShapeName: common.String("EXAMPLE-shapeName-Value"),
Variables: &mysql.ConfigurationVariables{MysqlxWaitTimeout: common.Int(1.143007e+06),
NetWriteTimeout: common.Int(2.3624193e+07),
ThreadPoolQueryThreadsPerGroup: common.Int(61),
JoinBufferSize: common.Int64(3.6162581866211666e+18),
MaxExecutionTime: common.Int64(3.7311832916919276e+18),
InnodbMaxPurgeLag: common.Int64(2.847219615e+09),
MysqlxWriteTimeout: common.Int(442188),
TableOpenCache: common.Int(300961),
GroupConcatMaxLen: common.Int64(4.191855702071977e+18),
SqlGenerateInvisiblePrimaryKey: common.Bool(true),
TableDefinitionCache: common.Int(253533),
InnodbLogWriterThreads: common.Bool(false),
InnodbStatsPersistentSamplePages: common.Int64(3.692453201089927e+18),
InnodbNumaInterleave: common.Bool(false),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataFull,
TimeZone: common.String("EXAMPLE-timeZone-Value"),
MysqlxDocumentIdUniquePrefix: common.Int(41833),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerDec8,
MysqlxInteractiveTimeout: common.Int(528222),
ExplicitDefaultsForTimestamp: common.Bool(true),
InnodbFtMinTokenSize: common.Int(13),
ThreadPoolDedicatedListeners: common.Bool(true),
RangeOptimizerMaxMemSize: common.Int64(6.303629407266467e+18),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
ConnectionMemoryChunkSize: common.Int(1.74936091e+08),
ConnectionMemoryLimit: common.Int64(4.46582521242382e+18),
InnodbStatsTransientSamplePages: common.Int64(4.616235441035966e+18),
LocalInfile: common.Bool(false),
MaxConnectErrors: common.Int64(2.7432697245410796e+18),
MysqlFirewallMode: common.Bool(false),
InnodbStrictMode: common.Bool(true),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
MysqlxDeflateMaxClientCompressionLevel: common.Int(2),
MysqlxZstdMaxClientCompressionLevel: common.Int(8),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationReadUncommitted,
InformationSchemaStatsExpiry: common.Int(9.309487e+06),
ParserMaxMemSize: common.Int64(6.420386920239556e+18),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
SortBufferSize: common.Int64(8.699583181090372e+18),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginSha256Password,
InnodbAutoincLockMode: common.Int(206),
QueryAllocBlockSize: common.Int64(3.793809429e+09),
RegexpTimeLimit: common.Int(1.254575187e+09),
SqlRequirePrimaryKey: common.Bool(false),
TemptableMaxRam: common.Int64(1.3545525503342298e+18),
ThreadPoolTransactionDelay: common.Int(25762),
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
LongQueryTime: common.Int(7.68381e+06),
MysqlxLz4DefaultCompressionLevel: common.Int(2),
MysqlxEnableHelloNotice: common.Bool(true),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
BigTables: common.Bool(false),
InnodbBufferPoolInstances: common.Int(23),
MysqlxIdleWorkerThreadTimeout: common.Int(1819),
MysqlxMinWorkerThreads: common.Int(18),
BinlogGroupCommitSyncNoDelayCount: common.Int(97336),
CompletionType: mysql.ConfigurationVariablesCompletionTypeNoChain,
InnodbMaxPurgeLagDelay: common.Int(845650),
MaxPreparedStmtCount: common.Int(2.288286e+06),
TmpTableSize: common.Int64(1.6317031039575304e+18),
BinlogGroupCommitSyncDelay: common.Int(902561),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingInserts,
MaxConnections: common.Int(72764),
AutoIncrementIncrement: common.Int(17380),
CteMaxRecursionDepth: common.Int64(2.087700737e+09),
ForeignKeyChecks: common.Bool(false),
InnodbAdaptiveHashIndex: common.Bool(true),
InnodbDdlThreads: common.Int(29),
InnodbFtMaxTokenSize: common.Int(66),
InnodbRollbackOnTimeout: common.Bool(false),
ReplicaNetTimeout: common.Int(7.381176e+06),
MysqlxDeflateDefaultCompressionLevel: common.Int(7),
SqlWarnings: common.Bool(false),
ThreadPoolMaxTransactionsLimit: common.Int(14797),
RequireSecureTransport: common.Bool(true),
InnodbFtNumWordOptimize: common.Int(485),
InnodbOnlineAlterLogMaxSize: common.Int64(9.561348857445595e+17),
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyEventual,
GlobalConnectionMemoryLimit: common.Int64(7.073238716687946e+18),
CollationServer: mysql.ConfigurationVariablesCollationServerUcs2VietnameseCi,
InnodbFtResultCacheLimit: common.Int64(2.684628391e+09),
MaxAllowedPacket: common.Int(7.37126673e+08),
MaxBinlogCacheSize: common.Int64(1.2758588972299e+13),
MaxUserConnections: common.Int64(9.5594707e+08),
MysqlxMaxAllowedPacket: common.Int(8.6166833e+07),
MysqlxZstdDefaultCompressionLevel: common.Int(14),
InnodbSortBufferSize: common.Int(3.7512538e+07),
NetReadTimeout: common.Int(3.1145249e+07),
QueryPreallocSize: common.Int64(2.216137523496873e+18),
MaxHeapTableSize: common.Int64(8.864078741645091e+18),
InnodbBufferPoolDumpPct: common.Int(56),
InnodbUndoLogTruncate: common.Bool(true),
MaxSeeksForKey: common.Int64(7.878427718801647e+18),
SkipNameResolve: common.Bool(true),
Autocommit: common.Bool(true),
MysqlxReadTimeout: common.Int(630618),
BinlogExpireLogsSeconds: common.Int(569),
InnodbBufferPoolSize: common.Int64(8.463318788393085e+18),
MysqlxLz4MaxClientCompressionLevel: common.Int(8),
GeneratedRandomPasswordLength: common.Int(64),
MysqlZstdDefaultCompressionLevel: common.Int(9),
InnodbFtEnableStopword: common.Bool(false),
AutoIncrementOffset: common.Int(64969),
BinlogTransactionCompression: common.Bool(true),
RelayLogSpaceLimit: common.Int64(2.19193895019448e+18),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
ConnectTimeout: common.Int(2.2444693e+07),
MysqlxConnectTimeout: common.Int(8.70988057e+08),
WaitTimeout: common.Int(1.405774e+06),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatTree,
InnodbDdlBufferSize: common.Int64(1.785593116e+09),
InteractiveTimeout: common.Int(1.5131941e+07),
GlobalConnectionMemoryTracking: common.Bool(false),
InnodbLockWaitTimeout: common.Int(5.80473278e+08),
ReplicaParallelWorkers: common.Int(731),
InnodbRedoLogCapacity: common.Int64(4.9709382099e+10),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
ThreadPoolSize: common.Int(285)},
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_pHGeM": map[string]interface{}{"EXAMPLE_KEY_n2QeM": "EXAMPLE--Value"}},
Description: common.String("EXAMPLE-description-Value"),
InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesSensitive},
ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value")},
OpcRequestId: common.String("0BFCMRDR2PSU0NNBPI4S<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)
}