5.5

Table Of Contents
For information about additional elements that an EdgeGateway can contain, see “Example: Create an
Edge Gateway,” on page 174 and the schema reference.
4 POST the EdgeGateway element to the URL for adding Edge Gateways to the organization VDC.
The server takes the requested action and returns an XML representation of the partially-created object. This
representation includes an href attribute, properties specified in the creation request, and an embedded
Task element that tracks the creation of the object. When the task completes, the object has been created, and
you can use the value of the href attribute with a GET request to retrieve the XML representation of the
object.
See the response portion of “Example: Create an Edge Gateway,” on page 174.
Example: Create an Edge Gateway
This example adds an Edge Gateway to the organization VDC created in “Add a VDC to an Organization,”
on page 161. The uplink interface specifies one of the networks shown in Step 2b. For the purposes of this
example, assume that the external network has a Configuration element that includes this information:
<Configuration>
<IpScopes>
<IpScope>
...
<Gateway>10.147.115.190</Gateway>
<Netmask>255.255.255.0</Netmask>
...
<IpRanges>
<IpRange>
<StartAddress>10.147.115.129</StartAddress>
<EndAddress>10.147.115.189</EndAddress>
</IpRange>
</IpRanges>
<AllocatedIpAddresses>
<IpAddress>10.147.115.129</IpAddress>
<IpAddress>10.147.115.133</IpAddress>
<IpAddress>10.147.115.132</IpAddress>
<IpAddress>10.147.115.130</IpAddress>
</AllocatedIpAddresses>
...
</IpScope>
</IpScopes>
...
</Configuration>
You can see the values from this external network's IpScope reflected in the SubnetParticipation element of
the EdgeGateway. The address range specified in the IpRange element of this GatewayInterface must be
within the IpRanges of the external network, and cannot include any IP addresses listed in the external
network's AllocatedIpAddresses element. You can specify a contiguous IpRange, as we do in this example,
or you can include multiple IpRange elements in the IpRanges if you need more IP addresses than are
available in a contiguous block.
The external network specified in the GatewayInterface created in this example becomes the default route
from this Edge Gateway (UseForDefaultRoute has a value of true). The default DNS service address is
inherited from the network specified as the default route.
vCloud API Programming Guide
174 VMware, Inc.