AccessPolicy Property
The canned access policy to apply to a bucket or object.
Syntax
public int getAccessPolicy(); public void setAccessPolicy(int accessPolicy);
Enumerated values: public final static int ptPrivate = 0; public final static int ptPublicRead = 1; public final static int ptPublicReadWrite = 2; public final static int ptAuthenticatedRead = 3; public final static int ptBucketOwnerRead = 4; public final static int ptBucketOwnerFullControl = 5; public final static int ptNone = 6;
Remarks
This property specifies the canned access policy that should be applied to a bucket or object when one of the following methods is called:
- CopyObject (for the destination object)
- CreateBucket
- CreateObject
- StartMultipartUpload
- UpdateBucketACL
- UpdateObjectACL
Valid values are:
ptPrivate (0) (default) | Owner gets full control, no one else has access. |
ptPublicRead (1) | Owner gets full control, everyone else gets read access. |
ptPublicReadWrite (2) | Owner gets full control, everyone else gets read/write access. |
ptAuthenticatedRead (3) | Owner gets full control, authenticated users get read access. |
ptBucketOwnerRead (4) | Only applicable for objects. Object owner gets full control, bucket owner gets read access. |
ptBucketOwnerFullControl (5) | Only applicable for objects. Both object and bucket owner get full control. |
ptNone (6) | (Instructs the component to not explicitly set a canned access policy for a bucket or object.) |
Default Value
0