EC2 / Paginator / DescribeCapacityBlockOfferings

DescribeCapacityBlockOfferings#

class EC2.Paginator.DescribeCapacityBlockOfferings#
paginator = client.get_paginator('describe_capacity_block_offerings')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from EC2.Client.describe_capacity_block_offerings().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    InstanceType='string',
    InstanceCount=123,
    StartDateRange=datetime(2015, 1, 1),
    EndDateRange=datetime(2015, 1, 1),
    CapacityDurationHours=123,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • InstanceType (string) – The type of instance for which the Capacity Block offering reserves capacity.

  • InstanceCount (integer) – The number of instances for which to reserve capacity.

  • StartDateRange (datetime) – The earliest start date for the Capacity Block offering.

  • EndDateRange (datetime) – The latest end date for the Capacity Block offering.

  • CapacityDurationHours (integer) –

    [REQUIRED]

    The number of hours for which to reserve Capacity Block.

  • 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

{
    'CapacityBlockOfferings': [
        {
            'CapacityBlockOfferingId': 'string',
            'InstanceType': 'string',
            'AvailabilityZone': 'string',
            'InstanceCount': 123,
            'StartDate': datetime(2015, 1, 1),
            'EndDate': datetime(2015, 1, 1),
            'CapacityBlockDurationHours': 123,
            'UpfrontFee': 'string',
            'CurrencyCode': 'string',
            'Tenancy': 'default'|'dedicated'
        },
    ],

}

Response Structure

  • (dict) –

    • CapacityBlockOfferings (list) –

      The recommended Capacity Block offering for the dates specified.

      • (dict) –

        The recommended Capacity Block that fits your search requirements.

        • CapacityBlockOfferingId (string) –

          The ID of the Capacity Block offering.

        • InstanceType (string) –

          The instance type of the Capacity Block offering.

        • AvailabilityZone (string) –

          The Availability Zone of the Capacity Block offering.

        • InstanceCount (integer) –

          The number of instances in the Capacity Block offering.

        • StartDate (datetime) –

          The start date of the Capacity Block offering.

        • EndDate (datetime) –

          The end date of the Capacity Block offering.

        • CapacityBlockDurationHours (integer) –

          The amount of time of the Capacity Block reservation in hours.

        • UpfrontFee (string) –

          The total price to be paid up front.

        • CurrencyCode (string) –

          The currency of the payment for the Capacity Block.

        • Tenancy (string) –

          The tenancy of the Capacity Block.