Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.glacier.model
Class GetJobOutputRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.glacier.model.GetJobOutputRequest
All Implemented Interfaces:
Serializable

public class GetJobOutputRequest
extends AmazonWebServiceRequest
implements Serializable

Container for the parameters to the GetJobOutput operation.

This operation downloads the output of the job you initiated using InitiateJob. Depending on the job type you specified when you initiated the job, the output will be either the content of an archive or a vault inventory.

A job ID will not expire for at least 24 hours after Amazon Glacier completes the job. That is, you can download the job output within the 24 hours period after Amazon Glacier completes the job.

If the job output is large, then you can use the Range request header to retrieve a portion of the output. This allows you to download the entire output in smaller chunks of bytes. For example, suppose you have 1 GB of job output you want to download and you decide to download 128 MB chunks of data at a time, which is a total of eight Get Job Output requests. You use the following process to download the job output:

  1. Download a 128 MB chunk of output by specifying the appropriate byte range using the Range header.

  2. Along with the data, the response includes a checksum of the payload. You compute the checksum of the payload on the client and compare it with the checksum you received in the response to ensure you received all the expected data.

  3. Repeat steps 1 and 2 for all the eight 128 MB chunks of output data, each time specifying the appropriate byte range.

  4. After downloading all the parts of the job output, you have a list of eight checksum values. Compute the tree hash of these values to find the checksum of the entire output. Using the Describe Job API, obtain job information of the job that provided you the output. The response includes the checksum of the entire archive stored in Amazon Glacier. You compare this value with the checksum you computed to ensure you have downloaded the entire archive content with no errors.

An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM) .

For conceptual information and the underlying REST API, go to Downloading a Vault Inventory , Downloading an Archive , and Get Job Output

See Also:
AmazonGlacier.getJobOutput(GetJobOutputRequest), Serialized Form

Constructor Summary
GetJobOutputRequest()
          Default constructor for a new GetJobOutputRequest object.
GetJobOutputRequest(String vaultName, String jobId, String range)
          Constructs a new GetJobOutputRequest object.
GetJobOutputRequest(String accountId, String vaultName, String jobId, String range)
          Constructs a new GetJobOutputRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAccountId()
          The AccountId is the AWS Account ID.
 String getJobId()
          The job ID whose data is downloaded.
 String getRange()
          The range of bytes to retrieve from the output.
 String getVaultName()
          The name of the vault.
 int hashCode()
           
 void setAccountId(String accountId)
          The AccountId is the AWS Account ID.
 void setJobId(String jobId)
          The job ID whose data is downloaded.
 void setRange(String range)
          The range of bytes to retrieve from the output.
 void setVaultName(String vaultName)
          The name of the vault.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 GetJobOutputRequest withAccountId(String accountId)
          The AccountId is the AWS Account ID.
 GetJobOutputRequest withJobId(String jobId)
          The job ID whose data is downloaded.
 GetJobOutputRequest withRange(String range)
          The range of bytes to retrieve from the output.
 GetJobOutputRequest withVaultName(String vaultName)
          The name of the vault.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetJobOutputRequest

public GetJobOutputRequest()
Default constructor for a new GetJobOutputRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


GetJobOutputRequest

public GetJobOutputRequest(String vaultName,
                           String jobId,
                           String range)
Constructs a new GetJobOutputRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
vaultName - The name of the vault.
jobId - The job ID whose data is downloaded.
range - The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.

GetJobOutputRequest

public GetJobOutputRequest(String accountId,
                           String vaultName,
                           String jobId,
                           String range)
Constructs a new GetJobOutputRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
accountId - The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.
vaultName - The name of the vault.
jobId - The job ID whose data is downloaded.
range - The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.
Method Detail

getAccountId

public String getAccountId()
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

Returns:
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

setAccountId

public void setAccountId(String accountId)
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

Parameters:
accountId - The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

withAccountId

public GetJobOutputRequest withAccountId(String accountId)
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

Returns a reference to this object so that method calls can be chained together.

Parameters:
accountId - The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.
Returns:
A reference to this updated object so that method calls can be chained together.

getVaultName

public String getVaultName()
The name of the vault.

Returns:
The name of the vault.

setVaultName

public void setVaultName(String vaultName)
The name of the vault.

Parameters:
vaultName - The name of the vault.

withVaultName

public GetJobOutputRequest withVaultName(String vaultName)
The name of the vault.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vaultName - The name of the vault.
Returns:
A reference to this updated object so that method calls can be chained together.

getJobId

public String getJobId()
The job ID whose data is downloaded.

Returns:
The job ID whose data is downloaded.

setJobId

public void setJobId(String jobId)
The job ID whose data is downloaded.

Parameters:
jobId - The job ID whose data is downloaded.

withJobId

public GetJobOutputRequest withJobId(String jobId)
The job ID whose data is downloaded.

Returns a reference to this object so that method calls can be chained together.

Parameters:
jobId - The job ID whose data is downloaded.
Returns:
A reference to this updated object so that method calls can be chained together.

getRange

public String getRange()
The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.

Returns:
The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.

setRange

public void setRange(String range)
The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.

Parameters:
range - The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.

withRange

public GetJobOutputRequest withRange(String range)
The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.

Returns a reference to this object so that method calls can be chained together.

Parameters:
range - The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575". By default, this operation downloads the entire output.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.