"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudVmCluster = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Cloud Vm Cluster resource in Oracle Cloud Infrastructure Database service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/database/latest/CloudVmCluster
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/database
 *
 * Creates a cloud VM cluster.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testCloudVmCluster = new oci.database.CloudVmCluster("test_cloud_vm_cluster", {
 *     backupSubnetId: testSubnet.id,
 *     cloudExadataInfrastructureId: testCloudExadataInfrastructure.id,
 *     compartmentId: compartmentId,
 *     cpuCoreCount: Number(cloudVmClusterCpuCoreCount),
 *     displayName: cloudVmClusterDisplayName,
 *     giVersion: cloudVmClusterGiVersion,
 *     hostname: cloudVmClusterHostname,
 *     sshPublicKeys: cloudVmClusterSshPublicKeys,
 *     subnetId: testSubnet.id,
 *     backupNetworkNsgIds: cloudVmClusterBackupNetworkNsgIds,
 *     cloudAutomationUpdateDetails: {
 *         applyUpdateTimePreference: {
 *             applyUpdatePreferredEndTime: cloudVmClusterCloudAutomationUpdateDetailsApplyUpdateTimePreferenceApplyUpdatePreferredEndTime,
 *             applyUpdatePreferredStartTime: cloudVmClusterCloudAutomationUpdateDetailsApplyUpdateTimePreferenceApplyUpdatePreferredStartTime,
 *         },
 *         freezePeriod: {
 *             freezePeriodEndTime: cloudVmClusterCloudAutomationUpdateDetailsFreezePeriodFreezePeriodEndTime,
 *             freezePeriodStartTime: cloudVmClusterCloudAutomationUpdateDetailsFreezePeriodFreezePeriodStartTime,
 *         },
 *         isEarlyAdoptionEnabled: cloudVmClusterCloudAutomationUpdateDetailsIsEarlyAdoptionEnabled === "true",
 *         isFreezePeriodEnabled: cloudVmClusterCloudAutomationUpdateDetailsIsFreezePeriodEnabled === "true",
 *     },
 *     clusterName: cloudVmClusterClusterName,
 *     dataCollectionOptions: {
 *         isDiagnosticsEventsEnabled: cloudVmClusterDataCollectionOptionsIsDiagnosticsEventsEnabled === "true",
 *         isHealthMonitoringEnabled: cloudVmClusterDataCollectionOptionsIsHealthMonitoringEnabled === "true",
 *         isIncidentLogsEnabled: cloudVmClusterDataCollectionOptionsIsIncidentLogsEnabled === "true",
 *     },
 *     dataStoragePercentage: Number(cloudVmClusterDataStoragePercentage),
 *     dataStorageSizeInTbs: cloudVmClusterDataStorageSizeInTbs,
 *     dbNodeStorageSizeInGbs: Number(cloudVmClusterDbNodeStorageSizeInGbs),
 *     dbServers: cloudVmClusterDbServers,
 *     definedTags: cloudVmClusterDefinedTags,
 *     domain: cloudVmClusterDomain,
 *     exascaleDbStorageVaultId: testExascaleDbStorageVault.id,
 *     fileSystemConfigurationDetails: [{
 *         fileSystemSizeGb: Number(cloudVmClusterFileSystemConfigurationDetailsFileSystemSizeGb),
 *         mountPoint: cloudVmClusterFileSystemConfigurationDetailsMountPoint,
 *     }],
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     isLocalBackupEnabled: cloudVmClusterIsLocalBackupEnabled === "true",
 *     isSparseDiskgroupEnabled: cloudVmClusterIsSparseDiskgroupEnabled === "true",
 *     licenseModel: cloudVmClusterLicenseModel,
 *     memorySizeInGbs: Number(cloudVmClusterMemorySizeInGbs),
 *     nsgIds: cloudVmClusterNsgIds,
 *     ocpuCount: cloudVmClusterOcpuCount,
 *     privateZoneId: testZone.id,
 *     recoStoragePercentage: Number(cloudVmClusterRecoStoragePercentage),
 *     scanListenerPortTcp: Number(cloudVmClusterScanListenerPortTcp),
 *     scanListenerPortTcpSsl: Number(cloudVmClusterScanListenerPortTcpSsl),
 *     securityAttributes: cloudVmClusterSecurityAttributes,
 *     sparseStoragePercentage: Number(cloudVmClusterSparseStoragePercentage),
 *     subscriptionId: tenantSubscriptionId,
 *     systemVersion: cloudVmClusterSystemVersion,
 *     timeZone: cloudVmClusterTimeZone,
 *     vmBackupStorageType: cloudVmClusterVmBackupStorageType,
 *     vmClusterType: cloudVmClusterVmClusterType,
 *     vmFileSystemStorageType: cloudVmClusterVmFileSystemStorageType,
 * });
 * ```
 *
 * ## Import
 *
 * CloudVmClusters can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Database/cloudVmCluster:CloudVmCluster test_cloud_vm_cluster "id"
 * ```
 */
