Remove a Capacity Reservation from a group
You can use the following examples to remove a Capacity Reservation from a group.
- AWS 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 \ --groupMyCRGroup\ --resource-arns \ arn:aws:ec2:sa-east-1:123456789012:capacity-reservation/cr-0e154d26a16094dd\ arn:aws: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 ` -GroupMyCRGroup` -ResourceArn ` "arn:aws:ec2:sa-east-1:123456789012:capacity-reservation/cr-0e154d26a16094dd", ` "arn:aws:ec2:sa-east-1:123456789012:capacity-reservation/cr-54321abcdef567890"
Add Capacity Reservation to group
Delete group