There are more AWS SDK examples available in the AWS Doc SDK Examples
Use GetGroup with a CLI
The following code examples show how to use GetGroup.
- CLI
-
- AWS CLI
-
To get information about a resource group
The following
get-groupexample displays details about the specified resource group. To get the query attached to the group, useget-group-query.aws resource-groups get-group \ --group-nametbq-WebServerOutput:
{ "Group": { "GroupArn": "arn:aws:resource-groups:us-west-2:123456789012:group/tbq-WebServer", "Name": "tbq-WebServer", "Description": "A tag-based query resource group of WebServers." } }-
For API details, see GetGroup
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example retrieves resource group as per the group name
Get-RGGroup -GroupName auto-noOutput:
Description GroupArn Name ----------- -------- ---- arn:aws:resource-groups:eu-west-1:123456789012:group/auto-no auto-no-
For API details, see GetGroup in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example retrieves resource group as per the group name
Get-RGGroup -GroupName auto-noOutput:
Description GroupArn Name ----------- -------- ---- arn:aws:resource-groups:eu-west-1:123456789012:group/auto-no auto-no-
For API details, see GetGroup in AWS Tools for PowerShell Cmdlet Reference (V5).
-