5.1

Table Of Contents
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 Organization vDC Network With a Direct Connection,” on
page 169.
Example: Create an Organization vDC Network With a Direct Connection
This example adds a directly-connected network to the organization vDC created in “Add a vDC to an
Organization,” on page 140. Because the network has a Configuration whose ParentNetwork element specifies
an external network to connect to and sets the FenceMode to bridged, it provides a direct connection to the parent
network.
Request:
POST https://vcloud.example.com/api/admin/vdc/44/networks
Content-Type: application/vnd.vmware.vcloud.orgVdcNetwork+xml ...
<?xml version="1.0" encoding="UTF-8"?>
<OrgVdcNetwork
name="Internet"
xmlns="http://www.vmware.com/vcloud/v1.5">
<Description>Bridged to the public Internet</Description>
<Configuration>
<ParentNetwork
href="https://vcloud.example.com/api/admin/network/297" />
<FenceMode>bridged</FenceMode>
</Configuration>
</OrgVdcNetwork>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.orgVdcNetwork+xml
...
<OrgVdcNetwork
xmlns="http://www.vmware.com/vcloud/v1.5"
name="Internet"
type="application/vnd.vmware.vcloud.orgVdcNetwork+xml"
href="https://vcloud.example.com/api/admin/network/54" ...>
<Link
rel="edit"
type="application/vnd.vmware.vcloud.orgVdcNetwork+xml"
href="https://vcloud.example.com/api/admin/network/54" />
<Link
rel="remove"
href="https://vcloud.example.com/api/admin/network/54" />
<Link
rel="up"
type="application/vnd.vmware.admin.vdc+xml"
href="https://vcloud.example.com/api/admin/vdc/44" />
<Link
rel="down"
type="application/vnd.vmware.vcloud.metadata+xml"
href="https://vcloud.example.com/api/admin/network/54/metadata" />
<Link
rel="down"
Chapter 6 Creating and Managing Organizations
VMware, Inc. 169