Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetMetricWidgetImageCommand

You can use the GetMetricWidgetImage API to retrieve a snapshot graph of one or more Amazon CloudWatch metrics as a bitmap image. You can then embed this image into your services and products, such as wiki pages, reports, and documents. You could also retrieve images regularly, such as every minute, and create your own custom live dashboard.

The graph you retrieve can include all CloudWatch metric graph features, including metric math and horizontal and vertical annotations.

There is a limit of 20 transactions per second for this API. Each GetMetricWidgetImage action has the following limits:

  • As many as 100 metrics in the graph.

  • Up to 100 KB uncompressed payload.

example

Use a bare-bones client and the command you need to make an API call.

import { CloudWatchClient, GetMetricWidgetImageCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import
// const { CloudWatchClient, GetMetricWidgetImageCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import
const client = new CloudWatchClient(config);
const command = new GetMetricWidgetImageCommand(input);
const response = await client.send(command);
see

GetMetricWidgetImageCommandInput for command's input shape.

see

GetMetricWidgetImageCommandOutput for command's response shape.

see

config for CloudWatchClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: GetMetricWidgetImageCommandInput

Readonly middlewareStack