Consulte la configuration d'un cloud privé virtuel (VPC).
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
vpc:DescribeVpcAttribute |
get |
*VPC
|
|
Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| VpcId |
string |
Oui |
L'identifiant du VPC que vous souhaitez interroger. |
vpc-bp18sth14qii3pnv**** |
| RegionId |
string |
Oui |
L'identifiant de la région où le VPC est déployé. |
cn-hangzhou |
| DryRun |
boolean |
Non |
Indique si un test à blanc uniquement doit être effectué, sans exécuter la requête réelle. Valeurs valides : |
false |
| IsDefault |
boolean |
Non |
Indique si le VPC est le VPC par défaut. Valeurs valides : |
false |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Heure de création du VPC. |
||
| CreationTime |
string |
L'heure à laquelle le VPC a été créé. |
2021-10-16T07:31:09Z |
| Status |
string |
L'état du VPC. Valeurs valides : |
Available |
| VpcId |
string |
L'identifiant du VPC. |
vpc-bp18sth14qii3pnvo**** |
| IsDefault |
boolean |
Indique si le VPC est le VPC par défaut. Valeurs valides : |
false |
ClassicLinkEnabled
deprecated
|
boolean |
Indique si la fonctionnalité ClassicLink est activée. Valeurs valides : |
false |
| OwnerId |
integer |
L'identifiant du compte Alibaba Cloud auquel le VPC appartient. |
28311773240248**** |
| RegionId |
string |
L'identifiant de la région à laquelle le VPC appartient. |
cn-hangzhou |
| VpcName |
string |
Le nom du VPC. |
doctest2 |
| VRouterId |
string |
L'identifiant du vRouter qui appartient au VPC. |
vrt-bp1jso6ng1at0ajsc**** |
| DhcpOptionsSetStatus |
string |
L'état du jeu d'options DHCP. Valeurs valides : |
Available |
| CidrBlock |
string |
Le bloc CIDR IPv4 du VPC. |
192.168.0.0/16 |
| RequestId |
string |
L'identifiant de la requête. |
7486AE4A-129D-43DB-A714-2432C074BA04 |
| Description |
string |
La description du VPC. |
VPC |
| ResourceGroupId |
string |
L'identifiant du groupe de ressources. |
rg-acfmxazbvgb4ph**** |
| DhcpOptionsSetId |
string |
L'identifiant du jeu d'options DHCP. |
dopt-o6w0df4epg9zo8isy**** |
| Ipv6CidrBlock |
string |
Le bloc CIDR IPv6 du VPC. |
2408:XXXX:0:a600::/56 |
| VSwitchIds |
object |
||
| VSwitchId |
array |
La liste des vSwitches déployés dans le VPC. |
|
|
string |
La liste des vSwitches déployés dans le VPC. |
{"VSwitchId": [ "vsw-bp14cagpfysr29feg****" ]} |
|
| UserCidrs |
object |
||
| UserCidr |
array |
Le bloc CIDR utilisateur. Plusieurs blocs CIDR sont séparés par des virgules (,). Trois blocs CIDR au maximum sont renvoyés. |
|
|
string |
Le bloc CIDR utilisateur. Plusieurs blocs CIDR sont séparés par des virgules (,). Trois blocs CIDR au maximum sont renvoyés. |
172.16.0.1/24 |
|
| SecondaryCidrBlocks |
object |
||
| SecondaryCidrBlock |
array |
Le bloc CIDR IPv4 secondaire du VPC. |
|
|
string |
Le bloc CIDR IPv4 secondaire du VPC. |
192.168.0.0/16 |
|
| AssociatedCens |
object |
||
| AssociatedCen |
array<object> |
La liste des instances Cloud Enterprise Network (CEN) auxquelles le VPC est rattaché. |
|
|
object |
L'identifiant du compte auquel le Cloud Enterprise Network (CEN) appartient. |
||
| CenOwnerId |
integer |
The ID of the account to which the CEN instance belongs. |
28311773240248**** |
| CenId |
string |
The instance ID of the CEN instance attached to the VPC. |
cen-7qthudw0ll6jmc**** |
| CenStatus |
string |
The status of the CEN instance associated with the VPC. Attached is returned only when the VPC is associated with a CEN instance. |
Attached |
| CloudResources |
object |
||
| CloudResourceSetType |
array<object> |
Les ressources dans le VPC. |
|
|
object |
Le nombre de ressources dans le VPC. |
||
| ResourceCount |
integer |
The resource count in the VPC. |
1 |
| ResourceType |
string |
The type of resource in the VPC. Valid values:
|
VSwitch |
| Ipv6CidrBlocks |
object |
||
| Ipv6CidrBlock |
array<object> |
Le bloc CIDR IPv6 du VPC. |
|
|
object |
|||
| Ipv6Isp |
string |
The type of the IPv6 CIDR block of the VPC. Valid values:
Remarque
If you are a user who has the single-ISP bandwidth whitelist enabled, this field can be set to ChinaTelecom (China Telecom), ChinaUnicom (China Unicom), or ChinaMobile (China Mobile). |
BGP |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the VPC. |
2408:XXXX:0:6a::/56 |
| SupportIpv4Gateway |
boolean |
Indique si le VPC prend en charge les passerelles IPv4. |
true |
| Ipv4GatewayId |
string |
L'identifiant de la passerelle IPv4. |
ipv4gw-5tsnc6s4ogsedtp3k**** |
| Tags |
object |
||
| Tag |
array<object> |
Les informations sur les balises. |
|
|
object |
Les balises. |
||
| Key |
string |
The tag key. |
FinanceDept |
| Value |
string |
The tag value. |
FinanceJoshua |
| AssociatedPropagationSources |
object |
||
| AssociatedPropagationSources |
array<object> |
La source de route associée au VPC. |
|
|
object |
|||
| SourceType |
string |
The type of the propagation source. Valid values:
|
CEN |
| SourceOwnerId |
integer |
The ID of the account to which the propagation source belongs. |
153980532164**** |
| SourceInstanceId |
string |
The instance ID of the propagation source. |
cen-dc4vwznpwbobrl**** |
| Status |
string |
The binding status. Valid values:
|
Attaching |
| RoutePropagated |
boolean |
Indicates whether routes are propagated to this VPC. |
true |
| EnabledIpv6 |
boolean |
Indique si l'IPv6 est activé sur le VPC. Valeurs valides :
|
false |
| DnsHostnameStatus |
string |
Indique si le nom d'hôte DNS est activé. |
DISABLED |
Exemples
JSON format
{
"CreationTime": "2021-10-16T07:31:09Z",
"Status": "Available",
"VpcId": "vpc-bp18sth14qii3pnvo****",
"IsDefault": false,
"ClassicLinkEnabled": false,
"OwnerId": 0,
"RegionId": "cn-hangzhou",
"VpcName": "doctest2",
"VRouterId": "vrt-bp1jso6ng1at0ajsc****",
"DhcpOptionsSetStatus": "Available",
"CidrBlock": "192.168.0.0/16",
"RequestId": "7486AE4A-129D-43DB-A714-2432C074BA04",
"Description": "VPC",
"ResourceGroupId": "rg-acfmxazbvgb4ph****",
"DhcpOptionsSetId": "dopt-o6w0df4epg9zo8isy****",
"Ipv6CidrBlock": "2408:XXXX:0:a600::/56",
"VSwitchIds": {
"VSwitchId": [
"{\"VSwitchId\": [ \"vsw-bp14cagpfysr29feg****\" ]}"
]
},
"UserCidrs": {
"UserCidr": [
"172.16.0.1/24"
]
},
"SecondaryCidrBlocks": {
"SecondaryCidrBlock": [
"192.168.0.0/16"
]
},
"AssociatedCens": {
"AssociatedCen": [
{
"CenOwnerId": 0,
"CenId": "cen-7qthudw0ll6jmc****",
"CenStatus": "Attached"
}
]
},
"CloudResources": {
"CloudResourceSetType": [
{
"ResourceCount": 1,
"ResourceType": "VSwitch"
}
]
},
"Ipv6CidrBlocks": {
"Ipv6CidrBlock": [
{
"Ipv6Isp": "BGP",
"Ipv6CidrBlock": "2408:XXXX:0:6a::/56"
}
]
},
"SupportIpv4Gateway": true,
"Ipv4GatewayId": "ipv4gw-5tsnc6s4ogsedtp3k****",
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
},
"AssociatedPropagationSources": {
"AssociatedPropagationSources": [
{
"SourceType": "CEN",
"SourceOwnerId": 0,
"SourceInstanceId": "cen-dc4vwznpwbobrl****",
"Status": "Attaching",
"RoutePropagated": true
}
]
},
"EnabledIpv6": false,
"DnsHostnameStatus": "DISABLED"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | IncorrectVpcStatus | Current VPC status does not support this operation. | |
| 400 | Forbidden.VpcNotFound | Specified VPC does not exist. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 404 | InvalidVpcId.NotFound | Specified VPC does not exist. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.