Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

New-VSCloudWatchAlarm should accept int for Threshold #83

Open
indented-automation opened this issue Aug 13, 2020 · 0 comments
Open

New-VSCloudWatchAlarm should accept int for Threshold #83

indented-automation opened this issue Aug 13, 2020 · 0 comments

Comments

@indented-automation
Copy link
Collaborator

Description

The New-VSCloudWatchAlarm requires a Double for the Threshold parameter. It should accept int and cast.

Steps to reproduce

New-VSCloudWatchAlarm -ComparisonOperator GreaterThanOrEqualToThreshold -EvaluationPeriods 1 -LogicalId one -Threshold 1

Expected result

Should create an alarm resource.

Actual result

An error is raised, even if Int32 can be trivially cast to double.

New-VSCloudWatchAlarm: This parameter only accepts the following types: System.Double, Vaporshell.Function, Vaporshell.Condition. The current types of the value are: System.Int32, System.ValueType, System.Object.

Workaround

This issue is, of course, easy to workaround.

New-VSCloudWatchAlarm -ComparisonOperator GreaterThanOrEqualToThreshold -EvaluationPeriods 1 -LogicalId one -Threshold ([double]1)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant