Public/Resource Property Types/Add-VSCodeDeployDeploymentGroupAlarmConfiguration.ps1
function Add-VSCodeDeployDeploymentGroupAlarmConfiguration { <# .SYNOPSIS Adds an AWS::CodeDeploy::DeploymentGroup.AlarmConfiguration resource property to the template .DESCRIPTION Adds an AWS::CodeDeploy::DeploymentGroup.AlarmConfiguration resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html .PARAMETER Alarms Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html#cfn-codedeploy-deploymentgroup-alarmconfiguration-alarms DuplicatesAllowed: False ItemType: Alarm Required: False Type: List UpdateType: Mutable .PARAMETER Enabled Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html#cfn-codedeploy-deploymentgroup-alarmconfiguration-enabled PrimitiveType: Boolean Required: False UpdateType: Mutable .PARAMETER IgnorePollAlarmFailure Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html#cfn-codedeploy-deploymentgroup-alarmconfiguration-ignorepollalarmfailure PrimitiveType: Boolean Required: False UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.CodeDeploy.DeploymentGroup.AlarmConfiguration')] [cmdletbinding()] Param ( [parameter(Mandatory = $false)] [ValidateScript( { $allowedTypes = "Vaporshell.Resource.CodeDeploy.DeploymentGroup.Alarm" 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 ", ")." } })] $Alarms, [parameter(Mandatory = $false)] [System.Boolean] $Enabled, [parameter(Mandatory = $false)] [System.Boolean] $IgnorePollAlarmFailure ) 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.CodeDeploy.DeploymentGroup.AlarmConfiguration' } } |