Use UpdateGroup with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use UpdateGroup with a CLI

The following code examples show how to use UpdateGroup.

CLI
AWS CLI

To update the description for a resource group

The following update-group example updates the description for the specified resource group.

aws resource-groups update-group \ --group-name tbq-WebServer \ --description "Resource group for all web server resources."

Output:

{ "Group": { "GroupArn": "arn:aws:resource-groups:us-west-2:123456789012:group/tbq-WebServer", "Name": "tbq-WebServer" "Description": "Resource group for all web server resources." } }

For more information, see Update Groups in the AWS Resource Groups User Guide.

  • For API details, see UpdateGroup in AWS CLI Command Reference.

PowerShell
Tools for PowerShell

Example 1: This example updates the description of the group

Update-RGGroup -GroupName auto-yes -Description "Instances auto-remove"

Output:

Description GroupArn Name ----------- -------- ---- Instances to be cleaned arn:aws:resource-groups:eu-west-1:123456789012:group/auto-yes auto-yes
  • For API details, see UpdateGroup in AWS Tools for PowerShell Cmdlet Reference.