A system administrator can define VDC templates, share them with organizations, and grant organization members the right to use the templates to create VDCs in their organization.

A VDC template specifies a VDC configuration. If the configuration includes an Edge Gateway, the VDC can support creation of routed organization VDC networks.

Note

If you are a system administrator, you can create a VDC without using a template. See Add a VDC to an Organization.

This operation requires the rights included in the predefined Organization Administrator role or an equivalent set of rights.

1

Retrieve the XML representation of the admin view of your organization.

Use a request like this one:

GET https://vcloud.example.com/api/admin/org/26
2

Examine the response to locate the Link element that contains the URL for retrieving the list of VDC templates that are available to your organization.

This element has a rel attribute value of down and a type attribute value of application/vnd.vmware.admin.vdcTemplates+xml, as shown here:

<Link
   rel="down"
   href="https://vcloud.example.com/api/vdcTemplates/"
   type="application/vnd.vmware.admin.vdcTemplates+xml"/>
3

Retrieve the list of VDC templates.

Make a GET request to the href value in the link shown in Step 2. The response is a VdcTemplateList that contains one or more VdcTemplate elements. Each of these elements has an href attribute whose value is a URL you can GET to retrieve the representation of the template. If there are no VDC templates in the list, you can ask your system administrator to create a template and share it with your organization.

4

Retrieve a template from the list.

Each VdcTemplate in the list includes a Description that provides more information about the features of the VDC that the template creates. For additional information, you can retrieve the VdcTemplateSpecification from the VdcTemplate. All of these elements are read-only.

5

Instantiate the template to create a VDC in your organization.

Each organization includes an action/instantiate link that you can use with a POST request to add a VDC to your organization that a template specifies. See Example: Create a VDC From a Template. The system administrator can impose limits on the number of VDCs that any organization can create. If your organization already contains the maximum number of VDCs allowed by the system administrator, the request fails.

This request creates a VDC from a template. If you do not specify the name attribute or include a Description element, the new VDC is created with the name and Description shown in the template.

Request:

POST https://vcloud.example.com/api/org/26/action/instantiate
Content-Type: application/vnd.vmware.vcloud.instantiateVdcTemplateParams+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<InstantiateVdcTemplateParams
   xmlns="http://www.vmware.com/vcloud/v1.5"
   Name="templateVdc">
   <Description>Example VDC from template</Description>
   <Source
      href="https://vcloud.example.com/api/VdcTemplate/100"/>
</InstantiateVdcTemplateParams>

The response is a Task.

Response:

202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
<Task
   name="task"
   status="running"
   operation="Creating Virtual Datacenter templateVdc (100)" ...
   ...
</Task>