VMware vSphere Automation SDK Perl
The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities
 All Classes Files Functions
List of all members
Com::Vmware::Content::Library::Item::DownloadSession Class Reference
Inheritance diagram for Com::Vmware::Content::Library::Item::DownloadSession:
Com::Vmware::Vapi::Bindings::VapiInterface

Avaliable Methods

public method create ()
 
public method fail ()
 
public method delete ()
 
public method get ()
 
public method cancel ()
 
public method new ()
 
public method keep_alive ()
 
public method list ()
 

Detailed Description

The Com::Vmware::Content::Library::Item::DownloadSession interface manipulates download sessions, which are used to download content from the Content Library Service.

A download session is an object that tracks the download of content (that is, downloading content from the Content Library Service) and acts as a lease to keep the download links available.

The class Com::Vmware::Content::Library::Item::Downloadsession::File interface provides access to the download links.

Constant String::RESOURCE_TYPE # Resource type for a download session.

Member Function Documentation

public method Com::Vmware::Content::Library::Item::DownloadSession::cancel ( )

Cancels the download session. This method will abort any ongoing transfers and invalidate transfer urls that the client may be downloading from.

Parameters
download_session_id[REQUIRED] Identifer of the download session that should be canceled. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif no download session with the given identifier exists.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the download session is not in the :attr:Com::Vmware::Content::Library::Item::DownloadSessionModel::State.ACTIVE state.
Code:
click to view
public method Com::Vmware::Content::Library::Item::DownloadSession::create ( )

Creates a new download session.

Parameters
client_token[OPTIONAL] A unique token generated by the client for each creation request. The token should be a universally unique identifier (UUID), for example: b8a2a2e3-2314-43cd-a871-6ede0f429751 . This token can be used to guarantee idempotent creation. If not specified creation is not idempotent. . The value must be String or None.
create_spec[REQUIRED] Specification for the new download session to be created. . The value must be Com::Vmware::Content::Library::Item::DownloadSessionModel.
Return values
Identifierof the new download session being created. The value will be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). The return type will be str
Exceptions
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif the session specification is not valid.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentformat.
Com::Vmware::Vapi::Std::Errors::NotFoundif the library item targeted by the download does not exist.
Code:
click to view
public method Com::Vmware::Content::Library::Item::DownloadSession::delete ( )

Deletes a download session. This removes the session and all information associated with it.

Removing a download session leaves any current transfers for that session in an indeterminate state (there is no guarantee that the transfers will be able to complete). However there will no longer be a means of inspecting the status of those downloads except by seeing the effect on the library item.

Download sessions for which there is no download activity or which are complete will automatically be expired and then deleted after a period of time.

Parameters
download_session_id[REQUIRED] Identifier of the download session to be deleted. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the download session does not exist.
Code:
click to view
public method Com::Vmware::Content::Library::Item::DownloadSession::fail ( )

Terminates the download session with a client specified error message.

This is useful in transmitting client side failures (for example, not being able to download a file) to the server side.

Parameters
download_session_id[REQUIRED] Identifier of the download session to fail. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
client_error_message[REQUIRED] Client side error message. This can be useful in providing some extra details about the client side failure. Note that the message won't be translated to the user's locale. . The value must be String.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the download session does not exist.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the download session is not in the :attr:Com::Vmware::Content::Library::Item::DownloadSessionModel::State.ACTIVE state.
Code:
click to view
public method Com::Vmware::Content::Library::Item::DownloadSession::get ( )

Gets the download session with the specified identifier, including the most up-to-date status information for the session.

Parameters
download_session_id[REQUIRED] Identifier of the download session to retrieve. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
Return values
Theclass Com::Vmware::Content::Library::Item::DownloadSessionModel instance with the given download_session_id . The return type will be Com::Vmware::Content::Library::Item::DownloadSessionModel
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif no download session with the given download_session_id exists.
Code:
click to view
public method Com::Vmware::Content::Library::Item::DownloadSession::keep_alive ( )

Keeps a download session alive. This operation is allowed only if the session is in the :attr:Com::Vmware::Content::Library::Item::DownloadSessionModel::State.ACTIVE state.

If there is no activity for a download session for a certain period of time, the download session will expire. The download session expiration timeout is configurable in the Content Library Service system configuration. The default is five minutes. Invoking this method* enables a client to specifically extend the lifetime of an active download session.

Parameters
download_session_id[REQUIRED] Identifier of the download session whose lifetime should be extended. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
progress[OPTIONAL] Optional update to the progress property of the session. If specified, the new progress should be greater then the current progress. See :attr:Com::Vmware::Content::Library::Item::DownloadSessionModel.client_progress . If not specified the progress is not updated. . The value must be Long or None.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif no download session with the given identifier exists.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the download session is not in the :attr:Com::Vmware::Content::Library::Item::DownloadSessionModel::State.ACTIVE state.
Code:
click to view
public method Com::Vmware::Content::Library::Item::DownloadSession::list ( )

Lists the identifiers of the download sessions created by the calling user. Optionally may filter by library item.

Parameters
library_item_id[OPTIONAL] Library item identifier on which to filter results. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). If not specified all download session identifiers are listed. . The value must be str or None.
Return values
Thelist of identifiers of all download sessions created by the calling user. The value will be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). The return type will be Array of str
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif a library item identifier is given for an item which does not exist.
Code:
click to view
public method Com::Vmware::Content::Library::Item::DownloadSession::new ( )

Constructor to initialize the object

Parameters
api_provider- protocol connection to use with stubs created by this factory
StubConfig- Stub's additional configuration
Return values
Blessedobject
Code:
click to view

The documentation for this class was generated from the following file: