"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.VpcEndpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage privatelink vpc endpoint
 * ## 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({});
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc",
 *     cidrBlock: "172.16.0.0/16",
 * });
 * 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,
 * });
 * const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
 *     securityGroupName: "acc-test-security-group",
 *     vpcId: fooVpc.id,
 * });
 * const fooClb = new volcengine.clb.Clb("fooClb", {
 *     type: "public",
 *     subnetId: fooSubnet.id,
 *     loadBalancerSpec: "small_1",
 *     description: "acc-test-demo",
 *     loadBalancerName: "acc-test-clb",
 *     loadBalancerBillingType: "PostPaid",
 *     eipBillingConfig: {
 *         isp: "BGP",
 *         eipBillingType: "PostPaidByBandwidth",
 *         bandwidth: 1,
 *     },
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * const fooVpcEndpointService = new volcengine.privatelink.VpcEndpointService("fooVpcEndpointService", {
 *     resources: [{
 *         resourceId: fooClb.id,
 *         resourceType: "CLB",
 *     }],
 *     description: "acc-test",
 *     autoAcceptEnabled: true,
 *     projectName: "default",
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * const fooVpcEndpoint = new volcengine.privatelink.VpcEndpoint("fooVpcEndpoint", {
 *     securityGroupIds: [fooSecurityGroup.id],
 *     serviceId: fooVpcEndpointService.id,
 *     endpointName: "acc-test-ep",
 *     description: "acc-test",
 *     projectName: "default",
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * VpcEndpoint can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:privatelink/vpcEndpoint:VpcEndpoint default ep-3rel74u229dz45zsk2i6l****
 * ```
 */
class VpcEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing VpcEndpoint 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 VpcEndpoint(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of VpcEndpoint.  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'] === VpcEndpoint.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["businessStatus"] = state ? state.businessStatus : undefined;
            resourceInputs["connectionStatus"] = state ? state.connectionStatus : undefined;
            resourceInputs["creationTime"] = state ? state.creationTime : undefined;
            resourceInputs["deletedTime"] = state ? state.deletedTime : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["endpointDomain"] = state ? state.endpointDomain : undefined;
            resourceInputs["endpointName"] = state ? state.endpointName : undefined;
            resourceInputs["endpointType"] = state ? state.endpointType : undefined;
            resourceInputs["privateDnsEnabled"] = state ? state.privateDnsEnabled : undefined;
            resourceInputs["privateDnsName"] = state ? state.privateDnsName : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined;
            resourceInputs["serviceId"] = state ? state.serviceId : undefined;
            resourceInputs["serviceName"] = state ? state.serviceName : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["updateTime"] = state ? state.updateTime : undefined;
            resourceInputs["vpcId"] = state ? state.vpcId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.securityGroupIds === undefined) && !opts.urn) {
                throw new Error("Missing required property 'securityGroupIds'");
            }
            if ((!args || args.serviceId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'serviceId'");
            }
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["endpointName"] = args ? args.endpointName : undefined;
            resourceInputs["privateDnsEnabled"] = args ? args.privateDnsEnabled : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined;
            resourceInputs["serviceId"] = args ? args.serviceId : undefined;
            resourceInputs["serviceName"] = args ? args.serviceName : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["businessStatus"] = undefined /*out*/;
            resourceInputs["connectionStatus"] = undefined /*out*/;
            resourceInputs["creationTime"] = undefined /*out*/;
            resourceInputs["deletedTime"] = undefined /*out*/;
            resourceInputs["endpointDomain"] = undefined /*out*/;
            resourceInputs["endpointType"] = undefined /*out*/;
            resourceInputs["privateDnsName"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
            resourceInputs["vpcId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(VpcEndpoint.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VpcEndpoint = VpcEndpoint;
/** @internal */
VpcEndpoint.__pulumiType = 'volcengine:privatelink/vpcEndpoint:VpcEndpoint';
//# sourceMappingURL=vpcEndpoint.js.map