Associa uma tabela de rotas personalizada a um vSwitch na mesma VPC.
Descrição da operação
A operação AssociateRouteTable é assíncrona. O sistema retorna um ID de solicitação, mas a tabela de rotas não é associada imediatamente. A tarefa de associação continua em segundo plano. Você pode chamar DescribeVSwitchAttributes para consultar o status de associação da tabela de rotas:\n- Se o vSwitch estiver no estado Pending, a tabela de rotas está sendo associada.\n- Se o vSwitch estiver no estado Available, a tabela de rotas foi associada com sucesso.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
vpc:AssociateRouteTable |
update |
*VSwitch
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Sim |
O ID da região da VPC à qual pertence a tabela de rotas a ser associada ao vSwitch.\n\nVocê pode chamar a operação DescribeRegions para consultar o ID da região. |
cn-hangzhou |
| RouteTableId |
string |
Sim |
O ID da tabela de rotas a ser associada ao vSwitch. |
vtb-bp145q7glnuzdvzu2**** |
| VSwitchId |
string |
Sim |
O ID do vSwitch a ser associado à tabela de rotas. |
vsw-25ncdvfaue4**** |
| ClientToken |
string |
Não |
O token de cliente usado para garantir a idempotência da solicitação.\n\nVocê pode gerar um valor de parâmetro em seu cliente para garantir que o valor seja exclusivo em diferentes solicitações. O parâmetro ClientToken aceita apenas caracteres ASCII.\n\n> Se você não especificar este parâmetro, o sistema usará automaticamente o RequestId da solicitação de API como o ClientToken. O RequestId de cada solicitação de API pode ser diferente. |
02fb3da4-130e-11e9-8e44-0016e04115b |
| RegionId |
string |
Sim |
O ID da região da VPC à qual pertence a tabela de rotas que você deseja associar a um vSwitch. Você pode chamar DescribeRegions para consultar o ID da região. |
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. | A operação especificada não é permitida porque a tabela de rotas contém uma entrada de rota cujo próximo salto aponta para um VBR do CloudBox. |
| 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. | A operação especificada não é permitida porque a tabela de rotas contém uma entrada de rota cujo próximo salto aponta para um VBR que não pertence a este CloudBox. |
| 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. | O vSwitch não pode ser associado a uma tabela de rotas de gateway. |
| 400 | OperationDenied.SwitchToSystemRouteTable | The associated route tables cannot be directly changed to system route tables. | Você não pode alternar diretamente a tabela de rotas associada para uma tabela de rotas do sistema. |
| 400 | ResourceNotFound.VSwitch | The specified resource of VSwitch is not found. | A instância de vSwitch especificada não existe. |
| 400 | InvalidRouteTableId.NotFound | Specified route table does not exist. | |
| 400 | OperationDenied.LocalRouteEntryModified | The next hop of a local route is modified. | O próximo salto de uma rota local não pode ser modificado. |
| 400 | MissingParam.VSwitchId | The parameter VSwitchId is missing. | O parâmetro VSwitchId está ausente. |
| 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.