// 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{DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_AlCVH": map[string]interface{}{"EXAMPLE_KEY_ULiFE": "EXAMPLE--Value"}},
Description: common.String("EXAMPLE-description-Value"),
DisplayName: common.String("EXAMPLE-displayName-Value"),
InitVariables: &mysql.InitializationVariables{LowerCaseTableNames: mysql.InitializationVariablesLowerCaseTableNamesInsensitiveLowercase},
Variables: &mysql.ConfigurationVariables{MysqlxLz4DefaultCompressionLevel: common.Int(13),
RangeOptimizerMaxMemSize: common.Int64(4.342328062236252e+17),
TmpTableSize: common.Int64(3.413399474143773e+18),
GroupReplicationConsistency: mysql.ConfigurationVariablesGroupReplicationConsistencyBeforeAndAfter,
MysqlxZstdDefaultCompressionLevel: common.Int(13),
TemptableMaxRam: common.Int64(4.973003394375118e+18),
CollationServer: mysql.ConfigurationVariablesCollationServerUcs2CroatianCi,
MaxBinlogCacheSize: common.Int64(2.6554438194117e+13),
BinlogRowMetadata: mysql.ConfigurationVariablesBinlogRowMetadataFull,
MaxAllowedPacket: common.Int(3.10759071e+08),
MaxConnections: common.Int(8524),
ConnectionMemoryLimit: common.Int64(3.8349281290225004e+18),
InnodbAdaptiveHashIndex: common.Bool(true),
MandatoryRoles: common.String("EXAMPLE-mandatoryRoles-Value"),
MaxUserConnections: common.Int64(4.100890988e+09),
OptimizerSwitch: common.String("EXAMPLE-optimizerSwitch-Value"),
TimeZone: common.String("EXAMPLE-timeZone-Value"),
CompletionType: mysql.ConfigurationVariablesCompletionTypeRelease,
InnodbFtEnableStopword: common.Bool(true),
LongQueryTime: common.Int(145984),
AutoIncrementOffset: common.Int(62317),
InnodbUndoLogTruncate: common.Bool(false),
MysqlxMinWorkerThreads: common.Int(24),
TableOpenCache: common.Int(27749),
AutoIncrementIncrement: common.Int(32614),
BinlogRowValueOptions: common.String("EXAMPLE-binlogRowValueOptions-Value"),
MysqlxDeflateMaxClientCompressionLevel: common.Int(4),
MysqlxInteractiveTimeout: common.Int(2.022028e+06),
MysqlxZstdMaxClientCompressionLevel: common.Int(17),
RegexpTimeLimit: common.Int(7.38632144e+08),
CharacterSetServer: mysql.ConfigurationVariablesCharacterSetServerKoi8u,
ExplainFormat: mysql.ConfigurationVariablesExplainFormatTraditional,
InnodbRedoLogCapacity: common.Int64(1.4577570825e+10),
NetWriteTimeout: common.Int(2.4688054e+07),
ReplicaTypeConversions: common.String("EXAMPLE-replicaTypeConversions-Value"),
BinlogExpireLogsSeconds: common.Int(914),
DefaultAuthenticationPlugin: mysql.ConfigurationVariablesDefaultAuthenticationPluginSha256Password,
GroupConcatMaxLen: common.Int64(1.2569251380849254e+18),
InnodbBufferPoolInstances: common.Int(23),
InnodbSortBufferSize: common.Int(1.9504078e+07),
MysqlZstdDefaultCompressionLevel: common.Int(4),
ReplicaParallelWorkers: common.Int(133),
Autocommit: common.Bool(true),
CteMaxRecursionDepth: common.Int64(3.053140759e+09),
InnodbStatsPersistentSamplePages: common.Int64(8.791944985731748e+18),
WaitTimeout: common.Int(1.905421e+06),
InnodbAutoincLockMode: common.Int(716),
InnodbBufferPoolSize: common.Int64(9.108458715439586e+18),
MysqlxEnableHelloNotice: common.Bool(false),
ConnectTimeout: common.Int(2.6874847e+07),
GlobalConnectionMemoryLimit: common.Int64(1.274507406713602e+18),
InnodbFtMinTokenSize: common.Int(12),
MaxPreparedStmtCount: common.Int(1.795874e+06),
MysqlxWaitTimeout: common.Int(182181),
ThreadPoolMaxTransactionsLimit: common.Int(7443),
ExplicitDefaultsForTimestamp: common.Bool(false),
GlobalConnectionMemoryTracking: common.Bool(true),
InnodbDdlBufferSize: common.Int64(1.918027521e+09),
InnodbMaxPurgeLag: common.Int64(1.122758422e+09),
MysqlxReadTimeout: common.Int(1.044214e+06),
SkipNameResolve: common.Bool(false),
ThreadPoolSize: common.Int(174),
ThreadPoolDedicatedListeners: common.Bool(false),
TransactionIsolation: mysql.ConfigurationVariablesTransactionIsolationReadCommited,
MysqlxMaxAllowedPacket: common.Int(3.22103832e+08),
ThreadPoolTransactionDelay: common.Int(96745),
GeneratedRandomPasswordLength: common.Int(24),
InnodbChangeBuffering: mysql.ConfigurationVariablesInnodbChangeBufferingInserts,
QueryPreallocSize: common.Int64(2.3577521568217876e+18),
SqlMode: common.String("EXAMPLE-sqlMode-Value"),
ThreadPoolQueryThreadsPerGroup: common.Int(2466),
MaxConnectErrors: common.Int64(7.49334056590522e+18),
ParserMaxMemSize: common.Int64(7.080087793118544e+18),
InnodbFtServerStopwordTable: common.String("EXAMPLE-innodbFtServerStopwordTable-Value"),
InnodbOnlineAlterLogMaxSize: common.Int64(8.369465958761123e+18),
InteractiveTimeout: common.Int(1.8964658e+07),
MysqlxIdleWorkerThreadTimeout: common.Int(385),
MysqlxWriteTimeout: common.Int(1.967189e+06),
QueryAllocBlockSize: common.Int64(2.045019183e+09),
ReplicaNetTimeout: common.Int(3.317325e+06),
TableDefinitionCache: common.Int(192099),
BlockEncryptionMode: common.String("EXAMPLE-blockEncryptionMode-Value"),
JoinBufferSize: common.Int64(6.1324032149444e+18),
RequireSecureTransport: common.Bool(true),
BinlogGroupCommitSyncDelay: common.Int(39003),
InformationSchemaStatsExpiry: common.Int(2.3401354e+07),
InnodbNumaInterleave: common.Bool(false),
InnodbStatsTransientSamplePages: common.Int64(8.516516716995365e+18),
MaxExecutionTime: common.Int64(4.670222945982518e+18),
MysqlFirewallMode: common.Bool(true),
MysqlxLz4MaxClientCompressionLevel: common.Int(8),
BigTables: common.Bool(false),
InnodbLockWaitTimeout: common.Int(2.25668927e+08),
MysqlxDocumentIdUniquePrefix: common.Int(19897),
SortBufferSize: common.Int64(1.0458360832074828e+18),
ForeignKeyChecks: common.Bool(true),
InnodbLogWriterThreads: common.Bool(false),
InnodbMaxPurgeLagDelay: common.Int(221885),
InnodbRollbackOnTimeout: common.Bool(false),
MaxHeapTableSize: common.Int64(8.60530962458304e+18),
MysqlxDeflateDefaultCompressionLevel: common.Int(5),
SqlRequirePrimaryKey: common.Bool(false),
SqlWarnings: common.Bool(false),
InnodbBufferPoolDumpPct: common.Int(65),
InnodbFtResultCacheLimit: common.Int64(3.24622693e+08),
RelayLogSpaceLimit: common.Int64(2.1259861052234742e+18),
InnodbDdlThreads: common.Int(46),
SqlGenerateInvisiblePrimaryKey: common.Bool(true),
BinlogGroupCommitSyncNoDelayCount: common.Int(64710),
InnodbFtNumWordOptimize: common.Int(547),
LocalInfile: common.Bool(false),
MaxSeeksForKey: common.Int64(7.682420465313275e+18),
NetReadTimeout: common.Int(2.7178733e+07),
BinlogTransactionCompression: common.Bool(true),
ConnectionMemoryChunkSize: common.Int(1.92927682e+08),
InnodbFtMaxTokenSize: common.Int(33),
InnodbStrictMode: common.Bool(true),
MysqlxConnectTimeout: common.Int(5.00290376e+08)},
FreeformTags: map[string]string{"EXAMPLE_KEY_8Kiyb": "EXAMPLE_VALUE_lfJYsBV796MxRjLQAxxB"},
ParentConfigurationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-parentConfigurationId-Value"),
ShapeName: common.String("EXAMPLE-shapeName-Value"),
CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value")},
OpcRequestId: common.String("X6IZGTICGD0AK2KTTHIW<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)
}