Skip to content

Instantly share code, notes, and snippets.

@mgjam
Created October 16, 2020 16:30
Show Gist options
  • Save mgjam/9dc02e95ef0490fdc1b83041d8e9953f to your computer and use it in GitHub Desktop.
Save mgjam/9dc02e95ef0490fdc1b83041d8e9953f to your computer and use it in GitHub Desktop.
import { GraphWidget, IWidget, Metric } from "@aws-cdk/aws-cloudwatch";
import { Construct, Duration } from "@aws-cdk/core";
const invocationWidget = new GraphWidget({
width: 24,
title: 'title',
left: [new Metric({
metricName: 'Count',
namespace: 'AWS/ApiGateway',
dimensions: {'ApiName': 'apiName'},
statistic: 'sum',
label: 'Count',
period: Duration.hours(3)
})]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment