// 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).
import * as ocvp from "oci-ocvp";
import common = require("oci-common");
// 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.
const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();
(async () => {
try {
// Create a service client
const client = new ocvp.ClusterClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const updateClusterDetails = {
displayName: "EXAMPLE-displayName-Value",
networkConfiguration: {
provisioningSubnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-provisioningSubnetId-Value",
vsphereVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-vsphereVlanId-Value",
vmotionVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-vmotionVlanId-Value",
vsanVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-vsanVlanId-Value",
nsxVTepVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-nsxVTepVlanId-Value",
nsxEdgeVTepVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-nsxEdgeVTepVlanId-Value",
nsxEdgeUplink1VlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-nsxEdgeUplink1VlanId-Value",
nsxEdgeUplink2VlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-nsxEdgeUplink2VlanId-Value",
replicationVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-replicationVlanId-Value",
provisioningVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-provisioningVlanId-Value",
hcxVlanId: "ocid1.test.oc1..<unique_ID>EXAMPLE-hcxVlanId-Value"
},
vmwareSoftwareVersion: "EXAMPLE-vmwareSoftwareVersion-Value",
esxiSoftwareVersion: "EXAMPLE-esxiSoftwareVersion-Value",
freeformTags: {
EXAMPLE_KEY_rtw6E: "EXAMPLE_VALUE_rPQiv3v6FV25aEg7jolJ"
},
definedTags: {
EXAMPLE_KEY_WaNSD: {
EXAMPLE_KEY_zwWYv: "EXAMPLE--Value"
}
}
};
const updateClusterRequest: ocvp.requests.UpdateClusterRequest = {
clusterId: "ocid1.test.oc1..<unique_ID>EXAMPLE-clusterId-Value",
updateClusterDetails: updateClusterDetails,
ifMatch: "EXAMPLE-ifMatch-Value",
opcRequestId: "JAUFGDJGPWSA4LHRAWMC<unique_ID>"
};
// Send request to the Client.
const updateClusterResponse = await client.updateCluster(updateClusterRequest);
} catch (error) {
console.log("updateCluster Failed with error " + error);
}
})();