Skip to main content

groups

Creates, updates, deletes, gets or lists a groups resource.

Overview

Namegroups
TypeResource
Idaws.resource_groups.groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_tagobjectA tag that defines the application group membership. This tag is only supported for application groups.
criticalityintegerThe critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.
descriptionstringThe description of the resource group. (pattern: <code>[\sa-zA-Z0-9_.-]*</code>)
display_namestringThe name of the application group, which you can change at any time. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)
group_arnstringThe Amazon resource name (ARN) of the resource group. (pattern: <code>arn:aws(-[a-z]+)*:resource-groups:[a-z]{2}(-[a-z]+)+-\d{1}:[0-9]{12}:group/([a-zA-Z0-9_.-]{1,300}|[a-zA-Z0-9_.-]{1,150}/[a-z0-9]{26})</code>)
namestringThe name of the resource group. (pattern: <code>[a-zA-Z0-9_.-]{1,300}|[a-zA-Z0-9_.-]{1,150}/[a-z0-9]{26}</code>)
ownerstringA name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_groupselectregionReturns information about a specified resource group. Minimum permissions To run this command, you must have the following permissions: resource-groups:GetGroup
list_groupsselectregionmaxResults, nextTokenReturns a list of existing Resource Groups in your account. Minimum permissions To run this command, you must have the following permissions: resource-groups:ListGroups
create_groupinsertregion, NameCreates a resource group with the specified name and description. You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see Build queries and groups in Resource Groups in the Resource Groups User Guide. For more information about service-linked groups and service configurations, see Service configurations for Resource Groups. Minimum permissions To run this command, you must have the following permissions: resource-groups:CreateGroup
update_groupupdateregionUpdates the description for an existing group. You cannot update the name of a resource group. Minimum permissions To run this command, you must have the following permissions: resource-groups:UpdateGroup
delete_groupdeleteregionDeletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure. Minimum permissions To run this command, you must have the following permissions: resource-groups:DeleteGroup

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
maxResultsintegerThe total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
nextTokenstringThe parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value provided by a previous call's NextToken response to indicate where the output should continue from.

SELECT examples

Returns information about a specified resource group. Minimum permissions To run this command, you must have the following permissions: resource-groups:GetGroup

SELECT
application_tag,
criticality,
description,
display_name,
group_arn,
name,
owner
FROM aws.resource_groups.groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a resource group with the specified name and description. You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see Build queries and groups in Resource Groups in the Resource Groups User Guide. For more information about service-linked groups and service configurations, see Service configurations for Resource Groups. Minimum permissions To run this command, you must have the following permissions: resource-groups:CreateGroup

INSERT INTO aws.resource_groups.groups (
Name,
Description,
ResourceQuery,
Tags,
Configuration,
Criticality,
Owner,
DisplayName,
region
)
SELECT
'{{ Name }}' /* required */,
'{{ Description }}',
'{{ ResourceQuery }}',
'{{ Tags }}',
'{{ Configuration }}',
{{ Criticality }},
'{{ Owner }}',
'{{ DisplayName }}',
'{{ region }}'
RETURNING
group,
group_configuration,
resource_query,
tags
;

UPDATE examples

Updates the description for an existing group. You cannot update the name of a resource group. Minimum permissions To run this command, you must have the following permissions: resource-groups:UpdateGroup

UPDATE aws.resource_groups.groups
SET
GroupName = '{{ GroupName }}',
Group = '{{ Group }}',
Description = '{{ Description }}',
Criticality = {{ Criticality }},
Owner = '{{ Owner }}',
DisplayName = '{{ DisplayName }}'
WHERE
region = '{{ region }}' --required
RETURNING
group;

DELETE examples

Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure. Minimum permissions To run this command, you must have the following permissions: resource-groups:DeleteGroup

DELETE FROM aws.resource_groups.groups
WHERE region = '{{ region }}' --required
;