resource_groups
Creates, updates, deletes, gets or lists a resource_groups resource.
Overview
| Name | resource_groups |
| Type | Resource |
| Id | aws.inspector.resource_groups |
Fields
The following fields are returned by SELECT queries:
- describe_resource_groups
| Name | Datatype | Description |
|---|---|---|
failed_items | object | Resource group details that cannot be described. An error code is provided for each failed item. |
resource_groups | array | Information about a resource group. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_resource_groups | select | region | Describes the resource groups that are specified by the ARNs of the resource groups. | |
create_resource_group | insert | region, resourceGroupTags | Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. For more information, see CreateAssessmentTarget. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_resource_groups
Describes the resource groups that are specified by the ARNs of the resource groups.
SELECT
failed_items,
resource_groups
FROM aws.inspector.resource_groups
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_resource_group
- Manifest
Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. For more information, see CreateAssessmentTarget.
INSERT INTO aws.inspector.resource_groups (
resourceGroupTags,
region
)
SELECT
'{{ resourceGroupTags }}' /* required */,
'{{ region }}'
RETURNING
resource_group_arn
;
# Description fields are for documentation purposes
- name: resource_groups
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resource_groups resource.
- name: resourceGroupTags
description: |
A collection of keys and an array of possible values, '[{"key":"key1","values":["Value1","Value2"]},{"key":"Key2","values":["Value3"]}]'. For example,'[{"key":"Name","values":["TestEC2Instance"]}]'.
value:
- key: "{{ key }}"
value: "{{ value }}"