"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.BdsInstance = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Bds Instance resource in Oracle Cloud Infrastructure Big Data Service service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/bigdata/latest/BdsInstance
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/big_data_service
 *
 * Creates a new BDS instance.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testBdsInstance = new oci.bigdataservice.BdsInstance("test_bds_instance", {
 *     clusterPublicKey: bdsInstanceClusterPublicKey,
 *     clusterVersion: bdsInstanceClusterVersion,
 *     compartmentId: compartmentId,
 *     displayName: bdsInstanceDisplayName,
 *     isHighAvailability: bdsInstanceIsHighAvailability === "true",
 *     isSecure: bdsInstanceIsSecure === "true",
 *     masterNode: {
 *         shape: bdsInstanceNodesShape,
 *         subnetId: testSubnet.id,
 *         numberOfNodes: Number(bdsInstanceNumberOfNodes),
 *         blockVolumeSizeInGbs: bdsInstanceNodesBlockVolumeSizeInGbs,
 *         shapeConfig: {
 *             memoryInGbs: Number(bdsInstanceNodesShapeConfigMemoryInGbs),
 *             nvmes: Number(bdsInstanceNodesShapeConfigNvmes),
 *             ocpus: Number(bdsInstanceNodesShapeConfigOcpus),
 *         },
 *     },
 *     utilNode: {
 *         shape: bdsInstanceNodesShape,
 *         subnetId: testSubnet.id,
 *         numberOfNodes: Number(bdsInstanceNumberOfNodes),
 *         blockVolumeSizeInGbs: bdsInstanceNodesBlockVolumeSizeInGbs,
 *         shapeConfig: {
 *             memoryInGbs: Number(bdsInstanceNodesShapeConfigMemoryInGbs),
 *             nvmes: Number(bdsInstanceNodesShapeConfigNvmes),
 *             ocpus: Number(bdsInstanceNodesShapeConfigOcpus),
 *         },
 *     },
 *     workerNode: {
 *         shape: bdsInstanceNodesShape,
 *         subnetId: testSubnet.id,
 *         numberOfNodes: Number(bdsInstanceNumberOfNodes),
 *         blockVolumeSizeInGbs: bdsInstanceNodesBlockVolumeSizeInGbs,
 *         shapeConfig: {
 *             memoryInGbs: Number(bdsInstanceNodesShapeConfigMemoryInGbs),
 *             nvmes: Number(bdsInstanceNodesShapeConfigNvmes),
 *             ocpus: Number(bdsInstanceNodesShapeConfigOcpus),
 *         },
 *     },
 *     computeOnlyWorkerNode: {
 *         shape: bdsInstanceNodesShape,
 *         subnetId: testSubnet.id,
 *         numberOfNodes: Number(bdsInstanceNumberOfNodes),
 *         blockVolumeSizeInGbs: bdsInstanceNodesBlockVolumeSizeInGbs,
 *         shapeConfig: {
 *             memoryInGbs: Number(bdsInstanceNodesShapeConfigMemoryInGbs),
 *             nvmes: Number(bdsInstanceNodesShapeConfigNvmes),
 *             ocpus: Number(bdsInstanceNodesShapeConfigOcpus),
 *         },
 *     },
 *     edgeNode: {
 *         shape: bdsInstanceNodesShape,
 *         subnetId: testSubnet.id,
 *         numberOfNodes: Number(bdsInstanceNumberOfNodes),
 *         blockVolumeSizeInGbs: bdsInstanceNodesBlockVolumeSizeInGbs,
 *         shapeConfig: {
 *             memoryInGbs: Number(bdsInstanceNodesShapeConfigMemoryInGbs),
 *             nvmes: Number(bdsInstanceNodesShapeConfigNvmes),
 *             ocpus: Number(bdsInstanceNodesShapeConfigOcpus),
 *         },
 *     },
 *     kafkaBrokerNode: {
 *         shape: bdsInstanceNodesShape,
 *         subnetId: testSubnet.id,
 *         numberOfNodes: bdsInstanceNumberOfNodes,
 *         blockVolumeSizeInGbs: bdsInstanceNodesBlockVolumeSizeInGbs,
 *         shapeConfig: {
 *             memoryInGbs: Number(bdsInstanceNodesShapeConfigMemoryInGbs),
 *             nvmes: Number(bdsInstanceNodesShapeConfigNvmes),
 *             ocpus: Number(bdsInstanceNodesShapeConfigOcpus),
 *         },
 *     },
 *     bdsClusterVersionSummary: {
 *         bdsVersion: bdsInstanceBdsClusterVersionSummaryBdsVersion,
 *         odhVersion: bdsInstanceBdsClusterVersionSummaryOdhVersion,
 *     },
 *     bootstrapScriptUrl: bdsInstanceBootstrapScriptUrl,
 *     clusterAdminPassword: bdsInstanceClusterAdminPassword,
 *     clusterProfile: bdsInstanceClusterProfile,
 *     definedTags: bdsInstanceDefinedTags,
 *     freeformTags: bdsInstanceFreeformTags,
 *     isSecretReused: bdsInstanceIsSecretReused === "true",
 *     kerberosRealmName: bdsInstanceKerberosRealmName,
 *     kmsKeyId: bdsInstanceKmsKeyId,
 *     ignoreExistingNodesShapes: ignoreExistingNodesShape,
 *     networkConfig: {
 *         cidrBlock: bdsInstanceNetworkConfigCidrBlock,
 *         isNatGatewayRequired: bdsInstanceNetworkConfigIsNatGatewayRequired === "true",
 *     },
 *     secretId: testSecret.id,
 * });
 * ```
 *
 * ## Import
 *
 * BdsInstances can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:BigDataService/bdsInstance:BdsInstance test_bds_instance "id"
 * ```
 */
