Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cloudwatch): validate Dashboards with an
end
time must also ha…
…ve a `start` time (#27124) This PR adds a validation for a `start` and an `end` in `Dashboard`. It throws an error if you specify an `end` without a `start`. While it is possible to deploy a dashboard with only an end time in CloudFormation, the setting will be ignored and the dashboard displayed with the default time period. With this validation, we are stopping the faulty deployment early. API Reference contains the following description and the user will not be aware of this situation. If you specify a value for end, you must also specify a value for start. https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html And each Widget in graph.ts also validates the same case. https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts#L245-L247 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information