@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
137 lines (136 loc) • 3.81 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { output as outputs } from "../types";
/**
* Use this data source to get a list of VPC.
*
* ## Example Usage
*
* An example filter by name and tag
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const config = new pulumi.Config();
* const vpcName = config.requireObject("vpcName");
* const vpc = huaweicloud.Vpc.getVpcs({
* name: vpcName,
* tags: {
* foo: "bar",
* },
* });
* export const vpcIds = [vpc.then(vpc => vpc.vpcs)].map(__item => __item?.id);
* ```
*/
export declare function getVpcs(args?: GetVpcsArgs, opts?: pulumi.InvokeOptions): Promise<GetVpcsResult>;
/**
* A collection of arguments for invoking getVpcs.
*/
export interface GetVpcsArgs {
/**
* Specifies the cidr block of the desired VPC.
*/
cidr?: string;
/**
* Specifies the enterprise project ID which the desired VPC belongs to.
*/
enterpriseProjectId?: string;
/**
* Specifies the id of the desired VPC.
*/
id?: string;
/**
* Specifies the name of the desired VPC. The value is a string of no more than 64 characters
* and can contain digits, letters, underscores (_) and hyphens (-).
*/
name?: string;
/**
* Specifies the region in which to obtain the VPC. If omitted, the provider-level region
* will be used.
*/
region?: string;
/**
* Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.
*/
status?: string;
/**
* Specifies the included key/value pairs which associated with the desired VPC.
*/
tags?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getVpcs.
*/
export interface GetVpcsResult {
/**
* The cidr block of the VPC.
*/
readonly cidr?: string;
/**
* The the enterprise project ID of the VPC.
*/
readonly enterpriseProjectId?: string;
/**
* The ID of the VPC.
*/
readonly id: string;
/**
* The name of the VPC.
*/
readonly name?: string;
readonly region: string;
/**
* The current status of the VPC.
*/
readonly status?: string;
/**
* The key/value pairs which associated with the VPC.
*/
readonly tags?: {
[key: string]: string;
};
/**
* The list of all VPCs found. Structure is documented below.
*/
readonly vpcs: outputs.Vpc.GetVpcsVpc[];
}
export declare function getVpcsOutput(args?: GetVpcsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetVpcsResult>;
/**
* A collection of arguments for invoking getVpcs.
*/
export interface GetVpcsOutputArgs {
/**
* Specifies the cidr block of the desired VPC.
*/
cidr?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID which the desired VPC belongs to.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the id of the desired VPC.
*/
id?: pulumi.Input<string>;
/**
* Specifies the name of the desired VPC. The value is a string of no more than 64 characters
* and can contain digits, letters, underscores (_) and hyphens (-).
*/
name?: pulumi.Input<string>;
/**
* Specifies the region in which to obtain the VPC. If omitted, the provider-level region
* will be used.
*/
region?: pulumi.Input<string>;
/**
* Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.
*/
status?: pulumi.Input<string>;
/**
* Specifies the included key/value pairs which associated with the desired VPC.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}