tencent cloud

Virtual Private Cloud

DeleteNatGateway

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-09-15 11:12:48

1. API Description

Domain name for API request: vpc.intl.tencentcloudapi.com.

This API is used to delete a NAT gateway.
When a NAT gateway is deleted, all routes containing this gateway are deleted automatically, and associated EIPs are unbound.When deleting a NAT gateway, you need to unbind the associated EIPs. Therefore, the caller must have CAM permissions for vpc:DisassociateAddress and vpc:ModifyAddressesBandwidth.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DeleteNatGateway.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
NatGatewayId Yes String NAT gateway ID, for example, nat-df45454.
IgnoreOperationRisk No Boolean Ignores operation risks.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Deleting a NAT Gateway

Input Example

POST / HTTP/1.1
Host: vpc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DeleteNatGateway
<Common request parameters>

{
    "NatGatewayId": "nat-3nptcfvp",
    "IgnoreOperationRisk": false
}

Output Example

{
    "Response": {
        "RequestId": "12345678-1234-1234-1234-123456789012"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InvalidParameterValue.Malformed Invalid input format.
ResourceInUse The resource is occupied.
ResourceInUse.NatUsedByCFW The current NAT gateway is associated with CFW and cannot be deleted.
ResourceNotFound The resource does not exist.
UnsupportedOperation.DeletionProtectionEnabled The NAT gateway has deletion protection enabled and cannot be deleted.
UnsupportedOperation.MutexOperationTaskRunning Exclusive operation task of resources is in progress.
UnsupportedOperation.NatGatewayHaveHighTraffic The NAT gateway's recent peak inbound/outbound bandwidth (whichever is higher) exceeds the detection bandwidth threshold.
UnsupportedOperation.NatGatewayHaveRoute The NAT gateway has a route.
UnsupportedOperation.NatGatewayHaveRouteAndHighTraffic The NAT gateway has routes and its recent peak inbound/outbound bandwidth (whichever is higher) exceeds the detection bandwidth threshold.
UnsupportedOperation.NatGatewayHaveTrafficMirror The NAT gateway is using traffic mirroring.
UnsupportedOperation.TrafficValidationFailed The resource business bandwidth exceeds the anti-misoperation detection threshold.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック