Skip to content

GetMetricStream

Source: src/AWS/CloudWatch/GetMetricStream.ts

Runtime binding for cloudwatch:GetMetricStream — read the configuration and state of the bound MetricStream; the stream name is injected automatically.

Provide CloudWatch.GetMetricStreamHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants cloudwatch:GetMetricStream on the stream
const getMetricStream = yield* AWS.CloudWatch.GetMetricStream(metricStream);
// runtime
const result = yield* getMetricStream();
const state = result.State; // "running" | "stopped"