Skip to main content

resource_groups

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

Overview

Nameresource_groups
TypeResource
Idaws.inspector.resource_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
failed_itemsobjectResource group details that cannot be described. An error code is provided for each failed item.
resource_groupsarrayInformation about a resource group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_resource_groupsselectregionDescribes the resource groups that are specified by the ARNs of the resource groups.
create_resource_groupinsertregion, resourceGroupTagsCreates 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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
;