class BdsInstance extends pulumi.CustomResource {
    /**
     * Get an existing BdsInstance 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 BdsInstance(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:BigDataService/bdsInstance:BdsInstance';
    /**
     * Returns true if the given object is an instance of BdsInstance.  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'] === BdsInstance.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["bdsClusterVersionSummary"] = state?.bdsClusterVersionSummary;
            resourceInputs["bootstrapScriptUrl"] = state?.bootstrapScriptUrl;
            resourceInputs["cloudSqlDetails"] = state?.cloudSqlDetails;
            resourceInputs["clusterAdminPassword"] = state?.clusterAdminPassword;
            resourceInputs["clusterDetails"] = state?.clusterDetails;
            resourceInputs["clusterProfile"] = state?.clusterProfile;
            resourceInputs["clusterPublicKey"] = state?.clusterPublicKey;
            resourceInputs["clusterVersion"] = state?.clusterVersion;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["computeOnlyWorkerNode"] = state?.computeOnlyWorkerNode;
            resourceInputs["createdBy"] = state?.createdBy;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["edgeNode"] = state?.edgeNode;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["ignoreExistingNodesShapes"] = state?.ignoreExistingNodesShapes;
            resourceInputs["isCloudSqlConfigured"] = state?.isCloudSqlConfigured;
            resourceInputs["isForceRemoveEnabled"] = state?.isForceRemoveEnabled;
            resourceInputs["isForceStopJobs"] = state?.isForceStopJobs;
            resourceInputs["isHighAvailability"] = state?.isHighAvailability;
            resourceInputs["isKafkaConfigured"] = state?.isKafkaConfigured;
            resourceInputs["isSecretReused"] = state?.isSecretReused;
            resourceInputs["isSecure"] = state?.isSecure;
            resourceInputs["kafkaBrokerNode"] = state?.kafkaBrokerNode;
            resourceInputs["kerberosRealmName"] = state?.kerberosRealmName;
            resourceInputs["kmsKeyId"] = state?.kmsKeyId;
            resourceInputs["masterNode"] = state?.masterNode;
            resourceInputs["networkConfig"] = state?.networkConfig;
            resourceInputs["nodes"] = state?.nodes;
            resourceInputs["numberOfNodes"] = state?.numberOfNodes;
            resourceInputs["numberOfNodesRequiringMaintenanceReboot"] = state?.numberOfNodesRequiringMaintenanceReboot;
            resourceInputs["osPatchVersion"] = state?.osPatchVersion;
            resourceInputs["removeNode"] = state?.removeNode;
            resourceInputs["removeNodes"] = state?.removeNodes;
            resourceInputs["secretId"] = state?.secretId;
            resourceInputs["startClusterShapeConfigs"] = state?.startClusterShapeConfigs;
            resourceInputs["state"] = state?.state;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeEarliestCertificateExpiration"] = state?.timeEarliestCertificateExpiration;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["utilNode"] = state?.utilNode;
            resourceInputs["workerNode"] = state?.workerNode;
        }
        else {
            const args = argsOrState;
            if (args?.clusterPublicKey === undefined && !opts.urn) {
                throw new Error("Missing required property 'clusterPublicKey'");
            }
            if (args?.clusterVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'clusterVersion'");
            }
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.isHighAvailability === undefined && !opts.urn) {
                throw new Error("Missing required property 'isHighAvailability'");
            }
            if (args?.isSecure === undefined && !opts.urn) {
                throw new Error("Missing required property 'isSecure'");
            }
            if (args?.masterNode === undefined && !opts.urn) {
                throw new Error("Missing required property 'masterNode'");
            }
            if (args?.utilNode === undefined && !opts.urn) {
                throw new Error("Missing required property 'utilNode'");
            }
            if (args?.workerNode === undefined && !opts.urn) {
                throw new Error("Missing required property 'workerNode'");
            }
            resourceInputs["bdsClusterVersionSummary"] = args?.bdsClusterVersionSummary;
            resourceInputs["bootstrapScriptUrl"] = args?.bootstrapScriptUrl;
            resourceInputs["cloudSqlDetails"] = args?.cloudSqlDetails;
            resourceInputs["clusterAdminPassword"] = args?.clusterAdminPassword ? pulumi.secret(args.clusterAdminPassword) : undefined;
            resourceInputs["clusterProfile"] = args?.clusterProfile;
            resourceInputs["clusterPublicKey"] = args?.clusterPublicKey;
            resourceInputs["clusterVersion"] = args?.clusterVersion;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["computeOnlyWorkerNode"] = args?.computeOnlyWorkerNode;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["edgeNode"] = args?.edgeNode;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["ignoreExistingNodesShapes"] = args?.ignoreExistingNodesShapes;
            resourceInputs["isCloudSqlConfigured"] = args?.isCloudSqlConfigured;
            resourceInputs["isForceRemoveEnabled"] = args?.isForceRemoveEnabled;
            resourceInputs["isForceStopJobs"] = args?.isForceStopJobs;
            resourceInputs["isHighAvailability"] = args?.isHighAvailability;
            resourceInputs["isKafkaConfigured"] = args?.isKafkaConfigured;
            resourceInputs["isSecretReused"] = args?.isSecretReused;
            resourceInputs["isSecure"] = args?.isSecure;
            resourceInputs["kafkaBrokerNode"] = args?.kafkaBrokerNode;
            resourceInputs["kerberosRealmName"] = args?.kerberosRealmName;
            resourceInputs["kmsKeyId"] = args?.kmsKeyId;
            resourceInputs["masterNode"] = args?.masterNode;
            resourceInputs["networkConfig"] = args?.networkConfig;
            resourceInputs["osPatchVersion"] = args?.osPatchVersion;
            resourceInputs["removeNode"] = args?.removeNode;
            resourceInputs["removeNodes"] = args?.removeNodes;
            resourceInputs["secretId"] = args?.secretId;
            resourceInputs["startClusterShapeConfigs"] = args?.startClusterShapeConfigs;
            resourceInputs["state"] = args?.state;
            resourceInputs["utilNode"] = args?.utilNode;
            resourceInputs["workerNode"] = args?.workerNode;
            resourceInputs["clusterDetails"] = undefined /*out*/;
            resourceInputs["createdBy"] = undefined /*out*/;
            resourceInputs["nodes"] = undefined /*out*/;
            resourceInputs["numberOfNodes"] = undefined /*out*/;
            resourceInputs["numberOfNodesRequiringMaintenanceReboot"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeEarliestCertificateExpiration"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["clusterAdminPassword"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(BdsInstance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.BdsInstance = BdsInstance;
//# sourceMappingURL=bdsInstance.js.map