Remove a Capacity Reservation from a group - Amazon Elastic Compute Cloud
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

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 \ --group MyCRGroup \ --resource-arns \ arn:aws-eusc:ec2:sa-east-1:123456789012:capacity-reservation/cr-0e154d26a16094dd \ arn:aws-eusc: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-eusc:ec2:sa-east-1:123456789012:capacity-reservation/cr-0e154d26a16094dd", ` "arn:aws-eusc:ec2:sa-east-1:123456789012:capacity-reservation/cr-54321abcdef567890"