Package org.jclouds.s3.domain
Enum Class CannedAccessPolicy
- All Implemented Interfaces:
Serializable
,Comparable<CannedAccessPolicy>
,java.lang.constant.Constable
Description from Amazon's documentation:
Because of restrictions in what can be sent via http headers, Amazon S3
supports the concept of canned access policies for REST. A canned access
policy can be included with the x-amz-acl header as part of a PUT operation
to provide shorthand representation of a full access policy. When Amazon S3
sees the x-amz-acl header as part of a PUT operation, it will assign the
respective access policy to the resource created as a result of the PUT. If
no x-amz-acl header is included with a PUT request, then the bucket or object
is written with the private access control policy (even if, in the case of an
object, the object already exists with some other pre-existing access control
policy).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOwner gets FULL_CONTROL, and any identity authenticated as a registered Amazon S3 user is granted READ access.Owner gets FULL_CONTROL.Both the object owner and the bucket owner get FULL_CONTROL over the object.Object owner gets FULL_CONTROL.The LogDelivery group gets WRITE and READ_ACP permissions on the bucket.Owner gets FULL_CONTROL.Owner gets FULL_CONTROL and the anonymous identity is granted READ access.Owner gets FULL_CONTROL, the anonymous identity is granted READ and WRITE access. -
Method Summary
Modifier and TypeMethodDescriptionstatic CannedAccessPolicy
fromHeader
(String capHeader) toString()
static CannedAccessPolicy
Returns the enum constant of this class with the specified name.static CannedAccessPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRIVATE
Owner gets FULL_CONTROL. No one else has access rights (default). -
PUBLIC_READ
Owner gets FULL_CONTROL and the anonymous identity is granted READ access. If this policy is used on an object, it can be read from a browser with no authentication. -
PUBLIC_READ_WRITE
Owner gets FULL_CONTROL, the anonymous identity is granted READ and WRITE access. This can be a useful policy to apply to a bucket, but is generally not recommended. -
AWS_EXEC_READ
Owner gets FULL_CONTROL. Amazon EC2 gets READ access to GET an Amazon Machine Image (AMI) bundle from Amazon S3. -
AUTHENTICATED_READ
Owner gets FULL_CONTROL, and any identity authenticated as a registered Amazon S3 user is granted READ access. -
BUCKET_OWNER_READ
Object owner gets FULL_CONTROL. Bucket owner gets READ access. If you specify this canned ACL when creating a bucket, Amazon S3 ignores it. -
BUCKET_OWNER_FULL_CONTROL
Both the object owner and the bucket owner get FULL_CONTROL over the object. If you specify this canned ACL when creating a bucket, Amazon S3 ignores it. -
LOG_DELIVERY_WRITE
The LogDelivery group gets WRITE and READ_ACP permissions on the bucket. For more information about logs, see (Server Access Logging).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<CannedAccessPolicy>
-
fromHeader
- Parameters:
capHeader
- The value of the x-amz-acl HTTP Header returned by S3 when an object has a canned access policy.- Returns:
- the canned access policy object corresponding to the header value, or null if the given header value does not represent a valid canned policy.
-