// 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/database"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
)

func ExampleCreateCloudVmCluster() {
	// 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 := database.NewDatabaseClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

	// Create a request and dependent object(s).

	req := database.CreateCloudVmClusterRequest{CreateCloudVmClusterDetails: database.CreateCloudVmClusterDetails{Hostname: common.String("EXAMPLE-hostname-Value"),
		BackupNetworkNsgIds:          []string{"EXAMPLE--Value"},
		ClusterName:                  common.String("EXAMPLE-clusterName-Value"),
		DbNodeStorageSizeInGBs:       common.Int(924),
		MemorySizeInGBs:              common.Int(511),
		ScanListenerPortTcpSsl:       common.Int(601),
		FreeformTags:                 map[string]string{"EXAMPLE_KEY_MRbtx": "EXAMPLE_VALUE_cvwXiZT0Zoa15uHG2b39"},
		IsLocalBackupEnabled:         common.Bool(true),
		SecurityAttributes:           map[string]map[string]interface{}{"EXAMPLE_KEY_MxLp9": map[string]interface{}{"EXAMPLE_KEY_uqW5h": "EXAMPLE--Value"}},
		SshPublicKeys:                []string{"EXAMPLE--Value"},
		SubnetId:                     common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value"),
		CloudExadataInfrastructureId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-cloudExadataInfrastructureId-Value"),
		CpuCoreCount:                 common.Int(592),
		DataCollectionOptions: &database.DataCollectionOptions{IsDiagnosticsEventsEnabled: common.Bool(false),
			IsHealthMonitoringEnabled: common.Bool(true),
			IsIncidentLogsEnabled:     common.Bool(false)},
		DataStorageSizeInTBs: common.Float64(3169.745),
		DbServers:            []string{"EXAMPLE--Value"},
		FileSystemConfigurationDetails: []database.FileSystemConfigurationDetail{database.FileSystemConfigurationDetail{FileSystemSizeGb: common.Int(127),
			MountPoint: common.String("EXAMPLE-mountPoint-Value")}},
		LicenseModel: database.CreateCloudVmClusterDetailsLicenseModelLicenseIncluded,
		OcpuCount:    common.Float32(2982.0032),
		CloudAutomationUpdateDetails: &database.CloudAutomationUpdateDetails{ApplyUpdateTimePreference: &database.CloudAutomationApplyUpdateTimePreference{ApplyUpdatePreferredEndTime: common.String("EXAMPLE-applyUpdatePreferredEndTime-Value"),
			ApplyUpdatePreferredStartTime: common.String("EXAMPLE-applyUpdatePreferredStartTime-Value")},
			FreezePeriod: &database.CloudAutomationFreezePeriod{FreezePeriodEndTime: common.String("EXAMPLE-freezePeriodEndTime-Value"),
				FreezePeriodStartTime: common.String("EXAMPLE-freezePeriodStartTime-Value")},
			IsEarlyAdoptionEnabled: common.Bool(false),
			IsFreezePeriodEnabled:  common.Bool(true)},
		CompartmentId:            common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
		ScanListenerPortTcp:      common.Int(71),
		NsgIds:                   []string{"EXAMPLE--Value"},
		PrivateZoneId:            common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-privateZoneId-Value"),
		SystemVersion:            common.String("EXAMPLE-systemVersion-Value"),
		VmClusterType:            database.CreateCloudVmClusterDetailsVmClusterTypeDeveloper,
		DefinedTags:              map[string]map[string]interface{}{"EXAMPLE_KEY_6beQZ": map[string]interface{}{"EXAMPLE_KEY_5Yb8r": "EXAMPLE--Value"}},
		DisplayName:              common.String("EXAMPLE-displayName-Value"),
		GiVersion:                common.String("EXAMPLE-giVersion-Value"),
		BackupSubnetId:           common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-backupSubnetId-Value"),
		Domain:                   common.String("EXAMPLE-domain-Value"),
		SubscriptionId:           common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-subscriptionId-Value"),
		TimeZone:                 common.String("EXAMPLE-timeZone-Value"),
		DataStoragePercentage:    common.Int(199),
		IsSparseDiskgroupEnabled: common.Bool(false)},
		OpcDryRun:     common.Bool(true),
		OpcRequestId:  common.String("IY5QMLVPUZG6ZBINTCKS<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value")}

	// Send the request using the service client
	resp, err := client.CreateCloudVmCluster(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}