Public/Resource Property Types/Add-VSSSMAssociationTarget.ps1
function Add-VSSSMAssociationTarget { <# .SYNOPSIS Adds an AWS::SSM::Association.Target resource property to the template .DESCRIPTION Adds an AWS::SSM::Association.Target resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-association-target.html .PARAMETER Key Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-association-target.html#cfn-ssm-association-target-key PrimitiveType: String Required: True UpdateType: Immutable .PARAMETER Values Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-association-target.html#cfn-ssm-association-target-values DuplicatesAllowed: False PrimitiveItemType: String Required: True Type: List UpdateType: Immutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.SSM.Association.Target')] [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)] $Values ) 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.SSM.Association.Target' } } |