Updating a NAT Gateway
Function
This API is used to update a NAT gateway.
admin_state_up = True & status = "ACTIVE" can be updated. The name, description, and type of a NAT gateway can be updated.
URI
PUT /v2/{project_id}/nat_gateways/{nat_gateway_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
nat_gateway_id |
Yes |
String |
Specifies the NAT gateway ID. |
Request
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
nat_gateway |
Yes |
Object |
Specifies the NAT gateway object. For details, see Table 3. Mandatory field: None. Only the name, description, and spec fields can be updated. At least one attribute must be specified for the NAT gateway to be updated. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Specifies the NAT gateway name. You can enter up to 64 characters. The name can contain only digits, letters, underscores (_), and hyphens (-). |
description |
No |
String |
Provides supplementary information about the NAT gateway. You can enter up to 255 characters. |
spec |
No |
String |
Specifies the NAT gateway type. The value can be:
|
Response
Table 4 lists response parameters.
Parameter |
Type |
Description |
---|---|---|
nat_gateway |
Object |
Specifies the NAT gateway object. For details, see Table 5. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the NAT gateway ID. |
tenant_id |
String |
Specifies the project ID. |
name |
String |
Specifies the NAT gateway name. You can enter up to 64 characters. The name can contain only digits, letters, underscores (_), and hyphens (-). |
description |
String |
Provides supplementary information about the NAT gateway. You can enter up to 255 characters. |
spec |
String |
Specifies the NAT gateway type. The value can be:
|
router_id |
String |
Specifies the VPC 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 is created (UTC time). Its value rounds to 6 decimal places for seconds. The format is yyyy-mm-dd hh:mm:ss. |
enterprise_project_id |
String |
|
Examples
- Example request
PUT https://{Endpoint}/v2/d199ba7e0ba64899b2e81518104b1526/nat_gateways/a78fb3eb-1654-4710-8742-3fc49d5f04f8 { "nat_gateway": { "name": "new_name", "description": "new description", "spec": "1" } }
- Example response
{ "nat_gateway": { "router_id": "d84f345c-80a1-4fa2-a39c-d0d397c3f09a", "status": "ACTIVE", "description": "new description", "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", "name": "new_name", "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" " } }
Status Codes
See Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot