"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.EscloudInstanceV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooZones = volcengine.ecs.getZones({});
 * // create vpc
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc",
 *     cidrBlock: "172.16.0.0/16",
 *     dnsServers: [
 *         "8.8.8.8",
 *         "114.114.114.114",
 *     ],
 *     projectName: "default",
 * });
 * // create subnet
 * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
 *     subnetName: "acc-test-subnet",
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     vpcId: fooVpc.id,
 * });
 * // create escloud instance
 * const fooEscloudInstanceV2 = new volcengine.escloud_v2.EscloudInstanceV2("fooEscloudInstanceV2", {
 *     instanceName: "acc-test-escloud-instance",
 *     version: "V7_10",
 *     zoneIds: [
 *         fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *         fooZones.then(fooZones => fooZones.zones?.[1]?.id),
 *         fooZones.then(fooZones => fooZones.zones?.[2]?.id),
 *     ],
 *     subnetId: fooSubnet.id,
 *     enableHttps: false,
 *     adminPassword: "Password@@123",
 *     chargeType: "PostPaid",
 *     autoRenew: false,
 *     period: 1,
 *     configurationCode: "es.standard",
 *     enablePureMaster: true,
 *     deletionProtection: false,
 *     projectName: "default",
 *     nodeSpecsAssigns: [
 *         {
 *             type: "Master",
 *             number: 3,
 *             resourceSpecName: "es.x2.medium",
 *             storageSpecName: "es.volume.essd.pl0",
 *             storageSize: 20,
 *         },
 *         {
 *             type: "Hot",
 *             number: 6,
 *             resourceSpecName: "es.x2.medium",
 *             storageSpecName: "es.volume.essd.flexpl-standard",
 *             storageSize: 500,
 *             extraPerformance: {
 *                 throughput: 65,
 *             },
 *         },
 *         {
 *             type: "Kibana",
 *             number: 1,
 *             resourceSpecName: "kibana.x2.small",
 *             storageSpecName: "",
 *             storageSize: 0,
 *         },
 *     ],
 *     networkSpecs: [
 *         {
 *             type: "Elasticsearch",
 *             bandwidth: 1,
 *             isOpen: true,
 *             specName: "es.eip.bgp_fixed_bandwidth",
 *         },
 *         {
 *             type: "Kibana",
 *             bandwidth: 1,
 *             isOpen: true,
 *             specName: "es.eip.bgp_fixed_bandwidth",
 *         },
 *     ],
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * // create escloud ip white list
 * const fooEscloudIpWhiteList = new volcengine.escloud_v2.EscloudIpWhiteList("fooEscloudIpWhiteList", {
 *     instanceId: fooEscloudInstanceV2.id,
 *     type: "public",
 *     component: "es",
 *     ipLists: [
 *         "172.16.0.10",
 *         "172.16.0.11",
 *         "172.16.0.12",
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * EscloudInstanceV2 can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:escloud_v2/escloudInstanceV2:EscloudInstanceV2 default resource_id
 * ```
 */
class EscloudInstanceV2 extends pulumi.CustomResource {
    /**
     * Get an existing EscloudInstanceV2 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 EscloudInstanceV2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of EscloudInstanceV2.  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'] === EscloudInstanceV2.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminPassword"] = state ? state.adminPassword : undefined;
            resourceInputs["autoRenew"] = state ? state.autoRenew : undefined;
            resourceInputs["cerebroPrivateDomain"] = state ? state.cerebroPrivateDomain : undefined;
            resourceInputs["cerebroPublicDomain"] = state ? state.cerebroPublicDomain : undefined;
            resourceInputs["chargeType"] = state ? state.chargeType : undefined;
            resourceInputs["configurationCode"] = state ? state.configurationCode : undefined;
            resourceInputs["deletionProtection"] = state ? state.deletionProtection : undefined;
            resourceInputs["enableHttps"] = state ? state.enableHttps : undefined;
            resourceInputs["enablePureMaster"] = state ? state.enablePureMaster : undefined;
            resourceInputs["esEip"] = state ? state.esEip : undefined;
            resourceInputs["esEipId"] = state ? state.esEipId : undefined;
            resourceInputs["esPrivateDomain"] = state ? state.esPrivateDomain : undefined;
            resourceInputs["esPrivateEndpoint"] = state ? state.esPrivateEndpoint : undefined;
            resourceInputs["esPrivateIpWhitelist"] = state ? state.esPrivateIpWhitelist : undefined;
            resourceInputs["esPublicDomain"] = state ? state.esPublicDomain : undefined;
            resourceInputs["esPublicEndpoint"] = state ? state.esPublicEndpoint : undefined;
            resourceInputs["esPublicIpWhitelist"] = state ? state.esPublicIpWhitelist : undefined;
            resourceInputs["instanceName"] = state ? state.instanceName : undefined;
            resourceInputs["kibanaEip"] = state ? state.kibanaEip : undefined;
            resourceInputs["kibanaEipId"] = state ? state.kibanaEipId : undefined;
            resourceInputs["kibanaPrivateDomain"] = state ? state.kibanaPrivateDomain : undefined;
            resourceInputs["kibanaPrivateIpWhitelist"] = state ? state.kibanaPrivateIpWhitelist : undefined;
            resourceInputs["kibanaPublicDomain"] = state ? state.kibanaPublicDomain : undefined;
            resourceInputs["kibanaPublicIpWhitelist"] = state ? state.kibanaPublicIpWhitelist : undefined;
            resourceInputs["mainZoneId"] = state ? state.mainZoneId : undefined;
            resourceInputs["maintenanceDays"] = state ? state.maintenanceDays : undefined;
            resourceInputs["maintenanceTime"] = state ? state.maintenanceTime : undefined;
            resourceInputs["networkSpecs"] = state ? state.networkSpecs : undefined;
            resourceInputs["nodeSpecsAssigns"] = state ? state.nodeSpecsAssigns : undefined;
            resourceInputs["period"] = state ? state.period : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["subnetId"] = state ? state.subnetId : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["version"] = state ? state.version : undefined;
            resourceInputs["zoneIds"] = state ? state.zoneIds : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.adminPassword === undefined) && !opts.urn) {
                throw new Error("Missing required property 'adminPassword'");
            }
            if ((!args || args.chargeType === undefined) && !opts.urn) {
                throw new Error("Missing required property 'chargeType'");
            }
            if ((!args || args.configurationCode === undefined) && !opts.urn) {
                throw new Error("Missing required property 'configurationCode'");
            }
            if ((!args || args.enableHttps === undefined) && !opts.urn) {
                throw new Error("Missing required property 'enableHttps'");
            }
            if ((!args || args.instanceName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'instanceName'");
            }
            if ((!args || args.nodeSpecsAssigns === undefined) && !opts.urn) {
                throw new Error("Missing required property 'nodeSpecsAssigns'");
            }
            if ((!args || args.subnetId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            if ((!args || args.version === undefined) && !opts.urn) {
                throw new Error("Missing required property 'version'");
            }
            if ((!args || args.zoneIds === undefined) && !opts.urn) {
                throw new Error("Missing required property 'zoneIds'");
            }
            resourceInputs["adminPassword"] = (args === null || args === void 0 ? void 0 : args.adminPassword) ? pulumi.secret(args.adminPassword) : undefined;
            resourceInputs["autoRenew"] = args ? args.autoRenew : undefined;
            resourceInputs["chargeType"] = args ? args.chargeType : undefined;
            resourceInputs["configurationCode"] = args ? args.configurationCode : undefined;
            resourceInputs["deletionProtection"] = args ? args.deletionProtection : undefined;
            resourceInputs["enableHttps"] = args ? args.enableHttps : undefined;
            resourceInputs["enablePureMaster"] = args ? args.enablePureMaster : undefined;
            resourceInputs["instanceName"] = args ? args.instanceName : undefined;
            resourceInputs["maintenanceDays"] = args ? args.maintenanceDays : undefined;
            resourceInputs["maintenanceTime"] = args ? args.maintenanceTime : undefined;
            resourceInputs["networkSpecs"] = args ? args.networkSpecs : undefined;
            resourceInputs["nodeSpecsAssigns"] = args ? args.nodeSpecsAssigns : undefined;
            resourceInputs["period"] = args ? args.period : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["subnetId"] = args ? args.subnetId : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["version"] = args ? args.version : undefined;
            resourceInputs["zoneIds"] = args ? args.zoneIds : undefined;
            resourceInputs["cerebroPrivateDomain"] = undefined /*out*/;
            resourceInputs["cerebroPublicDomain"] = undefined /*out*/;
            resourceInputs["esEip"] = undefined /*out*/;
            resourceInputs["esEipId"] = undefined /*out*/;
            resourceInputs["esPrivateDomain"] = undefined /*out*/;
            resourceInputs["esPrivateEndpoint"] = undefined /*out*/;
            resourceInputs["esPrivateIpWhitelist"] = undefined /*out*/;
            resourceInputs["esPublicDomain"] = undefined /*out*/;
            resourceInputs["esPublicEndpoint"] = undefined /*out*/;
            resourceInputs["esPublicIpWhitelist"] = undefined /*out*/;
            resourceInputs["kibanaEip"] = undefined /*out*/;
            resourceInputs["kibanaEipId"] = undefined /*out*/;
            resourceInputs["kibanaPrivateDomain"] = undefined /*out*/;
            resourceInputs["kibanaPrivateIpWhitelist"] = undefined /*out*/;
            resourceInputs["kibanaPublicDomain"] = undefined /*out*/;
            resourceInputs["kibanaPublicIpWhitelist"] = undefined /*out*/;
            resourceInputs["mainZoneId"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["adminPassword"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(EscloudInstanceV2.__pulumiType, name, resourceInputs, opts);
    }
}
exports.EscloudInstanceV2 = EscloudInstanceV2;
/** @internal */
EscloudInstanceV2.__pulumiType = 'volcengine:escloud_v2/escloudInstanceV2:EscloudInstanceV2';
//# sourceMappingURL=escloudInstanceV2.js.map