APIGateway / Paginator / GetUsagePlans

GetUsagePlans#

class APIGateway.Paginator.GetUsagePlans#
paginator = client.get_paginator('get_usage_plans')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from APIGateway.Client.get_usage_plans().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    keyId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • keyId (string) – The identifier of the API key associated with the usage plans.

  • 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

{
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'apiStages': [
                {
                    'apiId': 'string',
                    'stage': 'string',
                    'throttle': {
                        'string': {
                            'burstLimit': 123,
                            'rateLimit': 123.0
                        }
                    }
                },
            ],
            'throttle': {
                'burstLimit': 123,
                'rateLimit': 123.0
            },
            'quota': {
                'limit': 123,
                'offset': 123,
                'period': 'DAY'|'WEEK'|'MONTH'
            },
            'productCode': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    Represents a collection of usage plans for an AWS account.

    • items (list) –

      The current page of elements from this collection.

      • (dict) –

        Represents a usage plan used to specify who can assess associated API stages. Optionally, target request rate and quota limits can be set. In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using Amazon Web Services Budgets to monitor costs and WAF to manage API requests.

        • id (string) –

          The identifier of a UsagePlan resource.

        • name (string) –

          The name of a usage plan.

        • description (string) –

          The description of a usage plan.

        • apiStages (list) –

          The associated API stages of a usage plan.

          • (dict) –

            API stage name of the associated API stage in a usage plan.

            • apiId (string) –

              API Id of the associated API stage in a usage plan.

            • stage (string) –

              API stage name of the associated API stage in a usage plan.

            • throttle (dict) –

              Map containing method level throttling information for API stage in a usage plan.

              • (string) –

                • (dict) –

                  The API request rate limits.

                  • burstLimit (integer) –

                    The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.

                  • rateLimit (float) –

                    The API target request rate limit.

        • throttle (dict) –

          A map containing method level throttling information for API stage in a usage plan.

          • burstLimit (integer) –

            The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.

          • rateLimit (float) –

            The API target request rate limit.

        • quota (dict) –

          The target maximum number of permitted requests per a given unit time interval.

          • limit (integer) –

            The target maximum number of requests that can be made in a given time period.

          • offset (integer) –

            The number of requests subtracted from the given limit in the initial time period.

          • period (string) –

            The time period in which the limit applies. Valid values are “DAY”, “WEEK” or “MONTH”.

        • productCode (string) –

          The Amazon Web Services Marketplace product identifier to associate with the usage plan as a SaaS product on the Amazon Web Services Marketplace.

        • tags (dict) –

          The collection of tags. Each tag element is associated with a given resource.

          • (string) –

            • (string) –

    • NextToken (string) –

      A token to resume pagination.