UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

241 lines (240 loc) 6.62 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of albs * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.alb.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const subnet1 = new volcengine.vpc.Subnet("subnet1", { * subnetName: "acc-test-subnet-1", * cidrBlock: "172.16.1.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const subnet2 = new volcengine.vpc.Subnet("subnet2", { * subnetName: "acc-test-subnet-2", * cidrBlock: "172.16.2.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[1]?.id), * vpcId: fooVpc.id, * }); * const fooAlb: volcengine.alb.Alb[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooAlb.push(new volcengine.alb.Alb(`fooAlb-${range.value}`, { * addressIpVersion: "IPv4", * type: "private", * loadBalancerName: `acc-test-alb-private-${range.value}`, * description: "acc-test", * subnetIds: [ * subnet1.id, * subnet2.id, * ], * projectName: "default", * deleteProtection: "off", * tags: [{ * key: "k1", * value: "v1", * }], * })); * } * const fooAlbs = volcengine.alb.getAlbsOutput({ * ids: fooAlb.map(__item => __item.id), * }); * ``` */ export declare function getAlbs(args?: GetAlbsArgs, opts?: pulumi.InvokeOptions): Promise<GetAlbsResult>; /** * A collection of arguments for invoking getAlbs. */ export interface GetAlbsArgs { /** * The public ip address of the Alb. */ eipAddress?: string; /** * The private ip address of the Alb. */ eniAddress?: string; /** * A list of Alb IDs. */ ids?: string[]; /** * The name of the Alb. */ loadBalancerName?: string; /** * A Name Regex of Resource. */ nameRegex?: string; /** * File name where to save data source results. */ outputFile?: string; /** * The project of the Alb. */ project?: string; /** * Tags. */ tags?: inputs.alb.GetAlbsTag[]; /** * The type of the Alb. public: public network ALB. private: private network ALB. */ type?: string; /** * The vpc id which Alb belongs to. */ vpcId?: string; } /** * A collection of values returned by getAlbs. */ export interface GetAlbsResult { /** * The collection of query. */ readonly albs: outputs.alb.GetAlbsAlb[]; /** * The Eip address of the Alb. */ readonly eipAddress?: string; /** * The Eni address of the Alb in this availability zone. */ readonly eniAddress?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly ids?: string[]; /** * The name of the Alb. */ readonly loadBalancerName?: string; readonly nameRegex?: string; readonly outputFile?: string; readonly project?: string; /** * Tags. */ readonly tags?: outputs.alb.GetAlbsTag[]; /** * The total count of query. */ readonly totalCount: number; /** * The type of the Alb, valid value: `public`, `private`. */ readonly type?: string; /** * The vpc id of the Alb. */ readonly vpcId?: string; } /** * Use this data source to query detailed information of albs * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.alb.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const subnet1 = new volcengine.vpc.Subnet("subnet1", { * subnetName: "acc-test-subnet-1", * cidrBlock: "172.16.1.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const subnet2 = new volcengine.vpc.Subnet("subnet2", { * subnetName: "acc-test-subnet-2", * cidrBlock: "172.16.2.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[1]?.id), * vpcId: fooVpc.id, * }); * const fooAlb: volcengine.alb.Alb[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooAlb.push(new volcengine.alb.Alb(`fooAlb-${range.value}`, { * addressIpVersion: "IPv4", * type: "private", * loadBalancerName: `acc-test-alb-private-${range.value}`, * description: "acc-test", * subnetIds: [ * subnet1.id, * subnet2.id, * ], * projectName: "default", * deleteProtection: "off", * tags: [{ * key: "k1", * value: "v1", * }], * })); * } * const fooAlbs = volcengine.alb.getAlbsOutput({ * ids: fooAlb.map(__item => __item.id), * }); * ``` */ export declare function getAlbsOutput(args?: GetAlbsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetAlbsResult>; /** * A collection of arguments for invoking getAlbs. */ export interface GetAlbsOutputArgs { /** * The public ip address of the Alb. */ eipAddress?: pulumi.Input<string>; /** * The private ip address of the Alb. */ eniAddress?: pulumi.Input<string>; /** * A list of Alb IDs. */ ids?: pulumi.Input<pulumi.Input<string>[]>; /** * The name of the Alb. */ loadBalancerName?: pulumi.Input<string>; /** * A Name Regex of Resource. */ nameRegex?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * The project of the Alb. */ project?: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.alb.GetAlbsTagArgs>[]>; /** * The type of the Alb. public: public network ALB. private: private network ALB. */ type?: pulumi.Input<string>; /** * The vpc id which Alb belongs to. */ vpcId?: pulumi.Input<string>; }