Public/Resource Property Types/Add-VSApiGatewayRestApiS3Location.ps1
function Add-VSApiGatewayRestApiS3Location { <# .SYNOPSIS Adds an AWS::ApiGateway::RestApi.S3Location resource property to the template .DESCRIPTION Adds an AWS::ApiGateway::RestApi.S3Location resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-restapi-bodys3location.html .PARAMETER Bucket Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-restapi-bodys3location.html#cfn-apigateway-restapi-s3location-bucket PrimitiveType: String Required: False UpdateType: Mutable .PARAMETER ETag Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-restapi-bodys3location.html#cfn-apigateway-restapi-s3location-etag PrimitiveType: String Required: False UpdateType: Mutable .PARAMETER Key Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-restapi-bodys3location.html#cfn-apigateway-restapi-s3location-key PrimitiveType: String Required: False UpdateType: Mutable .PARAMETER Version Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-restapi-bodys3location.html#cfn-apigateway-restapi-s3location-version PrimitiveType: String Required: False UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.ApiGateway.RestApi.S3Location')] [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 ", ")." } })] $Bucket, [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 ", ")." } })] $ETag, [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 ", ")." } })] $Key, [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 ", ")." } })] $Version ) 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.ApiGateway.RestApi.S3Location' } } |