You can list the IP addresses that are allocated to an Edge Gateway to see which are being used in rules configured on that Edge Gateway. If an IP address is allocated, but is not in use, you might decide to deallocate the IP address from that Edge Gateway to allocate it to a different Edge Gateway.

When an IP address is allocated to an Edge Gateway, you can use that IP address to create NAT, firewall, or VPN rules on that Edge Gateway. When you deallocate an IP address from an Edge Gateway, it is available for allocation to another Edge Gateway.

When an allocated IP address is being used by one or more rules in the Edge Gateway, its isUsedInRule attribute is set to true. When an allocated IP address is not being used by a rule in the Edge Gateway, its isUsedInRule attribute is set to false.

Verify that you are logged into the vCloud API endpoint as an Account Administrator or a Network Administrator.

Verify that you can retrieve the id for the Edge Gateway for which you want to list the IP addresses.

1

Retrieve the id for the Edge Gateway.

Use a request like this one:

GET https://vcloud.example.com/api/vchs/query?type=edgeGateway
2

Examine the response to locate the VchsEdgeGatewayRecord element for the Edge Gateway.

3

In the VchsEdgeGatewayRecord element, locate the Link element that contains the URL for listing the IP addresses allocated to that Edge Gateway.

This element has a rel attribute value of externalIpUsage.

<Link
   href="https://vcloud.example.com/api/admin/edgeGateway/2000/externalIpUsage"
   rel="externalIpUsage"/>
4

Use the href value in the Link element to retrieve the IP address listing for that Edge Gateway.

Use a request like this one:

GET https://vcloud.example.com/api/admin/edgeGateway/2000/externalIpUsage

The response to this request contains an EdgeGatewayExternalConnectionList element that lists the IP addresses allocated to that Edge Gateway. The response contains an EdgeGatewayExternalConnection element for each allocated IP address. Each EdgeGatewayExternalConnection element has an isUsedInRule attribute that indicates whether that IP address is currently used by a rule in the Edge Gateway.

In this example, the Edge Gateway has three allocated IP addresses. Two of the three IP addresses are currently used in rules in that Edge Gateway. This example retrieves the list of IP addresses to show which ones are currently used in rules.

Request:

GET https://vcloud.example.com/api/admin/edgeGateway/2000/externalIpUsage

Response:


...
<EdgeGatewayExternalConnectionList
   ...
   <EdgeGatewayExternalConnection
      ipAddress="10.122.122.10"
      isUsedInRule="true"
      externalNetworkName="externlnet"
      externalNetworkRef="https://vcloud.example.com/api/admin/.../"/>
   <EdgeGatewayExternalConnection
      ipAddress="10.122.122.11"
      isUsedInRule="true"
      externalNetworkName="externlnet"
      externalNetworkRef="https://vcloud.example.com/api/admin/.../"/>
   <EdgeGatewayExternalConnection
      ipAddress="10.122.122.13"
      isUsedInRule="false"
      externalNetworkName="externlnet"
      externalNetworkRef="https://vcloud.example.com/api/admin/.../"/>
</EdgeGatewayExternalConnectionList>