UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

235 lines (234 loc) 7.39 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of privatelink vpc endpoints * ## 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, * }); * const fooVpcEndpoint: volcengine.privatelink.VpcEndpoint[] = []; * for (const range = {value: 0}; range.value < 2; range.value++) { * fooVpcEndpoint.push(new volcengine.privatelink.VpcEndpoint(`fooVpcEndpoint-${range.value}`, { * securityGroupIds: [fooSecurityGroup.id], * serviceId: fooVpcEndpointService.id, * endpointName: "acc-test-ep", * description: "acc-test", * })); * } * const fooVpcEndpoints = volcengine.privatelink.getVpcEndpointsOutput({ * ids: fooVpcEndpoint.map(__item => __item.id), * }); * ``` */ /** @deprecated volcengine.privatelink.VpcEndpoints has been deprecated in favor of volcengine.privatelink.getVpcEndpoints */ export declare function vpcEndpoints(args?: VpcEndpointsArgs, opts?: pulumi.InvokeOptions): Promise<VpcEndpointsResult>; /** * A collection of arguments for invoking VpcEndpoints. */ export interface VpcEndpointsArgs { /** * The name of vpc endpoint. */ endpointName?: string; /** * The IDs of vpc endpoint. */ ids?: string[]; /** * A Name Regex of vpc endpoint. */ nameRegex?: string; /** * File name where to save data source results. */ outputFile?: string; /** * The name of vpc endpoint service. */ serviceName?: string; /** * The status of vpc endpoint. Valid values: `Creating`, `Pending`, `Available`, `Deleting`, `Inactive`. */ status?: string; /** * The vpc id of vpc endpoint. */ vpcId?: string; } /** * A collection of values returned by VpcEndpoints. */ export interface VpcEndpointsResult { /** * The name of vpc endpoint. */ readonly endpointName?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly ids?: string[]; readonly nameRegex?: string; readonly outputFile?: string; /** * The name of vpc endpoint service. */ readonly serviceName?: string; /** * The status of vpc endpoint. */ readonly status?: string; /** * Returns the total amount of the data list. */ readonly totalCount: number; /** * The collection of query. */ readonly vpcEndpoints: outputs.privatelink.VpcEndpointsVpcEndpoint[]; /** * The vpc id of vpc endpoint. */ readonly vpcId?: string; } /** * Use this data source to query detailed information of privatelink vpc endpoints * ## 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, * }); * const fooVpcEndpoint: volcengine.privatelink.VpcEndpoint[] = []; * for (const range = {value: 0}; range.value < 2; range.value++) { * fooVpcEndpoint.push(new volcengine.privatelink.VpcEndpoint(`fooVpcEndpoint-${range.value}`, { * securityGroupIds: [fooSecurityGroup.id], * serviceId: fooVpcEndpointService.id, * endpointName: "acc-test-ep", * description: "acc-test", * })); * } * const fooVpcEndpoints = volcengine.privatelink.getVpcEndpointsOutput({ * ids: fooVpcEndpoint.map(__item => __item.id), * }); * ``` */ /** @deprecated volcengine.privatelink.VpcEndpoints has been deprecated in favor of volcengine.privatelink.getVpcEndpoints */ export declare function vpcEndpointsOutput(args?: VpcEndpointsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<VpcEndpointsResult>; /** * A collection of arguments for invoking VpcEndpoints. */ export interface VpcEndpointsOutputArgs { /** * The name of vpc endpoint. */ endpointName?: pulumi.Input<string>; /** * The IDs of vpc endpoint. */ ids?: pulumi.Input<pulumi.Input<string>[]>; /** * A Name Regex of vpc endpoint. */ nameRegex?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * The name of vpc endpoint service. */ serviceName?: pulumi.Input<string>; /** * The status of vpc endpoint. Valid values: `Creating`, `Pending`, `Available`, `Deleting`, `Inactive`. */ status?: pulumi.Input<string>; /** * The vpc id of vpc endpoint. */ vpcId?: pulumi.Input<string>; }