Skip to main content

capacity_reservation_fleets

Creates, updates, deletes or gets a capacity_reservation_fleet resource or lists capacity_reservation_fleets in a region

Overview

Namecapacity_reservation_fleets
TypeResource
DescriptionResource Type definition for AWS::EC2::CapacityReservationFleet
Idawscc.ec2.capacity_reservation_fleets

Fields

NameDatatypeDescription
allocation_strategystring
tag_specificationsarray
instance_type_specificationsarray
total_target_capacityinteger
end_datestring
instance_match_criteriastring
capacity_reservation_fleet_idstring
tenancystring
remove_end_dateboolean
no_remove_end_dateboolean
regionstringAWS region.

For more information, see AWS::EC2::CapacityReservationFleet.

Methods

NameResourceAccessible byRequired Params
create_resourcecapacity_reservation_fleetsINSERTregion
delete_resourcecapacity_reservation_fleetsDELETEIdentifier, region
update_resourcecapacity_reservation_fleetsUPDATEIdentifier, PatchDocument, region
list_resourcescapacity_reservation_fleets_list_onlySELECTregion
get_resourcecapacity_reservation_fleetsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual capacity_reservation_fleet.

SELECT
region,
allocation_strategy,
tag_specifications,
instance_type_specifications,
total_target_capacity,
end_date,
instance_match_criteria,
capacity_reservation_fleet_id,
tenancy,
remove_end_date,
no_remove_end_date
FROM awscc.ec2.capacity_reservation_fleets
WHERE
region = 'us-east-1' AND
Identifier = '{{ capacity_reservation_fleet_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new capacity_reservation_fleet resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ec2.capacity_reservation_fleets (
AllocationStrategy,
TagSpecifications,
InstanceTypeSpecifications,
TotalTargetCapacity,
EndDate,
InstanceMatchCriteria,
Tenancy,
RemoveEndDate,
NoRemoveEndDate,
region
)
SELECT
'{{ allocation_strategy }}',
'{{ tag_specifications }}',
'{{ instance_type_specifications }}',
'{{ total_target_capacity }}',
'{{ end_date }}',
'{{ instance_match_criteria }}',
'{{ tenancy }}',
'{{ remove_end_date }}',
'{{ no_remove_end_date }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a capacity_reservation_fleet resource, using stack-deploy.

/*+ update */
UPDATE awscc.ec2.capacity_reservation_fleets
SET PatchDocument = string('{{ {
"TotalTargetCapacity": total_target_capacity,
"RemoveEndDate": remove_end_date,
"NoRemoveEndDate": no_remove_end_date
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ capacity_reservation_fleet_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.capacity_reservation_fleets
WHERE
Identifier = '{{ capacity_reservation_fleet_id }}' AND
region = 'us-east-1';

Permissions

To operate on the capacity_reservation_fleets resource, the following permissions are required:

ec2:CreateCapacityReservationFleet,
ec2:ModifyCapacityReservationFleet,
ec2:DescribeCapacityReservationFleets,
ec2:CancelCapacityReservationFleets,
ec2:CreateCapacityReservation,
ec2:DescribeCapacityReservations,
ec2:CancelCapacityReservation,
ec2:DescribeInstances,
ec2:CreateTags,
iam:CreateServiceLinkedRole