APIs and reference

This page describes individual resources that can be used withCloud NAT.

The Cloud NAT APIs andgcloud commands are part ofCompute Engine.

Cloud NAT is configured using newCloud Router commands and parameters.

gcloud CLI commands

Existing Cloud Router commands can be found in theGoogle Cloud CLIinterface documentation.

The following table lists the commonly used Cloud NAT commands:

CommandDescription
gcloud compute routers nats createAdds a NAT configuration to a router.
gcloud compute routers nats updateUpdates a NAT configuration on a router.
gcloud compute routers nats deleteRemoves a NAT configuration from a router.
gcloud compute routers nats listLists NAT configurations on a router.
gcloud compute routers nats describeShows a NAT configuration on a router.
gcloud compute routers get-statusGets runtime information on the specified Cloud Router, including the status of the NAT.
gcloud compute routers get-nat-mapping-infoShows NAT IP:port-ranges.
gcloud compute routers get-nat-ip-infoShows NAT IP address usage.
gcloud compute routers nats rules createAdds a NAT rule to an existing NAT gateway.
gcloud compute routers nats rules updateUpdates a single NAT rule.
gcloud compute routers nats rules deleteDeletes a NAT rule from a NAT gateway.
gcloud compute routers nats rules describeDescribes a NAT rule.
gcloud compute routers nats rules listLists all NAT rules in a NAT gateway.

Rest API

All NAT operations are performed on theRouter resource. They all requireOAuth 2.0 authentication.

The following table lists the commonly used Cloud Router APIs:

CommandDescription
routers.insertCreates a Cloud Router. You can specify a NAT configuration when you create the router.
routers.updateUpdates a Cloud Router. You can specify a NAT configuration when you update the router.
routers.patchPatches a Cloud Router. You can specify a NAT configuration when you patch the router.
routers.getRouterStatusGets runtime information on the specified Cloud Router, including the status of the NAT.
routers.getNatMappingInfoRetrieves runtime NAT mapping information of VM endpoints.
routers.getNatIpInfoRetrieves runtime NAT IP address information for the specified Cloud Router.

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 2026-02-19 UTC.