Skip to content

(cloudwatch): Unit.NONE does not mean "No unit" #20112

@kyhau

Description

@kyhau

Describe the bug

In CDK it states Unit.NONE means "No unit", but it results in "None" instead of "No unit" (and no data is returned when Unit == None) .

Expected Behavior

The documentation states Unit.NONE means "No unit", so it is expected that when using Unit.NONE in CDK stack for alarm, the unit will be "No unit".

Current Behavior

In CDK it states Unit.NONE means "No unit"

image

The following screenshot shows the deployed alarm having Unit "None" instead of "No unit" (and no data is returned when Unit == None).

image

Reproduction Steps

  1. Use Unit.NONE for an alarm.
  2. Deploy the CDK stack.
  3. Check the alarm, you will see the Unit is None, not No Unit.

Possible Solution

Either fixed the documentation Unit.NONE != No Unit, or make Unit.NoUnit an option.

Additional Information/Context

No response

CDK CLI Version

2.21.1 (build a6ee543)

Framework Version

No response

Node.js Version

v16.14.2

OS

Ubuntu 20.04.4

Language

Typescript

Language Version

Version 4.6.3

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThis is a problem with documentation.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2package/toolsRelated to AWS CDK Tools or CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions