Chama a operação DeleteRouteEntry para excluir uma rota da tabela de rotas de um vRouter ou Virtual Border Router (VBR).
Descrição da operação
Ao chamar esta operação para excluir uma rota, observe os seguintes itens:
-
Somente rotas no estado Available podem ser excluídas.
-
Uma rota não pode ser excluída se a VPC que contém a tabela de rotas estiver criando ou excluindo um vSwitch ou uma rota.
-
Para excluir uma rota da tabela de rotas de um VBR, chame a operação DescribeRouteEntryList para consultar o NextHopId da rota que você deseja excluir e, em seguida, chame esta operação para excluir a rota.
-
A operação DeleteRouteEntry é assíncrona. Depois de enviar uma solicitação, o sistema retorna um ID de solicitação, mas a rota ainda não foi excluída. A tarefa de exclusão é executada em segundo plano. Você pode chamar DescribeRouteEntryList para consultar o status de exclusão da rota:
Se a rota estiver no estado Deleting, a rota está sendo excluída.
Se a rota especificada não puder ser encontrada, a rota foi excluída.
-
A operação DeleteRouteEntry não oferece suporte à exclusão simultânea de rotas da tabela de rotas dentro da mesma VPC ou VBR.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
vpc:DeleteRouteEntry |
delete |
*RouteTable
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Não |
O ID da região onde a tabela de rotas reside. Você pode chamar a operação DescribeRegions para consultar o ID da região. |
cn-hangzhou |
| RouteTableId |
string |
Não |
O ID da tabela de rotas que contém a rota. Nota
Se o parâmetro RouteEntryId não for especificado, os parâmetros DestinationCidrBlock e RouteTableId serão obrigatórios. Configure o parâmetro NextHopId ou NextHopList conforme necessário. |
vtb-2ze3jgygk9bmsj23s**** |
| RouteEntryId |
string |
Não |
O ID da rota que você deseja excluir. Este parâmetro é mutuamente exclusivo com o parâmetro DestinationCidrBlock. Nota
Se o parâmetro DestinationCidrBlock não for especificado, o parâmetro RouteEntryId será obrigatório. |
rte-bp1mnnr2al0naomnpv**** |
| DestinationCidrBlock |
string |
Não |
O bloco CIDR de destino da rota. Há suporte para blocos CIDR IPv4, blocos CIDR IPv6, blocos CIDR de lista de prefixos e IDs de instância de lista de prefixos. Este parâmetro é mutuamente exclusivo com o parâmetro RouteEntryId. Nota
Se o parâmetro RouteEntryId não for especificado, os parâmetros DestinationCidrBlock e RouteTableId serão obrigatórios. Configure o parâmetro NextHopId ou NextHopList conforme necessário. |
47.100.XX.XX/16 |
| NextHopId |
string |
Não |
O ID da instância do próximo salto.
|
ri-2zeo3xzyf38r4urzd**** |
| NextHopList |
array<object> |
Não |
As informações sobre as instâncias do próximo salto da rota ECMP. Há suporte para no máximo 16 instâncias de próximo salto. |
|
|
object |
Não |
As informações sobre as instâncias do próximo salto da rota ECMP. Há suporte para no máximo 16 instâncias de próximo salto. |
||
| NextHopId |
string |
Não |
O ID da instância do próximo salto da rota ECMP. Há suporte para no máximo 16 instâncias de próximo salto. |
ri-2zeo3xzyf38r43cd**** |
| NextHopType |
string |
Não |
O tipo do próximo salto da rota ECMP. Defina o valor como RouterInterface (interface de roteador). Há suporte para no máximo 16 instâncias de próximo salto. |
RouterInterface |
| DryRun |
boolean |
Não |
Especifica se deve ser realizado um dry run. Valores válidos: true: realiza um dry run sem excluir a rota. O sistema verifica o par de AccessKey, a autorização do usuário do Resource Access Management (RAM) e os parâmetros obrigatórios. Se a verificação falhar, o erro correspondente será retornado. Se a verificação for bem-sucedida, o código de erro false (padrão): envia uma solicitação normal. Após a verificação ser bem-sucedida, um código de status HTTP 2xx é retornado e a rota é excluída. |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os parâmetros de resposta. |
||
| RequestId |
string |
O ID da solicitação. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | MissingParameter | Miss mandatory parameter. | |
| 400 | IncorrcetRouteEntryStatus | Some route entry status blocked this operation. | |
| 400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | |
| 400 | OperationDenied | Specified operation is denied as route entry type is system. | |
| 400 | InvalidRouteEntry.NotFound | Route entry not exists. | |
| 400 | InvalidVRouter.NotFound | vRouter not exists. | |
| 400 | IncorrectRouteEntryStatus | Some route entry status blocked this operation. | |
| 400 | Forbbiden | Specified RouteEntry cannot allowed delete by openApi. | |
| 400 | InvalidNextHop | Specified nexthop and nexthop list cannot both null. | |
| 400 | InvalidRouteEntry | Specified routeEntry not exist. | |
| 400 | Forbidden.VRouterNotFound | pecified virtual switch is not found during access authentication. | |
| 400 | TaskConflict | The operation is too frequent, TaskConflict. | The system is unavailable. Try again later. |
| 400 | InvalidRouteEntryId.NotFound | Specified RouteEntryId does not exist. | The specified route is not found. |
| 400 | IncorrectVpcStatus | Current VPC status does not support this operation. | |
| 400 | InvalidVpnInstanceId.NotFound | %s | |
| 400 | ParamExclusive.RouteEntryIdAndRouteTableIdOrDestCidrBlock | %s | |
| 400 | InvalidNextHopList.Size | Nexthop list size should be between 2 and 16 | |
| 400 | ParamExclusive.NextHopIdAndList | NextHopId and NextHopList cannot both be not null. | |
| 400 | OperationFailed.DeleteMultiScopeEntry | Multi or ecmp scope must delete with force. | |
| 400 | OperationFailed.DistibuteLock | Distibute lock fail. | The operation is locked by another request; |
| 400 | OperationDenied.DeleteManagedRouteEntry | The operation is not allowed because of route entry is managed. | You cannot delete hosted routes. |
| 400 | OperationDenied.RouteTableTypeNotPermitted | The operation is not allowed because the type of route table is not permitted. | You cannot create routes for route tables of the specified type. |
| 400 | IncorrectStatus.VpcRouteEntry | The status of the specified routeEntry is invalid. | The status of the VPC route entry is invalid. |
| 400 | OperationDenied.NextHopNotChanged | The operation is not allowed because of NextHopNotChanged. | The operation is not allowed because the next hop is not changed. |
| 400 | OperationDenied.DeleteGatewayEndpointRoute | The operation is not allowed to delete route entry pointing gateway endpoint.. | You cannot delete a route that points to a gateway endpoint. |
| 400 | IncorrectStatus.PrefixList | The status of prefixList is incorrect. | The prefix list is in an unstable state. |
| 400 | InvalidCidrBlock | Specified CIDR block is not valid. | Possible reasons for error reporting: 1. You are not in the whitelist of the 10.0.0.0/8 CIDR block and cannot use this CIDR block. 2. The target CIDR block of the added custom route cannot belong to the CIDR block of all vSwitches under the same VPC. 3. Because 100.64.0.0/10 is a cloud service address, you cannot add this CIDR block to point to the IDC under the cloud. 4. Except for 100.64.0.0/10, the detailed route network segments such as 100.64.0.0/11 and 100.96.0.0/11 cannot be used in the IDC under the cloud. |
| 400 | OperationDenied.VbrAttachEcrInMiddleStatus | The operation is not allowed because of VBR attach or detach ECR in middle status. | The current operation cannot be performed because the VBR is in the process of loading or unloading the leased line gateway. Please wait a moment and try again. |
| 400 | UnsupportedFeature.NextHopType | The operation is not allowed because the NextHopType of specified RouteEntry is modified from Local type. | The operation is not allowed because the next hop type of the route is modified from the Local type. |
| 400 | ResourceNotFound.PrefixList | The specified resource of prefixList is not found. | The prefix list does not exist. |
| 500 | Vpc.Error | error code 500,Internal server error. | |
| 500 | Internal.Error | The request processing has failed due to some unknown error, exception or failure. | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error occurred. |
| 404 | InvalidRouteTableId.NotFound | Specified route table does not exist. | |
| 404 | InvalidVpcId.NotFound | Specified value of VpcId is not found in our record. | The VPC does not exist. Check whether the specified VPC is valid. |
| 404 | ResourceNotFound.GatewayLoadBalancerEndpoint | GatewayLoadBalancerEndpoint instance not found. | GatewayLoadBalancerEndpoint instance not found. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.