Delete NAT Gateways

Last updated: 2020-08-28 14:59:20

    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 (DeleteNatGateway) is used to delete NAT gateways.
    Domain for API request: vpc.api.qcloud.com

    When the NAT gateway is deleted, the routing entry containing this NAT 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.

    Parameter Name Required Type Description
    vpcId Yes String Virtual private cloud ID or unified ID (unified ID is recommended), for example: vpc-xfd55df
    natId Yes String Unified ID of highly available gateway, for example: nat-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 QueryNatGatewayProductionStatus API.

    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 Invalid VPC. VPC resource does not exist. Please verify that the resource information you entered is correct. You can query the VPC via the DescribeVpcEx API.
    InvalidNatGatewayId.NotFound Invalid NAT gateway, NAT gateway resource does not exist. Please verify that the resource information you entered is correct. You can query the NAT gateway via the DescribeNatGateway API.

    5. Example

    Input

    https://vpc.api.qcloud.com/v2/index.php?Action=DeleteNatGateway
    &>
    &vpcId=190
    &natId=nat-7t9nf3pu
    

    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