public class SetObjectAclRequest extends AmazonWebServiceRequest implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private AccessControlList |
acl
The custom ACL to apply to the specified object.
|
private java.lang.String |
bucketName
The name of the bucket containing the object whose ACL is being set.
|
private CannedAccessControlList |
cannedAcl
The canned ACL to apply to the specified object.
|
private boolean |
isRequesterPays
If enabled, the requester is charged for conducting this operation from
Requester Pays Buckets.
|
private java.lang.String |
key
The name of the object whose ACL is being set.
|
private java.lang.String |
versionId
The version ID of the object version whose ACL is being set.
|
NOOP
Constructor and Description |
---|
SetObjectAclRequest(java.lang.String bucketName,
java.lang.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(java.lang.String bucketName,
java.lang.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(java.lang.String bucketName,
java.lang.String key,
java.lang.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(java.lang.String bucketName,
java.lang.String key,
java.lang.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.
|
java.lang.String |
getBucketName()
Returns the name of the bucket containing the object whose ACL is being
set.
|
CannedAccessControlList |
getCannedAcl()
Returns the canned ACL to be applied to the specified object when this
request is executed.
|
java.lang.String |
getKey()
Returns the name of the object whose ACL is being set.
|
java.lang.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.
|
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
private final java.lang.String bucketName
private final java.lang.String key
private final java.lang.String versionId
private final AccessControlList acl
private final CannedAccessControlList cannedAcl
private boolean isRequesterPays
public SetObjectAclRequest(java.lang.String bucketName, java.lang.String key, AccessControlList acl)
bucketName
- The name of the bucket 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(java.lang.String bucketName, java.lang.String key, CannedAccessControlList acl)
bucketName
- The name of the bucket 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(java.lang.String bucketName, java.lang.String key, java.lang.String versionId, AccessControlList acl)
bucketName
- The name of the bucket 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(java.lang.String bucketName, java.lang.String key, java.lang.String versionId, CannedAccessControlList acl)
bucketName
- The name of the bucket 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 java.lang.String getBucketName()
public java.lang.String getKey()
public java.lang.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.