// 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/opensearch"
)
func ExampleResizeOpensearchClusterVertical() {
// 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 := opensearch.NewOpensearchClusterClientWithConfigurationProvider(common.DefaultConfigProvider())
helpers.FatalIfError(err)
// Create a request and dependent object(s).
req := opensearch.ResizeOpensearchClusterVerticalRequest{IfMatch: common.String("EXAMPLE-ifMatch-Value"),
OpcRequestId: common.String("O1LPJHHW3OY5R6QGCBCI<unique_ID>"),
OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
OpensearchClusterId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-opensearchClusterId-Value"),
ResizeOpensearchClusterVerticalDetails: opensearch.ResizeOpensearchClusterVerticalDetails{MlNodeHostMemoryGB: common.Int(86456),
DataNodeHostOcpuCount: common.Int(536),
MasterNodeHostOcpuCount: common.Int(2980),
OpendashboardNodeHostOcpuCount: common.Int(4961),
SearchNodeHostShape: common.String("EXAMPLE-searchNodeHostShape-Value"),
CoordinatorNodeHostOcpuCount: common.Int(3484),
MasterNodeHostMemoryGB: common.Int(22696),
MlNodeHostShape: common.String("EXAMPLE-mlNodeHostShape-Value"),
OpendashboardNodeHostShape: common.String("EXAMPLE-opendashboardNodeHostShape-Value"),
SearchNodeStorageGB: common.Int(44468),
MlNodeHostOcpuCount: common.Int(5433),
CoordinatorNodeHostMemoryGB: common.Int(80837),
CoordinatorNodeHostShape: common.String("EXAMPLE-coordinatorNodeHostShape-Value"),
DataNodeHostMemoryGB: common.Int(27360),
DataNodeHostShape: common.String("EXAMPLE-dataNodeHostShape-Value"),
DataNodeStorageGB: common.Int(92156),
FreeformTags: map[string]string{"EXAMPLE_KEY_OG5bX": "EXAMPLE_VALUE_7B68MGj1sRQ7hwJhHMml"},
SearchNodeHostMemoryGB: common.Int(36449),
DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_ZQod5": map[string]interface{}{"EXAMPLE_KEY_OccY6": "EXAMPLE--Value"}},
MasterNodeHostShape: common.String("EXAMPLE-masterNodeHostShape-Value"),
MlNodeStorageGB: common.Int(5831),
OpendashboardNodeHostMemoryGB: common.Int(59991),
SearchNodeHostOcpuCount: common.Int(4444)}}
// Send the request using the service client
resp, err := client.ResizeOpensearchClusterVertical(context.Background(), req)
helpers.FatalIfError(err)
// Retrieve value from the response.
fmt.Println(resp)
}