@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
214 lines (213 loc) • 5.85 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 nat gateways
* ## 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 fooGateway: volcengine.nat.Gateway[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooGateway.push(new volcengine.nat.Gateway(`fooGateway-${range.value}`, {
* vpcId: fooVpc.id,
* subnetId: fooSubnet.id,
* spec: "Small",
* natGatewayName: `acc-test-ng-${range.value}`,
* description: "acc-test",
* billingType: "PostPaid",
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* }));
* }
* const fooGateways = volcengine.nat.getGatewaysOutput({
* ids: fooGateway.map(__item => __item.id),
* });
* ```
*/
export declare function getGateways(args?: GetGatewaysArgs, opts?: pulumi.InvokeOptions): Promise<GetGatewaysResult>;
/**
* A collection of arguments for invoking getGateways.
*/
export interface GetGatewaysArgs {
/**
* The description of the NatGateway.
*/
description?: string;
/**
* The list of NatGateway IDs.
*/
ids?: string[];
/**
* The Name Regex of NatGateway.
*/
nameRegex?: string;
/**
* The name of the NatGateway.
*/
natGatewayName?: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
/**
* The specification of the NatGateway.
*/
spec?: string;
/**
* The id of the Subnet.
*/
subnetId?: string;
/**
* Tags.
*/
tags?: inputs.nat.GetGatewaysTag[];
/**
* The id of the VPC.
*/
vpcId?: string;
}
/**
* A collection of values returned by getGateways.
*/
export interface GetGatewaysResult {
/**
* The description of the NatGateway.
*/
readonly description?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly ids?: string[];
readonly nameRegex?: string;
/**
* The name of the NatGateway.
*/
readonly natGatewayName?: string;
/**
* The collection of NatGateway query.
*/
readonly natGateways: outputs.nat.GetGatewaysNatGateway[];
readonly outputFile?: string;
/**
* The specification of the NatGateway.
*/
readonly spec?: string;
/**
* The ID of the Subnet.
*/
readonly subnetId?: string;
/**
* Tags.
*/
readonly tags?: outputs.nat.GetGatewaysTag[];
/**
* The total count of NatGateway query.
*/
readonly totalCount: number;
/**
* The ID of the VPC.
*/
readonly vpcId?: string;
}
/**
* Use this data source to query detailed information of nat gateways
* ## 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 fooGateway: volcengine.nat.Gateway[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* fooGateway.push(new volcengine.nat.Gateway(`fooGateway-${range.value}`, {
* vpcId: fooVpc.id,
* subnetId: fooSubnet.id,
* spec: "Small",
* natGatewayName: `acc-test-ng-${range.value}`,
* description: "acc-test",
* billingType: "PostPaid",
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* }));
* }
* const fooGateways = volcengine.nat.getGatewaysOutput({
* ids: fooGateway.map(__item => __item.id),
* });
* ```
*/
export declare function getGatewaysOutput(args?: GetGatewaysOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetGatewaysResult>;
/**
* A collection of arguments for invoking getGateways.
*/
export interface GetGatewaysOutputArgs {
/**
* The description of the NatGateway.
*/
description?: pulumi.Input<string>;
/**
* The list of NatGateway IDs.
*/
ids?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The Name Regex of NatGateway.
*/
nameRegex?: pulumi.Input<string>;
/**
* The name of the NatGateway.
*/
natGatewayName?: pulumi.Input<string>;
/**
* File name where to save data source results.
*/
outputFile?: pulumi.Input<string>;
/**
* The specification of the NatGateway.
*/
spec?: pulumi.Input<string>;
/**
* The id of the Subnet.
*/
subnetId?: pulumi.Input<string>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.nat.GetGatewaysTagArgs>[]>;
/**
* The id of the VPC.
*/
vpcId?: pulumi.Input<string>;
}