Create a Capacity Reservation group - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Create a Capacity Reservation group

To create a group for Capacity Reservations

Use the create-group Amazon CLI command. For name, provide a descriptive name for the group, and for configuration, specify two Type request parameters:

  • AWS::EC2::CapacityReservationPool to ensure that the resource group can be targeted for instance launches

  • AWS::ResourceGroups::Generic with allowed-resource-types set to AWS::EC2::CapacityReservation to ensure that the resource group accepts Capacity Reservations only

For example, the following command creates a group named MyCRGroup.

aws resource-groups create-group --name MyCRGroup --configuration '{"Type":"AWS::EC2::CapacityReservationPool"}' '{"Type":"AWS::ResourceGroups::Generic", "Parameters": [{"Name": "allowed-resource-types", "Values": ["AWS::EC2::CapacityReservation"]}]}'

The following shows example output.

{ "GroupConfiguration": { "Status": "UPDATE_COMPLETE", "Configuration": [ { "Type": "AWS::EC2::CapacityReservationPool" }, { "Type": "AWS::ResourceGroups::Generic", "Parameters": [ { "Values": [ "AWS::EC2::CapacityReservation" ], "Name": "allowed-resource-types" } ] } ] }, "Group": { "GroupArn": "arn:aws:resource-groups:sa-east-1:123456789012:group/MyCRGroup", "Name": "MyCRGroup" } }