resource_collections
Creates, updates, deletes or gets a resource_collection
resource or lists resource_collections
in a region
Overview
Name | resource_collections |
Type | Resource |
Description | This resource schema represents the ResourceCollection resource in the Amazon DevOps Guru. |
Id | aws.devopsguru.resource_collections |
Fields
Name | Datatype | Description |
---|---|---|
resource_collection_filter | object | Information about a filter used to specify which AWS resources are analyzed for anomalous behavior by DevOps Guru. |
resource_collection_type | string | The type of ResourceCollection |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ResourceCollectionFilter, 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 resource_collections
in a region.
SELECT
region,
resource_collection_filter,
resource_collection_type
FROM aws.devopsguru.resource_collections
WHERE region = 'us-east-1';
Gets all properties from an individual resource_collection
.
SELECT
region,
resource_collection_filter,
resource_collection_type
FROM aws.devopsguru.resource_collections
WHERE region = 'us-east-1' AND data__Identifier = '<ResourceCollectionType>';
INSERT
example
Use the following StackQL query and manifest file to create a new resource_collection
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.devopsguru.resource_collections (
ResourceCollectionFilter,
region
)
SELECT
'{{ ResourceCollectionFilter }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.devopsguru.resource_collections (
ResourceCollectionFilter,
region
)
SELECT
'{{ ResourceCollectionFilter }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resource_collection
props:
- name: ResourceCollectionFilter
value:
CloudFormation:
StackNames:
- '{{ StackNames[0] }}'
Tags:
- AppBoundaryKey: '{{ AppBoundaryKey }}'
TagValues:
- '{{ TagValues[0] }}'
DELETE
example
/*+ delete */
DELETE FROM aws.devopsguru.resource_collections
WHERE data__Identifier = '<ResourceCollectionType>'
AND region = 'us-east-1';
Permissions
To operate on the resource_collections
resource, the following permissions are required:
Create
devops-guru:UpdateResourceCollection,
devops-guru:GetResourceCollection
Read
devops-guru:GetResourceCollection
Delete
devops-guru:UpdateResourceCollection,
devops-guru:GetResourceCollection
List
devops-guru:GetResourceCollection
Update
devops-guru:UpdateResourceCollection,
devops-guru:GetResourceCollection