Public/Resource Property Types/Add-VSDataPipelinePipelineParameterAttribute.ps1
function Add-VSDataPipelinePipelineParameterAttribute { <# .SYNOPSIS Adds an AWS::DataPipeline::Pipeline.ParameterAttribute resource property to the template .DESCRIPTION Adds an AWS::DataPipeline::Pipeline.ParameterAttribute resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html .PARAMETER Key Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html#cfn-datapipeline-pipeline-parameterobjects-attribtues-key PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER StringValue Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html#cfn-datapipeline-pipeline-parameterobjects-attribtues-stringvalue PrimitiveType: String Required: True UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.DataPipeline.Pipeline.ParameterAttribute')] [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 ", ")." } })] $Key, [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 ", ")." } })] $StringValue ) 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.DataPipeline.Pipeline.ParameterAttribute' } } |