// 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 database from "oci-database";
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 database.DatabaseClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const createCloudVmClusterDetails = {
compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
subscriptionId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subscriptionId-Value",
subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
backupSubnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-backupSubnetId-Value",
cpuCoreCount: 534,
ocpuCount: 8879.509,
memorySizeInGBs: 183,
dbNodeStorageSizeInGBs: 300,
dataStorageSizeInTBs: 574.81946,
dbServers: ["EXAMPLE--Value" ],
clusterName: "EXAMPLE-clusterName-Value",
dataStoragePercentage: 44,
displayName: "EXAMPLE-displayName-Value",
cloudExadataInfrastructureId: "ocid1.test.oc1..<unique_ID>EXAMPLE-cloudExadataInfrastructureId-Value",
hostname: "EXAMPLE-hostname-Value",
domain: "EXAMPLE-domain-Value",
sshPublicKeys: ["EXAMPLE--Value" ],
licenseModel: database.models.CreateCloudVmClusterDetails.LicenseModel.BringYourOwnLicense,
isSparseDiskgroupEnabled: false,
isLocalBackupEnabled: true,
timeZone: "EXAMPLE-timeZone-Value",
scanListenerPortTcp: 56,
scanListenerPortTcpSsl: 872,
privateZoneId: "ocid1.test.oc1..<unique_ID>EXAMPLE-privateZoneId-Value",
nsgIds: ["EXAMPLE--Value" ],
backupNetworkNsgIds: ["EXAMPLE--Value" ],
giVersion: "EXAMPLE-giVersion-Value",
freeformTags: {
EXAMPLE_KEY_yk6LO :"EXAMPLE_VALUE_I1pjOGKNnYO5LevCmx29"
},
definedTags: {
EXAMPLE_KEY_t6edB :{
EXAMPLE_KEY_TPnrl :"EXAMPLE--Value"
}
},
securityAttributes: {
EXAMPLE_KEY_hZf5L :{
EXAMPLE_KEY_AGh9T :"EXAMPLE--Value"
}
},
dataCollectionOptions: {
isDiagnosticsEventsEnabled: false,
isHealthMonitoringEnabled: false,
isIncidentLogsEnabled: true,
}
,
systemVersion: "EXAMPLE-systemVersion-Value",
fileSystemConfigurationDetails: [{
mountPoint: "EXAMPLE-mountPoint-Value",
fileSystemSizeGb: 275,
}
],
cloudAutomationUpdateDetails: {
isEarlyAdoptionEnabled: true,
isFreezePeriodEnabled: true,
applyUpdateTimePreference: {
applyUpdatePreferredStartTime: "EXAMPLE-applyUpdatePreferredStartTime-Value",
applyUpdatePreferredEndTime: "EXAMPLE-applyUpdatePreferredEndTime-Value",
}
,
freezePeriod: {
freezePeriodStartTime: "EXAMPLE-freezePeriodStartTime-Value",
freezePeriodEndTime: "EXAMPLE-freezePeriodEndTime-Value",
}
,
}
,
exascaleDbStorageVaultId: "ocid1.test.oc1..<unique_ID>EXAMPLE-exascaleDbStorageVaultId-Value",
vmClusterType: database.models.CreateCloudVmClusterDetails.VmClusterType.Developer,
}
const createCloudVmClusterRequest: database.requests.CreateCloudVmClusterRequest = {
createCloudVmClusterDetails: createCloudVmClusterDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "5OYNUC3NUJIKZPAOB87K<unique_ID>",
opcDryRun: false,
};
// Send request to the Client.
const createCloudVmClusterResponse = await client.createCloudVmCluster(createCloudVmClusterRequest);
}
catch (error) {
console.log("createCloudVmCluster Failed with error " + error);
}
})();