EC2 / Client / get_groups_for_capacity_reservation

get_groups_for_capacity_reservation#

EC2.Client.get_groups_for_capacity_reservation(**kwargs)#

Lists the resource groups to which a Capacity Reservation has been added.

See also: AWS API Documentation

Request Syntax

response = client.get_groups_for_capacity_reservation(
    CapacityReservationId='string',
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters:
  • CapacityReservationId (string) –

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

  • NextToken (string) – The token to use to retrieve the next page of results.

  • MaxResults (integer) – 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.

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

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'CapacityReservationGroups': [
        {
            'GroupArn': 'string',
            'OwnerId': 'string'
        },
    ]
}

Response Structure

  • (dict) –

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

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