Public/Resource Property Types/Add-VSCloudFrontDistributionCustomOriginConfig.ps1
function Add-VSCloudFrontDistributionCustomOriginConfig { <# .SYNOPSIS Adds an AWS::CloudFront::Distribution.CustomOriginConfig resource property to the template .DESCRIPTION Adds an AWS::CloudFront::Distribution.CustomOriginConfig resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-customorigin.html .PARAMETER HTTPPort Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-customorigin.html#cfn-cloudfront-customorigin-httpport PrimitiveType: Integer Required: False UpdateType: Mutable .PARAMETER HTTPSPort Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-customorigin.html#cfn-cloudfront-customorigin-httpsport PrimitiveType: Integer Required: False UpdateType: Mutable .PARAMETER OriginProtocolPolicy Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-customorigin.html#cfn-cloudfront-customorigin-originprotocolpolicy PrimitiveType: String Required: True UpdateType: Mutable .PARAMETER OriginSSLProtocols Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-customorigin.html#cfn-cloudfront-customorigin-originsslprotocols DuplicatesAllowed: False PrimitiveItemType: String Required: False Type: List UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.CloudFront.Distribution.CustomOriginConfig')] [cmdletbinding()] Param ( [parameter(Mandatory = $false)] [Int] $HTTPPort, [parameter(Mandatory = $false)] [Int] $HTTPSPort, [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 ", ")." } })] $OriginProtocolPolicy, [parameter(Mandatory = $false)] $OriginSSLProtocols ) 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.CloudFront.Distribution.CustomOriginConfig' } } |