This API is used to create a NAT gateway.
POST /v2.0/nat_gateways
Table 1 describes the request parameter.
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
nat_gateway |
Yes |
Object |
Specifies the NAT gateway object. For details, see Table 2. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
tenant_id |
No |
String |
Specifies the project ID. |
name |
Yes |
String(64) |
Specifies the NAT gateway name. The name can contain only digits, letters, underscores (_), and hyphens (-). |
description |
No |
String(255) |
Provides supplementary information about the NAT gateway. |
spec |
Yes |
String |
Specifies the NAT gateway type. The type can be:
|
router_id |
Yes |
String |
Specifies the VPC ID. |
internal_network_id |
Yes |
String |
Specifies the network ID of the downstream interface (the next hop of the DVR) of the NAT gateway. |
Table 3 lists response parameters.
Parameter |
Type |
Description |
|---|---|---|
nat_gateway |
Object |
Specifies the NAT gateway object. For details, see Table 4. |
Parameter |
Type |
Description |
|---|---|---|
id |
String |
Specifies the NAT gateway ID. |
tenant_id |
String |
Specifies the project ID. |
name |
String(64) |
Specifies the NAT gateway name. The name can contain only digits, letters, underscores (_), and hyphens (-). |
description |
String(255) |
Provides supplementary information about the NAT gateway. |
spec |
String |
Specifies the NAT gateway type. The type can be:
|
router_id |
String |
Specifies the router ID. |
internal_network_id |
String |
Specifies the network ID of the downstream interface (the next hop of the DVR) of the NAT gateway. |
status |
String |
|
admin_state_up |
Boolean |
|
created_at |
String |
Specifies when the NAT gateway was created (UTC time). Its value rounds to 6 decimal places for seconds. The format is yyyy-mm-dd hh:mm:ss. |
billinginfo |
String |
Specifies the order information. This parameter is left blank by default. |
freeze_info |
String |
Specifies information about the frozen NAT gateway. |
sys_tags |
List<String> |
Specifies the ID of the enterprise project associated with the NAT gateway when the NAT gateway is created. |
snat_rule_public_ip_limit |
Integer |
Specifies the maximum number of EIPs in an SNAT rule on a NAT gateway. The default value is 20. |
dnat_rules_limit |
Long |
Specifies the maximum number of DNAT rules on a NAT gateway. The default value is 200. |
POST https://{Endpoint}/v2.0/nat_gateways
{
"nat_gateway": {
"name": "nat_001",
"description": "my nat gateway 01",
"router_id": "d84f345c-80a1-4fa2-a39c-d0d397c3f09a",
"internal_network_id": "89d66639-aacb-4929-969d-07080b0f9fd9",
"spec": "1"
}
}
{
"nat_gateway": {
"router_id": "d84f345c-80a1-4fa2-a39c-d0d397c3f09a",
"status": "PENDING_CREATE",
"description": "my nat gateway 01",
"admin_state_up": true,
"tenant_id": "27e25061336f4af590faeabeb7fcd9a3",
"created_at": "2017-11-18 07:34:32.203044",
"spec": "1",
"internal_network_id": "89d66639-aacb-4929-969d-07080b0f9fd9",
"id": "a78fb3eb-1654-4710-8742-3fc49d5f04f8",
"billinginfo": "",
"dnat_rules_limit": 200,
"snat_rule_public_ip_limit": 20,
"freeze_info": null,
"sys_tags": [
"_sys_enterprise_project_id=0"
],
"name": "nat_001"
}
}
See Status Codes.