Class Grantee
- All Implemented Interfaces:
Serializable,SdkPojo,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:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Grantee.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final StringThe unique identifier of theGrantee.final GranteeTypeThe type of the grantee to which access has been granted.final StringThe type of the grantee to which access has been granted.final inthashCode()static Class<? extends Grantee.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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,
granteeTypewill returnGranteeType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromgranteeTypeAsString().- 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
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,
granteeTypewill returnGranteeType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromgranteeTypeAsString().- 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
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 ID00u1a2b3c4EXAMPLE. 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 formaws: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 asR&DorFinance (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 ID00u1a2b3c4EXAMPLE. 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 formaws: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 asR&DorFinance (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
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Grantee.Builder,Grantee> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-