AWS::DevOpsGuru::ResourceCollection - AWS CloudFormation

AWS::DevOpsGuru::ResourceCollection

A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze only the AWS resources that are defined in the stacks.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::DevOpsGuru::ResourceCollection", "Properties" : { "ResourceCollectionFilter" : ResourceCollectionFilter } }

YAML

Type: AWS::DevOpsGuru::ResourceCollection Properties: ResourceCollectionFilter: ResourceCollectionFilter

Properties

ResourceCollectionFilter

Information about a filter used to specify which AWS resources are analyzed for anomalous behavior by DevOps Guru.

Required: Yes

Type: ResourceCollectionFilter

Update requires: No interruption

Return values

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns Amazon Resource Name (ARN) of the ResourceCollection. For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values. For more information about using Fn::GetAtt, see Fn::GetAtt.

ResourceCollectionType

The type of AWS resource collections to return. The one valid value is CLOUD_FORMATION for AWS CloudFormation stacks.

Examples

Create a resource collection using two CloudFormation stacks

JSON

{ "Resources": { "MyResourceCollection": { "Type": "AWS::DevOpsGuru::ResourceCollection", "Properties": { "ResourceCollectionFilter": { "CloudFormation": { "StackNames": [ "StackA", "StackB" ] } } } } } }

YAML

Resources: MyResourceCollection: Type: AWS::DevOpsGuru::ResourceCollection Properties: ResourceCollectionFilter: CloudFormation: StackNames: - StackA - StackB

Create a resource collection with all CloudFormation stacks in your account

JSON

{ "Resources": { "MyResourceCollection": { "Type": "AWS::DevOpsGuru::ResourceCollection", "Properties": { "ResourceCollectionFilter": { "CloudFormation": { "StackNames": [ "*" ] } } } } } }

YAML

Resources: MyResourceCollection: Type: AWS::DevOpsGuru::ResourceCollection Properties: ResourceCollectionFilter: CloudFormation: StackNames: - "*"

Monitor DevOps Guru resources using tags

JSON

{ "DevOpsGuruResourceCollection": { "Type": "AWS::DevOpsGuru::ResourceCollection", "Condition": "DevOpsGuruEnable", "Properties": { "ResourceCollectionFilter": { "Tags": [{ "AppBoundaryKey": "devops-guru-workshop", "TagValues": [ "devops-guru-serverless", "devops-guru-aurora" ] }] } } } }

YAML

DevOpsGuruResourceCollection: Type: AWS::DevOpsGuru::ResourceCollection Condition: DevOpsGuruEnable Properties: ResourceCollectionFilter: Tags: - AppBoundaryKey: devops-guru-workshop TagValues: - devops-guru-serverless - devops-guru-aurora

JSON

{ "DevOpsGuruResourceCollection": { "Type": "AWS::DevOpsGuru::ResourceCollection", "Condition": "DevOpsGuruEnable", "Properties": { "ResourceCollectionFilter": { "Tags": [ { "AppBoundaryKey": "devops-guru-workshop", "TagValues": [ "*" ] } ] } } } }

YAML

DevOpsGuruResourceCollection: Type: AWS::DevOpsGuru::ResourceCollection Condition: DevOpsGuruEnable Properties: ResourceCollectionFilter: Tags: - AppBoundaryKey: devops-guru-workshop TagValues: - "*"