VMware Cloud Director API - PUT-MediaNameAndDescription

VMware Cloud Director API - PUT-MediaNameAndDescription

PUT /media/{id}

Operation:
PUT /media/{id}
Description:
Update the name and description of a media object.
Since:
0.9
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.media+xml
application/vnd.vmware.vcloud.media+json
Input type:
MediaType
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
PUT /api/media/a28c42bf-2e99-43ba-880a-6305fe621ab0

Headers:
Content-Length: 470
Content-Type: application/vnd.vmware.vcloud.media+xml; charset=ISO-8859-1
x-vcloud-authorization: H0WtdDGONxQuIdzQdy8wnQW9Eyo3E9HqGcaB8PlBdcg=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:Media
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    imageType="iso"
    name="Updated Media Name"
    operationKey="newOperationKey"
    size="0">
    <vcloud:Description>Updated Media Description</vcloud:Description>
    <vcloud:VdcStorageProfile
        href="https://vcloud.example.com/api/vdcStorageProfile/eb6aacbd-f0d8-4a07-8248-1de28151e98f"
        name="profile"
        type="application/vnd.vmware.vcloud.vdcStorageProfile+xml"/>
</vcloud:Media>
Response
HTTP/1.1 202 Accepted

Headers:
Content-Length: 1312
Content-Type: application/vnd.vmware.vcloud.task+xml;version=5.5
Location: https://vcloud.example.com/api/task/704179e4-b75f-485e-8942-6b6ee03a9682
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:10:59.624+03:00"
    href="https://vcloud.example.com/api/task/704179e4-b75f-485e-8942-6b6ee03a9682"
    id="urn:vcloud:task:704179e4-b75f-485e-8942-6b6ee03a9682"
    name="task"
    operation="Updating Media File (a28c42bf-2e99-43ba-880a-6305fe621ab0)"
    operationName="vdcUpdateMedia"
    serviceNamespace="com.vmware.vcloud"
    startTime="2013-02-14T13:10:59.624+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/704179e4-b75f-485e-8942-6b6ee03a9682/action/cancel"
        rel="task:cancel"/>
    <Owner
        href="https://vcloud.example.com/api/media/a28c42bf-2e99-43ba-880a-6305fe621ab0"
        name=""
        type="application/vnd.vmware.vcloud.media+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>