resource_groups
Creates, updates, deletes or gets a resource_group resource or lists resource_groups in a region
Overview
| Name | resource_groups |
| Type | Resource |
| Description | Resource Type definition for AWS::Inspector::ResourceGroup |
| Id | aws.inspector.resource_groups |
Fields
| Name | Datatype | Description |
|---|---|---|
arn | string | |
resource_group_tags | array | |
region | string | AWS region. |
For more information, see AWS::Inspector::ResourceGroup.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ResourceGroupTags, region |
delete_resource | DELETE | data__Identifier, region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all properties from an individual resource_group.
SELECT
region,
arn,
resource_group_tags
FROM aws.inspector.resource_groups
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT example
Use the following StackQL query and manifest file to create a new resource_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.inspector.resource_groups (
ResourceGroupTags,
region
)
SELECT
'{{ ResourceGroupTags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.inspector.resource_groups (
ResourceGroupTags,
region
)
SELECT
'{{ ResourceGroupTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resource_group
props:
- name: ResourceGroupTags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE example
/*+ delete */
DELETE FROM aws.inspector.resource_groups
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the resource_groups resource, the following permissions are required:
Create
inspector:CreateResourceGroup
Read
inspector:CreateResourceGroup
Delete
inspector:CreateResourceGroup