## com.baidubce.services.bos.model
Class SetBucketAclRequest

    java.lang.Object
      com.baidubce.model.AbstractBceRequest
          com.baidubce.services.bos.model.GenericBucketRequest
              com.baidubce.services.bos.model.SetBucketAclRequest

    public class SetBucketAclRequest

extends GenericBucketRequest

Request object containing all the options for setting a bucket's Access Control List (ACL).

Constructor Summary
`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.
`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.
`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.

Method Summary
`List<Grant>` `getAccessControlList()` Returns the custom ACL to be applied to the specified bucket when this request is executed.
`CannedAccessControlList` `getCannedAcl()` Returns the canned ACL to be applied to the specified bucket when this request is executed.
`String` `getJsonAcl()` Returns the custom json style of ACL to be applied to the specified bucket when this request is executed.
`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.
`void` `setCannedAcl(CannedAccessControlList cannedAcl)` Sets the canned ACL to be applied to the specified bucket when this request is executed.
`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.
`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.
`SetBucketAclRequest` `withBucketName(String bucketName)`
`SetBucketAclRequest` `withCannedAcl(CannedAccessControlList cannedAcl)` Sets the canned ACL to be applied to the specified bucket when this request is executed.
`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.
`SetBucketAclRequest` `withRequestCredentials(BceCredentials credentials)`

Methods inherited from class com.baidubce.services.bos.model.GenericBucketRequest
`getBucketName, setBucketName`

Methods inherited from class com.baidubce.model.AbstractBceRequest
`getRequestCredentials, setRequestCredentials`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### 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.

  Parameters:
    `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.

  Parameters:
    `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.

  Parameters:
    `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.

Method Detail

### withRequestCredentials

    public SetBucketAclRequest withRequestCredentials(BceCredentials credentials)

  Specified by:
    `withRequestCredentials` in class `AbstractBceRequest`

### withBucketName

    public SetBucketAclRequest withBucketName(String bucketName)

  Specified by:
    `withBucketName` in class `GenericBucketRequest`

### getCannedAcl

    public CannedAccessControlList getCannedAcl()

  Returns the canned ACL to be applied to the specified bucket when this request is executed.

  Returns:
    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.

  Parameters:
    `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.

  Parameters:
    `cannedAcl` - The canned ACL to be applied to the specified bucket when this request is executed.

### 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.

  Returns:
    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.

  Parameters:
    `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.

  Parameters:
    `accessControlList` - The custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.

### 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.

  Returns:
    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.

  Parameters:
    `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.

  Parameters:
    `jsonAcl` - The custom json style of acl containing the access rules to apply to the specified bucket when this request is executed.

Copyright © 2016. All rights reserved.