Class SetObjectAclRequest
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionSetObjectAclRequest
(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. -
Method Summary
Modifier and TypeMethodDescriptiongetAcl()
Returns the custom ACL to be applied to the specified object when this request is executed.Returns the name of the bucket containing the object whose ACL is being set.Returns the canned ACL to be applied to the specified object when this request is executed.getKey()
Returns the name of the object whose ACL is being set.Returns the version ID of the object version whose ACL is being set.boolean
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.withRequesterPays
(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket.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
-
SetObjectAclRequest
Constructs a new SetObjectAclRequest object, ready to set the specified ACL on the specified object when this request is executed.- Parameters:
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.
-
SetObjectAclRequest
Constructs a new SetObjectAclRequest object, ready to set the specified ACL on the specified object when this request is executed.- Parameters:
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.
-
SetObjectAclRequest
Constructs a new SetObjectAclRequest object, ready to set the specified ACL on the specified object when this request is executed.- Parameters:
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.
-
SetObjectAclRequest
public 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.- Parameters:
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.
-
-
Method Details
-
getBucketName
Returns the name of the bucket containing the object whose ACL is being set.- Returns:
- The name of the bucket containing the object whose ACL is being set.
-
getKey
Returns the name of the object whose ACL is being set.- Returns:
- The name of the object whose ACL is being set.
-
getVersionId
Returns the version ID of the object version whose ACL is being set.- Returns:
- The version ID of the object version whose ACL is being set.
-
getAcl
Returns the custom ACL to be applied to the specified object when this request is executed. A request can use either a custom ACL or a canned ACL, but not both.- Returns:
- The custom ACL to be applied to the specified bucket when this request is executed, or null if the request is to be executed with a canned ACL.
-
getCannedAcl
Returns the canned ACL to be applied to the specified object when this request is executed. A request can use either a custom ACL or a canned ACL, but not both.- Returns:
- The canned ACL to be applied to the specified bucket when this request is executed, or null if the request is to be executed with a custom ACL.
-
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 SetObjectAclRequest 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 SetObjectAclRequest object.
-