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-distribution-customoriginconfig.html
 
    .PARAMETER OriginReadTimeout
        Required: False
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originreadtimeout
        PrimitiveType: Integer
        UpdateType: Mutable
 
    .PARAMETER HTTPSPort
        Required: False
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-httpsport
        PrimitiveType: Integer
        UpdateType: Mutable
 
    .PARAMETER OriginKeepaliveTimeout
        Required: False
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originkeepalivetimeout
        PrimitiveType: Integer
        UpdateType: Mutable
 
    .PARAMETER OriginSSLProtocols
        PrimitiveItemType: String
        Type: List
        Required: False
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originsslprotocols
        UpdateType: Mutable
 
    .PARAMETER HTTPPort
        Required: False
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-httpport
        PrimitiveType: Integer
        UpdateType: Mutable
 
    .PARAMETER OriginProtocolPolicy
        Required: True
        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originprotocolpolicy
        PrimitiveType: String
        UpdateType: Mutable
 
    .FUNCTIONALITY
        Vaporshell
    #>

    [OutputType('Vaporshell.Resource.CloudFront.Distribution.CustomOriginConfig')]
    [cmdletbinding()]
    Param
    (
        [parameter(Mandatory = $false)]
        [Int]
        $OriginReadTimeout,
        [parameter(Mandatory = $false)]
        [Int]
        $HTTPSPort,
        [parameter(Mandatory = $false)]
        [Int]
        $OriginKeepaliveTimeout,
        [parameter(Mandatory = $false)]
        $OriginSSLProtocols,
        [parameter(Mandatory = $false)]
        [Int]
        $HTTPPort,
        [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 ", ")."))
                }
            })]
        $OriginProtocolPolicy
    )
    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.CloudFront.Distribution.CustomOriginConfig'
    }
}