Associa uma tabela de rotas personalizada a um vSwitch no mesmo VPC.
Descrição da operação
AssociateRouteTable é uma operação assíncrona. Após o envio de uma solicitação, o sistema retorna um ID de solicitação e executa a tarefa em segundo plano. Você pode chamar a operação DescribeVSwitchAttributes para consultar o status da tarefa:
Se o vSwitch estiver no estado Pending, a tabela de rotas está sendo associada ao vSwitch.
Se o vSwitch estiver no estado Available, a tabela de rotas foi associada ao vSwitch.
Experimente agora
Testar
Autorização RAM
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Sim |
O ID da região do VPC ao qual a tabela de rotas pertence. Você pode chamar a operação DescribeRegions para consultar a lista de regiões mais recente. |
cn-hangzhou |
| RouteTableId |
string |
Sim |
O ID da tabela de rotas. |
vtb-bp145q7glnuzdvzu2**** |
| VSwitchId |
string |
Sim |
O ID do vSwitch. |
vsw-25ncdvfaue4**** |
| ClientToken |
string |
Não |
O token do cliente usado para garantir a idempotência da solicitação. Você pode usar o cliente para gerar o token, mas deve garantir que o token seja único entre diferentes solicitações. O token pode conter apenas caracteres ASCII. Nota
Se você não especificar este parâmetro, o sistema usará automaticamente o ID da solicitação como o token do cliente. O ID da solicitação pode ser diferente para cada solicitação. |
02fb3da4-130e-11e9-8e44-0016e04115b |
| RegionId |
string |
Sim |
O ID da região do VPC ao qual a tabela de rotas pertence. Você pode chamar a operação DescribeRegions para consultar a lista de regiões mais recente. |
cn-hangzhou |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| RequestId |
string |
O ID da solicitação. |
DC668356-BCB4-42FD-9BC3-FA2B2E04B634 |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "DC668356-BCB4-42FD-9BC3-FA2B2E04B634"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | OperationDenied.CloudBoxVbrEntryExist | The operation is not allowed because the routing table has a route entry for the next hop to the cloud box VBR. | |
| 400 | OperationDenied.OtherCloudBoxVbrEntryExist | The operation is not allowed because the routing table has a route entry for the next hop that points to a VBR other than this cloud box. | |
| 400 | ResourceAlreadyAssociated.RouteTable | The resource has already associated with a routetable. | |
| 400 | OperationDenied.AssociateGatewayRouteTable | The operation is not allowed because gateway route tables cannot be bound to a vSwitch. | The vSwitch cannot be associated with a gateway route table. |
| 400 | OperationDenied.SwitchToSystemRouteTable | The associated route tables cannot be directly changed to system route tables. | Failed to switch from the associated route table to the system route table. |
| 400 | ResourceNotFound.VSwitch | The specified resource of VSwitch is not found. | The specified vSwitch does not exist. |
| 400 | InvalidRouteTableId.NotFound | Specified route table does not exist. | |
| 400 | OperationDenied.LocalRouteEntryModified | The next hop of a local route is modified. | The next hop of the local type route has been modified. |
| 400 | MissingParam.VSwitchId | The parameter VSwitchId is missing. | The parameter VSwitchId is missing. |
| 400 | InvalidRegionId.NotFound | Specified value of RegionId is not supported. | |
| 400 | InvalidParameter.Action | This vpc feature is not supported in this region | |
| 400 | IncorrectVSwitchStatus | The current status of the virtual switch does not support this operation. | |
| 400 | Forbidden.VSwitchAlreadyAssociatedRouteTable | The specified virtual switch already associates route table. | |
| 400 | Forbidden.NotInSameVpc | The specified virtual switch and route table are not in the same VPC. | |
| 400 | IncorrectStatus.RouteTable | The status of the specified route table is incorrect. | |
| 404 | InvalidRouteTableId.NotFound | Specified route table does not exist. | |
| 404 | InvalidVSwitchId.NotFound | Specified VSwitch does not exist. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.