// 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{PrivateZoneId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-privateZoneId-Value"),
		SecurityAttributes:       map[string]map[string]interface{}{"EXAMPLE_KEY_RUJ6F": map[string]interface{}{"EXAMPLE_KEY_NJwdH": "EXAMPLE--Value"}},
		DataStorageSizeInTBs:     common.Float64(7765.285),
		IsSparseDiskgroupEnabled: common.Bool(false),
		SparseStoragePercentage:  common.Int(80),
		SystemVersion:            common.String("EXAMPLE-systemVersion-Value"),
		VmClusterType:            database.CreateCloudVmClusterDetailsVmClusterTypeRegular,
		BackupSubnetId:           common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-backupSubnetId-Value"),
		FileSystemConfigurationDetails: []database.FileSystemConfigurationDetail{database.FileSystemConfigurationDetail{FileSystemSizeGb: common.Int(750),
			MountPoint: common.String("EXAMPLE-mountPoint-Value")}},
		CompartmentId:          common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
		DbNodeStorageSizeInGBs: common.Int(14),
		DefinedTags:            map[string]map[string]interface{}{"EXAMPLE_KEY_IX9ko": map[string]interface{}{"EXAMPLE_KEY_wj4Fa": "EXAMPLE--Value"}},
		FreeformTags:           map[string]string{"EXAMPLE_KEY_0P3HJ": "EXAMPLE_VALUE_dWRah83bjmztMuNXhLWH"},
		IsLocalBackupEnabled:   common.Bool(true),
		OcpuCount:              common.Float32(6857.6943),
		ScanListenerPortTcpSsl: common.Int(756),
		TimeZone:               common.String("EXAMPLE-timeZone-Value"),
		BackupNetworkNsgIds:    []string{"EXAMPLE--Value"},
		CloudAutomationUpdateDetails: &database.CloudAutomationUpdateDetails{IsEarlyAdoptionEnabled: common.Bool(false),
			IsFreezePeriodEnabled: common.Bool(true),
			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")}},
		CloudExadataInfrastructureId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-cloudExadataInfrastructureId-Value"),
		GiVersion:                    common.String("EXAMPLE-giVersion-Value"),
		MemorySizeInGBs:              common.Int(99),
		SshPublicKeys:                []string{"EXAMPLE--Value"},
		VmFileSystemStorageType:      database.CreateCloudVmClusterDetailsVmFileSystemStorageTypeExascale,
		DisplayName:                  common.String("EXAMPLE-displayName-Value"),
		ClusterName:                  common.String("EXAMPLE-clusterName-Value"),
		CpuCoreCount:                 common.Int(750),
		DataCollectionOptions: &database.DataCollectionOptions{IsDiagnosticsEventsEnabled: common.Bool(false),
			IsHealthMonitoringEnabled: common.Bool(true),
			IsIncidentLogsEnabled:     common.Bool(false)},
		DbServers:                  []string{"EXAMPLE--Value"},
		NsgIds:                     []string{"EXAMPLE--Value"},
		RecoStoragePercentage:      common.Int(90),
		SubscriptionId:             common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-subscriptionId-Value"),
		DataStoragePercentage:      common.Int(6),
		Domain:                     common.String("EXAMPLE-domain-Value"),
		ScanListenerPortTcp:        common.Int(87),
		SubnetId:                   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value"),
		VmBackupStorageType:        database.CreateCloudVmClusterDetailsVmBackupStorageTypeExascale,
		Hostname:                   common.String("EXAMPLE-hostname-Value"),
		LicenseModel:               database.CreateCloudVmClusterDetailsLicenseModelBringYourOwnLicense,
		ExascaleDbStorageVaultId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-exascaleDbStorageVaultId-Value"),
		IsOlderVersionAcknowledged: common.Bool(true)},
		OpcDryRun:     common.Bool(false),
		OpcRequestId:  common.String("3AQ4SHIDAEEMTDMXGPUM<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)
}