Last updated: 2021-08-02 17:21:42

1. API Description

Domain name for API request:

This API (ModifyNatGatewayAttribute) is used to modify the attributes of a NAT gateway.

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example:

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 parameter. The value used for this API: ModifyNatGatewayAttribute.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
NatGatewayId Yes String The ID of the NAT gateway, such as nat-df45454.
NatGatewayName No String The NAT gateway name, such as test_nat.
InternetMaxBandwidthOut No Integer The maximum outbound bandwidth of the NAT gateway. Unit: Mbps.
ModifySecurityGroup No Boolean Whether to modify the security group bound to the NAT Gateway
SecurityGroupIds.N No Array of String The final security groups bound to the NAT Gateway, such as ['sg-1n232323', 'sg-o4242424']. An empty list indicates that all the security groups have been deleted.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying the attributes of an NAT gateway

This example shows you how to change the name and public network outbound bandwidth cap of an NAT gateway. If you want to reset the maximum concurrent connections of an NAT gateway, use the ResetNatGatewayConnection API.

Input Example
&NatGatewayName=Test NAT gateway
&<Common request parameters>

Output Example

  "Response": {
    "RequestId": "e5c289dc-bf4b-4828-8093-3c434d1f0886"

5. Developer Resources


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 parameter format.
InvalidParameterValue.TooLong Invalid parameter value. The parameter value is too long.
ResourceInUse The resource is occupied.
ResourceNotFound The resource does not exist.
UnsupportedOperation Unsupported operation.