类 SetBucketAclRequest


  • public class SetBucketAclRequest
    extends GenericBucketRequest
    Request object containing all the options for setting a bucket's Access Control List (ACL).
    • 构造器详细资料

      • SetBucketAclRequest

        public SetBucketAclRequest​(String bucketName,
                                   CannedAccessControlList cannedAcl)
        Constructs a new SetBucketAclRequest object, ready to set the specified canned ACL on the specified bucket when this request is executed.
        参数:
        bucketName - The name of the bucket whose ACL will be set by this request.
        cannedAcl - The Canned Access Control List to apply to the specified bucket when this request is executed.
      • SetBucketAclRequest

        public SetBucketAclRequest​(String bucketName,
                                   String jsonAcl)
        Constructs a new SetBucketAclRequest object, ready to set the specified canned ACL on the specified bucket when this request is executed.
        参数:
        bucketName - The name of the bucket whose ACL will be set by this request.
        jsonAcl - The json style of acl to apply to the specified bucket when this request is executed.
      • SetBucketAclRequest

        public SetBucketAclRequest​(String bucketName,
                                   List<Grant> accessControlList)
        Constructs a new SetBucketAclRequest object, ready to set the specified ACL on the specified bucket when this request is executed.
        参数:
        bucketName - The name of the bucket whose ACL will be set by this request.
        accessControlList - The custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
    • 方法详细资料

      • getCannedAcl

        public CannedAccessControlList getCannedAcl()
        Returns the canned ACL to be applied to the specified bucket when this request is executed.
        返回:
        The canned ACL to be applied to the specified bucket when this request is executed.
      • setCannedAcl

        public void setCannedAcl​(CannedAccessControlList cannedAcl)
        Sets the canned ACL to be applied to the specified bucket when this request is executed.
        参数:
        cannedAcl - The canned ACL to be applied to the specified bucket when this request is executed.
      • withCannedAcl

        public SetBucketAclRequest withCannedAcl​(CannedAccessControlList cannedAcl)
        Sets the canned ACL to be applied to the specified bucket when this request is executed.
        参数:
        cannedAcl - The canned ACL to be applied to the specified bucket when this request is executed.
        返回:
        this object
      • getAccessControlList

        public List<Grant> getAccessControlList()
        Returns the custom ACL to be applied to the specified bucket when this request is executed. A request can use either a custom ACL or a canned ACL, but not both.
        返回:
        The custom ACL to be applied to the specified bucket when this request is executed.
      • setAccessControlList

        public void setAccessControlList​(List<Grant> accessControlList)
        Sets the custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
        参数:
        accessControlList - The custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
      • withAccessControlList

        public SetBucketAclRequest withAccessControlList​(List<Grant> accessControlList)
        Sets the custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
        参数:
        accessControlList - The custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
        返回:
        this object
      • getJsonAcl

        public String getJsonAcl()
        Returns the custom json style of ACL to be applied to the specified bucket when this request is executed. A request can use either a custom ACL or a canned ACL, but not both.
        返回:
        The custom json style of ACL to be applied to the specified bucket when this request is executed.
      • setJsonAcl

        public void setJsonAcl​(String jsonAcl)
        Sets the custom json style of ACL containing the access rules to apply to the specified bucket when this request is executed.
        参数:
        jsonAcl - The custom json style of acl containing the access rules to apply to the specified bucket when this request is executed.
      • withJsonAcl

        public SetBucketAclRequest withJsonAcl​(String jsonAcl)
        Sets the custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
        参数:
        jsonAcl - The custom json style of acl containing the access rules to apply to the specified bucket when this request is executed.
        返回:
        this object