@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
219 lines (218 loc) • 6.13 kB
TypeScript
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),
* });
* ```
*/
/** @deprecated volcengine.alb.Albs has been deprecated in favor of volcengine.alb.getAlbs */
export declare function albs(args?: AlbsArgs, opts?: pulumi.InvokeOptions): Promise<AlbsResult>;
/**
* A collection of arguments for invoking Albs.
*/
export interface AlbsArgs {
/**
* 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.AlbsTag[];
/**
* The vpc id which Alb belongs to.
*/
vpcId?: string;
}
/**
* A collection of values returned by Albs.
*/
export interface AlbsResult {
/**
* The collection of query.
*/
readonly albs: outputs.alb.AlbsAlb[];
/**
* 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.AlbsTag[];
/**
* The total count of query.
*/
readonly totalCount: number;
/**
* 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),
* });
* ```
*/
/** @deprecated volcengine.alb.Albs has been deprecated in favor of volcengine.alb.getAlbs */
export declare function albsOutput(args?: AlbsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<AlbsResult>;
/**
* A collection of arguments for invoking Albs.
*/
export interface AlbsOutputArgs {
/**
* 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.AlbsTagArgs>[]>;
/**
* The vpc id which Alb belongs to.
*/
vpcId?: pulumi.Input<string>;
}