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.
-
Enterprise
Project stringId 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.
- 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.
-
Enterprise
Project stringId 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.
- 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.
-
enterprise
Project StringId 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.
- 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.
-
enterprise
Project stringId 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.
- {[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_ strid 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.
- 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.
-
enterprise
Project StringId 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.
- 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<Get
Vpcs Vpc> Indicates a list of all VPCs found. Structure is documented below.
- Cidr string
Indicates the cidr block of the VPC.
-
Enterprise
Project stringId 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.
- Dictionary<string, string>
Indicates the key/value pairs which associated with the VPC.
- Id string
Indicates the ID of the VPC.
- Region string
-
Vpcs
[]Get
Vpcs Vpc Indicates a list of all VPCs found. Structure is documented below.
- Cidr string
Indicates the cidr block of the VPC.
-
Enterprise
Project stringId 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.
- 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.
-
enterprise
Project StringId 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.
- Map<String,String>
Indicates the key/value pairs which associated with the VPC.
- id string
Indicates the ID of the VPC.
- region string
-
vpcs
Get
Vpcs Vpc[] Indicates a list of all VPCs found. Structure is documented below.
- cidr string
Indicates the cidr block of the VPC.
-
enterprise
Project stringId 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.
- {[key: string]: string}
Indicates the key/value pairs which associated with the VPC.
- id str
Indicates the ID of the VPC.
- region str
-
vpcs
Get
Vpcs Vpc] Indicates a list of all VPCs found. Structure is documented below.
- cidr str
Indicates the cidr block of the VPC.
-
enterprise_
project_ strid 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.
- 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.
-
enterprise
Project StringId 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.
- 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.
-
Enterprise
Project stringId 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.
- 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.
-
Enterprise
Project stringId 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.
- 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.
-
enterprise
Project StringId 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.
- 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.
-
enterprise
Project stringId 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.
- {[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_ strid 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.
- 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.
-
enterprise
Project StringId 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.
- 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.