Class Grantee

java.lang.Object
software.amazon.awssdk.services.s3control.model.Grantee
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Grantee.Builder,Grantee>

@Generated("software.amazon.awssdk:codegen") public final class Grantee extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Grantee.Builder,Grantee>

The user, group, role, or attribute to which you are granting access. The grantee can be an IAM user or role, a directory user or group, or an attribute. A directory user or group comes from your corporate directory. Your users can sign in through IAM Identity Center or through IAM federation with trusted identity propagation (TIP). IAM Identity Center instances use the legacy experience until you turn on the simplified experience for trusted identity propagation. If your instance uses the legacy experience, associate it with your S3 Access Grants instance.

See Also:
  • Method Details

    • granteeType

      public final GranteeType granteeType()

      The type of the grantee to which access has been granted. It can be one of the following values:

      • IAM - An IAM user or role.

      • DIRECTORY_USER - A user from your corporate directory. The user can sign in through IAM Identity Center or through IAM federation with your external identity provider.

      • DIRECTORY_GROUP - A group from your corporate directory. Group grants match users who sign in through IAM Identity Center. They also match users who sign in through IAM federation when the IAM identity provider is configured for group-based access.

      • ATTRIBUTE - A runtime claim that you map on your IAM identity provider, such as a department. The grant matches every user who signs in through IAM federation with this runtime claim and value.

      If the service returns an enum value that is not available in the current SDK version, granteeType will return GranteeType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from granteeTypeAsString().

      Returns:
      The type of the grantee to which access has been granted. It can be one of the following values:

      • IAM - An IAM user or role.

      • DIRECTORY_USER - A user from your corporate directory. The user can sign in through IAM Identity Center or through IAM federation with your external identity provider.

      • DIRECTORY_GROUP - A group from your corporate directory. Group grants match users who sign in through IAM Identity Center. They also match users who sign in through IAM federation when the IAM identity provider is configured for group-based access.

      • ATTRIBUTE - A runtime claim that you map on your IAM identity provider, such as a department. The grant matches every user who signs in through IAM federation with this runtime claim and value.

      See Also:
    • granteeTypeAsString

      public final String granteeTypeAsString()

      The type of the grantee to which access has been granted. It can be one of the following values:

      • IAM - An IAM user or role.

      • DIRECTORY_USER - A user from your corporate directory. The user can sign in through IAM Identity Center or through IAM federation with your external identity provider.

      • DIRECTORY_GROUP - A group from your corporate directory. Group grants match users who sign in through IAM Identity Center. They also match users who sign in through IAM federation when the IAM identity provider is configured for group-based access.

      • ATTRIBUTE - A runtime claim that you map on your IAM identity provider, such as a department. The grant matches every user who signs in through IAM federation with this runtime claim and value.

      If the service returns an enum value that is not available in the current SDK version, granteeType will return GranteeType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from granteeTypeAsString().

      Returns:
      The type of the grantee to which access has been granted. It can be one of the following values:

      • IAM - An IAM user or role.

      • DIRECTORY_USER - A user from your corporate directory. The user can sign in through IAM Identity Center or through IAM federation with your external identity provider.

      • DIRECTORY_GROUP - A group from your corporate directory. Group grants match users who sign in through IAM Identity Center. They also match users who sign in through IAM federation when the IAM identity provider is configured for group-based access.

      • ATTRIBUTE - A runtime claim that you map on your IAM identity provider, such as a department. The grant matches every user who signs in through IAM federation with this runtime claim and value.

      See Also:
    • granteeIdentifier

      public final String granteeIdentifier()

      The unique identifier of the Grantee. The format depends on the grantee type:

      • IAM - The IAM Amazon Resource Name (ARN) of the user or role.

      • DIRECTORY_USER - The user's name, or the ID that IAM Identity Center uses for the user, for example, a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. For IAM federation, the name is the subject that IAM sets from your identity provider token, for example, the user ID 00u1a2b3c4EXAMPLE. For IAM Identity Center, the name is the user's username.

      • DIRECTORY_GROUP - The group's display name in IAM Identity Center, for example, finance-analysts, or the group's IAM Identity Center ID.

      • ATTRIBUTE - One runtime claim and its value, in the form aws:TransactionContext/IdentityProvider/key=value , for example, aws:TransactionContext/IdentityProvider/department=Finance. Each attribute grant contains one key and one value.

      S3 Access Grants stores the identifier exactly as you enter it. It compares identifiers exactly, and the comparison is case sensitive. S3 Access Grants doesn't check that the user, group, or attribute exists when you create the grant.

      User names can be up to 128 characters long. They can contain letters, numbers, spaces, and the characters _ . : / = + - @. Group names can be up to 128 characters long. They can contain any character that IAM Identity Center allows in a group display name, such as R&D or Finance (EU). Attribute keys and values can each be up to 128 characters long. Both can contain letters, numbers, and the characters _ . : / + - @. Values can also contain spaces and =. As a best practice, use an immutable user ID from your identity provider instead of an email address.

      Returns:
      The unique identifier of the Grantee. The format depends on the grantee type:

      • IAM - The IAM Amazon Resource Name (ARN) of the user or role.

      • DIRECTORY_USER - The user's name, or the ID that IAM Identity Center uses for the user, for example, a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. For IAM federation, the name is the subject that IAM sets from your identity provider token, for example, the user ID 00u1a2b3c4EXAMPLE. For IAM Identity Center, the name is the user's username.

      • DIRECTORY_GROUP - The group's display name in IAM Identity Center, for example, finance-analysts, or the group's IAM Identity Center ID.

      • ATTRIBUTE - One runtime claim and its value, in the form aws:TransactionContext/IdentityProvider/key=value , for example, aws:TransactionContext/IdentityProvider/department=Finance. Each attribute grant contains one key and one value.

      S3 Access Grants stores the identifier exactly as you enter it. It compares identifiers exactly, and the comparison is case sensitive. S3 Access Grants doesn't check that the user, group, or attribute exists when you create the grant.

      User names can be up to 128 characters long. They can contain letters, numbers, spaces, and the characters _ . : / = + - @. Group names can be up to 128 characters long. They can contain any character that IAM Identity Center allows in a group display name, such as R&D or Finance (EU). Attribute keys and values can each be up to 128 characters long. Both can contain letters, numbers, and the characters _ . : / + - @. Values can also contain spaces and =. As a best practice, use an immutable user ID from your identity provider instead of an email address.

    • toBuilder

      public Grantee.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Grantee.Builder,Grantee>
      Returns:
      a builder for type T
    • builder

      public static Grantee.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Grantee.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.