Deletes a static route from a route table of an Enterprise Edition transit router.

Usage notes

Before you call this operation, take note of the following items:

  • If TransitRouterRouteEntryId is set, you must not specify TransitRouterRouteTableId or TransitRouterRouteEntryDestinationCidrBlock. Otherwise, parameter conflicts will occur.
  • If TransitRouterRouteEntryId is not set, you must specify the following parameters based on the type of the next hop:
    • To delete a black hole route, you must set TransitRouterRouteTableId, TransitRouterRouteEntryDestinationCidrBlock, and TransitRouterRouteEntryNextHopType.
    • If the route that you want to delete is not a black hole route, you must set TransitRouterRouteTableId, TransitRouterRouteEntryDestinationCidrBlock, TransitRouterRouteEntryNextHopType, and TransitRouterRouteEntryNextHopId.
  • DeleteTransitRouterRouteEntry is an asynchronous operation. After you send a request, the system returns the request ID but the operation is still being performed in the system background. You can call ListTransitRouterRouteEntries to query the status of a route entry.
    • If a route entry is in the Deleting state, the route entry is being deleted. You can query the route entry but cannot perform other operations.
    • If a route entry cannot be found, it is deleted.

Limits

You can call this operation to delete only static routes. Automatically learned routes are not supported. You can call the ListTransitRouterRouteEntries operation to query route types.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteTransitRouterRouteEntry

The operation that you want to perform. The operation that you want to perform. Set the value to DeleteTransitRouterRouteEntry.

ClientToken String No 02fb3da4-130e-11e9-8e44-001****

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.
DryRun Boolean No false

Specifies whether to perform a precheck to check information such as the permissions and instance status. Valid values:

  • false (default): sends the request. If the request passes the precheck, the route is deleted.
  • true: sends a precheck request. The route is not deleted after the request passes the precheck. If you use this value, the system checks the required parameters and the request syntax. If the request fails to pass the precheck, an error message is returned. If the request passes the check, the system returns the ID of the request.
TransitRouterRouteEntryId String No rte-75eg4jprkvk0pw****

The ID of the route entry.

TransitRouterRouteEntryNextHopType String No BlackHole

The type of the next hop. Valid values:

  • BlackHole: a blackhole route. You do not need to specify a next hop.
  • Attachment: a network instance connection. You must specify a network instance connection as the next hop.
TransitRouterRouteEntryDestinationCidrBlock String No 192.168.0.0/24

The destination CIDR block.

TransitRouterRouteEntryNextHopId String No tr-attach-nls9fzkfat8934****

The ID of the network instance connection that you want to specify as the next hop.

TransitRouterRouteTableId String No vtb-bp1dudbh2d5na6b50****

The ID of the route table of the Enterprise Edition transit router.

Response parameters

Parameter Type Example Description
RequestId String 2D69CCEA-42D0-48B2-8C9A-9BB207F76D6E

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteTransitRouterRouteEntry
&ClientToken=02fb3da4-130e-11e9-8e44-001****
&DryRun=false
&TransitRouterRouteEntryId=rte-75eg4jprkvk0pw****
&TransitRouterRouteEntryNextHopType=BlackHole
&TransitRouterRouteEntryDestinationCidrBlock=192.168.0.0/24
&TransitRouterRouteTableId=vtb-bp1dudbh2d5na6b50****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DeleteTransitRouterRouteEntryResponse>
    <RequestId>2D69CCEA-42D0-48B2-8C9A-9BB207F76D6E</RequestId>
</DeleteTransitRouterRouteEntryResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "2D69CCEA-42D0-48B2-8C9A-9BB207F76D6E"
}

Error codes

HttpCode Error code Error message Description
400 DryRunOperation Request validation has been passed with DryRun flag set. The error message returned because the dry run request passed the precheck.

For a list of error codes, visit the API Error Center.