// 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{Description: common.String("EXAMPLE-description-Value"),
DisplayName: common.String("EXAMPLE-displayName-Value"),
FreeformTags: map[string]string{"EXAMPLE_KEY_VLzVV": "EXAMPLE_VALUE_PX5dBdGlrm0HuIkIHIAd"},
Options: []mysql.Option{mysql.Option{Name: common.String("EXAMPLE-name-Value"),
Value: common.String("EXAMPLE-value-Value")}},
ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_ENXuS": map[string]interface{}{"EXAMPLE_KEY_P7dqG": "EXAMPLE--Value"}},
InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesInsensitiveLowercase},
ShapeName: common.String("EXAMPLE-shapeName-Value"),
Variables: &mysql.ConfigurationVariables{MaxUserConnections: common.Int64(8.01877996e+08),
MysqlxReadTimeout: common.Int(165049),
ExplainFormat: mysql.ConfigurationVariablesExplainFormatTraditional,
MysqlZstdDefaultCompressionLevel: common.Int(15),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
InnodbNumaInterleave: common.Bool(true),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
BinlogExpireLogsSeconds: common.Int(529),
GlobalConnectionMemoryTracking: common.Bool(true),
InnodbDdlThreads: common.Int(35),
InnodbLockWaitTimeout: common.Int(3.4419032e+07),
InteractiveTimeout: common.Int(7.177177e+06),
MysqlxZstdMaxClientCompressionLevel: common.Int(7),
InnodbStatsPersistentSamplePages: common.Int64(1.064323004154753e+18),
InnodbUndoLogTruncate: common.Bool(false),
BinlogGroupCommitSyncDelay: common.Int(288826),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginMysqlNativePassword,
ForeignKeyChecks: common.Bool(false),
InformationSchemaStatsExpiry: common.Int(2.2454608e+07),
SortBufferSize: common.Int64(1.0553855727033635e+18),
SqlWarnings: common.Bool(true),
GlobalConnectionMemoryLimit: common.Int64(7.314245862315101e+18),
InnodbSortBufferSize: common.Int(5.5204166e+07),
MysqlxDeflateMaxClientCompressionLevel: common.Int(2),
BinlogTransactionCompression: common.Bool(true),
MysqlxIdleWorkerThreadTimeout: common.Int(3017),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
MysqlxLz4MaxClientCompressionLevel: common.Int(5),
ThreadPoolQueryThreadsPerGroup: common.Int(1481),
BigTables: common.Bool(false),
RequireSecureTransport: common.Bool(true),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingPurges,
JoinBufferSize: common.Int64(6.262617165105551e+18),
MaxHeapTableSize: common.Int64(8.364678541954803e+18),
MaxPreparedStmtCount: common.Int(3.725207e+06),
QueryPreallocSize: common.Int64(2.9245898138467886e+18),
MysqlxInteractiveTimeout: common.Int(1.762049e+06),
ReplicaParallelWorkers: common.Int(158),
InnodbRedoLogCapacity: common.Int64(1.7062944873e+10),
InnodbFtNumWordOptimize: common.Int(859),
LocalInfile: common.Bool(false),
MaxConnectErrors: common.Int64(2.067231851182971e+18),
RangeOptimizerMaxMemSize: common.Int64(1.7264092528899564e+18),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataFull,
ConnectTimeout: common.Int(1.776778e+06),
ExplicitDefaultsForTimestamp: common.Bool(true),
InnodbAutoincLockMode: common.Int(460),
InnodbStatsTransientSamplePages: common.Int64(6.180433801130017e+18),
InnodbStrictMode: common.Bool(false),
InnodbFtMinTokenSize: common.Int(13),
MysqlxDeflateDefaultCompressionLevel: common.Int(1),
MysqlxDocumentIdUniquePrefix: common.Int(18376),
MysqlxWriteTimeout: common.Int(416275),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerKoi8u,
InnodbDdlBufferSize: common.Int64(1.236177353e+09),
MysqlxLz4DefaultCompressionLevel: common.Int(1),
ThreadPoolTransactionDelay: common.Int(239605),
CteMaxRecursionDepth: common.Int64(4.040308857e+09),
InnodbFtResultCacheLimit: common.Int64(2.475298312e+09),
LongQueryTime: common.Int(1.8132158e+07),
MysqlxMinWorkerThreads: common.Int(90),
TableDefinitionCache: common.Int(261078),
InnodbAdaptiveHashIndex: common.Bool(true),
InnodbMaxPurgeLag: common.Int64(3.479413021e+09),
MysqlxMaxAllowedPacket: common.Int(4.91520306e+08),
TableOpenCache: common.Int(4363),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
InnodbMaxPurgeLagDelay: common.Int(963408),
NetWriteTimeout: common.Int(2.6423513e+07),
ThreadPoolSize: common.Int(418),
ConnectionMemoryChunkSize: common.Int(3.93422073e+08),
MaxAllowedPacket: common.Int(1.19418031e+08),
MysqlFirewallMode: common.Bool(false),
MysqlxEnableHelloNotice: common.Bool(false),
InnodbRollbackOnTimeout: common.Bool(true),
InnodbLogWriterThreads: common.Bool(false),
MaxBinlogCacheSize: common.Int64(2.3086447634807e+13),
MaxExecutionTime: common.Int64(3.354290618909988e+18),
MysqlxZstdDefaultCompressionLevel: common.Int(4),
RelayLogSpaceLimit: common.Int64(6.641961956120965e+18),
ThreadPoolMaxTransactionsLimit: common.Int(35829),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationSerializable,
CollationServer: mysql.ConfigurationVariablesCollationServerCp1250Bin,
InnodbBufferPoolDumpPct: common.Int(57),
MaxConnections: common.Int(19128),
MaxSeeksForKey: common.Int64(5.345333031049662e+18),
QueryAllocBlockSize: common.Int64(1.656630187e+09),
ConnectionMemoryLimit: common.Int64(5.3162157148191e+18),
InnodbFtMaxTokenSize: common.Int(44),
InnodbOnlineAlterLogMaxSize: common.Int64(2.1988537245231521e+18),
ThreadPoolDedicatedListeners: common.Bool(true),
BinlogGroupCommitSyncNoDelayCount: common.Int(21821),
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyBefore,
Autocommit: common.Bool(true),
SkipNameResolve: common.Bool(false),
TmpTableSize: common.Int64(4.657948153286075e+18),
GeneratedRandomPasswordLength: common.Int(77),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
SqlRequirePrimaryKey: common.Bool(true),
GroupConcatMaxLen: common.Int64(2.9891532518579456e+18),
ReplicaNetTimeout: common.Int(2.0839683e+07),
TemptableMaxRam: common.Int64(7.74113460546896e+18),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
AutoIncrementIncrement: common.Int(44924),
InnodbBufferPoolSize: common.Int64(1.562094440275428e+18),
SqlGenerateInvisiblePrimaryKey: common.Bool(false),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
AutoIncrementOffset: common.Int(18084),
InnodbBufferPoolInstances: common.Int(53),
NetReadTimeout: common.Int(2.9458549e+07),
MysqlxConnectTimeout: common.Int(9.3086151e+07),
ParserMaxMemSize: common.Int64(9.015159807062504e+18),
WaitTimeout: common.Int(1.145464e+06),
CompletionType: mysql.ConfigurationVariablesCompletionTypeChain,
InnodbFtEnableStopword: common.Bool(false),
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
MysqlxWaitTimeout: common.Int(1.407541e+06),
RegexpTimeLimit: common.Int(8.14282565e+08)},
CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value")},
OpcRequestId: common.String("5ZNSCXRJFF72E0OOCVHS<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)
}