AccessPolicy Property
The canned access policy to apply to a bucket or object.
Syntax
ANSI (Cross Platform) int GetAccessPolicy();
int SetAccessPolicy(int iAccessPolicy); Unicode (Windows) INT GetAccessPolicy();
INT SetAccessPolicy(INT iAccessPolicy);
Possible Values
PT_PRIVATE(0),
PT_PUBLIC_READ(1),
PT_PUBLIC_READ_WRITE(2),
PT_AUTHENTICATED_READ(3),
PT_BUCKET_OWNER_READ(4),
PT_BUCKET_OWNER_FULL_CONTROL(5),
PT_NONE(6)
@property (nonatomic,readwrite,assign,getter=accessPolicy,setter=setAccessPolicy:) int accessPolicy; - (int)accessPolicy; - (void)setAccessPolicy:(int)newAccessPolicy;
Possible Values
PT_PRIVATE(0),
PT_PUBLIC_READ(1),
PT_PUBLIC_READ_WRITE(2),
PT_AUTHENTICATED_READ(3),
PT_BUCKET_OWNER_READ(4),
PT_BUCKET_OWNER_FULL_CONTROL(5),
PT_NONE(6)
#define PID_GOOGLESTORAGE_ACCESSPOLICY 1 IPWORKSCLOUD_EXTERNAL void* IPWORKSCLOUD_CALL IPWorksCloud_GoogleStorage_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_GoogleStorage_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
Default Value
0
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 class to not explicitly set a canned access policy for a bucket or object.) |
Data Type
Integer