Delete Routing Policies

Last updated: 2020-08-28 14:46:56


    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new VPC API 3.0 which is standardized and faster.

    1. API Description

    This API (DeleteRoute) is used to delete routing policies.
    Domain for API

    You can delete routing policies in batch for a routing table.

    2. Input Parameters

    The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is DeleteRoute.

    Parameter Name Required Type Description
    vpcId Yes String ID of VPC to which the subnet belongs. It can be vpcId or unVpcId. unVpcId is recommended. For example, vpc-rqndayhs. It can be queried through API DescribeVpcEx.
    routeTableId Yes String The routing table ID assigned by the system, which can be routeTableId or unRouteTableId. unRouteTableId is recommended. For example: rtb-rqndayhs. It can be queried through API DescribeRouteTable.
    routeSet.n Yes array Content of routing table. This is optional.
    routeSet.n.destinationCidrBlock Yes String Destination network segment, which cannot be within the VPC network segment. For example:
    routeSet.n.nextType Yes String Type of next hop. Supported types: 0: public network gateway; 1: VPN gateway; 3: Direct Connect gateway; 4: peering connection; 7: sslvpn gateway; 8: NAT gateway; 9: general cvm .
    routeSet.n.nextHub Yes String Next hop address. You just need to specify gateway IDs (new ID is recommended) of different next hop types and the system will automatically match to the next hop address.

    3. Output Parameters

    Parameter Name Type Description
    code Int Error code, 0: Succeeded, other values: Failed.
    message String Error message.

    4. Error Codes

    The following error code list only provides the business logic error codes for this API. For additional common error codes, refer to VPC Error Codes.

    Error Code Description
    InvalidVpc.NotFound VPC not exist. Please check the information you entered. You can query VPC through API DescribeVpcEx.
    InvalidRouteTableId.NotFound Routing table ID not exist. Please check the information you entered. It can be queried through API DescribeRouteTable.
    InvalidDestinationCidr Invalid destination IP address range.
    InvalidRouteNextType Invalid next hop type. For supported types, refer to the descriptions of input parameters.
    InvalidRouteNextHub.NotFound The next hop address does not exist. Please check the information you entered.

    5. Example

      &<Common request parameters>


        "code": 0,
        "message": ""

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback