nandorsoma commented on code in PR #5905: URL: https://github.com/apache/nifi/pull/5905#discussion_r856298615
########## nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/cloudwatch/PutCloudWatchMetric.java: ########## @@ -70,6 +70,33 @@ public static final Set<Relationship> relationships = Collections.unmodifiableSet( new HashSet<>(Arrays.asList(REL_SUCCESS, REL_FAILURE))); + private static final Set<String> units = Collections.unmodifiableSet( + new HashSet<>(Arrays.asList( + "Seconds", "Microseconds", "Milliseconds", "Bytes", + "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", + "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", + "Percent", "Count", "Bytes/Second", "Kilobytes/Second", + "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", + "Bits/Second", "Kilobits/Second", "Megabits/Second", + "Gigabits/Second", "Terabits/Second", "Count/Second", + "None", ""))); Review Comment: I've seen this documentation, that's why I'm asking it. I think if you don't need Unit for the request you need to set that property to null, not empty string. Since the required property for the PropertyDescriptor is false, the validator will only run when a value is set for that field. Though I just realized that maybe for compatibility reasons we need to allow empty string, because previously everything was allowed. What do you think @exceptionfactory ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org