capacity_reservation_fleets
Creates, updates, deletes or gets a capacity_reservation_fleet
resource or lists capacity_reservation_fleets
in a region
Overview
Name | capacity_reservation_fleets |
Type | Resource |
Description | Resource Type definition for AWS::EC2::CapacityReservationFleet |
Id | aws.ec2.capacity_reservation_fleets |
Fields
Name | Datatype | Description |
---|---|---|
allocation_strategy | string | |
tag_specifications | array | |
instance_type_specifications | array | |
total_target_capacity | integer | |
end_date | string | |
instance_match_criteria | string | |
capacity_reservation_fleet_id | string | |
tenancy | string | |
remove_end_date | boolean | |
no_remove_end_date | boolean | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all capacity_reservation_fleets
in a region.
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 aws.ec2.capacity_reservation_fleets
WHERE region = 'us-east-1';
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 aws.ec2.capacity_reservation_fleets
WHERE region = 'us-east-1' AND data__Identifier = '<CapacityReservationFleetId>';
INSERT
example
Use the following StackQL query and manifest file to create a new capacity_reservation_fleet
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.capacity_reservation_fleets (
AllocationStrategy,
TagSpecifications,
InstanceTypeSpecifications,
TotalTargetCapacity,
EndDate,
InstanceMatchCriteria,
Tenancy,
RemoveEndDate,
NoRemoveEndDate,
region
)
SELECT
'{{ AllocationStrategy }}',
'{{ TagSpecifications }}',
'{{ InstanceTypeSpecifications }}',
'{{ TotalTargetCapacity }}',
'{{ EndDate }}',
'{{ InstanceMatchCriteria }}',
'{{ Tenancy }}',
'{{ RemoveEndDate }}',
'{{ NoRemoveEndDate }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.capacity_reservation_fleets (
AllocationStrategy,
TagSpecifications,
InstanceTypeSpecifications,
TotalTargetCapacity,
EndDate,
InstanceMatchCriteria,
Tenancy,
RemoveEndDate,
NoRemoveEndDate,
region
)
SELECT
'{{ AllocationStrategy }}',
'{{ TagSpecifications }}',
'{{ InstanceTypeSpecifications }}',
'{{ TotalTargetCapacity }}',
'{{ EndDate }}',
'{{ InstanceMatchCriteria }}',
'{{ Tenancy }}',
'{{ RemoveEndDate }}',
'{{ NoRemoveEndDate }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: capacity_reservation_fleet
props:
- name: AllocationStrategy
value: '{{ AllocationStrategy }}'
- name: TagSpecifications
value:
- ResourceType: '{{ ResourceType }}'
Tags:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: InstanceTypeSpecifications
value:
- InstanceType: '{{ InstanceType }}'
InstancePlatform: '{{ InstancePlatform }}'
Weight: null
AvailabilityZone: '{{ AvailabilityZone }}'
AvailabilityZoneId: '{{ AvailabilityZoneId }}'
EbsOptimized: '{{ EbsOptimized }}'
Priority: '{{ Priority }}'
- name: TotalTargetCapacity
value: '{{ TotalTargetCapacity }}'
- name: EndDate
value: '{{ EndDate }}'
- name: InstanceMatchCriteria
value: '{{ InstanceMatchCriteria }}'
- name: Tenancy
value: '{{ Tenancy }}'
- name: RemoveEndDate
value: '{{ RemoveEndDate }}'
- name: NoRemoveEndDate
value: '{{ NoRemoveEndDate }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.capacity_reservation_fleets
WHERE data__Identifier = '<CapacityReservationFleetId>'
AND region = 'us-east-1';
Permissions
To operate on the capacity_reservation_fleets
resource, the following permissions are required:
Create
ec2:CreateCapacityReservationFleet,
ec2:ModifyCapacityReservationFleet,
ec2:DescribeCapacityReservationFleets,
ec2:CancelCapacityReservationFleets,
ec2:CreateCapacityReservation,
ec2:DescribeCapacityReservations,
ec2:CancelCapacityReservation,
ec2:DescribeInstances,
ec2:CreateTags,
iam:CreateServiceLinkedRole
Delete
ec2:CreateCapacityReservationFleet,
ec2:ModifyCapacityReservationFleet,
ec2:DescribeCapacityReservationFleets,
ec2:CancelCapacityReservationFleets,
ec2:CreateCapacityReservation,
ec2:DescribeCapacityReservations,
ec2:CancelCapacityReservation,
ec2:DeleteTags
List
ec2:DescribeCapacityReservationFleets,
ec2:DescribeCapacityReservations,
ec2:DescribeInstances
Read
ec2:DescribeCapacityReservationFleets,
ec2:DescribeInstances,
ec2:DescribeCapacityReservations
Update
ec2:CreateCapacityReservationFleet,
ec2:ModifyCapacityReservationFleet,
ec2:DescribeCapacityReservationFleets,
ec2:CancelCapacityReservationFleets,
ec2:CreateCapacityReservation,
ec2:ModifyCapacityReservation,
ec2:DescribeCapacityReservations,
ec2:CancelCapacityReservation,
ec2:DescribeInstances,
ec2:DeleteTags