SSM / Paginator / GetInventory

GetInventory#

class SSM.Paginator.GetInventory#
paginator = client.get_paginator('get_inventory')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from SSM.Client.get_inventory().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ],
            'Type': 'Equal'|'NotEqual'|'BeginWith'|'LessThan'|'GreaterThan'|'Exists'
        },
    ],
    Aggregators=[
        {
            'Expression': 'string',
            'Aggregators': {'... recursive ...'},
            'Groups': [
                {
                    'Name': 'string',
                    'Filters': [
                        {
                            'Key': 'string',
                            'Values': [
                                'string',
                            ],
                            'Type': 'Equal'|'NotEqual'|'BeginWith'|'LessThan'|'GreaterThan'|'Exists'
                        },
                    ]
                },
            ]
        },
    ],
    ResultAttributes=[
        {
            'TypeName': 'string'
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • Filters (list) –

    One or more filters. Use a filter to return a more specific list of results.

    • (dict) –

      One or more filters. Use a filter to return a more specific list of results.

      • Key (string) – [REQUIRED]

        The name of the filter key.

      • Values (list) – [REQUIRED]

        Inventory filter values. Example: inventory filter where managed node IDs are specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g, i-1a2b3c4d5e6,Type=Equal.

        • (string) –

      • Type (string) –

        The type of filter.

        Note

        The Exists filter must be used with aggregators. For more information, see Aggregating inventory data in the Amazon Web Services Systems Manager User Guide.

  • Aggregators (list) –

    Returns counts of inventory types based on one or more expressions. For example, if you aggregate by using an expression that uses the AWS:InstanceInformation.PlatformType type, you can see a count of how many Windows and Linux managed nodes exist in your inventoried fleet.

    • (dict) –

      Specifies the inventory type and attribute for the aggregation execution.

      • Expression (string) –

        The inventory type and attribute name for aggregation.

      • Aggregators (list) –

        Nested aggregators to further refine aggregation for an inventory type.

      • Groups (list) –

        A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don’t match the specified criteria.

        • (dict) –

          A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don’t match the specified criteria.

          • Name (string) – [REQUIRED]

            The name of the group.

          • Filters (list) – [REQUIRED]

            Filters define the criteria for the group. The matchingCount field displays the number of resources that match the criteria. The notMatchingCount field displays the number of resources that don’t match the criteria.

            • (dict) –

              One or more filters. Use a filter to return a more specific list of results.

              • Key (string) – [REQUIRED]

                The name of the filter key.

              • Values (list) – [REQUIRED]

                Inventory filter values. Example: inventory filter where managed node IDs are specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g, i-1a2b3c4d5e6,Type=Equal.

                • (string) –

              • Type (string) –

                The type of filter.

                Note

                The Exists filter must be used with aggregators. For more information, see Aggregating inventory data in the Amazon Web Services Systems Manager User Guide.

  • ResultAttributes (list) –

    The list of inventory item types to return.

    • (dict) –

      The inventory item result attribute.

      • TypeName (string) – [REQUIRED]

        Name of the inventory item type. Valid value: AWS:InstanceInformation. Default Value: AWS:InstanceInformation.

  • 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

{
    'Entities': [
        {
            'Id': 'string',
            'Data': {
                'string': {
                    'TypeName': 'string',
                    'SchemaVersion': 'string',
                    'CaptureTime': 'string',
                    'ContentHash': 'string',
                    'Content': [
                        {
                            'string': 'string'
                        },
                    ]
                }
            }
        },
    ],

}

Response Structure

  • (dict) –

    • Entities (list) –

      Collection of inventory entities such as a collection of managed node inventory.

      • (dict) –

        Inventory query results.

        • Id (string) –

          ID of the inventory result entity. For example, for managed node inventory the result will be the managed node ID. For EC2 instance inventory, the result will be the instance ID.

        • Data (dict) –

          The data section in the inventory result entity JSON.

          • (string) –

            • (dict) –

              The inventory result item.

              • TypeName (string) –

                The name of the inventory result item type.

              • SchemaVersion (string) –

                The schema version for the inventory result item/

              • CaptureTime (string) –

                The time inventory item data was captured.

              • ContentHash (string) –

                MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API doesn’t update the inventory item type contents if the MD5 hash hasn’t changed since last update.

              • Content (list) –

                Contains all the inventory data of the item type. Results include attribute names and values.

                • (dict) –

                  • (string) –

                    • (string) –