Consulte les informations de mise en réseau. La mise en réseau interne est assurée par vSwitch.
Description de l'opération
L'opération DescribeVSwitches peut renvoyer le code d'erreur Throttling.DeepPageSkip lors de paginations profondes ou de sauts de page fréquents. Réduisez la fréquence des requêtes ou utilisez une pagination séquentielle.
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:DescribeVSwitches |
list |
*VSwitch
|
|
Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| VpcId |
string |
Non |
L'identifiant du VPC auquel appartiennent les vSwitchs que vous souhaitez interroger. |
vpc-25cdvfeq58pl**** |
| VSwitchId |
string |
Non |
L'identifiant du vSwitch que vous souhaitez interroger. |
vsw-23dscddcffvf3**** |
| ZoneId |
string |
Non |
L'identifiant de la zone à laquelle le vSwitch appartient. Vous pouvez appeler l'opération DescribeZones pour obtenir l'identifiant de la zone. |
cn-hangzhou-d |
| RegionId |
string |
Non |
L'identifiant de la région à laquelle le vSwitch appartient. Vous pouvez appeler l'opération DescribeRegions pour obtenir l'identifiant de la région. |
cn-hangzhou |
| VSwitchName |
string |
Non |
Le nom du vSwitch. |
vSwitch |
| DryRun |
boolean |
Non |
Indique si un test à blanc doit être effectué. Valeurs valides : |
true |
| IsDefault |
boolean |
Non |
Indique si le vSwitch par défaut de la région spécifiée doit être interrogé. Valeurs valides : |
true |
| RouteTableId |
string |
Non |
L'identifiant de la table de routage. |
vtb-bp145q7glnuzdvzu2**** |
| ResourceGroupId |
string |
Non |
L'identifiant du groupe de ressources auquel le vSwitch appartient. |
rg-bp67acfmxazb4ph**** |
| PageNumber |
integer |
Non |
Le numéro de page. Valeur par défaut : 1. |
1 |
| PageSize |
integer |
Non |
Le nombre d'entrées par page pour les requêtes paginées. Valeur maximale : 50. Valeur par défaut : 10. |
10 |
| VSwitchOwnerId |
integer |
Non |
L'identifiant du compte Alibaba Cloud propriétaire de la ressource. |
2546073170691**** |
| EnableIpv6 |
boolean |
Non |
Indique si les vSwitchs pour lesquels les blocs CIDR IPv6 sont activés dans la région spécifiée doivent être interrogés. Valeurs valides : |
false |
| Tag |
array<object> |
Non |
Les balises de la ressource. |
|
|
object |
Non |
La balise. |
||
| Key |
string |
Non |
La clé de balise de la ressource. Vous pouvez spécifier jusqu'à 20 clés de balise. La clé de balise ne peut pas être une chaîne vide. |
FinanceDept |
| Value |
string |
Non |
La valeur de balise de la ressource. Vous pouvez spécifier jusqu'à 20 valeurs de balise. La valeur de balise peut être une chaîne vide. |
FinanceJoshua |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| PageSize |
integer |
Le nombre d'entrées par page. |
10 |
| RequestId |
string |
L'identifiant de la requête. |
9A572171-4E27-40D1-BD36-D26C9E71E29E |
| PageNumber |
integer |
Le numéro de page. |
1 |
| TotalCount |
integer |
Le nombre total d'entrées renvoyées. |
1 |
| VSwitches |
object |
||
| VSwitch |
array<object> |
Les détails des vSwitch. |
|
|
array<object> |
La structure du vSwitch. |
||
| VpcId |
string |
The ID of the VPC to which the vSwitch belongs. |
vpc-257gcdcdq64**** |
| Status |
string |
The status of the vSwitch. Valid values:
|
Available |
| CreationTime |
string |
The time when the vSwitch was created. |
2022-01-18T12:43:57Z |
| IsDefault |
boolean |
Indicates whether the vSwitch is the default vSwitch. Valid values:
|
true |
| AvailableIpAddressCount |
integer |
The number of available IP addresses in the vSwitch. |
1 |
| NetworkAclId |
string |
The ID of the network ACL. |
nacl-a2do9e413e0spzasx**** |
| OwnerId |
integer |
The Alibaba Cloud account ID of the resource ownership. |
25346073170691**** |
| VSwitchId |
string |
The ID of the vSwitch. |
vsw-25bcdxs7pv1**** |
| CidrBlock |
string |
The IPv4 CIDR block of the vSwitch. |
172.16.0.0/24 |
| Description |
string |
The description of the vSwitch. |
VSwitchDescription |
| ResourceGroupId |
string |
The ID of the resource group to which the vSwitch belongs. |
rg-acfmxazb4ph6aiy**** |
| ZoneId |
string |
The zone to which the vSwitch belongs. |
cn-hangzhou-d |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the vSwitch. |
2408:4002:10c4:4e03::/64 |
| VSwitchName |
string |
The name of the vSwitch. |
vSwitch |
| ShareType |
string |
The sharing type of the vSwitch.
|
Shared |
| EnabledIpv6 |
boolean |
Indicates whether the IPv6 CIDR block is enabled for the vSwitch. Valid values:
|
true |
| Tags |
object |
||
| Tag |
array<object> |
The tag information of the vSwitch. |
|
|
object |
The tag information struct. |
||
| Key |
string |
The tag key bound to the vSwitch. |
department |
| Value |
string |
The tag value bound to the vSwitch. |
dev |
| RouteTable |
object |
The route table information. |
|
| RouteTableId |
string |
The ID of the route table associated with the vSwitch. |
vrt-bp145q7glnuzdv**** |
| RouteTableType |
string |
The type of the route table associated with the vSwitch. Valid values:
|
System |
Exemples
JSON format
{
"PageSize": 10,
"RequestId": "9A572171-4E27-40D1-BD36-D26C9E71E29E",
"PageNumber": 1,
"TotalCount": 1,
"VSwitches": {
"VSwitch": [
{
"VpcId": "vpc-257gcdcdq64****",
"Status": "Available",
"CreationTime": "2022-01-18T12:43:57Z",
"IsDefault": true,
"AvailableIpAddressCount": 1,
"NetworkAclId": "nacl-a2do9e413e0spzasx****",
"OwnerId": 0,
"VSwitchId": "vsw-25bcdxs7pv1****",
"CidrBlock": "172.16.0.0/24",
"Description": "VSwitchDescription",
"ResourceGroupId": "rg-acfmxazb4ph6aiy****",
"ZoneId": "cn-hangzhou-d",
"Ipv6CidrBlock": "2408:4002:10c4:4e03::/64",
"VSwitchName": "vSwitch",
"ShareType": "Shared",
"EnabledIpv6": true,
"Tags": {
"Tag": [
{
"Key": "department",
"Value": "dev"
}
]
},
"RouteTable": {
"RouteTableId": "vrt-bp145q7glnuzdv****",
"RouteTableType": "System"
}
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | Forbidden.VpcNotFound | Specified VPC can not found. | |
| 400 | InvalidTagKey | The tag keys are not valid. | |
| 400 | InvalidTagValue | The tag values are not valid. | |
| 400 | IellgalParameter.OwnerAccount | The specified parameter OwnerAccount is not valid. | |
| 400 | IllegalParam.OwnerId | The specified parameter VSwitchOwnerId is not valid. | |
| 400 | InvalidVpcIdNumber.NotSupported | The number of vpcIds exceeds the limit. | |
| 400 | InvalidVSwitchIdNumber.NotSupported | The number of vSwitchIds exceeds the limit. | |
| 400 | Throttling.DeepPageSkip | Deep page skip throttled. Please reduce the page skip frequency or use sequential pagination. | |
| 404 | InvalidVSwitchId.NotFound | VSwitch not exist. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.