Method: routers.getNatIpInfo

Retrieves runtime NAT IP information.

HTTP request

GET https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}/getNatIpInfo

The URL usesgRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to theservice error catalog

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region for this request.

router

string

Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.

Query parameters

Parameters
natName

string

Name of the nat service to filter the NAT IP information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{"result":[{"natName":string,"natIpInfoMappings":[{"natIp":string,"usage":enum,"mode":enum}]}]}
Fields
result[]

object

[Output Only] A list of NAT IP information.

result[].natName

string

Name of the NAT config which the NAT IP belongs to.

result[].natIpInfoMappings[]

object

A list of all NAT IPs assigned to this NAT config.

result[].natIpInfoMappings[].natIp

string

NAT IP address. For example: 203.0.113.11.

result[].natIpInfoMappings[].usage

enum

Specifies whether NAT IP is currently serving at least one endpoint or not.

result[].natIpInfoMappings[].mode

enum

Specifies whether NAT IP is auto or manual.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/compute.readonly
  • https://www.googleapis.com/auth/compute
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the followingIAM permissions:

  • compute.routers.get

To find predefined roles that contain those permissions, seeCompute Engine IAM Roles.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-18 UTC.