public class SetObjectLegalHoldRequest extends AmazonWebServiceRequest implements Serializable, ExpectedBucketOwnerRequest
NOOP
Constructor and Description |
---|
SetObjectLegalHoldRequest() |
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
The bucket name containing the object that you want to place a Legal Hold on.
|
String |
getExpectedBucketOwner()
Returns he account id of the expected bucket owner.
|
String |
getKey()
The Object Key.
|
ObjectLockLegalHold |
getLegalHold()
Container element for the Legal Hold configuration you want to apply to the specified object.
|
String |
getVersionId()
The Object Version ID.
|
boolean |
isRequesterPays()
Returns true if the user has enabled Requester Pays option when
downloading an object from Requester Pays Bucket; else false.
|
void |
setBucketName(String bucket)
The bucket name containing the object that you want to place a Legal Hold on.
|
void |
setExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
void |
setKey(String key)
The Object Key.
|
void |
setLegalHold(ObjectLockLegalHold legalHold)
Container element for the Legal Hold configuration you want to apply to the specified object.
|
void |
setRequesterPays(boolean isRequesterPays)
Used for downloading an Amazon S3 Object from a Requester Pays Bucket.
|
void |
setVersionId(String versionId)
The Object Version ID.
|
SetObjectLegalHoldRequest |
withBucketName(String bucket)
The bucket name containing the object that you want to place a Legal Hold on.
|
SetObjectLegalHoldRequest |
withExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
SetObjectLegalHoldRequest |
withKey(String key)
The Object Key.
|
SetObjectLegalHoldRequest |
withLegalHold(ObjectLockLegalHold legalHold)
Container element for the Legal Hold configuration you want to apply to the specified object.
|
SetObjectLegalHoldRequest |
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
SetObjectLegalHoldRequest |
withVersionId(String versionId)
The Object Version ID.
|
addHandlerContext, clone, copyBaseTo, 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 String getExpectedBucketOwner()
ExpectedBucketOwnerRequest
403 (Access Denied)
error.getExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public SetObjectLegalHoldRequest 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()
The bucket name containing the object that you want to place a Legal Hold on.
When using this action 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 action with 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 S3 User Guide.
When using this action 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 action with 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 S3 User Guide.
public SetObjectLegalHoldRequest withBucketName(String bucket)
The bucket name containing the object that you want to place a Legal Hold on.
When using this action 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 action with 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 S3 User Guide.
bucket
- The bucket name containing the object that you want to place a Legal Hold on.
When using this action 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 action with 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 S3 User Guide.
public void setBucketName(String bucket)
The bucket name containing the object that you want to place a Legal Hold on.
When using this action 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 action with 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 S3 User Guide.
bucket
- The bucket name containing the object that you want to place a Legal Hold on.
When using this action 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 action with 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 S3 User Guide.
public String getKey()
public SetObjectLegalHoldRequest withKey(String key)
public void setKey(String key)
public ObjectLockLegalHold getLegalHold()
public SetObjectLegalHoldRequest withLegalHold(ObjectLockLegalHold legalHold)
public void setLegalHold(ObjectLockLegalHold legalHold)
public boolean isRequesterPays()
If a bucket is enabled for Requester Pays, then any attempt to read 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 SetObjectLegalHoldRequest 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 void setRequesterPays(boolean isRequesterPays)
If a bucket is enabled for Requester Pays, then any attempt to read 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 String getVersionId()
public SetObjectLegalHoldRequest withVersionId(String versionId)
public void setVersionId(String versionId)
Copyright © 2023. All rights reserved.