Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

Querying NAT Gateways

Updated on 2023-04-19 GMT+08:00

Function

This API is used to query NAT gateways. Unless otherwise specified, exact match is applied.

URI

GET /v2/{project_id}/nat_gateways

NOTE:

You can type the question mark (?) and ampersand (&) at the end of the URI to define multiple search criteria. All optional parameters can be filtered. For details, see the example request.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

limit

No

Integer

Specifies the number of records on each page.

id

No

String

Specifies the NAT gateway ID.

tenant_id

No

String

Specifies the project ID.

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:

  • 1: small type, which supports up to 10,000 SNAT connections.
  • 2: medium type, which supports up to 50,000 SNAT connections.
  • 3: large type, which supports up to 200,000 SNAT connections.
  • 4: extra-large type, which supports up to 1,000,000 SNAT connections.

router_id

No

String

Specifies the VPC ID.

internal_network_id

No

String

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

status

No

String

  • Specifies the status of the NAT gateway.
  • For details about all its values, see Table 1.

admin_state_up

No

Boolean

  • Specifies the unfrozen or frozen state.
  • The value can be:
    • true: indicates the unfrozen state.
    • false: indicates the frozen state.

created_at

No

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

No

String

  • Specifies the enterprise project ID. The value 0 indicates the default enterprise project.
  • The value can contain a maximum of 36 characters. It is string "0" or in UUID format with hyphens (-).

Request

None

Response

Table 2 lists response parameters.

Table 2 Response parameter

Parameter

Type

Description

nat_gateways

Array(Object)

Specifies the NAT gateway objects. For details, see Table 3.

Table 3 Description of the nat_gateway field

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:

  • 1: small type, which supports up to 10,000 SNAT connections.
  • 2: medium type, which supports up to 50,000 SNAT connections.
  • 3: large type, which supports up to 200,000 SNAT connections.
  • 4: extra-large type, which supports up to 1,000,000 SNAT connections.

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

  • Specifies the status of the NAT gateway.
  • For details about all its values, see Table 1.

admin_state_up

Boolean

  • Specifies the unfrozen or frozen state.
  • The value can be:
    • true: indicates the unfrozen state.
    • false: indicates the frozen state.

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

  • Specifies the enterprise project ID. The value 0 indicates the default enterprise project.
  • The value can contain a maximum of 36 characters. It is string "0" or in UUID format with hyphens (-).

Examples

  • Example request
    GET https://{Endpoint}/v2/d199ba7e0ba64899b2e81518104b1526/nat_gateways?status=ACTIVE
  • Example response
    { 
        "nat_gateways": [ 
            { 
                "router_id": "b1d81744-5165-48b8-916e-e56626feb88f", 
                "status": "ACTIVE", 
                "description": "", 
                "admin_state_up": true, 
                "tenant_id": "27e25061336f4af590faeabeb7fcd9a3", 
                "created_at": "2017-11-15 14:50:39.505112", 
                "spec": "2", 
                "internal_network_id": "5930796a-6026-4d8b-8790-6c6bfc9f87e8", 
                "id": "a253be25-ae7c-4013-978b-3c0785eccd63", 
                "name": "wj3",
                "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" 
    
            }, 
            { 
                "router_id": "305dc52f-13dd-429b-a2d4-444a1039ba0b", 
                "status": "ACTIVE", 
                "description": "", 
                "admin_state_up": true, 
                "tenant_id": "27e25061336f4af590faeabeb7fcd9a3", 
                "created_at": "2017-11-17 07:41:07.538062", 
                "spec": "2", 
                "internal_network_id": "fc09463b-4ef8-4c7a-93c8-92d9ca6daf9d", 
                "id": "e824f1b4-4290-4ebc-8322-cfff370dbd1e", 
                "name": "lyl001",
                "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" 
            } 
        ] 
    }

Status Codes

See Status Codes.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback