KMS / Paginator / ListRetirableGrants

ListRetirableGrants#

class KMS.Paginator.ListRetirableGrants#
paginator = client.get_paginator('list_retirable_grants')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from KMS.Client.list_retirable_grants().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    RetiringPrincipal='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • RetiringPrincipal (string) –

    [REQUIRED]

    The retiring principal for which to list grants. Enter a principal in your Amazon Web Services account.

    To specify the retiring principal, use the Amazon Resource Name (ARN) of an Amazon Web Services principal. Valid principals include Amazon Web Services accounts, IAM users, IAM roles, federated users, and assumed role users. For help with the ARN syntax for a principal, see IAM ARNs in the Identity and Access Management User Guide .

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'Grants': [
        {
            'KeyId': 'string',
            'GrantId': 'string',
            'Name': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'GranteePrincipal': 'string',
            'RetiringPrincipal': 'string',
            'IssuingAccount': 'string',
            'Operations': [
                'Decrypt'|'Encrypt'|'GenerateDataKey'|'GenerateDataKeyWithoutPlaintext'|'ReEncryptFrom'|'ReEncryptTo'|'Sign'|'Verify'|'GetPublicKey'|'CreateGrant'|'RetireGrant'|'DescribeKey'|'GenerateDataKeyPair'|'GenerateDataKeyPairWithoutPlaintext'|'GenerateMac'|'VerifyMac',
            ],
            'Constraints': {
                'EncryptionContextSubset': {
                    'string': 'string'
                },
                'EncryptionContextEquals': {
                    'string': 'string'
                }
            }
        },
    ],
    'Truncated': True|False,
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Grants (list) –

      A list of grants.

      • (dict) –

        Contains information about a grant.

        • KeyId (string) –

          The unique identifier for the KMS key to which the grant applies.

        • GrantId (string) –

          The unique identifier for the grant.

        • Name (string) –

          The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.

        • CreationDate (datetime) –

          The date and time when the grant was created.

        • GranteePrincipal (string) –

          The identity that gets the permissions in the grant.

          The GranteePrincipal field in the ListGrants response usually contains the user or role designated as the grantee principal in the grant. However, when the grantee principal in the grant is an Amazon Web Services service, the GranteePrincipal field contains the service principal, which might represent several different grantee principals.

        • RetiringPrincipal (string) –

          The principal that can retire the grant.

        • IssuingAccount (string) –

          The Amazon Web Services account under which the grant was issued.

        • Operations (list) –

          The list of operations permitted by the grant.

          • (string) –

        • Constraints (dict) –

          A list of key-value pairs that must be present in the encryption context of certain subsequent operations that the grant allows.

          • EncryptionContextSubset (dict) –

            A list of key-value pairs that must be included in the encryption context of the cryptographic operation request. The grant allows the cryptographic operation only when the encryption context in the request includes the key-value pairs specified in this constraint, although it can include additional key-value pairs.

            • (string) –

              • (string) –

          • EncryptionContextEquals (dict) –

            A list of key-value pairs that must match the encryption context in the cryptographic operation request. The grant allows the operation only when the encryption context in the request is the same as the encryption context specified in this constraint.

            • (string) –

              • (string) –

    • Truncated (boolean) –

      A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in thisresponse to the Marker parameter in a subsequent request.

    • NextToken (string) –

      A token to resume pagination.