Add a Capacity Reservation to 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.

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.

AWS 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-eusc:ec2:sa-east-1:123456789012:capacity-reservation/cr-1234567890abcdef1 \ arn:aws-eusc: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-eusc:ec2:sa-east-1:123456789012:capacity-reservation/cr-1234567890abcdef1", ` "arn:aws-eusc:ec2:sa-east-1:123456789012:capacity-reservation/cr-54321abcdef567890"