// 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.SddcClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const createSddcDetails = {
displayName: "EXAMPLE-displayName-Value",
vmwareSoftwareVersion: "EXAMPLE-vmwareSoftwareVersion-Value",
esxiSoftwareVersion: "EXAMPLE-esxiSoftwareVersion-Value",
compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
hcxMode: ocvp.models.HcxModes.Advanced,
initialConfiguration: {
initialClusterConfigurations: [
{
vsphereType: ocvp.models.VsphereTypes.Management,
computeAvailabilityDomain: "EXAMPLE-computeAvailabilityDomain-Value",
displayName: "EXAMPLE-displayName-Value",
instanceDisplayNamePrefix: "EXAMPLE-instanceDisplayNamePrefix-Value",
esxiHostsCount: 51,
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"
},
initialCommitment: ocvp.models.Commitment.Month,
workloadNetworkCidr: "EXAMPLE-workloadNetworkCidr-Value",
initialHostShapeName: "EXAMPLE-initialHostShapeName-Value",
initialHostOcpuCount: 5007.2305,
isShieldedInstanceEnabled: true,
capacityReservationId: "ocid1.test.oc1..<unique_ID>EXAMPLE-capacityReservationId-Value",
datastores: [
{
blockVolumeIds: ["EXAMPLE--Value"],
datastoreType: ocvp.models.DatastoreTypes.Workload
}
]
}
]
},
isSingleHostSddc: true,
sshAuthorizedKeys: "EXAMPLE-sshAuthorizedKeys-Value",
freeformTags: {
EXAMPLE_KEY_9GU3A: "EXAMPLE_VALUE_Ih3VQ4gjSKQWoyeU59ln"
},
definedTags: {
EXAMPLE_KEY_H7Eas: {
EXAMPLE_KEY_s03OA: "EXAMPLE--Value"
}
}
};
const createSddcRequest: ocvp.requests.CreateSddcRequest = {
createSddcDetails: createSddcDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "TYTXSCTNOX7LGYTOBIFG<unique_ID>"
};
// Send request to the Client.
const createSddcResponse = await client.createSddc(createSddcRequest);
} catch (error) {
console.log("createSddc Failed with error " + error);
}
})();