The edge gateway for Advanced Networking Services provides a network address translation (NAT) service to assign a public address to a virtual machine or group of virtual machines in a private network.

For more information about the NAT features for Advanced Networking Services, see Network Address Translation (NAT) in the vCloud Air Advanced Networking Services Guide.

1

Log in to vCloud Air as an administrator. See Log in to vCloud Air for information.

2

Create a login session with vCloud Director. See Create a Session for a Virtual Data Center in a Service for information.

3

Using the vCloud API, query vCloud Director for the ID of the edge gateway you require NAT configuration details about. See Querying the vCloud API for information.

To get the details for the NAT configuration, issue the following request:

GET https://vchs.vmware.com/hybridity/api/gateways/gatewayId/nat/config

In the request header, include the OATH token and the Accept header that you obtained when creating a login session:

Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "vcloud-auth-token"

If the request is successful, the server returns HTTP response code 200 and the details of the NAT configuration.

Request Header – Get the NAT Configuration

GET https://vchs.vmware.com/hybridity/api/gateways/gw-5/nat/config
Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "d6eFLOqQYfuEn2MJTp7BQ2ISEO+ZYaEgTcqBy8wZQ6js="

Request body not required.

Response Body – Get the NAT Configuration

{
  "featureType" : "nat"
  "version" : 8,
  "enabled" : false,
   "rules" : {
    "natRulesDtos" : [ {
      "ruleId" : 196615,
      "ruleTag" : 196615,
      "ruleType" : "user",
      "action" : "snat",
      "vnic" : "0",
      "originalAddress" : "192.168.12.2",
      "translatedAddress" : "192.168.13.3",
      "loggingEnabled" : false,
      "enabled" : true,
      "description" : "",
      "protocol" : "any",
      "icmpType" : null,
      "originalPort" : "any",
      "translatedPort" : "any"
    }, {
      "ruleId" : 196610,
      "ruleTag" : 196610,
      "ruleType" : "user",
      "action" : "snat",
      "vnic" : "0",
      "originalAddress" : "192.168.12.1",
      "translatedAddress" : "192.168.13.2",
      "loggingEnabled" : false,
      "enabled" : true,
      "description" : "",
      "protocol" : "any",
      "icmpType" : null,
      "originalPort" : "any",
      "translatedPort" : "any"
     } ]
  }
}