Consulte les tables de routage.
Cette API est obsolète. Nous recommandons de migrer vers Vpc(2016-04-28) - DescribeRouteTableList pour bénéficier de fonctionnalités améliorées et d'un support continu. L'API obsolète reste temporairement accessible, mais aucune mise à jour ni correction de bug ne sera fournie.
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:DescribeRouteTables |
list |
*RouteTable
|
|
Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Non |
L'identifiant de la région du VPC auquel appartient la table de routage. Vous pouvez appeler l'opération DescribeRegions pour obtenir l'identifiant de la région. |
ap-southeast-6 |
| VRouterId |
string |
Non |
L'identifiant du vRouter à interroger. Remarque
Vous devez spécifier au moins l'un des paramètres suivants : VRouterId, RouteTableId, RouterId et RouteTableName. Vous ne pouvez pas spécifier à la fois VRouterId et RouterId. |
vrt-bp1lhl0taikrteen**** |
| RouteTableId |
string |
Non |
L'identifiant de la table de routage à interroger. Remarque
Vous devez spécifier au moins l'un des paramètres suivants : VRouterId, RouteTableId, RouterId et RouteTableName. Vous ne pouvez pas spécifier à la fois VRouterId et RouterId. |
vtb-bp145q7glnuzdvzu2**** |
| RouterType |
string |
Non |
Le type de routeur auquel appartient la table de routage. Valeurs valides :
|
VRouter |
| RouterId |
string |
Non |
L'identifiant du routeur auquel appartient la table de routage. Remarque
Vous devez spécifier au moins l'un des paramètres suivants : VRouterId, RouteTableId, RouterId et RouteTableName. Vous ne pouvez pas spécifier à la fois VRouterId et RouterId. |
vrt-bp1lhl0taikrteen8**** |
| Type |
string |
Non |
Le type d'entrée de route à interroger. Valeurs valides :
|
Custom |
| RouteTableName |
string |
Non |
Le nom de la table de routage à interroger. Le nom doit comporter de 2 à 128 caractères et commencer par une lettre ou un caractère chinois. Il peut contenir des chiffres, des points (.), des traits de soulignement (_) et des traits d'union (-). Remarque
Vous devez spécifier au moins l'un des paramètres suivants : VRouterId, RouteTableId, RouterId et RouteTableName. Vous ne pouvez pas spécifier à la fois VRouterId et RouterId. |
doctest |
| ResourceGroupId |
string |
Non |
L'identifiant du groupe de ressources auquel appartient la table de routage. |
rg-acfmxazb4ph**** |
| 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 la pagination. Valeur maximale : 50. Valeur par défaut : 10. |
10 |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Le nombre d'entrées par page. |
||
| PageSize |
integer |
Le nombre d'entrées par page. |
10 |
| RequestId |
string |
L'identifiant de la requête. |
DC668356-BCB4-42FD-9BC3-FA2B2E04B634 |
| PageNumber |
integer |
Le numéro de page actuel. |
1 |
| TotalCount |
integer |
Le nombre total d'entrées renvoyées. |
1 |
| RouteTables |
object |
||
| RouteTable |
array<object> |
Les détails des tables de routage. |
|
|
array<object> |
L'heure de création de la table de routage. |
||
| CreationTime |
string |
The time when the route table was created. The time is displayed in UTC in the |
2022-08-22T10:40:25Z |
| Status |
string |
The status of the route table. Valid values:
|
Available |
| VRouterId |
string |
The ID of the vRouter. |
vrt-bp1lhl0taikrteen**** |
| RouteTableType |
string |
The type of the route table. Valid values:
|
Custom |
| ResourceGroupId |
string |
The ID of the resource group to which the route table belongs. |
rg-acfmxazb4ph**** |
| RouteTableId |
string |
The ID of the route table. |
vtb-bp145q7glnuzdvzu2**** |
| RouteEntrys |
object |
||
| RouteEntry |
array<object> |
The route entry information. |
|
|
array<object> |
The route entry information. |
||
| Type |
string |
The type of the route entry. Valid values:
|
Custom |
| Status |
string |
The status of the route entry. Valid values:
|
Available |
| NextHopType |
string |
The next hop type. Valid values:
|
Instance |
| RouteEntryName |
string |
The name of the route entry. The name must be 2 to 128 characters in length and must start with a letter or Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-). |
name |
| RouteEntryId |
string |
The ID of the route entry. |
rte-bp1mnnr2al0naomnp**** |
| InstanceId |
string |
The instance ID of the instance associated with the next hop. |
vpc-bp1t36rn9l53iwbsf**** |
| RouteTableId |
string |
The ID of the route table. |
vtb-bp15w5q90d2rk3bww**** |
| Description |
string |
The description of the route entry. The description must be 2 to 256 characters in length and must start with a letter or Chinese character. It cannot start with |
RouteEntryDescription |
| DestinationCidrBlock |
string |
The destination CIDR block of the route entry. Both IPv4 and IPv6 destination CIDR blocks are supported. The following requirements must be met:
|
192.168.2.0/24 |
| NextHops |
object |
||
| NextHop |
array<object> |
The next hop information. |
|
|
object |
The next hop information. |
||
| NextHopId |
string |
The instance ID of the next hop. |
vpn-bp10zyaph5cc8b7c7**** |
| Weight |
integer |
The weight of the route entry. |
100 |
| NextHopType |
string |
The next hop type. Valid values:
|
Instance |
| Enabled |
integer |
Indicates whether the route is available. Valid values:
|
1 |
| VSwitchIds |
object |
||
| VSwitchId |
array |
The vSwitch ID. |
|
|
string |
The vSwitch ID. |
vsw-bp12mw1f8k3jgygk9**** |
Exemples
JSON format
{
"PageSize": 10,
"RequestId": "DC668356-BCB4-42FD-9BC3-FA2B2E04B634",
"PageNumber": 1,
"TotalCount": 1,
"RouteTables": {
"RouteTable": [
{
"CreationTime": "2022-08-22T10:40:25Z",
"Status": "Available",
"VRouterId": "vrt-bp1lhl0taikrteen****",
"RouteTableType": "Custom",
"ResourceGroupId": "rg-acfmxazb4ph****",
"RouteTableId": "vtb-bp145q7glnuzdvzu2****",
"RouteEntrys": {
"RouteEntry": [
{
"Type": "Custom",
"Status": "Available",
"NextHopType": "Instance",
"RouteEntryName": "name",
"RouteEntryId": "rte-bp1mnnr2al0naomnp****",
"InstanceId": "vpc-bp1t36rn9l53iwbsf****",
"RouteTableId": "vtb-bp15w5q90d2rk3bww****",
"Description": "RouteEntryDescription",
"DestinationCidrBlock": "192.168.2.0/24",
"NextHops": {
"NextHop": [
{
"NextHopId": "vpn-bp10zyaph5cc8b7c7****",
"Weight": 100,
"NextHopType": "Instance",
"Enabled": 1
}
]
}
}
]
},
"VSwitchIds": {
"VSwitchId": [
"vsw-bp12mw1f8k3jgygk9****"
]
}
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidVRouterId.NotFound | Specified virtual router does not exist. | |
| 400 | OperationFailed.DescribeCenRoute | An error occurred while querying the CEN route entry. | CEN routes are abnormal. |
| 400 | OperationFailed.VRouterNotExist | Operation failed because the VRouter does not exist. | Operation failed because the VRouter does not exist. |
| 400 | IllegalParam.Type | The parameter of Type is illegal. | Illegal parameter Type. |
| 400 | OperationFailed.InvalidRouterType | The operation is failed because of %s. | Invalid router type. |
| 400 | InvalidParam.RouterInstanceOrRouterId | The parameters routerInstanceId and routerId are mutually exclusive. Please use either routerInstanceId alone, or routerType with routerId. | The request contains conflicting parameters. You need to provide only routerInstanceId, or both routerType and routerId. Please remove conflicting parameter combinations from the request. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.