// 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{DisplayName: common.String("EXAMPLE-displayName-Value"),
InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesInsensitiveLowercase},
ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_2uXr8": map[string]interface{}{"EXAMPLE_KEY_MchlW": "EXAMPLE--Value"}},
Description: common.String("EXAMPLE-description-Value"),
FreeformTags: map[string]string{"EXAMPLE_KEY_dRIO2": "EXAMPLE_VALUE_3MB5sh1lPQfmo4XitGft"},
ShapeName: common.String("EXAMPLE-shapeName-Value"),
Variables: &mysql.ConfigurationVariables{BinlogGroupCommitSyncDelay: common.Int(539975),
LongQueryTime: common.Int(1.7672195e+07),
AutoIncrementIncrement: common.Int(57409),
InnodbFtEnableStopword: common.Bool(true),
InnodbRedoLogCapacity: common.Int64(9.8722729642e+10),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
SqlRequirePrimaryKey: common.Bool(false),
AutoIncrementOffset: common.Int(59174),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginMysqlNativePassword,
InnodbFtMinTokenSize: common.Int(0),
InnodbFtResultCacheLimit: common.Int64(4.253671434e+09),
MaxPreparedStmtCount: common.Int(3.283454e+06),
RegexpTimeLimit: common.Int(8.822848e+06),
WaitTimeout: common.Int(199351),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataFull,
InnodbDdlThreads: common.Int(11),
RequireSecureTransport: common.Bool(false),
Autocommit: common.Bool(false),
CompletionType: mysql.ConfigurationVariablesCompletionTypeChain,
GroupConcatMaxLen: common.Int64(3.9619542237909955e+18),
InformationSchemaStatsExpiry: common.Int(455680),
InnodbRollbackOnTimeout: common.Bool(true),
RelayLogSpaceLimit: common.Int64(7.783538668862546e+18),
InnodbBufferPoolSize: common.Int64(8.5751616007918e+18),
MysqlxIdleWorkerThreadTimeout: common.Int(3314),
MysqlxZstdMaxClientCompressionLevel: common.Int(6),
InteractiveTimeout: common.Int(6.848537e+06),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationReadCommited,
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
MysqlZstdDefaultCompressionLevel: common.Int(17),
MysqlxMinWorkerThreads: common.Int(49),
QueryPreallocSize: common.Int64(3.199605538723594e+18),
BinlogExpireLogsSeconds: common.Int(784),
InnodbAutoincLockMode: common.Int(481),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatTree,
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyAfter,
RangeOptimizerMaxMemSize: common.Int64(5.181377484215791e+18),
ReplicaParallelWorkers: common.Int(685),
TemptableMaxRam: common.Int64(1.7404036811248492e+18),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
TableOpenCache: common.Int(290040),
MaxUserConnections: common.Int64(1.65866341e+08),
MysqlxConnectTimeout: common.Int(1.55924302e+08),
ThreadPoolTransactionDelay: common.Int(238784),
InnodbDdlBufferSize: common.Int64(1.118354249e+09),
MaxConnectErrors: common.Int64(8.011875889525259e+18),
SqlGenerateInvisiblePrimaryKey: common.Bool(true),
TableDefinitionCache: common.Int(39671),
InnodbNumaInterleave: common.Bool(false),
MysqlFirewallMode: common.Bool(false),
ReplicaNetTimeout: common.Int(2.0787458e+07),
InnodbAdaptiveHashIndex: common.Bool(false),
InnodbFtMaxTokenSize: common.Int(60),
InnodbUndoLogTruncate: common.Bool(true),
MysqlxEnableHelloNotice: common.Bool(true),
MysqlxWaitTimeout: common.Int(116875),
BinlogGroupCommitSyncNoDelayCount: common.Int(78625),
InnodbStatsPersistentSamplePages: common.Int64(5.859487769178408e+18),
MysqlxLz4DefaultCompressionLevel: common.Int(3),
SqlWarnings: common.Bool(false),
BigTables: common.Bool(false),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
InnodbOnlineAlterLogMaxSize: common.Int64(2.2512265281085855e+18),
MysqlxReadTimeout: common.Int(1.300476e+06),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
MysqlxInteractiveTimeout: common.Int(1.088445e+06),
SortBufferSize: common.Int64(2.710800912905662e+18),
ConnectTimeout: common.Int(9.379575e+06),
NetWriteTimeout: common.Int(3.786987e+06),
MysqlxLz4MaxClientCompressionLevel: common.Int(2),
MaxConnections: common.Int(98066),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerTis620,
ConnectionMemoryChunkSize: common.Int(4.12698435e+08),
CteMaxRecursionDepth: common.Int64(2.666730617e+09),
GeneratedRandomPasswordLength: common.Int(23),
InnodbMaxPurgeLagDelay: common.Int(669538),
InnodbStrictMode: common.Bool(true),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingChanges,
InnodbLockWaitTimeout: common.Int(5.7846129e+07),
MaxHeapTableSize: common.Int64(2.5927403397154166e+18),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
ExplicitDefaultsForTimestamp: common.Bool(false),
MaxBinlogCacheSize: common.Int64(3.642493871887e+12),
MysqlxWriteTimeout: common.Int(877999),
ParserMaxMemSize: common.Int64(2.342781530731476e+18),
QueryAllocBlockSize: common.Int64(1.835752141e+09),
InnodbSortBufferSize: common.Int(4.6825902e+07),
MysqlxDeflateDefaultCompressionLevel: common.Int(5),
ThreadPoolQueryThreadsPerGroup: common.Int(929),
ForeignKeyChecks: common.Bool(false),
InnodbBufferPoolInstances: common.Int(19),
InnodbLogWriterThreads: common.Bool(false),
InnodbMaxPurgeLag: common.Int64(1.58008595e+08),
SkipNameResolve: common.Bool(false),
TmpTableSize: common.Int64(3.1820984522517386e+18),
BinlogTransactionCompression: common.Bool(false),
CollationServer: mysql.ConfigurationVariablesCollationServerUtf8LithuanianCi,
ConnectionMemoryLimit: common.Int64(3.6548853659742694e+18),
InnodbBufferPoolDumpPct: common.Int(79),
InnodbStatsTransientSamplePages: common.Int64(8.925632149830353e+18),
MaxSeeksForKey: common.Int64(2.8536718942176573e+18),
GlobalConnectionMemoryTracking: common.Bool(false),
MysqlxMaxAllowedPacket: common.Int(7.16322734e+08),
GlobalConnectionMemoryLimit: common.Int64(5.171698294644735e+18),
LocalInfile: common.Bool(true),
MaxAllowedPacket: common.Int(9.19514017e+08),
MysqlxDocumentIdUniquePrefix: common.Int(22865),
InnodbFtNumWordOptimize: common.Int(359),
JoinBufferSize: common.Int64(1.7845691478932275e+18),
MysqlxDeflateMaxClientCompressionLevel: common.Int(3),
ThreadPoolDedicatedListeners: common.Bool(true),
ThreadPoolMaxTransactionsLimit: common.Int(41408),
ThreadPoolSize: common.Int(275),
MaxExecutionTime: common.Int64(4.343435157292068e+18),
MysqlxZstdDefaultCompressionLevel: common.Int(15),
NetReadTimeout: common.Int(2.0296414e+07)}},
OpcRequestId: common.String("WRPSSGTZTMMJ78NYBIWF<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)
}