Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.
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

Description

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions