public class SetObjectAclRequest extends AmazonWebServiceRequest implements Serializable
NOOP
Constructor and Description |
---|
SetObjectAclRequest(String bucketName,
String key,
AccessControlList acl)
Constructs a new SetObjectAclRequest object, ready to set the specified
ACL on the specified object when this request is executed.
|
SetObjectAclRequest(String bucketName,
String key,
CannedAccessControlList acl)
Constructs a new SetObjectAclRequest object, ready to set the specified
ACL on the specified object when this request is executed.
|
SetObjectAclRequest(String bucketName,
String key,
String versionId,
AccessControlList acl)
Constructs a new SetObjectAclRequest object, ready to set the specified
ACL on the specified object when this request is executed.
|
SetObjectAclRequest(String bucketName,
String key,
String versionId,
CannedAccessControlList acl)
Constructs a new SetObjectAclRequest object, ready to set the specified
ACL on the specified object when this request is executed.
|
Modifier and Type | Method and Description |
---|---|
AccessControlList |
getAcl()
Returns the custom ACL to be applied to the specified object when this
request is executed.
|
String |
getBucketName()
The bucket name that contains the object to which you want to attach the ACL.
|
CannedAccessControlList |
getCannedAcl()
Returns the canned ACL to be applied to the specified object when this
request is executed.
|
String |
getKey()
Key for which the PUT action was initiated.
|
String |
getVersionId()
Returns the version ID of the object version whose ACL is being set.
|
boolean |
isRequesterPays()
Returns true if the user has enabled Requester Pays option when
conducting this operation from Requester Pays Bucket; else false.
|
void |
setRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
SetObjectAclRequest |
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
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 SetObjectAclRequest(String bucketName, String key, AccessControlList acl)
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 object whose ACL is
being set.key
- The name of the object whose ACL is being set.acl
- The custom Access Control List containing the access rules to
apply to the specified bucket when this request is executed.public SetObjectAclRequest(String bucketName, String key, CannedAccessControlList acl)
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 object whose ACL is
being set.key
- The name of the object whose ACL is being set.acl
- The Canned Access Control List to apply to the specified
bucket when this request is executed.public SetObjectAclRequest(String bucketName, String key, String versionId, AccessControlList acl)
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 object whose ACL is
being set.key
- The name of the object whose ACL is being set.versionId
- The version ID of the object version whose ACL is being set.acl
- The custom Access Control List containing the access rules to
apply to the specified bucket when this request is executed.public SetObjectAclRequest(String bucketName, String key, String versionId, CannedAccessControlList acl)
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 object whose ACL is
being set.key
- The name of the object whose ACL is being set.versionId
- The version ID of the object version whose ACL is being set.acl
- The Canned Access Control List to apply to the specified
bucket when this request is executed.public String getBucketName()
The bucket name that contains the object to which you want to attach the ACL.
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 you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts 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.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
hostname. The S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts
in the Amazon S3 User Guide.
public String getKey()
Key for which the PUT action was initiated.
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 you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts 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.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
hostname. The S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts
in the Amazon S3 User Guide.
public String getVersionId()
public AccessControlList getAcl()
public CannedAccessControlList getCannedAcl()
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 SetObjectAclRequest 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.Copyright © 2024. All rights reserved.