// 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{ShapeName: common.String("EXAMPLE-shapeName-Value"),
Variables: &mysql.ConfigurationVariables{MysqlxWriteTimeout: common.Int(168110),
QueryAllocBlockSize: common.Int64(8.3801805e+08),
InnodbFtEnableStopword: common.Bool(true),
JoinBufferSize: common.Int64(2.779312779092778e+18),
TableOpenCache: common.Int(155371),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationReadCommited,
BigTables: common.Bool(false),
InnodbDdlThreads: common.Int(13),
MaxConnectErrors: common.Int64(8.852843318079223e+18),
MysqlxZstdMaxClientCompressionLevel: common.Int(5),
ThreadPoolTransactionDelay: common.Int(86055),
InnodbBufferPoolSize: common.Int64(4.9451023275015526e+17),
MaxSeeksForKey: common.Int64(8.101624617628232e+18),
MysqlxWaitTimeout: common.Int(2.108503e+06),
BinlogGroupCommitSyncDelay: common.Int(853434),
BinlogGroupCommitSyncNoDelayCount: common.Int(62776),
InnodbOnlineAlterLogMaxSize: common.Int64(4.2312710898682476e+18),
MaxExecutionTime: common.Int64(8.677855667181804e+17),
WaitTimeout: common.Int(1.379999e+06),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
InformationSchemaStatsExpiry: common.Int(1.9637093e+07),
MysqlxDeflateDefaultCompressionLevel: common.Int(7),
MysqlxInteractiveTimeout: common.Int(1.119273e+06),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
ParserMaxMemSize: common.Int64(7.153736530089366e+18),
AutoIncrementOffset: common.Int(19989),
LongQueryTime: common.Int(2.3909165e+07),
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyEventual,
CteMaxRecursionDepth: common.Int64(1.276755069e+09),
InnodbLogWriterThreads: common.Bool(false),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
QueryPreallocSize: common.Int64(4.642408759882811e+18),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
GroupConcatMaxLen: common.Int64(1.2284696729626655e+18),
InnodbStatsPersistentSamplePages: common.Int64(8.274570601495823e+18),
SkipNameResolve: common.Bool(true),
AutoIncrementIncrement: common.Int(14199),
ConnectionMemoryChunkSize: common.Int(5.20319653e+08),
MysqlxMaxAllowedPacket: common.Int(4.42093963e+08),
SqlWarnings: common.Bool(false),
CompletionType: mysql.ConfigurationVariablesCompletionTypeChain,
InnodbFtMaxTokenSize: common.Int(43),
MaxHeapTableSize: common.Int64(1.0613168893423249e+18),
SortBufferSize: common.Int64(5.051388652324479e+18),
ThreadPoolMaxTransactionsLimit: common.Int(63200),
ThreadPoolSize: common.Int(490),
BinlogTransactionCompression: common.Bool(false),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatTraditional,
ForeignKeyChecks: common.Bool(false),
InnodbAutoincLockMode: common.Int(258),
InnodbBufferPoolInstances: common.Int(58),
InnodbFtNumWordOptimize: common.Int(14),
MysqlxLz4DefaultCompressionLevel: common.Int(1),
RegexpTimeLimit: common.Int(5.42312564e+08),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerCp932,
NetWriteTimeout: common.Int(2.4303552e+07),
RangeOptimizerMaxMemSize: common.Int64(4.266745867296041e+17),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
InnodbAdaptiveHashIndex: common.Bool(false),
InnodbStrictMode: common.Bool(false),
ReplicaParallelWorkers: common.Int(256),
ConnectTimeout: common.Int(1.0902083e+07),
MaxBinlogCacheSize: common.Int64(2.2545462072965e+13),
MysqlxConnectTimeout: common.Int(1.1733644e+08),
MaxConnections: common.Int(31541),
SqlGenerateInvisiblePrimaryKey: common.Bool(false),
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
InnodbMaxPurgeLagDelay: common.Int(873237),
InnodbUndoLogTruncate: common.Bool(false),
MysqlxLz4MaxClientCompressionLevel: common.Int(5),
GlobalConnectionMemoryLimit: common.Int64(2.1790691936322634e+18),
MysqlxIdleWorkerThreadTimeout: common.Int(1458),
ReplicaNetTimeout: common.Int(8.8279e+06),
TableDefinitionCache: common.Int(286208),
MysqlxDocumentIdUniquePrefix: common.Int(63350),
MysqlxEnableHelloNotice: common.Bool(true),
MysqlxZstdDefaultCompressionLevel: common.Int(1),
ThreadPoolDedicatedListeners: common.Bool(false),
CollationServer: mysql.ConfigurationVariablesCollationServerUtf16GeneralCi,
ExplicitDefaultsForTimestamp: common.Bool(true),
MysqlFirewallMode: common.Bool(false),
ConnectionMemoryLimit: common.Int64(4.4829963482718397e+18),
InnodbBufferPoolDumpPct: common.Int(62),
InnodbRollbackOnTimeout: common.Bool(true),
MaxAllowedPacket: common.Int(6.03892812e+08),
MysqlxDeflateMaxClientCompressionLevel: common.Int(7),
MysqlxReadTimeout: common.Int(1.479037e+06),
Autocommit: common.Bool(false),
GlobalConnectionMemoryTracking: common.Bool(false),
InnodbMaxPurgeLag: common.Int64(2.470532611e+09),
GeneratedRandomPasswordLength: common.Int(73),
InnodbDdlBufferSize: common.Int64(3.318586327e+09),
LocalInfile: common.Bool(false),
MaxPreparedStmtCount: common.Int(2.494552e+06),
MaxUserConnections: common.Int64(2.056901704e+09),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginSha256Password,
RequireSecureTransport: common.Bool(true),
ThreadPoolQueryThreadsPerGroup: common.Int(877),
BinlogExpireLogsSeconds: common.Int(822),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataMinimal,
InnodbLockWaitTimeout: common.Int(2.1074994e+08),
InnodbRedoLogCapacity: common.Int64(4.0284873096e+10),
InnodbStatsTransientSamplePages: common.Int64(4.144424857151107e+18),
RelayLogSpaceLimit: common.Int64(8.688558703662269e+18),
InnodbFtMinTokenSize: common.Int(6),
InnodbFtResultCacheLimit: common.Int64(3.572459525e+09),
InnodbSortBufferSize: common.Int(4.5201081e+07),
SqlRequirePrimaryKey: common.Bool(true),
InnodbNumaInterleave: common.Bool(false),
MysqlxMinWorkerThreads: common.Int(32),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
TemptableMaxRam: common.Int64(8.351955992687213e+18),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingPurges,
MysqlZstdDefaultCompressionLevel: common.Int(4),
InteractiveTimeout: common.Int(2.8426627e+07),
NetReadTimeout: common.Int(2.4002399e+07),
TmpTableSize: common.Int64(8.469260775669449e+18)},
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_VBTwx": map[string]interface{}{"EXAMPLE_KEY_03N3x": "EXAMPLE--Value"}},
DisplayName: common.String("EXAMPLE-displayName-Value"),
FreeformTags: map[string]string{"EXAMPLE_KEY_u0XDz": "EXAMPLE_VALUE_Y9ifbUnO1WKhWxd3Jgbv"},
InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesSensitive},
Options: []mysql.Option{mysql.Option{Name: common.String("EXAMPLE-name-Value"),
Value: common.String("EXAMPLE-value-Value")}},
CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
Description: common.String("EXAMPLE-description-Value"),
ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value")},
OpcRequestId: common.String("UJPCZQCR0NDHGSLFFHCZ<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)
}