:doc:`EC2 <../../ec2>` / Paginator / GetGroupsForCapacityReservation

*******************************
GetGroupsForCapacityReservation
*******************************



.. py:class:: EC2.Paginator.GetGroupsForCapacityReservation

  ::

    
    paginator = client.get_paginator('get_groups_for_capacity_reservation')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.get_groups_for_capacity_reservation`.

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


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          CapacityReservationId='string',
          DryRun=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type CapacityReservationId: string
    :param CapacityReservationId: **[REQUIRED]** 

      The ID of the Capacity Reservation. If you specify a Capacity Reservation that is shared with you, the operation returns only Capacity Reservation groups that you own.

      

    
    :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 PaginationConfig: dict
    :param PaginationConfig: 

      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.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax**

      
      ::

        {
            'CapacityReservationGroups': [
                {
                    'GroupArn': 'string',
                    'OwnerId': 'string'
                },
            ]
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **CapacityReservationGroups** *(list) --* 

          Information about the resource groups to which the Capacity Reservation has been added.

          
          

          - *(dict) --* 

            Describes a resource group to which a Capacity Reservation has been added.

            
            

            - **GroupArn** *(string) --* 

              The ARN of the resource group.

              
            

            - **OwnerId** *(string) --* 

              The ID of the Amazon Web Services account that owns the resource group.

              
        
      
    