Public/Resource Property Types/Add-VSCodeBuildProjectVpcConfig.ps1
function Add-VSCodeBuildProjectVpcConfig { <# .SYNOPSIS Adds an AWS::CodeBuild::Project.VpcConfig resource property to the template .DESCRIPTION Adds an AWS::CodeBuild::Project.VpcConfig resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html .PARAMETER Subnets PrimitiveItemType: String Type: List Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-subnets UpdateType: Mutable .PARAMETER VpcId Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-vpcid PrimitiveType: String UpdateType: Mutable .PARAMETER SecurityGroupIds PrimitiveItemType: String Type: List Required: True Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-securitygroupids UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.CodeBuild.Project.VpcConfig')] [cmdletbinding()] Param ( [parameter(Mandatory = $true)] $Subnets, [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 ", ").")) } })] $VpcId, [parameter(Mandatory = $true)] $SecurityGroupIds ) 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.CodeBuild.Project.VpcConfig' } } |