Public/Resource Property Types/Add-VSWAFRegionalIPSetIPSetDescriptor.ps1
function Add-VSWAFRegionalIPSetIPSetDescriptor { <# .SYNOPSIS Adds an AWS::WAFRegional::IPSet.IPSetDescriptor resource property to the template .DESCRIPTION Adds an AWS::WAFRegional::IPSet.IPSetDescriptor resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-ipset-ipsetdescriptor.html .PARAMETER Type Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-ipset-ipsetdescriptor.html#cfn-wafregional-ipset-ipsetdescriptor-type PrimitiveType: String UpdateType: Mutable .PARAMETER Value Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-ipset-ipsetdescriptor.html#cfn-wafregional-ipset-ipsetdescriptor-value PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.WAFRegional.IPSet.IPSetDescriptor')] [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 ", ")." } })] $Type, [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 ", ")." } })] $Value ) Begin { $obj = [PSCustomObject]@{} } Process { foreach ($psParamKey in $PSBoundParameters.Keys) { $val = $((Get-Variable $psParamKey).Value) if ($val -eq "True") { $val = "true" } elseif ($val -eq "False") { $val = "false" } $obj | Add-Member -MemberType NoteProperty -Name $psParamKey -Value $val } } End { $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.IPSet.IPSetDescriptor' } } |