Skip to content

CloudWatch Widget: Support time range value #4647

@Amri91

Description

@Amri91

As per CDK documentation, there is no way to define a widget that looks like this.

{
    "view": "singleValue",
    "region": "us-east-1",
    "metrics": [
        [someMetric]
    ],
    "setPeriodToTimeRange": true // <--
}

Use Case

I want to display a widget on my CloudWatch dashboard that uses my Route53 health checks to show a rudimentary uptime. Currently, I have to use the console to switch the widgets to use time range value instead of setting it using my current CDK code.

Proposed Solution

Add a new property in the SingleValueWidgetProps and use it in the SingleValueWidget toJson function.

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-cloudwatchRelated to Amazon CloudWatchfeature-requestA feature should be added or improved.in-progressThis issue is being actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions