Enum Permission
- All Implemented Interfaces:
Serializable, Comparable<Permission>, java.lang.constant.Constable
Specifies constants defining an access permission,
as granted to grantees in an
AccessControlList. Only a limited set of permission are available;
each one is represented as a value in this enumeration.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionProvides READ, WRITE, READ_ACP, and WRITE_ACP permissions.Grants permission to list the bucket when applied to a bucket.Grants permission to read the ACL for the applicable bucket or object.Grants permission to create, overwrite, and delete any objects in the bucket.Gives permission to overwrite the ACP for the applicable bucket or object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the header used to grant this permission.static PermissionparsePermission(String str) Returns thePermissionenumeration value representing the specified Amazon S3 Region ID string.toString()Gets the string representation of this permission object as defined by Amazon S3, eg.static PermissionReturns the enum constant of this type with the specified name.static Permission[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
FullControl
Provides READ, WRITE, READ_ACP, and WRITE_ACP permissions.It does not convey additional rights and is provided only for convenience.
-
Read
Grants permission to list the bucket when applied to a bucket. Grants permission to read object data and/or metadata when applied to an object. -
Write
Grants permission to create, overwrite, and delete any objects in the bucket.This permission is not supported for objects.
-
ReadAcp
Grants permission to read the ACL for the applicable bucket or object.The owner of a bucket or object always implicitly has this permission.
-
WriteAcp
Gives permission to overwrite the ACP for the applicable bucket or object.The owner of a bucket or object always has this permission implicitly.
Granting this permission is equivalent to granting
FULL_CONTROLbecause the grant recipient can make any changes to the ACP.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getHeaderName
Returns the name of the header used to grant this permission. -
toString
Gets the string representation of this permission object as defined by Amazon S3, eg.FULL_CONTROL.- Overrides:
toStringin classEnum<Permission>- Returns:
- The string representation of this permission object as defined by
Amazon S3, eg.
FULL_CONTROL.
-
parsePermission
Returns thePermissionenumeration value representing the specified Amazon S3 Region ID string. If specified string doesn't map to a known Amazon S3 Region, returnsnull.- Parameters:
str- A string representation of an Amazon S3 permission, eg.FULL_CONTROL- Returns:
- The
Permissionobject represented by the given permission string, Returnsnullif the string isn't a valid representation of an Amazon S3 permission.
-