class CloudVmCluster extends pulumi.CustomResource {
    /**
     * Get an existing CloudVmCluster resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new CloudVmCluster(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Database/cloudVmCluster:CloudVmCluster';
    /**
     * Returns true if the given object is an instance of CloudVmCluster.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === CloudVmCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["availabilityDomain"] = state?.availabilityDomain;
            resourceInputs["backupNetworkNsgIds"] = state?.backupNetworkNsgIds;
            resourceInputs["backupSubnetId"] = state?.backupSubnetId;
            resourceInputs["cloudAutomationUpdateDetails"] = state?.cloudAutomationUpdateDetails;
            resourceInputs["cloudExadataInfrastructureId"] = state?.cloudExadataInfrastructureId;
            resourceInputs["clusterName"] = state?.clusterName;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["computeModel"] = state?.computeModel;
            resourceInputs["cpuCoreCount"] = state?.cpuCoreCount;
            resourceInputs["createAsync"] = state?.createAsync;
            resourceInputs["dataCollectionOptions"] = state?.dataCollectionOptions;
            resourceInputs["dataStoragePercentage"] = state?.dataStoragePercentage;
            resourceInputs["dataStorageSizeInTbs"] = state?.dataStorageSizeInTbs;
            resourceInputs["dbNodeStorageSizeInGbs"] = state?.dbNodeStorageSizeInGbs;
            resourceInputs["dbServers"] = state?.dbServers;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["diskRedundancy"] = state?.diskRedundancy;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["domain"] = state?.domain;
            resourceInputs["exascaleDbStorageVaultId"] = state?.exascaleDbStorageVaultId;
            resourceInputs["fileSystemConfigurationDetails"] = state?.fileSystemConfigurationDetails;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["giVersion"] = state?.giVersion;
            resourceInputs["hostname"] = state?.hostname;
            resourceInputs["iormConfigCaches"] = state?.iormConfigCaches;
            resourceInputs["isLocalBackupEnabled"] = state?.isLocalBackupEnabled;
            resourceInputs["isSparseDiskgroupEnabled"] = state?.isSparseDiskgroupEnabled;
            resourceInputs["lastUpdateHistoryEntryId"] = state?.lastUpdateHistoryEntryId;
            resourceInputs["licenseModel"] = state?.licenseModel;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["listenerPort"] = state?.listenerPort;
            resourceInputs["memorySizeInGbs"] = state?.memorySizeInGbs;
            resourceInputs["multiCloudIdentityConnectorConfigs"] = state?.multiCloudIdentityConnectorConfigs;
            resourceInputs["nodeCount"] = state?.nodeCount;
            resourceInputs["nsgIds"] = state?.nsgIds;
            resourceInputs["ocpuCount"] = state?.ocpuCount;
            resourceInputs["privateZoneId"] = state?.privateZoneId;
            resourceInputs["recoStoragePercentage"] = state?.recoStoragePercentage;
            resourceInputs["scanDnsName"] = state?.scanDnsName;
            resourceInputs["scanDnsRecordId"] = state?.scanDnsRecordId;
            resourceInputs["scanIpIds"] = state?.scanIpIds;
            resourceInputs["scanIpv6ids"] = state?.scanIpv6ids;
            resourceInputs["scanListenerPortTcp"] = state?.scanListenerPortTcp;
            resourceInputs["scanListenerPortTcpSsl"] = state?.scanListenerPortTcpSsl;
            resourceInputs["securityAttributes"] = state?.securityAttributes;
            resourceInputs["shape"] = state?.shape;
            resourceInputs["sparseStoragePercentage"] = state?.sparseStoragePercentage;
            resourceInputs["sshPublicKeys"] = state?.sshPublicKeys;
            resourceInputs["state"] = state?.state;
            resourceInputs["storageManagementType"] = state?.storageManagementType;
            resourceInputs["storageSizeInGbs"] = state?.storageSizeInGbs;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["subscriptionId"] = state?.subscriptionId;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["systemVersion"] = state?.systemVersion;
            resourceInputs["tdeKeyStoreType"] = state?.tdeKeyStoreType;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeZone"] = state?.timeZone;
            resourceInputs["vipIds"] = state?.vipIds;
            resourceInputs["vipv6ids"] = state?.vipv6ids;
            resourceInputs["vmBackupStorageType"] = state?.vmBackupStorageType;
            resourceInputs["vmClusterType"] = state?.vmClusterType;
            resourceInputs["vmFileSystemStorageType"] = state?.vmFileSystemStorageType;
            resourceInputs["zoneId"] = state?.zoneId;
        }
        else {
            const args = argsOrState;
            if (args?.backupSubnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'backupSubnetId'");
            }
            if (args?.cloudExadataInfrastructureId === undefined && !opts.urn) {
                throw new Error("Missing required property 'cloudExadataInfrastructureId'");
            }
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.cpuCoreCount === undefined && !opts.urn) {
                throw new Error("Missing required property 'cpuCoreCount'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.giVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'giVersion'");
            }
            if (args?.hostname === undefined && !opts.urn) {
                throw new Error("Missing required property 'hostname'");
            }
            if (args?.sshPublicKeys === undefined && !opts.urn) {
                throw new Error("Missing required property 'sshPublicKeys'");
            }
            if (args?.subnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            resourceInputs["backupNetworkNsgIds"] = args?.backupNetworkNsgIds;
            resourceInputs["backupSubnetId"] = args?.backupSubnetId;
            resourceInputs["cloudAutomationUpdateDetails"] = args?.cloudAutomationUpdateDetails;
            resourceInputs["cloudExadataInfrastructureId"] = args?.cloudExadataInfrastructureId;
            resourceInputs["clusterName"] = args?.clusterName;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["cpuCoreCount"] = args?.cpuCoreCount;
            resourceInputs["createAsync"] = args?.createAsync;
            resourceInputs["dataCollectionOptions"] = args?.dataCollectionOptions;
            resourceInputs["dataStoragePercentage"] = args?.dataStoragePercentage;
            resourceInputs["dataStorageSizeInTbs"] = args?.dataStorageSizeInTbs;
            resourceInputs["dbNodeStorageSizeInGbs"] = args?.dbNodeStorageSizeInGbs;
            resourceInputs["dbServers"] = args?.dbServers;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["domain"] = args?.domain;
            resourceInputs["exascaleDbStorageVaultId"] = args?.exascaleDbStorageVaultId;
            resourceInputs["fileSystemConfigurationDetails"] = args?.fileSystemConfigurationDetails;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["giVersion"] = args?.giVersion;
            resourceInputs["hostname"] = args?.hostname;
            resourceInputs["isLocalBackupEnabled"] = args?.isLocalBackupEnabled;
            resourceInputs["isSparseDiskgroupEnabled"] = args?.isSparseDiskgroupEnabled;
            resourceInputs["licenseModel"] = args?.licenseModel;
            resourceInputs["memorySizeInGbs"] = args?.memorySizeInGbs;
            resourceInputs["nsgIds"] = args?.nsgIds;
            resourceInputs["ocpuCount"] = args?.ocpuCount;
            resourceInputs["privateZoneId"] = args?.privateZoneId;
            resourceInputs["recoStoragePercentage"] = args?.recoStoragePercentage;
            resourceInputs["scanListenerPortTcp"] = args?.scanListenerPortTcp;
            resourceInputs["scanListenerPortTcpSsl"] = args?.scanListenerPortTcpSsl;
            resourceInputs["securityAttributes"] = args?.securityAttributes;
            resourceInputs["sparseStoragePercentage"] = args?.sparseStoragePercentage;
            resourceInputs["sshPublicKeys"] = args?.sshPublicKeys;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["subscriptionId"] = args?.subscriptionId;
            resourceInputs["systemVersion"] = args?.systemVersion;
            resourceInputs["tdeKeyStoreType"] = args?.tdeKeyStoreType;
            resourceInputs["timeZone"] = args?.timeZone;
            resourceInputs["vmBackupStorageType"] = args?.vmBackupStorageType;
            resourceInputs["vmClusterType"] = args?.vmClusterType;
            resourceInputs["vmFileSystemStorageType"] = args?.vmFileSystemStorageType;
            resourceInputs["availabilityDomain"] = undefined /*out*/;
            resourceInputs["computeModel"] = undefined /*out*/;
            resourceInputs["diskRedundancy"] = undefined /*out*/;
            resourceInputs["iormConfigCaches"] = undefined /*out*/;
            resourceInputs["lastUpdateHistoryEntryId"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["listenerPort"] = undefined /*out*/;
            resourceInputs["multiCloudIdentityConnectorConfigs"] = undefined /*out*/;
            resourceInputs["nodeCount"] = undefined /*out*/;
            resourceInputs["scanDnsName"] = undefined /*out*/;
            resourceInputs["scanDnsRecordId"] = undefined /*out*/;
            resourceInputs["scanIpIds"] = undefined /*out*/;
            resourceInputs["scanIpv6ids"] = undefined /*out*/;
            resourceInputs["shape"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["storageManagementType"] = undefined /*out*/;
            resourceInputs["storageSizeInGbs"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["vipIds"] = undefined /*out*/;
            resourceInputs["vipv6ids"] = undefined /*out*/;
            resourceInputs["zoneId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CloudVmCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CloudVmCluster = CloudVmCluster;
//# sourceMappingURL=cloudVmCluster.js.map