Skip to main content

groups

Creates, updates, deletes or gets a group resource or lists groups in a region

Overview

Namegroups
TypeResource
DescriptionSchema for ResourceGroups::Group
Idaws.resourcegroups.groups

Fields

NameDatatypeDescription
namestringThe name of the resource group
descriptionstringThe description of the resource group
resource_queryobject
tagsarray
arnstringThe Resource Group ARN.
configurationarray
resourcesarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all groups in a region.

SELECT
region,
name,
description,
resource_query,
tags,
arn,
configuration,
resources
FROM aws.resourcegroups.groups
WHERE region = 'us-east-1';

Gets all properties from an individual group.

SELECT
region,
name,
description,
resource_query,
tags,
arn,
configuration,
resources
FROM aws.resourcegroups.groups
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';

INSERT example

Use the following StackQL query and manifest file to create a new group resource, using stack-deploy.

/*+ create */
INSERT INTO aws.resourcegroups.groups (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.resourcegroups.groups
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the groups resource, the following permissions are required:

Create

resource-groups:CreateGroup,
resource-groups:Tag,
cloudformation:DescribeStacks,
cloudformation:ListStackResources,
resource-groups:ListGroupResources,
resource-groups:GroupResources

Read

resource-groups:GetGroup,
resource-groups:GetGroupQuery,
resource-groups:GetTags,
resource-groups:GetGroupConfiguration,
resource-groups:ListGroupResources

Update

resource-groups:UpdateGroup,
resource-groups:GetTags,
resource-groups:GetGroupQuery,
resource-groups:UpdateGroupQuery,
resource-groups:Tag,
resource-groups:Untag,
resource-groups:PutGroupConfiguration,
resource-groups:GetGroupConfiguration,
resource-groups:ListGroupResources,
resource-groups:GroupResources,
resource-groups:UnGroupResources

Delete

resource-groups:DeleteGroup,
resource-groups:UnGroupResources

List

resource-groups:ListGroups