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).
Add Capacity Reservations to a group
You can add Capacity Reservations that you own in your account, or Capacity Reservations that are shared
with you by other Amazon accounts to a group.
Considerations
-
You can add only Capacity Reservations in the active state to a
group.
-
If a shared Capacity Reservation is later unshared by its owner, Amazon EC2
automatically removes it from your group.
- Console
-
You can add Capacity Reservations to a group from the Capacity Reservation Resource Group details
page, or from the Capacity Reservation console.
To add Capacity Reservations from the Capacity Reservation Resource Group page
-
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
-
In the navigation pane, choose Capacity
Reservations.
-
Choose Capacity Reservation
Resource Group.
-
Select the group name to open its details page.
-
In the Capacity Reservations section,
choose Add.
-
Select the Capacity Reservations you want to add, then choose
Add.
To add Capacity Reservations from the Capacity Reservation console
-
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
-
In the navigation pane, choose Capacity
Reservations.
-
Select the Capacity Reservation you want to add to a group.
-
Choose Action, then choose
Add to group.
-
Select the group, then choose
Add.
- Amazon CLI
-
To add Capacity Reservations to a group
Use the group-resources command. Provide the ARN of each Capacity Reservation
you want to add.
The following example adds two Capacity Reservations to the specified group.
aws resource-groups group-resources \
--group MyCRGroup \
--resource-arns \
arn:aws-cn:ec2:sa-east-1:123456789012:capacity-reservation/cr-1234567890abcdef1 \
arn:aws-cn:ec2:sa-east-1:123456789012:capacity-reservation/cr-54321abcdef567890
- PowerShell
-
To add Capacity Reservations to a group
Use the Add-RGResource cmdlet.
The following example adds two Capacity Reservations to the specified group.
Add-RGResource `
-Group MyCRGroup `
-ResourceArn `
"arn:aws-cn:ec2:sa-east-1:123456789012:capacity-reservation/cr-1234567890abcdef1", `
"arn:aws-cn:ec2:sa-east-1:123456789012:capacity-reservation/cr-54321abcdef567890"