ListRules

class RecycleBin.Paginator.ListRules
paginator = client.get_paginator('list_rules')
paginate(**kwargs)

Creates an iterator that will paginate through responses from RecycleBin.Client.list_rules().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ResourceType='EBS_SNAPSHOT'|'EC2_IMAGE',
    ResourceTags=[
        {
            'ResourceTagKey': 'string',
            'ResourceTagValue': 'string'
        },
    ],
    LockState='locked'|'pending_unlock'|'unlocked',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ResourceType (string) --

    [REQUIRED]

    The resource type retained by the retention rule. Only retention rules that retain the specified resource type are listed. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To list retention rules that retain snapshots, specify EBS_SNAPSHOT . To list retention rules that retain EBS-backed AMIs, specify EC2_IMAGE .

  • ResourceTags (list) --

    Information about the resource tags used to identify resources that are retained by the retention rule.

    • (dict) --

      Information about the resource tags used to identify resources that are retained by the retention rule.

      • ResourceTagKey (string) -- [REQUIRED]

        The tag key.

      • ResourceTagValue (string) --

        The tag value.

  • LockState (string) -- The lock state of the retention rules to list. Only retention rules with the specified lock state are returned.
  • 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

{
    'Rules': [
        {
            'Identifier': 'string',
            'Description': 'string',
            'RetentionPeriod': {
                'RetentionPeriodValue': 123,
                'RetentionPeriodUnit': 'DAYS'
            },
            'LockState': 'locked'|'pending_unlock'|'unlocked'
        },
    ],

}

Response Structure

  • (dict) --

    • Rules (list) --

      Information about the retention rules.

      • (dict) --

        Information about a Recycle Bin retention rule.

        • Identifier (string) --

          The unique ID of the retention rule.

        • Description (string) --

          The retention rule description.

        • RetentionPeriod (dict) --

          Information about the retention period for which the retention rule is to retain resources.

          • RetentionPeriodValue (integer) --

            The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit .

          • RetentionPeriodUnit (string) --

            The unit of time in which the retention period is measured. Currently, only DAYS is supported.

        • LockState (string) --

          The lock state for the retention rule.

          • locked - The retention rule is locked and can't be modified or deleted.
          • pending_unlock - The retention rule has been unlocked but it is still within the unlock delay period. The retention rule can be modified or deleted only after the unlock delay period has expired.
          • unlocked - The retention rule is unlocked and it can be modified or deleted by any user with the required permissions.
          • null - The retention rule has never been locked. Once a retention rule has been locked, it can transition between the locked and unlocked states only; it can never transition back to null .