Skip to content

GetTelemetryEnrichmentStatus

Source: src/AWS/ObservabilityAdmin/GetTelemetryEnrichmentStatus.ts

Runtime binding for observabilityadmin:GetTelemetryEnrichmentStatus — reads the status of the account’s telemetry enrichment feature (resource tags added to telemetry). Fails with a typed ResourceNotFoundException when the account has never onboarded to enrichment.

Provide AWS.ObservabilityAdmin.GetTelemetryEnrichmentStatusHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants observabilityadmin:GetTelemetryEnrichmentStatus
const getEnrichmentStatus = yield* AWS.ObservabilityAdmin.GetTelemetryEnrichmentStatus();
// runtime
const status = yield* getEnrichmentStatus().pipe(
Effect.map((r) => r.Status ?? "Stopped"),
Effect.catchTag("ResourceNotFoundException", () =>
Effect.succeed("NotOnboarded"),
),
);