tencent cloud

文档反馈

ModifyNatGatewayAttribute

最后更新时间:2024-07-10 16:19:04

    1. API Description

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

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

    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: ModifyNatGatewayAttribute.
    Version Yes String Common Params. The value used for this API: 2017-03-12.
    Region No String Common Params. This parameter is not required for this API.
    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, 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 Modifying the attributes of a NAT Gateway

    This example shows you how to modify the NAT gateway name and maximum outbound bandwidth. To adjust the maximum concurrent connections of a NAT gateway, please use ResetNatGatewayConnection.

    Input Example

    POST / HTTP/1.1
    Host: vpc.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyNatGatewayAttribute
    <Common request parameters>
    
    {
        "InternetMaxBandwidthOut": "500",
        "NatGatewayId": "nat-ig8xpno8",
        "NatGatewayName": "Test natNAT gateway"
    }
    

    Output Example

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

    Example2 Changing the SNAT mode of a NAT gateway

    This example shows you how to modify the StrictSnatMode status of a NAT gateway

    Input Example

    POST / HTTP/1.1
    Host: vpc.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyNatGatewayAttribute
    <Common request parameters>
    
    {
        "NatGatewayId": "nat-owj32fec"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "5acefde4-3be5-4582-a432-742081e1c904"
        }
    }
    

    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 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.
    UnsupportedOperation.InsufficientInternetServiceProviders