"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.Clb = 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",
 * });
 * // 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 ipv4 public clb
 * const publicClb = new volcengine.clb.Clb("publicClb", {
 *     type: "public",
 *     subnetId: fooSubnet.id,
 *     loadBalancerName: "acc-test-clb-public",
 *     loadBalancerSpec: "small_1",
 *     description: "acc-test-demo",
 *     projectName: "default",
 *     eipBillingConfig: {
 *         isp: "BGP",
 *         eipBillingType: "PostPaidByBandwidth",
 *         bandwidth: 1,
 *     },
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * // create ipv4 private clb
 * const privateClb = new volcengine.clb.Clb("privateClb", {
 *     type: "private",
 *     subnetId: fooSubnet.id,
 *     loadBalancerName: "acc-test-clb-private",
 *     loadBalancerSpec: "small_1",
 *     description: "acc-test-demo",
 *     projectName: "default",
 * });
 * // create eip
 * const eip = new volcengine.eip.Address("eip", {
 *     billingType: "PostPaidByBandwidth",
 *     bandwidth: 1,
 *     isp: "BGP",
 *     description: "tf-test",
 *     projectName: "default",
 * });
 * // associate eip to clb
 * const associate = new volcengine.eip.Associate("associate", {
 *     allocationId: eip.id,
 *     instanceId: privateClb.id,
 *     instanceType: "ClbInstance",
 * });
 * // create ipv6 vpc
 * const vpcIpv6 = new volcengine.vpc.Vpc("vpcIpv6", {
 *     vpcName: "acc-test-vpc-ipv6",
 *     cidrBlock: "172.16.0.0/16",
 *     enableIpv6: true,
 * });
 * // create ipv6 subnet
 * const subnetIpv6 = new volcengine.vpc.Subnet("subnetIpv6", {
 *     subnetName: "acc-test-subnet-ipv6",
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[1]?.id),
 *     vpcId: vpcIpv6.id,
 *     ipv6CidrBlock: 1,
 * });
 * // create ipv6 private clb
 * const privateClbIpv6 = new volcengine.clb.Clb("privateClbIpv6", {
 *     type: "private",
 *     subnetId: subnetIpv6.id,
 *     loadBalancerName: "acc-test-clb-ipv6",
 *     loadBalancerSpec: "small_1",
 *     description: "acc-test-demo",
 *     projectName: "default",
 *     addressIpVersion: "DualStack",
 * });
 * // create ipv6 gateway
 * const ipv6Gateway = new volcengine.vpc.Ipv6Gateway("ipv6Gateway", {vpcId: vpcIpv6.id});
 * const fooIpv6AddressBandwidth = new volcengine.vpc.Ipv6AddressBandwidth("fooIpv6AddressBandwidth", {
 *     ipv6Address: privateClbIpv6.eniIpv6Address,
 *     billingType: "PostPaidByBandwidth",
 *     bandwidth: 5,
 * }, {
 *     dependsOn: [ipv6Gateway],
 * });
 * ```
 *
 * ## Import
 *
 * CLB can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:clb/clb:Clb default clb-273y2ok6ets007fap8txvf6us
 * ```
 */
class Clb extends pulumi.CustomResource {
    /**
     * Get an existing Clb 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 Clb(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Clb.  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'] === Clb.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["addressIpVersion"] = state ? state.addressIpVersion : undefined;
            resourceInputs["bypassSecurityGroupEnabled"] = state ? state.bypassSecurityGroupEnabled : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["eipAddress"] = state ? state.eipAddress : undefined;
            resourceInputs["eipBillingConfig"] = state ? state.eipBillingConfig : undefined;
            resourceInputs["eipId"] = state ? state.eipId : undefined;
            resourceInputs["eniAddress"] = state ? state.eniAddress : undefined;
            resourceInputs["eniAddressNum"] = state ? state.eniAddressNum : undefined;
            resourceInputs["eniIpv6Address"] = state ? state.eniIpv6Address : undefined;
            resourceInputs["ipv6EipId"] = state ? state.ipv6EipId : undefined;
            resourceInputs["loadBalancerBillingType"] = state ? state.loadBalancerBillingType : undefined;
            resourceInputs["loadBalancerName"] = state ? state.loadBalancerName : undefined;
            resourceInputs["loadBalancerSpec"] = state ? state.loadBalancerSpec : undefined;
            resourceInputs["masterZoneId"] = state ? state.masterZoneId : undefined;
            resourceInputs["modificationProtectionReason"] = state ? state.modificationProtectionReason : undefined;
            resourceInputs["modificationProtectionStatus"] = state ? state.modificationProtectionStatus : undefined;
            resourceInputs["period"] = state ? state.period : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["regionId"] = state ? state.regionId : undefined;
            resourceInputs["remainRenewTimes"] = state ? state.remainRenewTimes : undefined;
            resourceInputs["renewPeriodTimes"] = state ? state.renewPeriodTimes : undefined;
            resourceInputs["renewType"] = state ? state.renewType : undefined;
            resourceInputs["slaveZoneId"] = state ? state.slaveZoneId : undefined;
            resourceInputs["subnetId"] = state ? state.subnetId : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["timestampRemoveEnabled"] = state ? state.timestampRemoveEnabled : undefined;
            resourceInputs["type"] = state ? state.type : undefined;
            resourceInputs["vpcId"] = state ? state.vpcId : undefined;
            resourceInputs["zoneType"] = state ? state.zoneType : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.subnetId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            if ((!args || args.type === undefined) && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            resourceInputs["addressIpVersion"] = args ? args.addressIpVersion : undefined;
            resourceInputs["bypassSecurityGroupEnabled"] = args ? args.bypassSecurityGroupEnabled : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["eipBillingConfig"] = args ? args.eipBillingConfig : undefined;
            resourceInputs["eniAddress"] = args ? args.eniAddress : undefined;
            resourceInputs["eniAddressNum"] = args ? args.eniAddressNum : undefined;
            resourceInputs["eniIpv6Address"] = args ? args.eniIpv6Address : undefined;
            resourceInputs["loadBalancerBillingType"] = args ? args.loadBalancerBillingType : undefined;
            resourceInputs["loadBalancerName"] = args ? args.loadBalancerName : undefined;
            resourceInputs["loadBalancerSpec"] = args ? args.loadBalancerSpec : undefined;
            resourceInputs["masterZoneId"] = args ? args.masterZoneId : undefined;
            resourceInputs["modificationProtectionReason"] = args ? args.modificationProtectionReason : undefined;
            resourceInputs["modificationProtectionStatus"] = args ? args.modificationProtectionStatus : undefined;
            resourceInputs["period"] = args ? args.period : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["regionId"] = args ? args.regionId : undefined;
            resourceInputs["remainRenewTimes"] = args ? args.remainRenewTimes : undefined;
            resourceInputs["renewPeriodTimes"] = args ? args.renewPeriodTimes : undefined;
            resourceInputs["renewType"] = args ? args.renewType : undefined;
            resourceInputs["slaveZoneId"] = args ? args.slaveZoneId : undefined;
            resourceInputs["subnetId"] = args ? args.subnetId : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["timestampRemoveEnabled"] = args ? args.timestampRemoveEnabled : undefined;
            resourceInputs["type"] = args ? args.type : undefined;
            resourceInputs["vpcId"] = args ? args.vpcId : undefined;
            resourceInputs["zoneType"] = args ? args.zoneType : undefined;
            resourceInputs["eipAddress"] = undefined /*out*/;
            resourceInputs["eipId"] = undefined /*out*/;
            resourceInputs["ipv6EipId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Clb.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Clb = Clb;
/** @internal */
Clb.__pulumiType = 'volcengine:clb/clb:Clb';
//# sourceMappingURL=clb.js.map