Skip to main content

groups_for_capacity_reservations

Creates, updates, deletes, gets or lists a groups_for_capacity_reservations resource.

Overview

Namegroups_for_capacity_reservations
TypeResource
Idaws.ec2.groups_for_capacity_reservations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
group_arnstringThe ARN of the resource group.
owner_idstringThe ID of the Amazon Web Services account that owns the resource group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_groups_for_capacity_reservationselectCapacityReservationId, regionNextToken, MaxResults, DryRunLists the resource groups to which a Capacity Reservation has been added.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
CapacityReservationIdstringThe 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.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks 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.
MaxResultsintegerThe 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.
NextTokenstringThe token to use to retrieve the next page of results.

SELECT examples

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

SELECT
group_arn,
owner_id
FROM aws.ec2.groups_for_capacity_reservations
WHERE CapacityReservationId = '{{ CapacityReservationId }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND DryRun = '{{ DryRun }}'
;