Class RestoreObjectRequest
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
Request object containing all the options for restoring an object, which was transitioned to the Amazon Glacier from S3 when it was expired.
All RestoreObjectRequest
must specify a bucket name and key,
along with expiration time.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionRestoreObjectRequest
(String bucketName, String key) Constructs a new RestoreObjectRequest.RestoreObjectRequest
(String bucketName, String key, int expirationInDays) Constructs a new RestoreObjectRequest. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.int
Returns the time in days from an object's creation to its expiration.getKey()
Gets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.Returns the id of the version to be restored.boolean
Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.void
setBucketName
(String bucketName) Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.void
setExpirationInDays
(int expirationInDays) Sets the time, in days, between when an object is uploaded to the bucket and when it expires.void
Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.void
setRequesterPays
(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket.void
setVersionId
(String versionId) Sets the id of the version to be restored.withBucketName
(String bucketName) Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier, and returns a reference to this object(RestoreObjectRequest) for method chaining.withExpirationInDays
(int expirationInDays) Sets the time, in days, between when an object is uploaded to the bucket and when it expires, and returns a reference to this object(RestoreObjectRequest) for method chaining.Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier. returns a reference to this object(RestoreObjectRequest) for method chaining.withRequesterPays
(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket.withVersionId
(String versionId) Sets the id of the version to be restored and returns a reference to this object for method chaining.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
RestoreObjectRequest
Constructs a new RestoreObjectRequest.
- Parameters:
bucketName
- The name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.key
- The key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.- See Also:
-
RestoreObjectRequest
Constructs a new RestoreObjectRequest.
- Parameters:
bucketName
- The name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.key
- The key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.expirationInDays
- The time, in days, between when an object is restored to the bucket and when it expires- See Also:
-
-
Method Details
-
getBucketName
Returns the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.- See Also:
-
withBucketName
Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier, and returns a reference to this object(RestoreObjectRequest) for method chaining.- See Also:
-
setBucketName
Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.- See Also:
-
getKey
Gets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.- See Also:
-
setKey
Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.- See Also:
-
withKey
Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier. returns a reference to this object(RestoreObjectRequest) for method chaining.- See Also:
-
getVersionId
Returns the id of the version to be restored. -
setVersionId
Sets the id of the version to be restored. -
withVersionId
Sets the id of the version to be restored and returns a reference to this object for method chaining. -
setExpirationInDays
public void setExpirationInDays(int expirationInDays) Sets the time, in days, between when an object is uploaded to the bucket and when it expires. -
getExpirationInDays
public int getExpirationInDays()Returns the time in days from an object's creation to its expiration. -
withExpirationInDays
Sets the time, in days, between when an object is uploaded to the bucket and when it expires, and returns a reference to this object(RestoreObjectRequest) for method chaining. -
isRequesterPays
public boolean isRequesterPays()Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket
- Returns:
- true if the user has enabled Requester Pays option for conducting this operation from Requester Pays Bucket.
-
setRequesterPays
public void setRequesterPays(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket.If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket.
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.
-
withRequesterPays
Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket. It returns this updated RestoreObjectRequest object so that additional method calls can be chained together.If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket.
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.- Returns:
- The updated RestoreObjectRequest object.
-