VMware Cloud Director API - POST-UpdateVdcStorageClasses

VMware Cloud Director API - POST-UpdateVdcStorageClasses

POST /admin/vdc/{id}/vdcStorageProfiles

Operation:
POST /admin/vdc/{id}/vdcStorageProfiles
Description:
Add or remove virtual datacenter storage classes.
Since:
Input parameters
Consume media type(s):
application/vnd.vmware.admin.updateVdcStorageProfiles+xml
application/vnd.vmware.admin.updateVdcStorageProfiles+json
Input type:
UpdateVdcStorageProfilesType
Output parameters
TaskType

This operation is asynchronous and returns a task that you can monitor to track the progress of the request.

Produce media type(s):
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
Output type:
TaskType
Examples
Request
HTTP 1.1
POST /api/admin/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42/vdcStorageProfiles

Headers:
Content-Length: 611
Content-Type: application/vnd.vmware.admin.updateVdcStorageProfiles+xml; charset=ISO-8859-1
x-vcloud-authorization: jlfBniGOkcjcw1qWDpCYp6dhBJZ4LQW0m5Sp7UjZ/Vg=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:UpdateVdcStorageProfiles
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
    <vcloud:AddStorageProfile>
        <vcloud:Enabled>true</vcloud:Enabled>
        <vcloud:Units>MB</vcloud:Units>
        <vcloud:Limit>300</vcloud:Limit>
        <vcloud:Default>false</vcloud:Default>
        <vcloud:ProviderVdcStorageProfile
            href="https://vcloud.example.com/api/admin/pvdcStorageProfile/468ed24c-fdc3-4535-83a9-3f5e198b66be"
            name="profile"
            type="application/vnd.vmware.admin.pvdcStorageProfile+xml"/>
    </vcloud:AddStorageProfile>
</vcloud:UpdateVdcStorageProfiles>
Response
HTTP/1.1 202 Accepted

Headers:
Content-Length: 1352
Content-Type: application/vnd.vmware.vcloud.task+xml;version=5.5
Location: https://vcloud.example.com/api/task/2510f3ab-4a12-4c69-834f-bbfd442ff374
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><Task
    xmlns="http://www.vmware.com/vcloud/v1.5"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    cancelRequested="false"
    expiryTime="2013-05-15T13:12:59.989+03:00"
    href="https://vcloud.example.com/api/task/2510f3ab-4a12-4c69-834f-bbfd442ff374"
    id="urn:vcloud:task:2510f3ab-4a12-4c69-834f-bbfd442ff374"
    name="task"
    operation="Updating Storage Profiles for Virtual Datacenter (afaafb99-228c-4838-ad07-5bf3aa649d42)"
    operationName="vdcUpdateStorageProfiles"
    serviceNamespace="com.vmware.vcloud"
    startTime="2013-02-14T13:12:59.989+02:00"
    status="running"
    type="application/vnd.vmware.vcloud.task+xml"
    xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
    <Link
        href="https://vcloud.example.com/api/task/2510f3ab-4a12-4c69-834f-bbfd442ff374/action/cancel"
        rel="task:cancel"/>
    <Owner
        href="https://vcloud.example.com/api/admin/vdc/afaafb99-228c-4838-ad07-5bf3aa649d42"
        name=""
        type="application/vnd.vmware.admin.vdc+xml"/>
    <User
        href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
        name="system"
        type="application/vnd.vmware.admin.user+xml"/>
    <Organization
        href="https://vcloud.example.com/api/org/7b832bc5-3d65-45a2-8d35-da28388ab80a"
        name="Default"
        type="application/vnd.vmware.vcloud.org+xml"/>
    <Details/>
</Task>