Media

Element:
Media
Type:
MediaType
Namespace:
http://www.vmware.com/vcloud/v1.5
Description:
Represents a media.
Since:
0.9
Schema:
media.xsd
Media type(s):
application/vnd.vmware.vcloud.media+xml
Extends:
ResourceEntityType
XML Representation:
<Media xmlns="http://www.vmware.com/vcloud/v1.5" href="xs:anyURI" type="xs:string" name="xs:string" id="xs:string"
        status="xs:int" imageType="xs:string" size="xs:long">
    <Link href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"
            rel="xs:string"/>
    <Description> xs:string </Description>
    <Tasks>
        <Task href="xs:anyURI" type="xs:string" name="xs:string" id="xs:string"
                status="xs:string" operation="xs:string" operationName="xs:string" startTime="xs:dateTime"
                endTime="xs:dateTime" expiryTime="xs:dateTime">
            <Link href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"
                    rel="xs:string"/>
            <Description> xs:string </Description>
            <Tasks> TasksInProgressType </Tasks>
            <Owner href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
            <Error message="xs:string" majorErrorCode="xs:int" minorErrorCode="xs:string" vendorSpecificErrorCode="xs:string"
                    stackTrace="xs:string"/>
            <User href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
            <Organization href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
            <Progress> xs:int </Progress>
            <Params> ... </Params>
        </Task>
    </Tasks>
    <Files>
        <File href="xs:anyURI" type="xs:string" name="xs:string" id="xs:string"
                size="xs:long" bytesTransferred="xs:long" checksum="xs:normalizedString">
            <Link href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"
                    rel="xs:string"/>
            <Description> xs:string </Description>
            <Tasks>
                <Task href="xs:anyURI" type="xs:string" name="xs:string" id="xs:string"
                        status="xs:string" operation="xs:string" operationName="xs:string" startTime="xs:dateTime"
                        endTime="xs:dateTime" expiryTime="xs:dateTime">
                    <Link href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"
                            rel="xs:string"/>
                    <Description> xs:string </Description>
                    <Tasks> TasksInProgressType </Tasks>
                    <Owner href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
                    <Error message="xs:string" majorErrorCode="xs:int" minorErrorCode="xs:string" vendorSpecificErrorCode="xs:string"
                            stackTrace="xs:string"/>
                    <User href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
                    <Organization href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
                    <Progress> xs:int </Progress>
                    <Params> ... </Params>
                </Task>
            </Tasks>
        </File>
    </Files>
    <Owner href="xs:anyURI" type="xs:string">
        <Link href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"
                rel="xs:string"/>
        <User href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
    </Owner>
</Media>

Attributes

Attribute Type Required Modifiable Since Description
href anyURI No always 0.9 Contains the URI to the entity.
type string No always 0.9 Contains the type of the entity.
name string Yes always 0.9 The name of the entity.
id string No none 0.9 The entity identifier, expressed in URN format. The value of this attribute uniquely identifies the entity, persists for the life of the entity, and is never reused.
status int No none 0.9 Creation status of the resource entity.
imageType string Yes create 0.9 Media image type. One of: iso, floppy Required on create. Must be present on modify but cannot be changed.
size long Yes none 0.9 Size of the media. For modify operation this is required only for the XSD validation it could not be changed.

Elements

Element Type Occurrence Modifiable Since Description
VCloudExtension VCloudExtensionType 0..* always 0.9 An optional extension element that can contain an arbitrary number of elements and attributes.
Link LinkType 0..* none 0.9 Optional link to an entity or operation associated with this object.
Description string 0..1 always 0.9 Optional description.
Tasks TasksInProgressType 0..1 none 0.9 A list of queued, running, or recently completed tasks associated with this entity.
Files FilesListType 0..1 none 0.9 Represents a list of files to be transferred (uploaded or downloaded). Each File in the list is part of the ResourceEntity.
Owner OwnerType 0..1 none 0.9 Media owner.

Operations

CRUD Operation Description Since
create POST /admin/extension/vimServer/{id}/importMedia Import media from vSphere Supported media types are ISO and FLOPPY The returned media entity will contain a task of importing process. 1.5
create POST /vdc/{id}/action/cloneMedia Clones a media into new one. 0.9
create POST /vdc/{id}/media Creates a media (and present upload link for the floppy/iso file). 0.9
read GET /media/{id} Retrieves a media. 0.9
update PUT /media/{id} Updates the name/description of a media. 0.9
delete DELETE /media/{id} Deletes a media. 0.9