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 a Capacity Reservation to a group
If you add a Capacity Reservation that is shared with you to a group, and that Capacity Reservation is unshared,
it is automatically removed from the group.
- Amazon CLI
-
To add a Capacity Reservation to a group
Use the group-resources command.
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 a Capacity Reservation 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
"