Querying NAT Gateways

Function

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

URI

GET /v2.0/nat_gateways

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

id

No

String

Specifies the NAT gateway ID.

limit

No

Integer

Specifies the number of records on each page.

tenant_id

No

String

Specifies the project ID.

name

No

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

No

String

Specifies the NAT gateway type.

The type can be:

  • 0: micro type, which supports up to 1,000 SNAT connections.
  • 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 router 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 NAT gateway status.
  • For details about all its values, see Table 1.

admin_state_up

No

Boolean

  • Specifies whether the NAT gateway is up or down.
  • The state can be:
    • true: The NAT gateway is up.
    • false: The NAT gateway is down.

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.

Request

None

Response

Table 2 lists response parameters.

Table 2 Response parameter

Parameter

Type

Description

nat_gateways

List (NAT gateways)

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(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:

  • 0: micro type, which supports up to 1,000 SNAT connections.
  • 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 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

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

admin_state_up

Boolean

  • Specifies whether the NAT gateway is up or down.
  • The state can be:
    • true: The NAT gateway is up.
    • false: The NAT gateway is down.

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.

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.

Examples

Status Codes

See Status Codes.