Help Center> > API Reference> API> NAT Gateway Service> Creating a NAT Gateway

Creating a NAT Gateway

Updated at: Nov 19, 2018 15:34

Function

This API is used to create a NAT gateway.

URI

POST /v2.0/nat_gateways

Request

Table 1 describes the request parameters.

Table 1 Request parameters

Parameter

Type

Mandatory

Description

tenant_id

Uuid-Str

No

Specifies the project ID.

name

String(64)

Yes

Specifies the name of the NAT gateway.

The name can contain only digits, letters, underscores (_), hyphens (-), and Chinese.

description

String(255)

No

Provides supplementary information about the NAT gateway.

spec

String

Yes

Specifies the type of the NAT gateway.

The value can be:

  • 1: small scale
  • 2: medium scale
  • 3: large scale
  • 4: extra-large scale

router_id

Uuid-Str

Yes

Specifies the router UUID.

internal_network_id

Uuid-Str

Yes

Specifies the network ID where the downstream interface of the NAT gateway (the next hop of the DVR) belongs.

Response

Table 2 lists response parameters.

Table 2 Response parameters

Parameter

Type

Description

nat_gateway

Dict

Indicates the NAT gateway object.

Examples

  • Example request
    POST /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"
        }
    }
  • Example response
    {
        "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",
            "name": "nat_001"
        }
    }

Returned Value

For details, see Common Returned Values.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel