Public/Resource Property Types/Add-VSCloudFrontDistributionCustomErrorResponse.ps1
function Add-VSCloudFrontDistributionCustomErrorResponse { <# .SYNOPSIS Adds an AWS::CloudFront::Distribution.CustomErrorResponse resource property to the template .DESCRIPTION Adds an AWS::CloudFront::Distribution.CustomErrorResponse resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html .PARAMETER ResponseCode Required: False Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-responsecode PrimitiveType: Integer UpdateType: Mutable .PARAMETER ErrorCachingMinTTL Required: False Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcachingminttl PrimitiveType: Double UpdateType: Mutable .PARAMETER ErrorCode Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcode PrimitiveType: Integer UpdateType: Mutable .PARAMETER ResponsePagePath Required: False Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-responsepagepath PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.CloudFront.Distribution.CustomErrorResponse')] [cmdletbinding()] Param ( [parameter(Mandatory = $false)] [Int] $ResponseCode, [parameter(Mandatory = $false)] [System.Double] $ErrorCachingMinTTL, [parameter(Mandatory = $true)] [Int] $ErrorCode, [parameter(Mandatory = $false)] [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 ", ").")) } })] $ResponsePagePath ) Begin { $obj = [PSCustomObject]@{} $commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable') } Process { foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) { $obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key } } End { $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.CloudFront.Distribution.CustomErrorResponse' } } |