Chama a operação DescribeRouteTables para consultar tabelas de rotas.
Esta API foi descontinuada. Recomendamos migrar para Vpc(2016-04-28) - DescribeRouteTableList para funcionalidade aprimorada e suporte contínuo. Embora a API descontinuada permaneça temporariamente acessível, nenhuma atualização ou correção de bugs será fornecida.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
vpc:DescribeRouteTables |
list |
*RouteTable
|
|
Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Não |
O ID da região da VPC à qual a tabela de rotas pertence. Você pode chamar a operação DescribeRegions para consultar o ID da região. |
ap-southeast-6 |
| VRouterId |
string |
Não |
O ID do vRouter a ser consultado. Nota
Você deve especificar pelo menos um dos seguintes parâmetros: VRouterId, RouteTableId, RouterId e RouteTableName. Você não pode especificar VRouterId e RouterId ao mesmo tempo. |
vrt-bp1lhl0taikrteen**** |
| RouteTableId |
string |
Não |
O ID da tabela de rotas a ser consultada. Nota
Você deve especificar pelo menos um dos seguintes parâmetros: VRouterId, RouteTableId, RouterId e RouteTableName. Você não pode especificar VRouterId e RouterId ao mesmo tempo. |
vtb-bp145q7glnuzdvzu2**** |
| RouterType |
string |
Não |
O tipo do roteador ao qual a tabela de rotas pertence. Valores válidos:
|
VRouter |
| RouterId |
string |
Não |
O ID do roteador ao qual a tabela de rotas pertence. Nota
Você deve especificar pelo menos um dos seguintes parâmetros: VRouterId, RouteTableId, RouterId e RouteTableName. Você não pode especificar VRouterId e RouterId ao mesmo tempo. |
vrt-bp1lhl0taikrteen8**** |
| Type |
string |
Não |
O tipo de destino da rota a ser consultada. Valores válidos:
|
Custom |
| RouteTableName |
string |
Não |
O nome da tabela de rotas a ser consultada. O nome deve ter de 2 a 128 caracteres e deve começar com uma letra ou um caractere chinês. Pode conter dígitos, pontos (.), underscores (_) e hifens (-). Nota
Você deve especificar pelo menos um dos seguintes parâmetros: VRouterId, RouteTableId, RouterId e RouteTableName. Você não pode especificar VRouterId e RouterId ao mesmo tempo. |
doctest |
| ResourceGroupId |
string |
Não |
O ID do grupo de recursos ao qual a tabela de rotas pertence. |
rg-acfmxazb4ph**** |
| PageNumber |
integer |
Não |
O número da página. Valor padrão: 1. |
1 |
| PageSize |
integer |
Não |
O número de entradas por página durante a paginação. Valor máximo: 50. Valor padrão: 10. |
10 |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
O número de entradas por página. |
||
| PageSize |
integer |
O número de entradas por página. |
10 |
| RequestId |
string |
O ID da solicitação. |
DC668356-BCB4-42FD-9BC3-FA2B2E04B634 |
| PageNumber |
integer |
O número da página atual. |
1 |
| TotalCount |
integer |
O número total de entradas retornadas. |
1 |
| RouteTables |
object |
||
| RouteTable |
array<object> |
Os detalhes das tabelas de rotas. |
|
|
array<object> |
A hora em que a tabela de rotas foi criada. |
||
| 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 information. |
|
|
array<object> |
The route information. |
||
| Type |
string |
The destination type of the route. Valid values:
|
Custom |
| Status |
string |
The status of the route. Valid values:
|
Available |
| NextHopType |
string |
The next hop type. Valid values:
|
Instance |
| RouteEntryName |
string |
The name of the route. The name must be 2 to 128 characters in length and must start with a letter or a Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-). |
name |
| RouteEntryId |
string |
The ID of the route. |
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.
The description must be 2 to 256 characters in length and must start with a letter or a Chinese character. It cannot start with |
RouteEntryDescription |
| DestinationCidrBlock |
string |
The destination CIDR block of the route. 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. |
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**** |
Exemplos
Resposta de sucesso
JSON formato
{
"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****"
]
}
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 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. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.