:doc:`EC2 <../../ec2>` / Client / describe_capacity_block_offerings

*********************************
describe_capacity_block_offerings
*********************************



.. py:method:: EC2.Client.describe_capacity_block_offerings(**kwargs)

  

  Describes Capacity Block offerings available for purchase in the Amazon Web Services Region that you're currently using. With Capacity Blocks, you can purchase a specific GPU instance type or EC2 UltraServer for a period of time.

   

  To search for an available Capacity Block offering, you specify a reservation duration and instance count.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCapacityBlockOfferings>`_  


  **Request Syntax**
  ::

    response = client.describe_capacity_block_offerings(
        DryRun=True|False,
        InstanceType='string',
        InstanceCount=123,
        StartDateRange=datetime(2015, 1, 1),
        EndDateRange=datetime(2015, 1, 1),
        CapacityDurationHours=123,
        NextToken='string',
        MaxResults=123,
        UltraserverType='string',
        UltraserverCount=123
    )
    
  :type DryRun: boolean
  :param DryRun: 

    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``.

    

  
  :type InstanceType: string
  :param InstanceType: 

    The type of instance for which the Capacity Block offering reserves capacity.

    

  
  :type InstanceCount: integer
  :param InstanceCount: 

    The number of instances for which to reserve capacity. Each Capacity Block can have up to 64 instances, and you can have up to 256 instances across Capacity Blocks.

    

  
  :type StartDateRange: datetime
  :param StartDateRange: 

    The earliest start date for the Capacity Block offering.

    

  
  :type EndDateRange: datetime
  :param EndDateRange: 

    The latest end date for the Capacity Block offering.

    

  
  :type CapacityDurationHours: integer
  :param CapacityDurationHours: **[REQUIRED]** 

    The reservation duration for the Capacity Block, in hours. You must specify the duration in 1-day increments up 14 days, and in 7-day increments up to 182 days.

    

  
  :type NextToken: string
  :param NextToken: 

    The token to use to retrieve the next page of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see `Pagination <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination>`__.

    

  
  :type UltraserverType: string
  :param UltraserverType: 

    The EC2 UltraServer type of the Capacity Block offerings.

    

  
  :type UltraserverCount: integer
  :param UltraserverCount: 

    The number of EC2 UltraServers in the offerings.

    

  
  
  :rtype: 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',
                  'UltraserverType': 'string',
                  'UltraserverCount': 123,
                  'CapacityBlockDurationMinutes': 123
              },
          ],
          'NextToken': 'string'
      }
      
    **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 number of hours (in addition to ``capacityBlockDurationMinutes``) for the duration of the Capacity Block reservation. For example, if a Capacity Block starts at **04:55** and ends at **11:30**, the hours field would be **6**.

            
          

          - **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.

            
          

          - **UltraserverType** *(string) --* 

            The EC2 UltraServer type of the Capacity Block offering.

            
          

          - **UltraserverCount** *(integer) --* 

            The number of EC2 UltraServers in the offering.

            
          

          - **CapacityBlockDurationMinutes** *(integer) --* 

            The number of minutes (in addition to ``capacityBlockDurationHours``) for the duration of the Capacity Block reservation. For example, if a Capacity Block starts at **08:55** and ends at **11:30**, the minutes field would be **35**.

            
      
    
      

      - **NextToken** *(string) --* 

        The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

        
  