list_access_grants
async
¶
list_access_grants(
account_id: AccountId,
*,
config_overrides: Optional[AsyncS3ControlClientConfig] = None,
next_token: Optional[ContinuationToken] = None,
max_results: Optional[MaxResults] = None,
grantee_type: Optional[GranteeType] = None,
grantee_identifier: Optional[GranteeIdentifier] = None,
permission: Optional[Permission] = None,
grant_scope: Optional[S3Prefix] = None,
application_arn: Optional[IdentityCenterApplicationArn] = None,
) -> ListAccessGrantsResult
Returns the list of access grants in your S3 Access Grants instance.
- Permissions
-
You must have the
s3:ListAccessGrantspermission to use this operation.
Parameters:
-
account_id(AccountId) –The Amazon Web Services account ID of the S3 Access Grants instance.
-
next_token(Optional[ContinuationToken], default:None) –A pagination token to request the next page of results. Pass this value into a subsequent
List Access Grantsrequest in order to retrieve the next page of results. -
max_results(Optional[MaxResults], default:None) –The maximum number of access grants that you would like returned in the
List Access Grantsresponse. If the results include the pagination tokenNextToken, make another call using theNextTokento determine if there are more results. -
grantee_type(Optional[GranteeType], default:None) –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.
-
-
grantee_identifier(Optional[GranteeIdentifier], default:None) –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.The filter matches the identifier stored in the grant. A grant for a user's name and a grant for the same user's IAM Identity Center user ID are separate grants.
-
-
permission(Optional[Permission], default:None) –The type of permission granted to your S3 data, which can be set to one of the following values:
-
READ– Grant read-only access to the S3 data. -
WRITE– Grant write-only access to the S3 data. -
READWRITE– Grant both read and write access to the S3 data.
-
-
grant_scope(Optional[S3Prefix], default:None) –The S3 path of the data to which you are granting access. It is the result of appending the
Subprefixto the location scope. -
application_arn(Optional[IdentityCenterApplicationArn], default:None) –The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.
Grants with an application ARN match only users who sign in through an IAM Identity Center instance that uses the legacy experience, not the simplified experience for trusted identity propagation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_s3_control/_services/async_s3_control.py
3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 | |