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).
Remove a Capacity Reservation from a group
You can use the following examples to remove a Capacity Reservation from a group.
- Amazon CLI
-
To remove a Capacity Reservation from a group
Use the ungroup-resources command.
The following example removes two Capacity Reservations from the specified group.
aws resource-groups ungroup-resources \
--group MyCRGroup
\
--resource-arns \
arn:aws-cn:ec2:sa-east-1
:123456789012
:capacity-reservation/cr-0e154d26a16094dd
\
arn:aws-cn:ec2:sa-east-1
:123456789012
:capacity-reservation/cr-54321abcdef567890
- PowerShell
-
To remove a Capacity Reservation from a group
Use the Remove-RGResource cmdlet.
The following example removes two Capacity Reservations from the specified group.
Remove-RGResource `
-Group MyCRGroup
`
-ResourceArn `
"arn:aws-cn:ec2:sa-east-1
:123456789012
:capacity-reservation/cr-0e154d26a16094dd
", `
"arn:aws-cn:ec2:sa-east-1
:123456789012
:capacity-reservation/cr-54321abcdef567890
"