Skip to content

ResourceCollection

Source: src/AWS/DevOpsGuru/ResourceCollection.ts

The DevOps Guru resource collection — the account/region singleton that defines which AWS resources DevOps Guru analyzes for operational insights, either by CloudFormation stack or by app-boundary tag. Configuring a collection is what “enables” DevOps Guru analysis in an account.

An account has exactly one collection, so this resource is a capture-and-restore singleton: adopting a collection that Alchemy did not configure requires --adopt.

Analyze specific CloudFormation stacks

const collection = yield* DevOpsGuru.ResourceCollection("Coverage", {
cloudFormation: { stackNames: ["my-app-prod"] },
});

Analyze every stack in the account

const collection = yield* DevOpsGuru.ResourceCollection("Coverage", {
cloudFormation: { stackNames: ["*"] },
});

Analyze resources by app-boundary tag

const collection = yield* DevOpsGuru.ResourceCollection("Coverage", {
tags: [
{ appBoundaryKey: "devops-guru-app", tagValues: ["checkout", "billing"] },
],
});