Any request that creates a catalog can also specify a storage profile for the items in that catalog.
If you do not specify a CatalogStorageProfile when creating a catalog, the catalog is created on the default storage profile for the first VDC created in the organization. To create the catalog on a specific storage profile, retrieve the list of available storage profiles in your organization and specify one in the CatalogStorageProfiles element of the request.
Prerequisites
-
This operation requires the rights included in the predefined Catalog Author role or an equivalent set of rights.Verify that you are logged in to the vCloud Air Compute Service as a Virtual Infrastructure Administrator.
-
Verify that at least one VDC exists in your organization. You cannot create a catalog in an organization that has no VDCs.
Procedure
Results
The server creates an empty catalog on the specified storage profile and returns its representation in the response. See the response portion of Create a Catalog.
Example: Specify a Storage Profile for a Catalog
This example modifies the request shown in Create a Catalog to add a CatalogStorageProfiles element..
POST https://vcloud.example.com/api/admin/org/26/catalogs Content-Type: application/vnd.vmware.admin.catalog+xml ... <?xml version="1.0" encoding="UTF-8"?> <AdminCatalog xmlns="http://www.vmware.com/vcloud/v1.5" name="Example Catalog"> <Description>New Catalog for Example Org</Description> <CatalogStorageProfiles> <VdcStorageProfile type="application/vnd.vmware.admin.vdcStorageProfile+xml" href="https://vcloud.example.com/api/vdcStorageProfile/59" /> </CatalogStorageProfiles> </AdminCatalog>
The response is similar to the one shown in Create a Catalog, and includes a CatalogStorageProfiles element derived form the one that you specified in the request.
201 Created Content-Type: application/vnd.vmware.admin.catalog+xml ... <AdminCatalog xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" name="Example Catalog" ... <Description>New Catalog for Example Org</Description> <CatalogItems/> ... <CatalogStorageProfiles> <VdcStorageProfile type="application/vnd.vmware.admin.vdcStorageProfile+xml" name="*" id="urn:vcloud:vdcstorageProfile:59" href="https://vcloud.example.com/api/vdcStorageProfile/59" /> </CatalogStorageProfiles> </AdminCatalog>