groups
Creates, updates, deletes or gets a group
resource or lists groups
in a region
Overview
Name | groups |
Type | Resource |
Description | Schema for ResourceGroups::Group |
Id | aws.resourcegroups.groups |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the resource group |
description | string | The description of the resource group |
resource_query | object | |
tags | array | |
arn | string | The Resource Group ARN. |
configuration | array | |
resources | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.resourcegroups.groups (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.resourcegroups.groups (
Name,
Description,
ResourceQuery,
Tags,
Configuration,
Resources,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ResourceQuery }}',
'{{ Tags }}',
'{{ Configuration }}',
'{{ Resources }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: group
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: ResourceQuery
value:
Type: '{{ Type }}'
Query:
ResourceTypeFilters:
- '{{ ResourceTypeFilters[0] }}'
StackIdentifier: '{{ StackIdentifier }}'
TagFilters:
- Key: '{{ Key }}'
Values:
- '{{ Values[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Configuration
value:
- Type: '{{ Type }}'
Parameters:
- Name: '{{ Name }}'
Values:
- '{{ Values[0] }}'
- name: Resources
value:
- '{{ Resources[0] }}'
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