Public/Resource Property Types/Add-VSWAFRegionalRulePredicate.ps1
function Add-VSWAFRegionalRulePredicate { <# .SYNOPSIS Adds an AWS::WAFRegional::Rule.Predicate resource property to the template .DESCRIPTION Adds an AWS::WAFRegional::Rule.Predicate resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-rule-predicate.html .PARAMETER Type Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-rule-predicate.html#cfn-wafregional-rule-predicate-type PrimitiveType: String UpdateType: Mutable .PARAMETER DataId Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-rule-predicate.html#cfn-wafregional-rule-predicate-dataid PrimitiveType: String UpdateType: Mutable .PARAMETER Negated Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-rule-predicate.html#cfn-wafregional-rule-predicate-negated PrimitiveType: Boolean UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.WAFRegional.Rule.Predicate')] [cmdletbinding()] Param ( [parameter(Mandatory = $true)] [ValidateScript( { $allowedTypes = "System.String","Vaporshell.Function" if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") { $true } else { $PSCmdlet.ThrowTerminatingError((New-VSError -String "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 { $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ").")) } })] $DataId, [parameter(Mandatory = $true)] [System.Boolean] $Negated ) Begin { $obj = [PSCustomObject]@{} } Process { foreach ($key in $PSBoundParameters.Keys) { $obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key } } End { $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.Rule.Predicate' } } |