Cria uma entrada de rota personalizada.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
ens:CreateEnsRouteEntry |
create |
*All Resource
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RouteTableId |
string |
Sim |
O ID da tabela de rotas à qual você deseja adicionar uma entrada de rota personalizada. |
vtb-bp1cifr72dioje82lse2j |
| DestinationCidrBlock |
string |
Sim |
O bloco CIDR de destino da entrada de rota personalizada. Certifique-se de que os seguintes requisitos sejam atendidos:\n\n- O bloco CIDR de destino não pode apontar para ou pertencer a 100.64.0.0/10.\n\n- Os blocos CIDR de destino das entradas de rota personalizadas na mesma tabela de rotas não podem se sobrepor.\n\n- 0.0.0.0/0 indica o bloco CIDR padrão. |
120.XXX.XXX.0/24 |
| NextHopType |
string |
Não |
O tipo de próximo salto da rota personalizada. Valores válidos:\n\n- Instance: uma instância ENS.\n\n- HaVip: um endereço IP virtual de alta disponibilidade (HAVIP).\n\n- NetworkPeer: conexão de emparelhamento de VPC. |
Instance |
| NextHopId |
string |
Sim |
O ID do próximo salto da entrada de rota personalizada. |
i-5vb7leks9z4mxy1ay258 |
| RouteEntryName |
string |
Não |
O nome da entrada de rota personalizada que você deseja adicionar. O nome deve ter de 1 a 128 caracteres. Não pode começar com http:// ou https://. |
test |
| Description |
string |
Não |
A descrição da entrada de rota personalizada. |
example |
| SourceCidrBlock |
string |
Não |
O bloco CIDR de origem está disponível quando você configura uma entrada de rota na tabela de rotas do gateway, mas não está disponível quando você configura uma entrada de rota na tabela de rotas do vSwitch. |
172.XXX.XXX.0/24 |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Esquema da resposta. |
||
| RequestId |
string |
O ID da solicitação. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| RouteEntryId |
string |
O ID da entrada de rota. |
rte-5vb5q8sk0lyoscx8539ds |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"RouteEntryId": "rte-5vb5q8sk0lyoscx8539ds"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | ens.interface.error | Failed to call API. | |
| 400 | InvalidRouteTableId.NotFound | Specified route table does not exist. | The routing table does not exist. |
| 400 | IncorrectStatus.Network | The status of the network is incorrect. | The status of the network is incorrect. |
| 400 | InvalidNetworkType.NotSupported | The specified network type does not supported. | The network type is not supported. |
| 400 | QuotaExceeded | Route entry quota exceeded in this route table. | The number of route entries in the routing table exceeds the limit. |
| 400 | InvalidRouteEntry.Duplicate | The route entry already exists. | The specified route entry already exists. |
| 400 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instance does not exist. |
| 400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | The format of the destination network segment is incorrect. |
| 400 | InvalidSourceCidrBlock.Malformed | Specified Source CIDR Block is not valid. | The format of the source network segment is incorrect. |
| 400 | InvalidSourceCidrBlock.NotSupported | The route table does not support the source CIDR block parameter. | The routing table does not support the source CIDR block parameter. |
| 400 | InvalidNextHopType.NotSupported | This next hop type is not supported. | This next hop type is not supported. |
| 400 | HaVipNotFound | The input parameter haVipId that is not found. | The specified HaVip does not exist. |
| 400 | IncorrectHaVipStatus | The status of the haVip is invalid. | HaVip status is incorrect |
| 400 | InstanceNotFound.NetworkPeerConnection | Network peer connection not found, please check the InstanceId. | The instance cannot be found, please check the instance ID. |
| 400 | IncorrectStatus.NetworkPeerConnection | The status of the network peer connection is incorrect. | The status of the network peer connection is incorrect. |
| 400 | IncorrectNetworkInterfaceStatus | The operation could not be completed because the status of the specified network interface is invalid for this action. | The operation could not be completed because the status of the specified network interface is invalid for this action. |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.