Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Instance Management/ Querying NAT Gateways Bound to an Instance
Updated on 2026-04-27 GMT+08:00

Querying NAT Gateways Bound to an Instance

Function

This API is used to query the NAT gateways bound to an instance. Before calling this API:

Debugging

You can debug this API in API Explorer.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    gaussdb:instance:listPublicIps

    list

    instance

    -

    gaussdb:instance:list

    -

URI

GET /v3/{project_id}/instances/{instance_id}/dnat

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance. For details about how to obtain the instance ID, see Querying DB Instances.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

None

Response Parameters

Table 2 Parameter description

Parameter

Type

Description

dnat_list

Array of objects

Definition

List of NAT gateways bound to the instance.

For details, see Table 3.

Table 3 Data structure description of the dnat_list field

Parameter

Type

Description

node_id

String

Definition

ID of the node that is bound to the NAT gateway.

Range

N/A

nat_gateway_id

String

Definition

NAT gateway ID.

Range

N/A

public_ip_id

String

Definition

EIP ID.

Range

N/A

public_ip

String

Definition

EIP.

Range

N/A

external_service_port

Integer

Definition

Port used to provide services to external systems. You can connect to the DB instance using the EIP and this port number.

Range

N/A

port_id

String

Definition

Port ID.

Range

N/A

private_ip

String

Definition

Private IP address.

Range

N/A

internal_service_port

Integer

Definition

GaussDB database port.

Range

N/A

Example Request

Querying NAT gateways bound to an instance

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/599628f2665841b2a66fa2780fadc025/instances/e0984e23578c4296950336e613d99d32in14/dnat

Example Response

NAT gateways bound to the instance queried.

{
    "dnat_list": [
        {
            "node_id": "b868bf2c6945452c9dbea5b3c07da6cano14",
            "nat_gateway_id": "2219bb95-cb16-4296-91f8-96c00ffab5c9",
            "port_id": "4d059675-c08a-4f71-8901-ac164d54f375",
            "public_ip_id": "0d8c2bd4-745a-4381-ad5e-7dc51142918b",
            "public_ip": "10.83.83.110",
            "external_service_port": 3000,
            "internal_service_port": 8000,
            "private_ip": "192.168.0.184"
        }
    ]
}

Status Codes

Error Codes

For details, see Error Codes.