Public/Resource Property Types/Add-VSS3BucketWebsiteConfiguration.ps1
function Add-VSS3BucketWebsiteConfiguration { <# .SYNOPSIS Adds an AWS::S3::Bucket.WebsiteConfiguration resource property to the template .DESCRIPTION Adds an AWS::S3::Bucket.WebsiteConfiguration resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html .PARAMETER ErrorDocument Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-errordocument PrimitiveType: String Required: False UpdateType: Mutable .PARAMETER IndexDocument Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-indexdocument PrimitiveType: String Required: False UpdateType: Mutable .PARAMETER RedirectAllRequestsTo Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-redirectallrequeststo Required: False Type: RedirectAllRequestsTo UpdateType: Mutable .PARAMETER RoutingRules Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-routingrules DuplicatesAllowed: False ItemType: RoutingRule Required: False Type: List UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.S3.Bucket.WebsiteConfiguration')] [cmdletbinding()] Param ( [parameter(Mandatory = $false)] [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 ", ")." } })] $ErrorDocument, [parameter(Mandatory = $false)] [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 ", ")." } })] $IndexDocument, [parameter(Mandatory = $false)] $RedirectAllRequestsTo, [parameter(Mandatory = $false)] [ValidateScript( { $allowedTypes = "Vaporshell.Resource.S3.Bucket.RoutingRule" 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 ", ")." } })] $RoutingRules ) 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.S3.Bucket.WebsiteConfiguration' } } |