Public/Resource Property Types/Add-VSEC2InstanceEbs.ps1
function Add-VSEC2InstanceEbs { <# .SYNOPSIS Adds an AWS::EC2::Instance.Ebs resource property to the template .DESCRIPTION Adds an AWS::EC2::Instance.Ebs resource property to the template .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html .PARAMETER DeleteOnTermination Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-deleteontermination PrimitiveType: Boolean Required: False UpdateType: Mutable .PARAMETER Encrypted Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-encrypted PrimitiveType: Boolean Required: False UpdateType: Mutable .PARAMETER Iops Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-iops PrimitiveType: Integer Required: False UpdateType: Mutable .PARAMETER SnapshotId Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-snapshotid PrimitiveType: String Required: False UpdateType: Mutable .PARAMETER VolumeSize Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-volumesize PrimitiveType: Integer Required: False UpdateType: Mutable .PARAMETER VolumeType Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-volumetype PrimitiveType: String Required: False UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType('Vaporshell.Resource.EC2.Instance.Ebs')] [cmdletbinding()] Param ( [parameter(Mandatory = $false)] [System.Boolean] $DeleteOnTermination, [parameter(Mandatory = $false)] [System.Boolean] $Encrypted, [parameter(Mandatory = $false)] [Int] $Iops, [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 ", ").")) } })] $SnapshotId, [parameter(Mandatory = $false)] [Int] $VolumeSize, [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 ", ").")) } })] $VolumeType ) 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.EC2.Instance.Ebs' } } |