Creates a NAT CIDR block.
Operation description
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the NAT gateway with which you want to associate the CIDR block. You can call the DescribeRegions operation to query the most recent region list. | eu-central-1 |
NatGatewayId | string | Yes | The ID of the Virtual Private Cloud (VPC) NAT gateway with which you want to associate the CIDR block. | ngw-gw8v16wgvtq26vh59**** |
NatIpCidrName | string | Yes | The name of the CIDR block. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. The name must start with a letter and cannot start with | newcidr |
NatIpCidrDescription | string | Yes | The description of the NAT CIDR block. The description must be 2 to 256 characters in length and start with a letter. The description cannot start with | mycidr |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The client token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
| 5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
NatIpCidr | string | Yes | The NAT CIDR block that you want to associate with the NAT gateway. The new CIDR block must meet the following conditions:
| 172.16.0.0/24 |
Response parameters
Examples
Sample success responses
JSON
format
{
"NatIpCidrId": "vpcnatcidr-gw8lhqtvdn4qnea****",
"RequestId": "7021BEB1-210F-48A9-AB82-BE9A9110BB89"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IncorrectStatus.NatGateway | The status of %s [%s] is incorrect. | - |
400 | OperationFailed.NatIpCidrInUse | The operation is failed because of %s. | - |
400 | QuotaExceeded.NatIpCidr | The quota of %s is exceeded, usage %s/%s. | - |
400 | OperationFailed.CreateNatIpCidrInVpcCidrBlock | The operation is failed because of Creating NatIpCidr in Vpc Cidr. | - |
400 | OperationFailed.CreateNatIpCidrNotInUserCidr | The operation is failed because of Creating NatIpCidr not in UserCidr. | The operation failed because the NAT CIDR block does not fall within the user CIDR block. |
400 | ResourceAlreadyExist.NatIpCidr | The specified resource of %s is already exist. | - |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified region ID does not exist. |
404 | ResourceNotFound.NatGateway | The specified resource of %s is not found. | - |
404 | ResourceNotFound.VPC | The specified resource of %s is not found. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-10-23 | The Error code has changed | View Change Details |
2024-07-23 | API Description Update. The Error code has changed | View Change Details |
2023-03-01 | The Error code has changed | View Change Details |