public class RestoreObjectRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, ExpectedBucketOwnerRequest
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.
NOOP
Constructor and Description |
---|
RestoreObjectRequest(String bucketName,
String key)
Constructs a new RestoreObjectRequest.
|
RestoreObjectRequest(String bucketName,
String key,
int expirationInDays)
Constructs a new RestoreObjectRequest.
|
Modifier and Type | Method and Description |
---|---|
RestoreObjectRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
String |
getBucketName()
Returns the name of the bucket containing the reference to the object to
restore which is now stored in Amazon Glacier.
|
String |
getDescription() |
String |
getExpectedBucketOwner()
Returns he account id of the expected bucket owner.
|
int |
getExpirationInDays()
Returns the lifetime of the active copy in days.
|
GlacierJobParameters |
getGlacierJobParameters() |
String |
getKey()
Gets the key, the name of the reference to the object to restore, which is
now stored in Amazon Glacier.
|
OutputLocation |
getOutputLocation() |
SelectParameters |
getSelectParameters() |
String |
getTier() |
String |
getType() |
String |
getVersionId()
Returns the id of the version to be restored.
|
int |
hashCode() |
boolean |
isRequesterPays()
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 |
setDescription(String description)
Sets the description for the job.
|
void |
setExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
void |
setExpirationInDays(int expirationInDays)
Set the lifetime of the active copy in days.
|
void |
setGlacierJobParameters(GlacierJobParameters glacierJobParameters)
Sets Glacier related parameters pertaining to this job.
|
void |
setKey(String key)
Sets the key, the name of the reference to the object to restore, which
is now stored in Amazon Glacier.
|
void |
setOutputLocation(OutputLocation outputLocation)
Sets the location where the restore job's output is stored.
|
void |
setRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
void |
setSelectParameters(SelectParameters selectParameters)
Sets the parameters for select job types.
|
void |
setTier(String tier)
Sets the glacier retrieval tier.
|
void |
setType(String type)
Sets the restore request type.
|
void |
setVersionId(String versionId)
Sets the id of the version to be restored.
|
String |
toString() |
RestoreObjectRequest |
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.
|
RestoreObjectRequest |
withDescription(String description)
Sets the description for the job.
|
RestoreObjectRequest |
withExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
RestoreObjectRequest |
withExpirationInDays(int expirationInDays)
Set the lifetime of the active copy in days.
|
RestoreObjectRequest |
withGlacierJobParameters(GlacierJobParameters glacierJobParameters)
Sets Glacier related parameters pertaining to this job.
|
RestoreObjectRequest |
withKey(String key)
Sets the key, the name of the reference to the object to restore, which
is now stored in Amazon Glacier.
|
RestoreObjectRequest |
withOutputLocation(OutputLocation outputLocation)
Sets the location where the restore job's output is stored.
|
RestoreObjectRequest |
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
RestoreObjectRequest |
withSelectParameters(SelectParameters selectParameters)
Sets the parameters for select job types.
|
RestoreObjectRequest |
withTier(String tier)
Sets the glacier retrieval tier.
|
RestoreObjectRequest |
withTier(Tier tier)
Sets the glacier retrieval tier.
|
RestoreObjectRequest |
withType(RestoreRequestType restoreRequestType)
Sets the restore request type.
|
RestoreObjectRequest |
withType(String restoreRequestType)
Sets the restore request type.
|
RestoreObjectRequest |
withVersionId(String versionId)
Sets the id of the version to be restored and returns a reference to
this object for method chaining.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public RestoreObjectRequest(String bucketName, String key)
Constructs a new RestoreObjectRequest.
When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
When using this operation using an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon Simple Storage Service Developer Guide.
bucketName
- The name of the bucket, or access point ARN, 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.RestoreObjectRequest(String, String, int)
public RestoreObjectRequest(String bucketName, String key, int expirationInDays)
Constructs a new RestoreObjectRequest.
When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
When using this operation using an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon Simple Storage Service Developer Guide.
bucketName
- The name of the bucket, or access point ARN, 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 expiresRestoreObjectRequest(String, String)
public String getExpectedBucketOwner()
ExpectedBucketOwnerRequest
403 (Access Denied)
error.getExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public RestoreObjectRequest withExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.withExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public void setExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.setExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public String getBucketName()
setBucketName(String)
,
withBucketName(String)
public RestoreObjectRequest withBucketName(String bucketName)
When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
When using this operation using an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon Simple Storage Service Developer Guide.
setBucketName(String)
,
getBucketName()
public void setBucketName(String bucketName)
When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
When using this operation using an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon Simple Storage Service Developer Guide.
getBucketName()
,
withBucketName(String)
public String getKey()
setKey(String)
,
withKey(String)
public void setKey(String key)
getKey()
,
withKey(String)
public RestoreObjectRequest withKey(String key)
getKey()
,
setKey(String)
public String getVersionId()
public void setVersionId(String versionId)
public RestoreObjectRequest withVersionId(String versionId)
public void setExpirationInDays(int expirationInDays)
OutputLocation
.
The Days element is required for regular restores, and must not be provided for select requests.
public int getExpirationInDays()
OutputLocation
.
The Days element is required for regular restores, and must not be provided for select requests.
public RestoreObjectRequest withExpirationInDays(int expirationInDays)
OutputLocation
.
The Days element is required for regular restores, and must not be provided for select requests.
public boolean isRequesterPays()
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
public void setRequesterPays(boolean isRequesterPays)
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.
isRequesterPays
- Enable Requester Pays option for the operation.public RestoreObjectRequest withRequesterPays(boolean isRequesterPays)
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.
isRequesterPays
- Enable Requester Pays option for the operation.public GlacierJobParameters getGlacierJobParameters()
public void setGlacierJobParameters(GlacierJobParameters glacierJobParameters)
This should not be used for restores with a specified OutputLocation.
glacierJobParameters
- New value for Glacier job parameters.public RestoreObjectRequest withGlacierJobParameters(GlacierJobParameters glacierJobParameters)
This should not be used for restores with a specified OutputLocation.
glacierJobParameters
- New value for Glacier job parameters.public String getType()
public void setType(String type)
type
- New value for type.public RestoreObjectRequest withType(String restoreRequestType)
restoreRequestType
- New value for restore request type.public RestoreObjectRequest withType(RestoreRequestType restoreRequestType)
restoreRequestType
- New value for restore request type.public String getTier()
public void setTier(String tier)
tier
- New value for tier.public RestoreObjectRequest withTier(String tier)
tier
- New value for tier.public RestoreObjectRequest withTier(Tier tier)
tier
- New value for tier.public String getDescription()
public void setDescription(String description)
description
- New value for the descriptionpublic RestoreObjectRequest withDescription(String description)
description
- New value for the descriptionpublic SelectParameters getSelectParameters()
public void setSelectParameters(SelectParameters selectParameters)
selectParameters
- New value for selectParameterspublic RestoreObjectRequest withSelectParameters(SelectParameters selectParameters)
selectParameters
- New value for selectParameterspublic OutputLocation getOutputLocation()
public void setOutputLocation(OutputLocation outputLocation)
outputLocation
- New value for output locationpublic RestoreObjectRequest withOutputLocation(OutputLocation outputLocation)
outputLocation
- New value for output locationpublic RestoreObjectRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()