AWS S3 Control

2024/09/04 - AWS S3 Control - 1 new 3 updated api methods

Changes  Amazon Simple Storage Service /S3 Access Grants / Features : This release launches new Access Grants API - ListCallerAccessGrants.

ListCallerAccessGrants (new) Link ¶

Returns a list of the access grants that were given to the caller using S3 Access Grants and that allow the caller to access the S3 data of the Amazon Web Services account specified in the request.

Permissions

You must have the s3:ListCallerAccessGrants permission to use this operation.

See also: AWS API Documentation

Request Syntax

client.list_caller_access_grants(
    AccountId='string',
    GrantScope='string',
    NextToken='string',
    MaxResults=123,
    AllowedByApplication=True|False
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Web Services account ID of the S3 Access Grants instance.

type GrantScope

string

param GrantScope

The S3 path of the data that you would like to access. Must start with s3:// . You can optionally pass only the beginning characters of a path, and S3 Access Grants will search for all applicable grants for the path fragment.

type NextToken

string

param NextToken

A pagination token to request the next page of results. Pass this value into a subsequent List Caller Access Grants request in order to retrieve the next page of results.

type MaxResults

integer

param MaxResults

The maximum number of access grants that you would like returned in the List Caller Access Grants response. If the results include the pagination token NextToken , make another call using the NextToken to determine if there are more results.

type AllowedByApplication

boolean

param AllowedByApplication

If this optional parameter is passed in the request, a filter is applied to the results. The results will include only the access grants for the caller's Identity Center application or for any other applications ( ALL ).

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'CallerAccessGrantsList': [
        {
            'Permission': 'READ'|'WRITE'|'READWRITE',
            'GrantScope': 'string',
            'ApplicationArn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      A pagination token that you can use to request the next page of results. Pass this value into a subsequent List Caller Access Grants request in order to retrieve the next page of results.

    • CallerAccessGrantsList (list) --

      A list of the caller's access grants that were created using S3 Access Grants and that grant the caller access to the S3 data of the Amazon Web Services account ID that was specified in the request.

      • (dict) --

        Part of ListCallerAccessGrantsResult . Each entry includes the permission level (READ, WRITE, or READWRITE) and the grant scope of the access grant. If the grant also includes an application ARN, the grantee can only access the S3 data through this application.

        • Permission (string) --

          The type of permission granted, which can be one of the following values:

          • READ - Grants read-only access to the S3 data.

          • WRITE - Grants write-only access to the S3 data.

          • READWRITE - Grants both read and write access to the S3 data.

        • GrantScope (string) --

          The S3 path of the data to which you have been granted access.

        • ApplicationArn (string) --

          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.

CreateAccessGrantsInstance (updated) Link ¶
Changes (response)
{'IdentityCenterApplicationArn': 'string',
 'IdentityCenterInstanceArn': 'string'}

Creates an S3 Access Grants instance, which serves as a logical grouping for access grants. You can create one S3 Access Grants instance per Region per account.

Permissions

You must have the s3:CreateAccessGrantsInstance permission to use this operation.

Additional Permissions

To associate an IAM Identity Center instance with your S3 Access Grants instance, you must also have the sso:DescribeInstance , sso:CreateApplication , sso:PutApplicationGrant , and sso:PutApplicationAuthenticationMethod permissions.

See also: AWS API Documentation

Request Syntax

client.create_access_grants_instance(
    AccountId='string',
    IdentityCenterArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Web Services account ID of the S3 Access Grants instance.

type IdentityCenterArn

string

param IdentityCenterArn

If you would like to associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, use this field to pass the Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.

type Tags

list

param Tags

The Amazon Web Services resource tags that you are adding to the S3 Access Grants instance. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.

  • (dict) --

    An Amazon Web Services resource tag that's associated with your S3 resource. You can add tags to new objects when you upload them, or you can add object tags to existing objects.

    Note

    This operation is only supported for S3 Storage Lens groups and for S3 Access Grants. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered location, or grant.

    • Key (string) -- [REQUIRED]

      The key of the key-value pair of a tag added to your Amazon Web Services resource. A tag key can be up to 128 Unicode characters in length and is case-sensitive. System created tags that begin with aws: aren’t supported.

    • Value (string) -- [REQUIRED]

      The value of the key-value pair of a tag added to your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive.

rtype

dict

returns

Response Syntax

{
    'CreatedAt': datetime(2015, 1, 1),
    'AccessGrantsInstanceId': 'string',
    'AccessGrantsInstanceArn': 'string',
    'IdentityCenterArn': 'string',
    'IdentityCenterInstanceArn': 'string',
    'IdentityCenterApplicationArn': 'string'
}

Response Structure

  • (dict) --

    • CreatedAt (datetime) --

      The date and time when you created the S3 Access Grants instance.

    • AccessGrantsInstanceId (string) --

      The ID of the S3 Access Grants instance. The ID is default . You can have one S3 Access Grants instance per Region per account.

    • AccessGrantsInstanceArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.

    • IdentityCenterArn (string) --

      If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.

    • IdentityCenterInstanceArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.

    • IdentityCenterApplicationArn (string) --

      If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.

GetAccessGrantsInstance (updated) Link ¶
Changes (response)
{'IdentityCenterApplicationArn': 'string',
 'IdentityCenterInstanceArn': 'string'}

Retrieves the S3 Access Grants instance for a Region in your account.

Permissions

You must have the s3:GetAccessGrantsInstance permission to use this operation.

Note

GetAccessGrantsInstance is not supported for cross-account access. You can only call the API from the account that owns the S3 Access Grants instance.

See also: AWS API Documentation

Request Syntax

client.get_access_grants_instance(
    AccountId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Web Services account ID of the S3 Access Grants instance.

rtype

dict

returns

Response Syntax

{
    'AccessGrantsInstanceArn': 'string',
    'AccessGrantsInstanceId': 'string',
    'IdentityCenterArn': 'string',
    'IdentityCenterInstanceArn': 'string',
    'IdentityCenterApplicationArn': 'string',
    'CreatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • AccessGrantsInstanceArn (string) --

      The Amazon Resource Name (ARN) of the S3 Access Grants instance.

    • AccessGrantsInstanceId (string) --

      The ID of the S3 Access Grants instance. The ID is default . You can have one S3 Access Grants instance per Region per account.

    • IdentityCenterArn (string) --

      If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.

    • IdentityCenterInstanceArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.

    • IdentityCenterApplicationArn (string) --

      If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.

    • CreatedAt (datetime) --

      The date and time when you created the S3 Access Grants instance.

ListAccessGrantsInstances (updated) Link ¶
Changes (response)
{'AccessGrantsInstancesList': {'IdentityCenterApplicationArn': 'string',
                               'IdentityCenterInstanceArn': 'string'}}

Returns a list of S3 Access Grants instances. An S3 Access Grants instance serves as a logical grouping for your individual access grants. You can only have one S3 Access Grants instance per Region per account.

Permissions

You must have the s3:ListAccessGrantsInstances permission to use this operation.

See also: AWS API Documentation

Request Syntax

client.list_access_grants_instances(
    AccountId='string',
    NextToken='string',
    MaxResults=123
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Web Services account ID of the S3 Access Grants instance.

type NextToken

string

param NextToken

A pagination token to request the next page of results. Pass this value into a subsequent List Access Grants Instances request in order to retrieve the next page of results.

type MaxResults

integer

param MaxResults

The maximum number of access grants that you would like returned in the List Access Grants response. If the results include the pagination token NextToken , make another call using the NextToken to determine if there are more results.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'AccessGrantsInstancesList': [
        {
            'AccessGrantsInstanceId': 'string',
            'AccessGrantsInstanceArn': 'string',
            'CreatedAt': datetime(2015, 1, 1),
            'IdentityCenterArn': 'string',
            'IdentityCenterInstanceArn': 'string',
            'IdentityCenterApplicationArn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      A pagination token to request the next page of results. Pass this value into a subsequent List Access Grants Instances request in order to retrieve the next page of results.

    • AccessGrantsInstancesList (list) --

      A container for a list of S3 Access Grants instances.

      • (dict) --

        Information about the S3 Access Grants instance.

        • AccessGrantsInstanceId (string) --

          The ID of the S3 Access Grants instance. The ID is default . You can have one S3 Access Grants instance per Region per account.

        • AccessGrantsInstanceArn (string) --

          The Amazon Resource Name (ARN) of the S3 Access Grants instance.

        • CreatedAt (datetime) --

          The date and time when you created the S3 Access Grants instance.

        • IdentityCenterArn (string) --

          If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.

        • IdentityCenterInstanceArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.

        • IdentityCenterApplicationArn (string) --

          If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.