// 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.Workload,
computeAvailabilityDomain: "EXAMPLE-computeAvailabilityDomain-Value",
displayName: "EXAMPLE-displayName-Value",
instanceDisplayNamePrefix: "EXAMPLE-instanceDisplayNamePrefix-Value",
esxiHostsCount: 27,
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.Hour,
workloadNetworkCidr: "EXAMPLE-workloadNetworkCidr-Value",
initialHostShapeName: "EXAMPLE-initialHostShapeName-Value",
initialHostOcpuCount: 3775.7026,
isShieldedInstanceEnabled: false,
capacityReservationId: "ocid1.test.oc1..<unique_ID>EXAMPLE-capacityReservationId-Value",
datastores: [{
blockVolumeIds: ["EXAMPLE--Value" ],
datastoreType: ocvp.models.DatastoreTypes.Management,
}
],
datastoreClusterIds: ["EXAMPLE--Value" ],
}
],
}
,
isSingleHostSddc: true,
sshAuthorizedKeys: "EXAMPLE-sshAuthorizedKeys-Value",
freeformTags: {
EXAMPLE_KEY_1LoED :"EXAMPLE_VALUE_rzKc0aFXFGxYoj4YujNW"
},
definedTags: {
EXAMPLE_KEY_wD62L :{
EXAMPLE_KEY_czJRR :"EXAMPLE--Value"
}
},
}
const createSddcRequest: ocvp.requests.CreateSddcRequest = {
createSddcDetails: createSddcDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "QIQ0XXVVSBT0CGJWLEFF<unique_ID>",
};
// Send request to the Client.
const createSddcResponse = await client.createSddc(createSddcRequest);
}
catch (error) {
console.log("createSddc Failed with error " + error);
}
})();