// 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{OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
CreateConfigurationDetails: mysql.CreateConfigurationDetails{Description: common.String("EXAMPLE-description-Value"),
FreeformTags: map[string]string{"EXAMPLE_KEY_mCdns": "EXAMPLE_VALUE_oaEZvfda8lKqRmLutnNf"},
Options: []mysql.Option{mysql.Option{Value: common.String("EXAMPLE-value-Value"),
Name: common.String("EXAMPLE-name-Value")}},
ShapeName: common.String("EXAMPLE-shapeName-Value"),
Variables: &mysql.ConfigurationVariables{CteMaxRecursionDepth: common.Int64(1.200429438e+09),
GlobalConnectionMemoryTracking: common.Bool(false),
MysqlxWaitTimeout: common.Int(1.03565e+06),
MysqlxZstdDefaultCompressionLevel: common.Int(6),
NetReadTimeout: common.Int(1.1341502e+07),
BigTables: common.Bool(true),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginCachingSha2Password,
InnodbMaxPurgeLag: common.Int64(9.89015019e+08),
InnodbNumaInterleave: common.Bool(false),
MysqlxDocumentIdUniquePrefix: common.Int(53245),
RelayLogSpaceLimit: common.Int64(3.5946363369572854e+18),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
AutoIncrementOffset: common.Int(24145),
InnodbFtMinTokenSize: common.Int(11),
MysqlxDeflateDefaultCompressionLevel: common.Int(2),
MysqlxEnableHelloNotice: common.Bool(true),
ThreadPoolTransactionDelay: common.Int(56815),
InnodbBufferPoolInstances: common.Int(38),
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
InnodbUndoLogTruncate: common.Bool(true),
LocalInfile: common.Bool(false),
MaxBinlogCacheSize: common.Int64(6.0257497160063e+13),
MysqlxLz4DefaultCompressionLevel: common.Int(5),
ReplicaParallelWorkers: common.Int(760),
ThreadPoolMaxTransactionsLimit: common.Int(69741),
InteractiveTimeout: common.Int(1.4057981e+07),
InformationSchemaStatsExpiry: common.Int(2.4025478e+07),
MysqlxMaxAllowedPacket: common.Int(9.69789653e+08),
SkipNameResolve: common.Bool(false),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
ThreadPoolSize: common.Int(309),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationSerializable,
LongQueryTime: common.Int(1.8032072e+07),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
MysqlZstdDefaultCompressionLevel: common.Int(1),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatJson,
InnodbDdlBufferSize: common.Int64(2.406814829e+09),
InnodbFtResultCacheLimit: common.Int64(2.725991376e+09),
QueryAllocBlockSize: common.Int64(3.284815194e+09),
RangeOptimizerMaxMemSize: common.Int64(1.4195035591610143e+18),
BinlogTransactionCompression: common.Bool(true),
CompletionType: mysql.ConfigurationVariablesCompletionTypeNoChain,
InnodbAutoincLockMode: common.Int(59),
InnodbMaxPurgeLagDelay: common.Int(340526),
InnodbRollbackOnTimeout: common.Bool(false),
BinlogGroupCommitSyncNoDelayCount: common.Int(34759),
MaxAllowedPacket: common.Int(6.82900725e+08),
SqlWarnings: common.Bool(true),
InnodbStatsPersistentSamplePages: common.Int64(6.557562588799238e+18),
MysqlxDeflateMaxClientCompressionLevel: common.Int(7),
MysqlxLz4MaxClientCompressionLevel: common.Int(11),
ExplicitDefaultsForTimestamp: common.Bool(false),
ForeignKeyChecks: common.Bool(true),
InnodbBufferPoolSize: common.Int64(2.9125532146391245e+18),
JoinBufferSize: common.Int64(7.783455167698983e+18),
MaxExecutionTime: common.Int64(1.1194934975830477e+18),
RequireSecureTransport: common.Bool(true),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
InnodbBufferPoolDumpPct: common.Int(57),
MysqlxWriteTimeout: common.Int(420355),
TemptableMaxRam: common.Int64(7.920058025592453e+18),
InnodbFtEnableStopword: common.Bool(false),
AutoIncrementIncrement: common.Int(62839),
GroupConcatMaxLen: common.Int64(2.9779620611372503e+18),
MaxConnections: common.Int(14486),
InnodbLogWriterThreads: common.Bool(true),
MaxSeeksForKey: common.Int64(2.706987883325306e+18),
Autocommit: common.Bool(true),
CollationServer: mysql.ConfigurationVariablesCollationServerUtf32DanishCi,
ConnectTimeout: common.Int(1.5199692e+07),
SqlGenerateInvisiblePrimaryKey: common.Bool(false),
ConnectionMemoryChunkSize: common.Int(1.69187447e+08),
ConnectionMemoryLimit: common.Int64(2.4503499257308713e+18),
GlobalConnectionMemoryLimit: common.Int64(8.844820441305726e+18),
InnodbStatsTransientSamplePages: common.Int64(7.92580524223847e+18),
MysqlxIdleWorkerThreadTimeout: common.Int(1544),
MysqlxMinWorkerThreads: common.Int(18),
MysqlxReadTimeout: common.Int(1.954257e+06),
ParserMaxMemSize: common.Int64(2.3925026090147727e+18),
GeneratedRandomPasswordLength: common.Int(247),
InnodbSortBufferSize: common.Int(5.1380537e+07),
NetWriteTimeout: common.Int(1.5201649e+07),
ThreadPoolQueryThreadsPerGroup: common.Int(3712),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataMinimal,
RegexpTimeLimit: common.Int(1.829607836e+09),
MaxPreparedStmtCount: common.Int(1.548167e+06),
InnodbDdlThreads: common.Int(33),
QueryPreallocSize: common.Int64(2.0576204331193275e+18),
TableOpenCache: common.Int(393308),
InnodbRedoLogCapacity: common.Int64(6.6221924605e+10),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
WaitTimeout: common.Int(1.076693e+06),
InnodbOnlineAlterLogMaxSize: common.Int64(8.811746927350423e+18),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingChanges,
SortBufferSize: common.Int64(7.457636116290052e+18),
TmpTableSize: common.Int64(1.2452203746965553e+18),
TableDefinitionCache: common.Int(505534),
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyAfter,
InnodbAdaptiveHashIndex: common.Bool(false),
InnodbFtMaxTokenSize: common.Int(50),
InnodbLockWaitTimeout: common.Int(1.05314758e+08),
SqlRequirePrimaryKey: common.Bool(false),
BinlogExpireLogsSeconds: common.Int(553),
MaxHeapTableSize: common.Int64(4.374015311656642e+18),
MysqlxZstdMaxClientCompressionLevel: common.Int(15),
BinlogGroupCommitSyncDelay: common.Int(366595),
ReplicaNetTimeout: common.Int(2.3866857e+07),
ThreadPoolDedicatedListeners: common.Bool(true),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerAscii,
InnodbStrictMode: common.Bool(false),
MysqlFirewallMode: common.Bool(false),
MysqlxInteractiveTimeout: common.Int(182293),
InnodbFtNumWordOptimize: common.Int(879),
MaxConnectErrors: common.Int64(8.923097436091437e+18),
MaxUserConnections: common.Int64(1.066567958e+09),
MysqlxConnectTimeout: common.Int(5.77463366e+08),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value")},
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_T4upQ": map[string]interface{}{"EXAMPLE_KEY_4SWLn": "EXAMPLE--Value"}},
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")},
OpcRequestId: common.String("IADZAPKMP0TGVF3RCJ9F<unique_ID>")}
// 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)
}