Public/Resource Property Types/Add-VSIoTTopicRuleCloudwatchMetricAction.ps1
function Add-VSIoTTopicRuleCloudwatchMetricAction { <# .SYNOPSIS Adds an AWS::IoT::TopicRule.CloudwatchMetricAction resource property to the template .DESCRIPTION Adds an AWS::IoT::TopicRule.CloudwatchMetricAction resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html .PARAMETER MetricName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricname PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER MetricNamespace Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricnamespace PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER MetricTimestamp Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metrictimestamp PrimitiveType: String Required: False UpdateType: Mutable .PARAMETER MetricUnit Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricunit PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER MetricValue Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-metricvalue PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER RoleArn Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-cloudwatchmetric.html#cfn-iot-cloudwatchmetric-rolearn PrimitiveType: String Required: True UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.IoT.TopicRule.CloudwatchMetricAction')] [cmdletbinding()] Param ( [parameter(Mandatory = $true)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")." } })] $MetricName, [parameter(Mandatory = $true)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")." } })] $MetricNamespace, [parameter(Mandatory = $false)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")." } })] $MetricTimestamp, [parameter(Mandatory = $true)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")." } })] $MetricUnit, [parameter(Mandatory = $true)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")." } })] $MetricValue, [parameter(Mandatory = $true)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { throw "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")." } })] $RoleArn ) Begin { $obj = [PSCustomObject]@{} } Process { foreach ($key in $PSBoundParameters.Keys) { $val = $((Get-Variable $key).Value) if ($val -eq "True") { $val = "true" } elseif ($val -eq "False") { $val = "false" } $obj | Add-Member -MemberType NoteProperty -Name $key -Value $val } } End { $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.IoT.TopicRule.CloudwatchMetricAction' } } |