AWS.DevOpsGuru reference
DeleteInsight
Section titled “DeleteInsight”Source:
src/AWS/DevOpsGuru/DeleteInsight.ts
Runtime binding for devops-guru:DeleteInsight.
Deletes a closed insight — housekeeping automation for insights that have been triaged and resolved. Only closed insights can be deleted.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DeleteInsightHttp).
DeleteInsight: Inspecting Insights
Section titled “DeleteInsight: Inspecting Insights”// init — account-level binding, no resource argumentconst deleteInsight = yield* AWS.DevOpsGuru.DeleteInsight();
// runtimeyield* deleteInsight({ Id: insightId });DescribeAccountHealth
Section titled “DescribeAccountHealth”Source:
src/AWS/DevOpsGuru/DescribeAccountHealth.ts
Runtime binding for devops-guru:DescribeAccountHealth.
Returns the number of open reactive and proactive insights, analyzed metrics, and resource hours for the account — the top line of an operations dashboard.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeAccountHealthHttp).
DescribeAccountHealth: Account Health
Section titled “DescribeAccountHealth: Account Health”// init — account-level binding, no resource argumentconst describeAccountHealth = yield* AWS.DevOpsGuru.DescribeAccountHealth();
// runtimeconst health = yield* describeAccountHealth();yield* Effect.log(`open reactive insights: ${health.OpenReactiveInsights}`);DescribeAccountOverview
Section titled “DescribeAccountOverview”Source:
src/AWS/DevOpsGuru/DescribeAccountOverview.ts
Runtime binding for devops-guru:DescribeAccountOverview.
Summarizes the insights created and the mean time to recover over a time range — the account’s operational scorecard for a reporting window.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeAccountOverviewHttp).
DescribeAccountOverview: Account Health
Section titled “DescribeAccountOverview: Account Health”// init — account-level binding, no resource argumentconst describeAccountOverview = yield* AWS.DevOpsGuru.DescribeAccountOverview();
// runtimeconst overview = yield* describeAccountOverview({ FromTime: new Date(Date.now() - 7 * 24 * 3600_000),});yield* Effect.log(`MTTR: ${overview.MeanTimeToRecoverInMilliseconds}ms`);DescribeAnomaly
Section titled “DescribeAnomaly”Source:
src/AWS/DevOpsGuru/DescribeAnomaly.ts
Runtime binding for devops-guru:DescribeAnomaly.
Returns the details of a single anomaly — severity, status, time ranges, and the CloudWatch/Performance Insights metrics that triggered it.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeAnomalyHttp).
DescribeAnomaly: Inspecting Anomalies
Section titled “DescribeAnomaly: Inspecting Anomalies”// init — account-level binding, no resource argumentconst describeAnomaly = yield* AWS.DevOpsGuru.DescribeAnomaly();
// runtimeconst { ReactiveAnomaly } = yield* describeAnomaly({ Id: anomalyId });yield* Effect.log(`severity: ${ReactiveAnomaly?.Severity}`);DescribeFeedback
Section titled “DescribeFeedback”Source:
src/AWS/DevOpsGuru/DescribeFeedback.ts
Runtime binding for devops-guru:DescribeFeedback.
Returns the most recently recorded feedback (e.g. VALID / NOT_VALID) for an insight.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeFeedbackHttp).
DescribeFeedback: Feedback
Section titled “DescribeFeedback: Feedback”// init — account-level binding, no resource argumentconst describeFeedback = yield* AWS.DevOpsGuru.DescribeFeedback();
// runtimeconst { InsightFeedback } = yield* describeFeedback({ InsightId: insightId });yield* Effect.log(`feedback: ${InsightFeedback?.Feedback}`);DescribeInsight
Section titled “DescribeInsight”Source:
src/AWS/DevOpsGuru/DescribeInsight.ts
Runtime binding for devops-guru:DescribeInsight.
Returns the details of a single insight — severity, status, time ranges, and the SSM OpsItem id when OpsCenter integration is enabled. The building block of an incident-response Function reacting to DevOps Guru notifications.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeInsightHttp).
DescribeInsight: Inspecting Insights
Section titled “DescribeInsight: Inspecting Insights”// init — account-level binding, no resource argumentconst describeInsight = yield* AWS.DevOpsGuru.DescribeInsight();
// runtimeconst { ReactiveInsight } = yield* describeInsight({ Id: insightId });yield* Effect.log(`${ReactiveInsight?.Severity}: ${ReactiveInsight?.Name}`);DescribeOrganizationHealth
Section titled “DescribeOrganizationHealth”Source:
src/AWS/DevOpsGuru/DescribeOrganizationHealth.ts
Runtime binding for devops-guru:DescribeOrganizationHealth.
Returns the number of open insights and analyzed resources across the organization (management or delegated-administrator account).
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeOrganizationHealthHttp).
DescribeOrganizationHealth: Organization Visibility
Section titled “DescribeOrganizationHealth: Organization Visibility”// init — account-level binding, no resource argumentconst describeOrganizationHealth = yield* AWS.DevOpsGuru.DescribeOrganizationHealth();
// runtimeconst health = yield* describeOrganizationHealth();yield* Effect.log(`org open reactive: ${health.OpenReactiveInsights}`);DescribeOrganizationOverview
Section titled “DescribeOrganizationOverview”Source:
src/AWS/DevOpsGuru/DescribeOrganizationOverview.ts
Runtime binding for devops-guru:DescribeOrganizationOverview.
Summarizes the insights created across the organization during a time range (management or delegated-administrator account).
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeOrganizationOverviewHttp).
DescribeOrganizationOverview: Organization Visibility
Section titled “DescribeOrganizationOverview: Organization Visibility”// init — account-level binding, no resource argumentconst describeOrganizationOverview = yield* AWS.DevOpsGuru.DescribeOrganizationOverview();
// runtimeconst overview = yield* describeOrganizationOverview({ FromTime: new Date(Date.now() - 7 * 24 * 3600_000),});yield* Effect.log(`reactive insights: ${overview.ReactiveInsights}`);DescribeOrganizationResourceCollectionHealth
Section titled “DescribeOrganizationResourceCollectionHealth”Source:
src/AWS/DevOpsGuru/DescribeOrganizationResourceCollectionHealth.ts
Runtime binding for devops-guru:DescribeOrganizationResourceCollectionHealth.
Returns per-CloudFormation-stack (or per-tag/per-service) insight counts across the organization’s accounts.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeOrganizationResourceCollectionHealthHttp).
DescribeOrganizationResourceCollectionHealth: Organization Visibility
Section titled “DescribeOrganizationResourceCollectionHealth: Organization Visibility”// init — account-level binding, no resource argumentconst describeOrganizationResourceCollectionHealth = yield* AWS.DevOpsGuru.DescribeOrganizationResourceCollectionHealth();
// runtimeconst page = yield* describeOrganizationResourceCollectionHealth({ OrganizationResourceCollectionType: "AWS_CLOUD_FORMATION",});yield* Effect.log(`stacks analyzed: ${page.CloudFormation?.length}`);DescribeResourceCollectionHealth
Section titled “DescribeResourceCollectionHealth”Source:
src/AWS/DevOpsGuru/DescribeResourceCollectionHealth.ts
Runtime binding for devops-guru:DescribeResourceCollectionHealth.
Returns the number of open insights per analyzed CloudFormation stack or app-boundary tag — where the operational pain is concentrated.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.DescribeResourceCollectionHealthHttp).
DescribeResourceCollectionHealth: Coverage Health
Section titled “DescribeResourceCollectionHealth: Coverage Health”// init — account-level binding, no resource argumentconst describeResourceCollectionHealth = yield* AWS.DevOpsGuru.DescribeResourceCollectionHealth();
// runtimeconst page = yield* describeResourceCollectionHealth({ ResourceCollectionType: "AWS_CLOUD_FORMATION",});for (const stack of page.CloudFormation ?? []) { yield* Effect.log(`${stack.StackName}: ${stack.Insight?.OpenReactiveInsights}`);}EventSourcesConfig
Section titled “EventSourcesConfig”Source:
src/AWS/DevOpsGuru/EventSourcesConfig.ts
The DevOps Guru event sources configuration — the account/region singleton that controls which integrated services DevOps Guru consumes recommendations from as event sources. The one supported source is Amazon CodeGuru Profiler: when enabled, profiler recommendations surface as DevOps Guru proactive insights.
An account has exactly one configuration, so this resource is a
capture-and-restore singleton: adopting an enabled configuration that
Alchemy did not create requires --adopt. Destroying the resource
restores the default (disabled).
EventSourcesConfig: Enabling Event Sources
Section titled “EventSourcesConfig: Enabling Event Sources”const eventSources = yield* DevOpsGuru.EventSourcesConfig("EventSources", { amazonCodeGuruProfiler: true,});GetCostEstimation
Section titled “GetCostEstimation”Source:
src/AWS/DevOpsGuru/GetCostEstimation.ts
Runtime binding for devops-guru:GetCostEstimation.
Returns the result of the most recent cost estimation started with StartCostEstimation — the estimated monthly cost of DevOps Guru analyzing the candidate resource collection.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.GetCostEstimationHttp).
GetCostEstimation: Cost Estimation
Section titled “GetCostEstimation: Cost Estimation”// init — account-level binding, no resource argumentconst getCostEstimation = yield* AWS.DevOpsGuru.GetCostEstimation();
// runtimeconst estimate = yield* getCostEstimation();yield* Effect.log(`estimated: ${estimate.TotalCost} (${estimate.Status})`);ListAnomaliesForInsight
Section titled “ListAnomaliesForInsight”Source:
src/AWS/DevOpsGuru/ListAnomaliesForInsight.ts
Runtime binding for devops-guru:ListAnomaliesForInsight.
Lists the anomalies that belong to an insight — the individual metric deviations DevOps Guru correlated into the incident.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.ListAnomaliesForInsightHttp).
ListAnomaliesForInsight: Inspecting Anomalies
Section titled “ListAnomaliesForInsight: Inspecting Anomalies”// init — account-level binding, no resource argumentconst listAnomaliesForInsight = yield* AWS.DevOpsGuru.ListAnomaliesForInsight();
// runtimeconst { ReactiveAnomalies } = yield* listAnomaliesForInsight({ InsightId: insightId,});yield* Effect.log(`anomalies: ${ReactiveAnomalies?.length}`);ListAnomalousLogGroups
Section titled “ListAnomalousLogGroups”Source:
src/AWS/DevOpsGuru/ListAnomalousLogGroups.ts
Runtime binding for devops-guru:ListAnomalousLogGroups.
Lists the CloudWatch log groups that contain log anomalies for an insight (requires the service integration’s log anomaly detection).
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.ListAnomalousLogGroupsHttp).
ListAnomalousLogGroups: Inspecting Anomalies
Section titled “ListAnomalousLogGroups: Inspecting Anomalies”// init — account-level binding, no resource argumentconst listAnomalousLogGroups = yield* AWS.DevOpsGuru.ListAnomalousLogGroups();
// runtimeconst { AnomalousLogGroups } = yield* listAnomalousLogGroups({ InsightId: insightId,});for (const group of AnomalousLogGroups ?? []) { yield* Effect.log(`${group.LogGroupName}: ${group.NumberOfLogLinesScanned} lines`);}ListEvents
Section titled “ListEvents”Source:
src/AWS/DevOpsGuru/ListEvents.ts
Runtime binding for devops-guru:ListEvents.
Lists the infrastructure and deployment events (CloudTrail changes, deployments, schema changes) DevOps Guru evaluated around an insight — the “what changed?” of an incident.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.ListEventsHttp).
ListEvents: Events and Recommendations
Section titled “ListEvents: Events and Recommendations”// init — account-level binding, no resource argumentconst listEvents = yield* AWS.DevOpsGuru.ListEvents();
// runtimeconst { Events } = yield* listEvents({ Filters: { InsightId: insightId, DataSource: "AWS_CLOUD_TRAIL" },});yield* Effect.log(`events: ${Events?.length}`);ListInsights
Section titled “ListInsights”Source:
src/AWS/DevOpsGuru/ListInsights.ts
Runtime binding for devops-guru:ListInsights.
Lists the account’s insights filtered by status (ongoing, closed, or any within a time range) and type (reactive/proactive).
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.ListInsightsHttp).
ListInsights: Inspecting Insights
Section titled “ListInsights: Inspecting Insights”// init — account-level binding, no resource argumentconst listInsights = yield* AWS.DevOpsGuru.ListInsights();
// runtimeconst { ReactiveInsights } = yield* listInsights({ StatusFilter: { Ongoing: { Type: "REACTIVE" } },});yield* Effect.log(`ongoing: ${ReactiveInsights?.length}`);ListMonitoredResources
Section titled “ListMonitoredResources”Source:
src/AWS/DevOpsGuru/ListMonitoredResources.ts
Runtime binding for devops-guru:ListMonitoredResources.
Lists the resources DevOps Guru is analyzing (or supports analyzing) — an audit of what the resource collection actually covers.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.ListMonitoredResourcesHttp).
ListMonitoredResources: Coverage Health
Section titled “ListMonitoredResources: Coverage Health”// init — account-level binding, no resource argumentconst listMonitoredResources = yield* AWS.DevOpsGuru.ListMonitoredResources();
// runtimeconst { MonitoredResourceIdentifiers } = yield* listMonitoredResources();yield* Effect.log(`monitored: ${MonitoredResourceIdentifiers?.length}`);ListOrganizationInsights
Section titled “ListOrganizationInsights”Source:
src/AWS/DevOpsGuru/ListOrganizationInsights.ts
Runtime binding for devops-guru:ListOrganizationInsights.
Lists insights across the organization’s accounts filtered by status and type (management or delegated-administrator account).
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.ListOrganizationInsightsHttp).
ListOrganizationInsights: Organization Visibility
Section titled “ListOrganizationInsights: Organization Visibility”// init — account-level binding, no resource argumentconst listOrganizationInsights = yield* AWS.DevOpsGuru.ListOrganizationInsights();
// runtimeconst { ReactiveInsights } = yield* listOrganizationInsights({ StatusFilter: { Ongoing: { Type: "REACTIVE" } },});yield* Effect.log(`org ongoing: ${ReactiveInsights?.length}`);ListRecommendations
Section titled “ListRecommendations”Source:
src/AWS/DevOpsGuru/ListRecommendations.ts
Runtime binding for devops-guru:ListRecommendations.
Lists DevOps Guru’s remediation recommendations for an insight — the ready-made content of an incident notification or runbook comment.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.ListRecommendationsHttp).
ListRecommendations: Events and Recommendations
Section titled “ListRecommendations: Events and Recommendations”// init — account-level binding, no resource argumentconst listRecommendations = yield* AWS.DevOpsGuru.ListRecommendations();
// runtimeconst { Recommendations } = yield* listRecommendations({ InsightId: insightId,});for (const rec of Recommendations ?? []) { yield* Effect.log(`${rec.Name}: ${rec.Description}`);}NotificationChannel
Section titled “NotificationChannel”Source:
src/AWS/DevOpsGuru/NotificationChannel.ts
A DevOps Guru notification channel — an Amazon SNS topic that DevOps Guru uses to notify you when insights are generated, closed, or change severity.
The channel configuration is immutable in the AWS API: changing the topic
replaces the channel, while filter changes are converged in place by
removing and re-adding the channel (the channel id attribute changes).
NotificationChannel: Creating a Notification Channel
Section titled “NotificationChannel: Creating a Notification Channel”Notify an SNS topic about all insights
const topic = yield* SNS.Topic("Alerts", {});
const channel = yield* DevOpsGuru.NotificationChannel("Channel", { topicArn: topic.topicArn,});Filter to high-severity new insights
const channel = yield* DevOpsGuru.NotificationChannel("Channel", { topicArn: topic.topicArn, severities: ["HIGH"], messageTypes: ["NEW_INSIGHT", "SEVERITY_UPGRADED"],});PutFeedback
Section titled “PutFeedback”Source:
src/AWS/DevOpsGuru/PutFeedback.ts
Runtime binding for devops-guru:PutFeedback.
Records feedback on an insight’s usefulness (VALID / NOT_VALID and variants) — feeding triage decisions back into DevOps Guru.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.PutFeedbackHttp).
PutFeedback: Feedback
Section titled “PutFeedback: Feedback”// init — account-level binding, no resource argumentconst putFeedback = yield* AWS.DevOpsGuru.PutFeedback();
// runtimeyield* putFeedback({ InsightFeedback: { Id: insightId, Feedback: "VALID_COLLECTION" },});ResourceCollection
Section titled “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.
ResourceCollection: Defining Coverage
Section titled “ResourceCollection: Defining Coverage”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"] }, ],});SearchInsights
Section titled “SearchInsights”Source:
src/AWS/DevOpsGuru/SearchInsights.ts
Runtime binding for devops-guru:SearchInsights.
Searches the account’s insights within a start-time range, filtered by severity, status, service, or resource collection. The service
requires both FromTime and ToTime on the range.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.SearchInsightsHttp).
SearchInsights: Inspecting Insights
Section titled “SearchInsights: Inspecting Insights”// init — account-level binding, no resource argumentconst searchInsights = yield* AWS.DevOpsGuru.SearchInsights();
// runtimeconst { ReactiveInsights } = yield* searchInsights({ Type: "REACTIVE", StartTimeRange: { FromTime: new Date(Date.now() - 24 * 3600_000), ToTime: new Date(), }, Filters: { Severities: ["HIGH"] },});yield* Effect.log(`high severity: ${ReactiveInsights?.length}`);SearchOrganizationInsights
Section titled “SearchOrganizationInsights”Source:
src/AWS/DevOpsGuru/SearchOrganizationInsights.ts
Runtime binding for devops-guru:SearchOrganizationInsights.
Searches insights across specific organization accounts within a start-time range (management or delegated-administrator account). The
service requires both FromTime and ToTime on the range.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.SearchOrganizationInsightsHttp).
SearchOrganizationInsights: Organization Visibility
Section titled “SearchOrganizationInsights: Organization Visibility”// init — account-level binding, no resource argumentconst searchOrganizationInsights = yield* AWS.DevOpsGuru.SearchOrganizationInsights();
// runtimeconst { ReactiveInsights } = yield* searchOrganizationInsights({ AccountIds: ["111111111111"], Type: "REACTIVE", StartTimeRange: { FromTime: new Date(Date.now() - 24 * 3600_000), ToTime: new Date(), },});yield* Effect.log(`found: ${ReactiveInsights?.length}`);ServiceIntegration
Section titled “ServiceIntegration”Source:
src/AWS/DevOpsGuru/ServiceIntegration.ts
The DevOps Guru service integration — the account/region singleton that controls how DevOps Guru integrates with other AWS services: creating a Systems Manager OpsItem for each insight, analyzing CloudWatch log groups for anomalies, and encrypting DevOps Guru data with a customer-managed KMS key.
An account has exactly one integration configuration, so this resource is
a capture-and-restore singleton: adopting a non-default configuration that
Alchemy did not create requires --adopt. Destroying the resource
restores the account defaults (everything disabled, AWS-owned key).
ServiceIntegration: Configuring the Integration
Section titled “ServiceIntegration: Configuring the Integration”Enable Log Anomaly Detection
const integration = yield* DevOpsGuru.ServiceIntegration("Integration", { logsAnomalyDetection: true,});File an OpsItem for Every Insight
const integration = yield* DevOpsGuru.ServiceIntegration("Integration", { opsCenter: true, logsAnomalyDetection: true,});Encrypt with a Customer-Managed Key
const integration = yield* DevOpsGuru.ServiceIntegration("Integration", { kmsKeyId: key.keyId,});StartCostEstimation
Section titled “StartCostEstimation”Source:
src/AWS/DevOpsGuru/StartCostEstimation.ts
Runtime binding for devops-guru:StartCostEstimation.
Starts estimating the monthly cost of DevOps Guru analyzing a candidate resource collection. Poll the result with GetCostEstimation.
Provide the implementation with
Effect.provide(AWS.DevOpsGuru.StartCostEstimationHttp).
StartCostEstimation: Cost Estimation
Section titled “StartCostEstimation: Cost Estimation”// init — account-level binding, no resource argumentconst startCostEstimation = yield* AWS.DevOpsGuru.StartCostEstimation();
// runtimeyield* startCostEstimation({ ResourceCollection: { CloudFormation: { StackNames: ["my-app-prod"] } },});