Delete Direct Connect Gateways

Last updated: 2020-06-04 18:09:51

    Note:

    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 (DeleteDirectConnectGateway) is used to delete Direct Connect gateway.
    Domain for API request:vpc.api.qcloud.com

    1) For a NAT gateway, NAT and ACL rules will be cleaned upon the deletion of Direct Connect gateway.
    2) When the Direct Connect gateway is deleted, the routing policy associated with the gateway in the routing table will also be deleted.

    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 DeleteDirectConnectGateway.

    Parameter Name Required Type Description
    vpcId Yes String VPC ID assigned by the system, e.g. vpc-7t9nf3pu.
    directConnectGatewayId Yes String Direct Connect gateway ID assigned by the system, e.g. dcg-7t9nf3pu.

    3. Output Parameters

    Parameter Name Type Description
    code Int Error code, 0: Succeeded, other values: Failed.
    message String Error message.
    taskId Int Task ID. The operation result can be queried with taskId. For more information, refer to API for Querying Task Execution Result.

    4. Error Code List

    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 Invalid VPC. VPC resource does not exist. Please verify that you have entered resource information correctly.
    InvalidDirectConnectGateway.NotFound Invalid Direct Connect gateway. Direct Connect gateway resource does not exist. Please verify that you have entered resource information correctly.

    5. Example

    Input

    https://vpc.api.qcloud.com/v2/index.php?Action=DeleteDirectConnectGateway&<Common request parameters>&vpcId=vpc-dfgg190&directConnectGatewayId=dcg-ddf14d

    Output

    {
        "code":"0",
        "message":"",
        "taskId":16284
    }

    Was this page helpful?

    Was this page helpful?

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