title: "getVpcs" title_tag: "huaweicloud.Vpc.getVpcs" meta_desc: "Documentation for the huaweicloud.Vpc.getVpcs function with examples, input properties, output properties, and supporting types." layout: api no_edit_this_page: true


Use this data source to get a list of VPC.

Using getVpcs {#using}

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getVpcs(args: GetVpcsArgs, opts?: InvokeOptions): Promise<GetVpcsResult>
function getVpcsOutput(args: GetVpcsOutputArgs, opts?: InvokeOptions): Output<GetVpcsResult>
def get_vpcs(cidr: Optional[str] = None,
             enterprise_project_id: Optional[str] = None,
             id: Optional[str] = None,
             name: Optional[str] = None,
             region: Optional[str] = None,
             status: Optional[str] = None,
             tags: Optional[Mapping[str, str]] = None,
             opts: Optional[InvokeOptions] = None) -> GetVpcsResult
def get_vpcs_output(cidr: Optional[pulumi.Input[str]] = None,
             enterprise_project_id: Optional[pulumi.Input[str]] = None,
             id: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             region: Optional[pulumi.Input[str]] = None,
             status: Optional[pulumi.Input[str]] = None,
             tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetVpcsResult]
func GetVpcs(ctx *Context, args *GetVpcsArgs, opts ...InvokeOption) (*GetVpcsResult, error)
func GetVpcsOutput(ctx *Context, args *GetVpcsOutputArgs, opts ...InvokeOption) GetVpcsResultOutput

> Note: This function is named GetVpcs in the Go SDK.

public static class GetVpcs 
{
    public static Task<GetVpcsResult> InvokeAsync(GetVpcsArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcsResult> Invoke(GetVpcsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcsResult> getVpcs(GetVpcsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: huaweicloud:Vpc/getVpcs:getVpcs
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Cidr string

Specifies the cidr block of the desired VPC.

EnterpriseProjectId string

Specifies the enterprise project ID which the desired VPC belongs to.

Id string

Specifies the id of the desired VPC.

Name 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 (-).

Region string

Specifies the region in which to obtain the VPC. If omitted, the provider-level region will be used.

Status string

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

Tags Dictionary<string, string>

Specifies the included key/value pairs which associated with the desired VPC.

Cidr string

Specifies the cidr block of the desired VPC.

EnterpriseProjectId string

Specifies the enterprise project ID which the desired VPC belongs to.

Id string

Specifies the id of the desired VPC.

Name 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 (-).

Region string

Specifies the region in which to obtain the VPC. If omitted, the provider-level region will be used.

Status string

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

Tags map[string]string

Specifies the included key/value pairs which associated with the desired VPC.

cidr String

Specifies the cidr block of the desired VPC.

enterpriseProjectId String

Specifies the enterprise project ID which the desired VPC belongs to.

id String

Specifies the id of the desired VPC.

name 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 (-).

region String

Specifies the region in which to obtain the VPC. If omitted, the provider-level region will be used.

status String

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags Map<String,String>

Specifies the included key/value pairs which associated with the desired VPC.

cidr string

Specifies the cidr block of the desired VPC.

enterpriseProjectId string

Specifies the enterprise project ID which the desired VPC belongs to.

id string

Specifies the id of the desired VPC.

name 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 (-).

region string

Specifies the region in which to obtain the VPC. If omitted, the provider-level region will be used.

status string

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags {[key: string]: string}

Specifies the included key/value pairs which associated with the desired VPC.

cidr str

Specifies the cidr block of the desired VPC.

enterprise_project_id str

Specifies the enterprise project ID which the desired VPC belongs to.

id str

Specifies the id of the desired VPC.

name str

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 (-).

region str

Specifies the region in which to obtain the VPC. If omitted, the provider-level region will be used.

status str

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags Mapping[str, str]

Specifies the included key/value pairs which associated with the desired VPC.

cidr String

Specifies the cidr block of the desired VPC.

enterpriseProjectId String

Specifies the enterprise project ID which the desired VPC belongs to.

id String

Specifies the id of the desired VPC.

name 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 (-).

region String

Specifies the region in which to obtain the VPC. If omitted, the provider-level region will be used.

status String

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags Map<String>

Specifies the included key/value pairs which associated with the desired VPC.

getVpcs Result {#result}

The following output properties are available:

Id string

Indicates the ID of the VPC.

Region string
Vpcs List<GetVpcsVpc>

Indicates a list of all VPCs found. Structure is documented below.

Cidr string

Indicates the cidr block of the VPC.

EnterpriseProjectId string

Indicates the the enterprise project ID of the VPC.

Name string

Indicates the name of the VPC.

Status string

Indicates the current status of the VPC.

Tags Dictionary<string, string>

Indicates the key/value pairs which associated with the VPC.

Id string

Indicates the ID of the VPC.

Region string
Vpcs []GetVpcsVpc

Indicates a list of all VPCs found. Structure is documented below.

Cidr string

Indicates the cidr block of the VPC.

EnterpriseProjectId string

Indicates the the enterprise project ID of the VPC.

Name string

Indicates the name of the VPC.

Status string

Indicates the current status of the VPC.

Tags map[string]string

Indicates the key/value pairs which associated with the VPC.

id String

Indicates the ID of the VPC.

region String
vpcs List<Gets>

Indicates a list of all VPCs found. Structure is documented below.

cidr String

Indicates the cidr block of the VPC.

enterpriseProjectId String

Indicates the the enterprise project ID of the VPC.

name String

Indicates the name of the VPC.

status String

Indicates the current status of the VPC.

tags Map<String,String>

Indicates the key/value pairs which associated with the VPC.

id string

Indicates the ID of the VPC.

region string
vpcs GetVpcsVpc[]

Indicates a list of all VPCs found. Structure is documented below.

cidr string

Indicates the cidr block of the VPC.

enterpriseProjectId string

Indicates the the enterprise project ID of the VPC.

name string

Indicates the name of the VPC.

status string

Indicates the current status of the VPC.

tags {[key: string]: string}

Indicates the key/value pairs which associated with the VPC.

id str

Indicates the ID of the VPC.

region str
vpcs GetVpcsVpc]

Indicates a list of all VPCs found. Structure is documented below.

cidr str

Indicates the cidr block of the VPC.

enterprise_project_id str

Indicates the the enterprise project ID of the VPC.

name str

Indicates the name of the VPC.

status str

Indicates the current status of the VPC.

tags Mapping[str, str]

Indicates the key/value pairs which associated with the VPC.

id String

Indicates the ID of the VPC.

region String
vpcs List<Property Map>

Indicates a list of all VPCs found. Structure is documented below.

cidr String

Indicates the cidr block of the VPC.

enterpriseProjectId String

Indicates the the enterprise project ID of the VPC.

name String

Indicates the name of the VPC.

status String

Indicates the current status of the VPC.

tags Map<String>

Indicates the key/value pairs which associated with the VPC.

Supporting Types

GetVpcsVpc

Cidr string

Specifies the cidr block of the desired VPC.

Description string

Indicates the description of the VPC.

EnterpriseProjectId string

Specifies the enterprise project ID which the desired VPC belongs to.

Id string

Specifies the id of the desired VPC.

Name 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 (-).

Status string

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

Tags Dictionary<string, string>

Specifies the included key/value pairs which associated with the desired VPC.

Cidr string

Specifies the cidr block of the desired VPC.

Description string

Indicates the description of the VPC.

EnterpriseProjectId string

Specifies the enterprise project ID which the desired VPC belongs to.

Id string

Specifies the id of the desired VPC.

Name 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 (-).

Status string

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

Tags map[string]string

Specifies the included key/value pairs which associated with the desired VPC.

cidr String

Specifies the cidr block of the desired VPC.

description String

Indicates the description of the VPC.

enterpriseProjectId String

Specifies the enterprise project ID which the desired VPC belongs to.

id String

Specifies the id of the desired VPC.

name 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 (-).

status String

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags Map<String,String>

Specifies the included key/value pairs which associated with the desired VPC.

cidr string

Specifies the cidr block of the desired VPC.

description string

Indicates the description of the VPC.

enterpriseProjectId string

Specifies the enterprise project ID which the desired VPC belongs to.

id string

Specifies the id of the desired VPC.

name 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 (-).

status string

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags {[key: string]: string}

Specifies the included key/value pairs which associated with the desired VPC.

cidr str

Specifies the cidr block of the desired VPC.

description str

Indicates the description of the VPC.

enterprise_project_id str

Specifies the enterprise project ID which the desired VPC belongs to.

id str

Specifies the id of the desired VPC.

name str

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 (-).

status str

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags Mapping[str, str]

Specifies the included key/value pairs which associated with the desired VPC.

cidr String

Specifies the cidr block of the desired VPC.

description String

Indicates the description of the VPC.

enterpriseProjectId String

Specifies the enterprise project ID which the desired VPC belongs to.

id String

Specifies the id of the desired VPC.

name 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 (-).

status String

Specifies the current status of the desired VPC. The value can be CREATING, OK or ERROR.

tags Map<String>

Specifies the included key/value pairs which associated with the desired VPC.

Package Details

Repository
https://github.com/huaweicloud/pulumi-huaweicloud
License
Apache-2.0
Notes

This Pulumi package is based on the huaweicloud Terraform Provider.