Queries created virtual private clouds (VPCs).
Syntax
{
"Type": "DATASOURCE::VPC::Vpcs",
"Properties": {
"IsDefault": Boolean,
"DhcpOptionsSetId": String,
"ResourceGroupId": String,
"VpcIds": List,
"VpcName": String,
"VpcOwnerId": String,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
IsDefault |
Boolean |
No |
Yes |
Whether to query the default VPC in the region where the stack is deployed. |
Valid values:
|
|
DhcpOptionsSetId |
String |
No |
Yes |
The ID of the Dynamic Host Configuration Protocol (DHCP) options set. |
None. |
|
ResourceGroupId |
String |
No |
Yes |
The ID of the resource group to which the VPC belongs. |
None. |
|
VpcIds |
List |
No |
Yes |
The IDs of VPCs. |
You can specify up to 20 IDs. |
|
VpcName |
String |
No |
Yes |
The VPC name. |
None. |
|
VpcOwnerId |
String |
No |
Yes |
The ID of the Alibaba Cloud account to which the VPC belongs. |
None. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
Return values (Fn::GetAtt)
-
VpcIds: the IDs of the VPCs.
-
Vpcs: details of the VPCs.
|
Property |
Type |
Description |
Constraint |
|
VpcIds |
List |
The IDs of VPCs. |
Example: |
|
Vpcs |
List |
Details of the VPCs. |
None. |
|
Status |
String |
The status of the VPC. |
Valid values:
|
|
VpcId |
String |
The VPC ID. |
Example: vpc-bp1qpo0kug3a20qqe****. |
|
IsDefault |
Boolean |
Whether the VPC is the default VPC in the region. |
Valid values:
|
|
OwnerId |
String |
The ID of the Alibaba Cloud account to which the VPC belongs. |
None. |
|
VpcName |
String |
The name of the VPC. |
None. |
|
VRouterId |
String |
The ID of the vRouter automatically created after the VPC is created. |
Example: vrt-bp1jcg5cmxjbl9xgc****. |
|
DhcpOptionsSetStatus |
String |
The status of the DHCP options set. |
Valid values:
|
|
CidrBlock |
String |
The IPv4 CIDR block of the VPC. |
None. |
|
Description |
String |
The description of the VPC. |
None. |
|
ResourceGroupId |
String |
The ID of the resource group to which the VPC belongs. |
Example: |
|
DhcpOptionsSetId |
String |
The ID of the DHCP options set. |
Example: |
|
Ipv6CidrBlock |
String |
The IPv6 CIDR block of the VPC. |
None. |
|
CenStatus |
String |
The status of the CEN instance to which the VPC is attached. |
Attached is returned, indicating that the VPC is attached to a CEN instance. Returned only when the VPC is attached to a CEN instance. |
|
Tags |
List |
The tags of the VPC. |
Example:
|
|
Ipv6CidrBlocks |
List |
The IPv6 CIDR blocks of the VPC. |
None. |
|
VSwitchIds |
List |
The IDs of vSwitches. |
Example: |
|
SecondaryCidrBlocks |
List |
The secondary IPv4 CIDR blocks of the VPC. |
None. |
|
UserCidrs |
List |
The user CIDR blocks of the VPC. |
Example: |
|
NatGatewayIds |
List |
The IDs of NAT gateways. |
Example: |
|
RouterTableIds |
List |
The IDs of the route tables. |
Example: |
Examples
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"VpcName": {
"Type": "String",
"Description": "The name of the VPC.",
"Default": "TestVpc"
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::VPC::Vpcs",
"Properties": {
"VpcName": {
"Ref": "VpcName"
}
}
}
},
"Outputs": {
"Vpcs": {
"Description": "The detailed information about the VPCs.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Vpcs"
]
}
},
"VpcIds": {
"Description": "The list of The VPC IDs.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"VpcIds"
]
}
}
}
}