APIs and reference

This page describes individual resources that can be used with Cloud NAT.

The Cloud NAT APIs and gcloud commands are part of Compute Engine.

Cloud NAT is configured using new Cloud Router commands and parameters.

gcloud SDK commands

Existing Cloud Router commands can be found in the gcloud command-line tool interface documentation.

New or updated commands are as follows.

Command Description
gcloud compute routers nats create Adds a NAT configuration to a router.
gcloud compute routers nats update Updates a NAT configuration on a router.
gcloud compute routers nats delete Removes a NAT configuration from a router.
gcloud compute routers nats list Lists NAT configurations on a router.
gcloud compute routers nats describe Shows a NAT configuration on a router.
gcloud compute routers get-status Gets runtime information on the specified Cloud Router, including the status of the NAT.
gcloud compute routers get-nat-mapping-info Shows NAT IP:port-ranges.

Rest API

All NAT operations are performed on the Router resource. They all require OAuth 2.0 authentication.

New or updated commands are as follows.

Command Description
routers.insert Creates a Cloud Router. You can specify a NAT configuration when you create the router.
routers.update Updates a Cloud Router. You can specify a NAT configuration when you update the router.
routers.patch Patches a Cloud Router. You can specify a NAT configuration when you patch the router.
routers.getRouterStatus Gets runtime information on the specified Cloud Router, including the status of the NAT.
routers.getNatMappingInfo Retrieves runtime NAT mapping information of VM endpoints.