VaporShell.AutoScaling.psm1
# PSM1 Contents function Format-Json { [CmdletBinding()] Param ( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [String] $Json ) Begin { $cleaner = { param([String]$Line) Process{ [Regex]::Replace( $Line, "\\u(?<Value>[a-zA-Z0-9]{4})", { param($m)([char]([int]::Parse( $m.Groups['Value'].Value, [System.Globalization.NumberStyles]::HexNumber ))).ToString() } ) } } } Process { if ($PSVersionTable.PSVersion.Major -lt 6) { try { $indent = 0; $res = $Json -split '\n' | ForEach-Object { if ($_ -match '[\}\]]') { # This line contains ] or }, decrement the indentation level $indent-- } $line = (' ' * $indent * 2) + $_.TrimStart().Replace(': ', ': ') if ($_ -match '[\{\[]') { # This line contains [ or {, increment the indentation level $indent++ } $cleaner.Invoke($line) } $res -join "`n" } catch { ($Json -split '\n' | ForEach-Object {$cleaner.Invoke($_)}) -join "`n" } } else { ($Json -split '\n' | ForEach-Object {$cleaner.Invoke($_)}) -join "`n" } } } function Get-TrueCount { Param ( [parameter(Mandatory = $false,Position = 0,ValueFromPipeline = $true)] $Array ) Process { if ($array) { if ($array.Count) { $count = $array.Count } else { $count = 1 } } else { $count = 0 } } End { return $count } } function New-VSError { <# .SYNOPSIS Error generator function to use in tandem with $PSCmdlet.ThrowTerminatingError() .PARAMETER Result Allows input of an error from AWS SDK, resulting in the Exception message being parsed out. .PARAMETER String Used to create basic String message errors in the same wrapper #> [cmdletbinding(DefaultParameterSetName="Result")] param( [parameter(Position=0,ParameterSetName="Result")] $Result, [parameter(Position=0,ParameterSetName="String")] $String ) switch ($PSCmdlet.ParameterSetName) { Result { $Exception = "$($result.Exception.InnerException.Message)" } String { $Exception = "$String" } } $e = New-Object "System.Exception" $Exception $errorRecord = New-Object 'System.Management.Automation.ErrorRecord' $e, $null, ([System.Management.Automation.ErrorCategory]::InvalidOperation), $null return $errorRecord } function ResolveS3Endpoint { <# .SYNOPSIS Resolves the S3 endpoint most appropriate for each region. #> Param ( [parameter(Mandatory=$true,Position=0)] [ValidateSet("eu-west-2","ap-south-1","us-east-2","sa-east-1","us-west-1","us-west-2","eu-west-1","ap-southeast-2","ca-central-1","ap-northeast-2","us-east-1","eu-central-1","ap-southeast-1","ap-northeast-1")] [String] $Region ) $endpointMap = @{ "us-east-2" = "s3.us-east-2.amazonaws.com" "us-east-1" = "s3.amazonaws.com" "us-west-1" = "s3-us-west-1.amazonaws.com" "us-west-2" = "s3-us-west-2.amazonaws.com" "ca-central-1" = "s3.ca-central-1.amazonaws.com" "ap-south-1" = "s3.ap-south-1.amazonaws.com" "ap-northeast-2" = "s3.ap-northeast-2.amazonaws.com" "ap-southeast-1" = "s3-ap-southeast-1.amazonaws.com" "ap-southeast-2" = "s3-ap-southeast-2.amazonaws.com" "ap-northeast-1" = "s3-ap-northeast-1.amazonaws.com" "eu-central-1" = "s3.eu-central-1.amazonaws.com" "eu-west-1" = "s3-eu-west-1.amazonaws.com" "eu-west-2" = "s3.eu-west-2.amazonaws.com" "sa-east-1" = "s3-sa-east-1.amazonaws.com" } return $endpointMap[$Region] } function Add-VSAutoScalingAutoScalingGroupAcceleratorCountRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.AcceleratorCountRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.AcceleratorCountRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html#cfn-autoscaling-autoscalinggroup-acceleratorcountrequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html#cfn-autoscaling-autoscalinggroup-acceleratorcountrequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupAcceleratorCountRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupAcceleratorCountRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupAcceleratorCountRequest' function Add-VSAutoScalingAutoScalingGroupAcceleratorTotalMemoryMiBRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.AcceleratorTotalMemoryMiBRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.AcceleratorTotalMemoryMiBRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest.html#cfn-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest.html#cfn-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupAcceleratorTotalMemoryMiBRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupAcceleratorTotalMemoryMiBRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupAcceleratorTotalMemoryMiBRequest' function Add-VSAutoScalingAutoScalingGroupBaselineEbsBandwidthMbpsRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.BaselineEbsBandwidthMbpsRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.BaselineEbsBandwidthMbpsRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest.html#cfn-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest.html#cfn-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupBaselineEbsBandwidthMbpsRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupBaselineEbsBandwidthMbpsRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupBaselineEbsBandwidthMbpsRequest' function Add-VSAutoScalingAutoScalingGroupInstanceRequirements { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.InstanceRequirements resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.InstanceRequirements resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html .PARAMETER AcceleratorCount Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratorcount Type: AcceleratorCountRequest UpdateType: Mutable .PARAMETER AcceleratorManufacturers Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratormanufacturers DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER AcceleratorNames Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratornames DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER AcceleratorTotalMemoryMiB Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratortotalmemorymib Type: AcceleratorTotalMemoryMiBRequest UpdateType: Mutable .PARAMETER AcceleratorTypes Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratortypes DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER BareMetal Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-baremetal PrimitiveType: String UpdateType: Mutable .PARAMETER BaselineEbsBandwidthMbps Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-baselineebsbandwidthmbps Type: BaselineEbsBandwidthMbpsRequest UpdateType: Mutable .PARAMETER BurstablePerformance Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-burstableperformance PrimitiveType: String UpdateType: Mutable .PARAMETER CpuManufacturers Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-cpumanufacturers DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER ExcludedInstanceTypes Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-excludedinstancetypes DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER InstanceGenerations Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-instancegenerations DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER LocalStorage Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-localstorage PrimitiveType: String UpdateType: Mutable .PARAMETER LocalStorageTypes Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-localstoragetypes DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER MemoryGiBPerVCpu Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-memorygibpervcpu Type: MemoryGiBPerVCpuRequest UpdateType: Mutable .PARAMETER MemoryMiB Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-memorymib Type: MemoryMiBRequest UpdateType: Mutable .PARAMETER NetworkInterfaceCount Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-networkinterfacecount Type: NetworkInterfaceCountRequest UpdateType: Mutable .PARAMETER OnDemandMaxPricePercentageOverLowestPrice Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-ondemandmaxpricepercentageoverlowestprice PrimitiveType: Integer UpdateType: Mutable .PARAMETER RequireHibernateSupport Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-requirehibernatesupport PrimitiveType: Boolean UpdateType: Mutable .PARAMETER SpotMaxPricePercentageOverLowestPrice Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-spotmaxpricepercentageoverlowestprice PrimitiveType: Integer UpdateType: Mutable .PARAMETER TotalLocalStorageGB Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-totallocalstoragegb Type: TotalLocalStorageGBRequest UpdateType: Mutable .PARAMETER VCpuCount Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-vcpucount Type: VCpuCountRequest UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupInstanceRequirements])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] $AcceleratorCount, [parameter(Mandatory = $false)] $AcceleratorManufacturers, [parameter(Mandatory = $false)] $AcceleratorNames, [parameter(Mandatory = $false)] $AcceleratorTotalMemoryMiB, [parameter(Mandatory = $false)] $AcceleratorTypes, [parameter(Mandatory = $false)] [object] $BareMetal, [parameter(Mandatory = $false)] $BaselineEbsBandwidthMbps, [parameter(Mandatory = $false)] [object] $BurstablePerformance, [parameter(Mandatory = $false)] $CpuManufacturers, [parameter(Mandatory = $false)] $ExcludedInstanceTypes, [parameter(Mandatory = $false)] $InstanceGenerations, [parameter(Mandatory = $false)] [object] $LocalStorage, [parameter(Mandatory = $false)] $LocalStorageTypes, [parameter(Mandatory = $false)] $MemoryGiBPerVCpu, [parameter(Mandatory = $false)] $MemoryMiB, [parameter(Mandatory = $false)] $NetworkInterfaceCount, [parameter(Mandatory = $false)] [object] $OnDemandMaxPricePercentageOverLowestPrice, [parameter(Mandatory = $false)] [object] $RequireHibernateSupport, [parameter(Mandatory = $false)] [object] $SpotMaxPricePercentageOverLowestPrice, [parameter(Mandatory = $false)] $TotalLocalStorageGB, [parameter(Mandatory = $false)] $VCpuCount ) Process { $obj = [AutoScalingAutoScalingGroupInstanceRequirements]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupInstanceRequirements' function Add-VSAutoScalingAutoScalingGroupInstancesDistribution { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.InstancesDistribution resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.InstancesDistribution resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html .PARAMETER OnDemandAllocationStrategy Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandallocationstrategy PrimitiveType: String UpdateType: Mutable .PARAMETER OnDemandBaseCapacity Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandbasecapacity PrimitiveType: Integer UpdateType: Mutable .PARAMETER OnDemandPercentageAboveBaseCapacity Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandpercentageabovebasecapacity PrimitiveType: Integer UpdateType: Mutable .PARAMETER SpotAllocationStrategy Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotallocationstrategy PrimitiveType: String UpdateType: Mutable .PARAMETER SpotInstancePools Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotinstancepools PrimitiveType: Integer UpdateType: Mutable .PARAMETER SpotMaxPrice Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotmaxprice PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupInstancesDistribution])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $OnDemandAllocationStrategy, [parameter(Mandatory = $false)] [object] $OnDemandBaseCapacity, [parameter(Mandatory = $false)] [object] $OnDemandPercentageAboveBaseCapacity, [parameter(Mandatory = $false)] [object] $SpotAllocationStrategy, [parameter(Mandatory = $false)] [object] $SpotInstancePools, [parameter(Mandatory = $false)] [object] $SpotMaxPrice ) Process { $obj = [AutoScalingAutoScalingGroupInstancesDistribution]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupInstancesDistribution' function Add-VSAutoScalingAutoScalingGroupLaunchTemplate { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.LaunchTemplate resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.LaunchTemplate resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplate.html .PARAMETER LaunchTemplateSpecification Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplate.html#cfn-as-group-launchtemplate Type: LaunchTemplateSpecification UpdateType: Mutable .PARAMETER Overrides Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplate.html#cfn-as-mixedinstancespolicy-overrides DuplicatesAllowed: False ItemType: LaunchTemplateOverrides Type: List UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupLaunchTemplate])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] $LaunchTemplateSpecification, [parameter(Mandatory = $false)] [object] $Overrides ) Process { $obj = [AutoScalingAutoScalingGroupLaunchTemplate]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupLaunchTemplate' function Add-VSAutoScalingAutoScalingGroupLaunchTemplateOverrides { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.LaunchTemplateOverrides resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.LaunchTemplateOverrides resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html .PARAMETER InstanceRequirements Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-as-mixedinstancespolicy-instancerequirements Type: InstanceRequirements UpdateType: Mutable .PARAMETER InstanceType Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype PrimitiveType: String UpdateType: Mutable .PARAMETER LaunchTemplateSpecification Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-launchtemplatespecification Type: LaunchTemplateSpecification UpdateType: Mutable .PARAMETER WeightedCapacity Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupLaunchTemplateOverrides])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] $InstanceRequirements, [parameter(Mandatory = $false)] [object] $InstanceType, [parameter(Mandatory = $false)] $LaunchTemplateSpecification, [parameter(Mandatory = $false)] [object] $WeightedCapacity ) Process { $obj = [AutoScalingAutoScalingGroupLaunchTemplateOverrides]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupLaunchTemplateOverrides' function Add-VSAutoScalingAutoScalingGroupLaunchTemplateSpecification { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.LaunchTemplateSpecification resource property to the template. The LaunchTemplateSpecification property specifies the Amazon EC2 launch template and the launch template version that can be used by an Auto Scaling group to configure Amazon EC2 instances. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.LaunchTemplateSpecification resource property to the template. The LaunchTemplateSpecification property specifies the Amazon EC2 launch template and the launch template version that can be used by an Auto Scaling group to configure Amazon EC2 instances. The launch template that is specified must be configured for use with an Auto Scaling group. For information about creating a launch template, see Creating a Launch Template for an Auto Scaling Group: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html in the *Amazon EC2 Auto Scaling User Guide*. You can find a sample template snippet in the Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#aws-properties-as-group--examples section of the AWS::AutoScaling::AutoScalingGroup documentation. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html .PARAMETER LaunchTemplateId The ID of the AWS::EC2::LaunchTemplate: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html. You must specify either a template ID or a template name. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-launchtemplateid PrimitiveType: String UpdateType: Mutable .PARAMETER LaunchTemplateName The name of the AWS::EC2::LaunchTemplate: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html. You must specify either a template name or a template ID. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-launchtemplatename PrimitiveType: String UpdateType: Mutable .PARAMETER Version The version number. AWS CloudFormation does not support specifying $Latest, or $Default for the template version number. However, you can specify LatestVersionNumber or DefaultVersionNumber using the Fn::GetAtt function. For more information, see Fn::GetAtt: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2-launchtemplate-return-values-fn--getatt in the AWS::EC2::LaunchTemplate documentation. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-version PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupLaunchTemplateSpecification])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $LaunchTemplateId, [parameter(Mandatory = $false)] [object] $LaunchTemplateName, [parameter(Mandatory = $true)] [object] $Version ) Process { $obj = [AutoScalingAutoScalingGroupLaunchTemplateSpecification]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupLaunchTemplateSpecification' function Add-VSAutoScalingAutoScalingGroupLifecycleHookSpecification { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.LifecycleHookSpecification resource property to the template. LifecycleHookSpecification specifies a list of lifecycle hooks for the LifecycleHookSpecificationList property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html. LifecycleHookSpecification defines lifecycle hooks for an Auto Scaling group that specify actions to perform when Amazon EC2 Auto Scaling launches or terminates instances. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.LifecycleHookSpecification resource property to the template. LifecycleHookSpecification specifies a list of lifecycle hooks for the LifecycleHookSpecificationList property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html. LifecycleHookSpecification defines lifecycle hooks for an Auto Scaling group that specify actions to perform when Amazon EC2 Auto Scaling launches or terminates instances. For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks: https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html in the *Amazon EC2 Auto Scaling User Guide*. You can find a sample template snippet in the Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-lifecyclehook.html#aws-resource-as-lifecyclehook--examples section of the AWS::AutoScaling::LifecycleHook documentation. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html .PARAMETER DefaultResult The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The valid values are CONTINUE and ABANDON default. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-defaultresult PrimitiveType: String UpdateType: Mutable .PARAMETER HeartbeatTimeout The maximum time, in seconds, that can elapse before the lifecycle hook times out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the default action. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-heartbeattimeout PrimitiveType: Integer UpdateType: Mutable .PARAMETER LifecycleHookName The name of the lifecycle hook. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-lifecyclehookname PrimitiveType: String UpdateType: Mutable .PARAMETER LifecycleTransition The state of the EC2 instance to attach the lifecycle hook to. The valid values are: + autoscaling:EC2_INSTANCE_LAUNCHING + autoscaling:EC2_INSTANCE_TERMINATING Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-lifecycletransition PrimitiveType: String UpdateType: Mutable .PARAMETER NotificationMetadata Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-notificationmetadata PrimitiveType: String UpdateType: Mutable .PARAMETER NotificationTargetARN The Amazon Resource Name ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance is in the transition state for the lifecycle hook. You can specify an Amazon SQS queue or an Amazon SNS topic. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-notificationtargetarn PrimitiveType: String UpdateType: Mutable .PARAMETER RoleARN The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target, for example, an Amazon SNS topic or an Amazon SQS queue. For information about creating this role, see Preparing for Notifications: https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html#preparing-for-notification in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-rolearn PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupLifecycleHookSpecification])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $DefaultResult, [parameter(Mandatory = $false)] [object] $HeartbeatTimeout, [parameter(Mandatory = $true)] [object] $LifecycleHookName, [parameter(Mandatory = $true)] [object] $LifecycleTransition, [parameter(Mandatory = $false)] [object] $NotificationMetadata, [parameter(Mandatory = $false)] [object] $NotificationTargetARN, [parameter(Mandatory = $false)] [object] $RoleARN ) Process { $obj = [AutoScalingAutoScalingGroupLifecycleHookSpecification]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupLifecycleHookSpecification' function Add-VSAutoScalingAutoScalingGroupMemoryGiBPerVCpuRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.MemoryGiBPerVCpuRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.MemoryGiBPerVCpuRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorygibpervcpurequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorygibpervcpurequest.html#cfn-autoscaling-autoscalinggroup-memorygibpervcpurequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorygibpervcpurequest.html#cfn-autoscaling-autoscalinggroup-memorygibpervcpurequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupMemoryGiBPerVCpuRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupMemoryGiBPerVCpuRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupMemoryGiBPerVCpuRequest' function Add-VSAutoScalingAutoScalingGroupMemoryMiBRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.MemoryMiBRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.MemoryMiBRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorymibrequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorymibrequest.html#cfn-autoscaling-autoscalinggroup-memorymibrequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorymibrequest.html#cfn-autoscaling-autoscalinggroup-memorymibrequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupMemoryMiBRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupMemoryMiBRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupMemoryMiBRequest' function Add-VSAutoScalingAutoScalingGroupMetricsCollection { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.MetricsCollection resource property to the template. MetricsCollection is a property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html that describes the group metrics that an Amazon EC2 Auto Scaling group sends to Amazon CloudWatch. These metrics describe the group rather than any of its instances. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.MetricsCollection resource property to the template. MetricsCollection is a property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html that describes the group metrics that an Amazon EC2 Auto Scaling group sends to Amazon CloudWatch. These metrics describe the group rather than any of its instances. For more information, see Monitoring Your Auto Scaling Groups and Instances Using Amazon CloudWatch: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html in the *Amazon EC2 Auto Scaling User Guide*. You can find a sample template snippet in the Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#aws-properties-as-group--examples section of the AWS::AutoScaling::AutoScalingGroup documentation. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-metricscollection.html .PARAMETER Granularity The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. *Allowed Values*: 1Minute Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-metricscollection.html#cfn-as-metricscollection-granularity PrimitiveType: String UpdateType: Mutable .PARAMETER Metrics The list of Auto Scaling group metrics to collect. If you specify Granularity and don't specify any metrics, all metrics are enabled. *Allowed Values*: + GroupMinSize + GroupMaxSize + GroupDesiredCapacity + GroupInServiceInstances + GroupPendingInstances + GroupStandbyInstances + GroupTerminatingInstances + GroupTotalInstances Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-metricscollection.html#cfn-as-metricscollection-metrics DuplicatesAllowed: True PrimitiveItemType: String Type: List UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupMetricsCollection])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] [object] $Granularity, [parameter(Mandatory = $false)] $Metrics ) Process { $obj = [AutoScalingAutoScalingGroupMetricsCollection]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupMetricsCollection' function Add-VSAutoScalingAutoScalingGroupMixedInstancesPolicy { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.MixedInstancesPolicy resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.MixedInstancesPolicy resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-group-mixedinstancespolicy.html .PARAMETER InstancesDistribution Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-group-mixedinstancespolicy.html#cfn-as-mixedinstancespolicy-instancesdistribution Type: InstancesDistribution UpdateType: Mutable .PARAMETER LaunchTemplate Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-group-mixedinstancespolicy.html#cfn-as-mixedinstancespolicy-launchtemplate Type: LaunchTemplate UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupMixedInstancesPolicy])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] $InstancesDistribution, [parameter(Mandatory = $true)] $LaunchTemplate ) Process { $obj = [AutoScalingAutoScalingGroupMixedInstancesPolicy]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupMixedInstancesPolicy' function Add-VSAutoScalingAutoScalingGroupNetworkInterfaceCountRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.NetworkInterfaceCountRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.NetworkInterfaceCountRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkinterfacecountrequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkinterfacecountrequest.html#cfn-autoscaling-autoscalinggroup-networkinterfacecountrequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkinterfacecountrequest.html#cfn-autoscaling-autoscalinggroup-networkinterfacecountrequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupNetworkInterfaceCountRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupNetworkInterfaceCountRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupNetworkInterfaceCountRequest' function Add-VSAutoScalingAutoScalingGroupNotificationConfiguration { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.NotificationConfiguration resource property to the template. NotificationConfiguration specifies a list of notification configurations for the NotificationConfigurations property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html. NotificationConfiguration specifies the events that the Amazon EC2 Auto Scaling group sends notifications for. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.NotificationConfiguration resource property to the template. NotificationConfiguration specifies a list of notification configurations for the NotificationConfigurations property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html. NotificationConfiguration specifies the events that the Amazon EC2 Auto Scaling group sends notifications for. For example snippets, see Auto Scaling Group with Notifications: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-autoscaling.html#scenario-as-notification. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-notificationconfigurations.html .PARAMETER NotificationTypes A list of event types that trigger a notification. Event types can include any of the following types. *Allowed Values*: + autoscaling:EC2_INSTANCE_LAUNCH + autoscaling:EC2_INSTANCE_LAUNCH_ERROR + autoscaling:EC2_INSTANCE_TERMINATE + autoscaling:EC2_INSTANCE_TERMINATE_ERROR + autoscaling:TEST_NOTIFICATION Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-notificationconfigurations.html#cfn-as-group-notificationconfigurations-notificationtypes DuplicatesAllowed: True PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER TopicARN The Amazon Resource Name ARN of the Amazon Simple Notification Service Amazon SNS topic. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-notificationconfigurations.html#cfn-autoscaling-autoscalinggroup-notificationconfigurations-topicarn PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupNotificationConfiguration])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] $NotificationTypes, [parameter(Mandatory = $true)] [object] $TopicARN ) Process { $obj = [AutoScalingAutoScalingGroupNotificationConfiguration]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupNotificationConfiguration' function Add-VSAutoScalingAutoScalingGroupTagProperty { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.TagProperty resource property to the template. TagProperty specifies a list of tags for the Tag property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html. TagProperty adds tags to all associated instances in an Auto Scaling group. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.TagProperty resource property to the template. TagProperty specifies a list of tags for the Tag property of AWS::AutoScaling::AutoScalingGroup: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html. TagProperty adds tags to all associated instances in an Auto Scaling group. For more information, see Tagging Auto Scaling Groups and Instances: https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html in the *Amazon EC2 Auto Scaling User Guide*. You can find a sample template snippet in the Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#aws-properties-as-group--examples section of the AWS::AutoScaling::AutoScalingGroup documentation. AWS CloudFormation adds the following tags to all Auto Scaling groups and associated instances: + aws:cloudformation:stack-name + aws:cloudformation:stack-id + aws:cloudformation:logical-id .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html .PARAMETER Key The tag key. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html#cfn-as-tags-Key PrimitiveType: String UpdateType: Mutable .PARAMETER PropagateAtLaunch Set to true if you want AWS CloudFormation to copy the tag to EC2 instances that are launched as part of the Auto Scaling group. Set to false if you want the tag attached only to the Auto Scaling group and not copied to any instances launched as part of the Auto Scaling group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html#cfn-as-tags-PropagateAtLaunch PrimitiveType: Boolean UpdateType: Mutable .PARAMETER Value The tag value. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html#cfn-as-tags-Value PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupTagProperty])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] [object] $Key, [parameter(Mandatory = $true)] [object] $PropagateAtLaunch, [parameter(Mandatory = $true)] [object] $Value ) Process { $obj = [AutoScalingAutoScalingGroupTagProperty]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupTagProperty' function Add-VSAutoScalingAutoScalingGroupTotalLocalStorageGBRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.TotalLocalStorageGBRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.TotalLocalStorageGBRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-totallocalstoragegbrequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-totallocalstoragegbrequest.html#cfn-autoscaling-autoscalinggroup-totallocalstoragegbrequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-totallocalstoragegbrequest.html#cfn-autoscaling-autoscalinggroup-totallocalstoragegbrequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupTotalLocalStorageGBRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupTotalLocalStorageGBRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupTotalLocalStorageGBRequest' function Add-VSAutoScalingAutoScalingGroupVCpuCountRequest { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup.VCpuCountRequest resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup.VCpuCountRequest resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-vcpucountrequest.html .PARAMETER Max Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-vcpucountrequest.html#cfn-autoscaling-autoscalinggroup-vcpucountrequest-max PrimitiveType: Integer UpdateType: Mutable .PARAMETER Min Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-vcpucountrequest.html#cfn-autoscaling-autoscalinggroup-vcpucountrequest-min PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroupVCpuCountRequest])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Max, [parameter(Mandatory = $false)] [object] $Min ) Process { $obj = [AutoScalingAutoScalingGroupVCpuCountRequest]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingAutoScalingGroupVCpuCountRequest' function Add-VSAutoScalingLaunchConfigurationBlockDevice { <# .SYNOPSIS Adds an AWS::AutoScaling::LaunchConfiguration.BlockDevice resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::LaunchConfiguration.BlockDevice resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html .PARAMETER SnapshotId Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html#cfn-autoscaling-launchconfiguration-blockdevice-snapshotid UpdateType: Immutable PrimitiveType: String .PARAMETER VolumeType Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html#cfn-autoscaling-launchconfiguration-blockdevice-volumetype UpdateType: Immutable PrimitiveType: String .PARAMETER Encrypted Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html#cfn-autoscaling-launchconfiguration-blockdevice-encrypted UpdateType: Immutable PrimitiveType: Boolean .PARAMETER Iops Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html#cfn-autoscaling-launchconfiguration-blockdevice-iops UpdateType: Immutable PrimitiveType: Integer .PARAMETER VolumeSize Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html#cfn-autoscaling-launchconfiguration-blockdevice-volumesize UpdateType: Immutable PrimitiveType: Integer .PARAMETER DeleteOnTermination Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html#cfn-autoscaling-launchconfiguration-blockdevice-deleteontermination UpdateType: Immutable PrimitiveType: Boolean .PARAMETER Throughput Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevice.html#cfn-autoscaling-launchconfiguration-blockdevice-throughput UpdateType: Immutable PrimitiveType: Integer .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingLaunchConfigurationBlockDevice])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $SnapshotId, [parameter(Mandatory = $false)] [object] $VolumeType, [parameter(Mandatory = $false)] [object] $Encrypted, [parameter(Mandatory = $false)] [object] $Iops, [parameter(Mandatory = $false)] [object] $VolumeSize, [parameter(Mandatory = $false)] [object] $DeleteOnTermination, [parameter(Mandatory = $false)] [object] $Throughput ) Process { $obj = [AutoScalingLaunchConfigurationBlockDevice]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingLaunchConfigurationBlockDevice' function Add-VSAutoScalingLaunchConfigurationBlockDeviceMapping { <# .SYNOPSIS Adds an AWS::AutoScaling::LaunchConfiguration.BlockDeviceMapping resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::LaunchConfiguration.BlockDeviceMapping resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevicemapping.html .PARAMETER NoDevice Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevicemapping.html#cfn-autoscaling-launchconfiguration-blockdevicemapping-nodevice UpdateType: Immutable PrimitiveType: Boolean .PARAMETER VirtualName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevicemapping.html#cfn-autoscaling-launchconfiguration-blockdevicemapping-virtualname UpdateType: Immutable PrimitiveType: String .PARAMETER Ebs Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevicemapping.html#cfn-autoscaling-launchconfiguration-blockdevicemapping-ebs UpdateType: Immutable Type: BlockDevice .PARAMETER DeviceName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-blockdevicemapping.html#cfn-autoscaling-launchconfiguration-blockdevicemapping-devicename UpdateType: Immutable PrimitiveType: String .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingLaunchConfigurationBlockDeviceMapping])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $NoDevice, [parameter(Mandatory = $false)] [object] $VirtualName, [parameter(Mandatory = $false)] $Ebs, [parameter(Mandatory = $true)] [object] $DeviceName ) Process { $obj = [AutoScalingLaunchConfigurationBlockDeviceMapping]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingLaunchConfigurationBlockDeviceMapping' function Add-VSAutoScalingLaunchConfigurationMetadataOptions { <# .SYNOPSIS Adds an AWS::AutoScaling::LaunchConfiguration.MetadataOptions resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::LaunchConfiguration.MetadataOptions resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-metadataoptions.html .PARAMETER HttpPutResponseHopLimit Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-metadataoptions.html#cfn-autoscaling-launchconfiguration-metadataoptions-httpputresponsehoplimit UpdateType: Immutable PrimitiveType: Integer .PARAMETER HttpTokens Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-metadataoptions.html#cfn-autoscaling-launchconfiguration-metadataoptions-httptokens UpdateType: Immutable PrimitiveType: String .PARAMETER HttpEndpoint Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-launchconfiguration-metadataoptions.html#cfn-autoscaling-launchconfiguration-metadataoptions-httpendpoint UpdateType: Immutable PrimitiveType: String .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingLaunchConfigurationMetadataOptions])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $HttpPutResponseHopLimit, [parameter(Mandatory = $false)] [object] $HttpTokens, [parameter(Mandatory = $false)] [object] $HttpEndpoint ) Process { $obj = [AutoScalingLaunchConfigurationMetadataOptions]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingLaunchConfigurationMetadataOptions' function Add-VSAutoScalingScalingPolicyCustomizedMetricSpecification { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.CustomizedMetricSpecification resource property to the template. CustomizedMetricSpecification is a subproperty of TargetTrackingConfiguration: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html that configures a customized metric for a target tracking policy to use with Amazon EC2 Auto Scaling. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.CustomizedMetricSpecification resource property to the template. CustomizedMetricSpecification is a subproperty of TargetTrackingConfiguration: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html that configures a customized metric for a target tracking policy to use with Amazon EC2 Auto Scaling. For more information, see CustomizedMetricSpecification: https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CustomizedMetricSpecification.html in the *Amazon EC2 Auto Scaling API Reference*. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html .PARAMETER Dimensions The dimensions of the metric. Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-dimensions DuplicatesAllowed: False ItemType: MetricDimension Type: List UpdateType: Mutable .PARAMETER MetricName The name of the metric. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-metricname PrimitiveType: String UpdateType: Mutable .PARAMETER Namespace The namespace of the metric. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-namespace PrimitiveType: String UpdateType: Mutable .PARAMETER Statistic The statistic of the metric. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-statistic PrimitiveType: String UpdateType: Mutable .PARAMETER Unit The unit of the metric. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-unit PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyCustomizedMetricSpecification])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $Dimensions, [parameter(Mandatory = $true)] [object] $MetricName, [parameter(Mandatory = $true)] [object] $Namespace, [parameter(Mandatory = $true)] [object] $Statistic, [parameter(Mandatory = $false)] [object] $Unit ) Process { $obj = [AutoScalingScalingPolicyCustomizedMetricSpecification]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyCustomizedMetricSpecification' function Add-VSAutoScalingScalingPolicyMetricDimension { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.MetricDimension resource property to the template. MetricDimension is a subproperty of CustomizedMetricSpecification: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html that specifies the dimensions of a metric for a target tracking scaling policy. Dimensions are arbitrary name/value pairs that can be associated with a CloudWatch metric. Duplicate dimensions are not allowed. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.MetricDimension resource property to the template. MetricDimension is a subproperty of CustomizedMetricSpecification: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html that specifies the dimensions of a metric for a target tracking scaling policy. Dimensions are arbitrary name/value pairs that can be associated with a CloudWatch metric. Duplicate dimensions are not allowed. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-metricdimension.html .PARAMETER Name The name of the dimension. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-metricdimension.html#cfn-autoscaling-scalingpolicy-metricdimension-name PrimitiveType: String UpdateType: Mutable .PARAMETER Value The value of the dimension. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-metricdimension.html#cfn-autoscaling-scalingpolicy-metricdimension-value PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyMetricDimension])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] [object] $Name, [parameter(Mandatory = $true)] [object] $Value ) Process { $obj = [AutoScalingScalingPolicyMetricDimension]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyMetricDimension' function Add-VSAutoScalingScalingPolicyPredefinedMetricSpecification { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.PredefinedMetricSpecification resource property to the template. PredefinedMetricSpecification is a subproperty of TargetTrackingConfiguration: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html that configures a predefined metric for a target tracking policy to use with Amazon EC2 Auto Scaling. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.PredefinedMetricSpecification resource property to the template. PredefinedMetricSpecification is a subproperty of TargetTrackingConfiguration: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html that configures a predefined metric for a target tracking policy to use with Amazon EC2 Auto Scaling. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predefinedmetricspecification.html .PARAMETER PredefinedMetricType The metric type. The following predefined metrics are available. + ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling group. + ASGAverageNetworkIn - Average number of bytes received on all network interfaces by the Auto Scaling group. + ASGAverageNetworkOut - Average number of bytes sent out on all network interfaces by the Auto Scaling group. + ALBRequestCountPerTarget - Number of requests completed per target in an Application Load Balancer target group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-autoscaling-scalingpolicy-predefinedmetricspecification-predefinedmetrictype PrimitiveType: String UpdateType: Mutable .PARAMETER ResourceLabel Identifies the resource associated with the metric type. You can't specify a resource label unless the metric type is ALBRequestCountPerTarget and there is a target group attached to the Auto Scaling group. The format is app/load-balancer-name/load-balancer-id/targetgroup/target-group-name/target-group-id , where + app/load-balancer-name/load-balancer-id is the final portion of the load balancer ARN, and + targetgroup/target-group-name/target-group-id is the final portion of the target group ARN. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-autoscaling-scalingpolicy-predefinedmetricspecification-resourcelabel PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyPredefinedMetricSpecification])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] [object] $PredefinedMetricType, [parameter(Mandatory = $false)] [object] $ResourceLabel ) Process { $obj = [AutoScalingScalingPolicyPredefinedMetricSpecification]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyPredefinedMetricSpecification' function Add-VSAutoScalingScalingPolicyPredictiveScalingConfiguration { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingConfiguration resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingConfiguration resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html .PARAMETER MaxCapacityBreachBehavior Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-maxcapacitybreachbehavior PrimitiveType: String UpdateType: Mutable .PARAMETER MaxCapacityBuffer Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-maxcapacitybuffer PrimitiveType: Integer UpdateType: Mutable .PARAMETER MetricSpecifications Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-metricspecifications DuplicatesAllowed: False ItemType: PredictiveScalingMetricSpecification Type: List UpdateType: Mutable .PARAMETER Mode Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-mode PrimitiveType: String UpdateType: Mutable .PARAMETER SchedulingBufferTime Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingconfiguration.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration-schedulingbuffertime PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyPredictiveScalingConfiguration])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $MaxCapacityBreachBehavior, [parameter(Mandatory = $false)] [object] $MaxCapacityBuffer, [parameter(Mandatory = $true)] [object] $MetricSpecifications, [parameter(Mandatory = $false)] [object] $Mode, [parameter(Mandatory = $false)] [object] $SchedulingBufferTime ) Process { $obj = [AutoScalingScalingPolicyPredictiveScalingConfiguration]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyPredictiveScalingConfiguration' function Add-VSAutoScalingScalingPolicyPredictiveScalingMetricSpecification { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingMetricSpecification resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingMetricSpecification resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html .PARAMETER PredefinedLoadMetricSpecification Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-predefinedloadmetricspecification Type: PredictiveScalingPredefinedLoadMetric UpdateType: Mutable .PARAMETER PredefinedMetricPairSpecification Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-predefinedmetricpairspecification Type: PredictiveScalingPredefinedMetricPair UpdateType: Mutable .PARAMETER PredefinedScalingMetricSpecification Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-predefinedscalingmetricspecification Type: PredictiveScalingPredefinedScalingMetric UpdateType: Mutable .PARAMETER TargetValue Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-targetvalue PrimitiveType: Double UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyPredictiveScalingMetricSpecification])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] $PredefinedLoadMetricSpecification, [parameter(Mandatory = $false)] $PredefinedMetricPairSpecification, [parameter(Mandatory = $false)] $PredefinedScalingMetricSpecification, [parameter(Mandatory = $true)] [object] $TargetValue ) Process { $obj = [AutoScalingScalingPolicyPredictiveScalingMetricSpecification]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyPredictiveScalingMetricSpecification' function Add-VSAutoScalingScalingPolicyPredictiveScalingPredefinedLoadMetric { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedLoadMetric resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedLoadMetric resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric.html .PARAMETER PredefinedMetricType Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric-predefinedmetrictype PrimitiveType: String UpdateType: Mutable .PARAMETER ResourceLabel Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedloadmetric-resourcelabel PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyPredictiveScalingPredefinedLoadMetric])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] [object] $PredefinedMetricType, [parameter(Mandatory = $false)] [object] $ResourceLabel ) Process { $obj = [AutoScalingScalingPolicyPredictiveScalingPredefinedLoadMetric]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyPredictiveScalingPredefinedLoadMetric' function Add-VSAutoScalingScalingPolicyPredictiveScalingPredefinedMetricPair { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedMetricPair resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedMetricPair resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair.html .PARAMETER PredefinedMetricType Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair-predefinedmetrictype PrimitiveType: String UpdateType: Mutable .PARAMETER ResourceLabel Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedmetricpair-resourcelabel PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyPredictiveScalingPredefinedMetricPair])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] [object] $PredefinedMetricType, [parameter(Mandatory = $false)] [object] $ResourceLabel ) Process { $obj = [AutoScalingScalingPolicyPredictiveScalingPredefinedMetricPair]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyPredictiveScalingPredefinedMetricPair' function Add-VSAutoScalingScalingPolicyPredictiveScalingPredefinedScalingMetric { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedScalingMetric resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedScalingMetric resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric.html .PARAMETER PredefinedMetricType Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric-predefinedmetrictype PrimitiveType: String UpdateType: Mutable .PARAMETER ResourceLabel Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric.html#cfn-autoscaling-scalingpolicy-predictivescalingpredefinedscalingmetric-resourcelabel PrimitiveType: String UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyPredictiveScalingPredefinedScalingMetric])] [cmdletbinding()] Param( [parameter(Mandatory = $true)] [object] $PredefinedMetricType, [parameter(Mandatory = $false)] [object] $ResourceLabel ) Process { $obj = [AutoScalingScalingPolicyPredictiveScalingPredefinedScalingMetric]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyPredictiveScalingPredefinedScalingMetric' function Add-VSAutoScalingScalingPolicyStepAdjustment { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.StepAdjustment resource property to the template. StepAdjustments is a subproperty of ScalingPolicy: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html that represents a step adjustment for a step scaling policy. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.StepAdjustment resource property to the template. StepAdjustments is a subproperty of ScalingPolicy: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html that represents a step adjustment for a step scaling policy. For the following examples, suppose that you have an alarm with a breach threshold of 50: + To trigger a step adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of 0 and an upper bound of 10. + To trigger a step adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of -10 and an upper bound of 0. There are a few rules for the step adjustments for your step policy: + The ranges of your step adjustments can't overlap or have a gap. + At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there must be a step adjustment with a null lower bound. + At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there must be a step adjustment with a null upper bound. + The upper and lower bound can't be null in the same step adjustment. For more information, see Step Adjustments: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-steps in the *Amazon EC2 Auto Scaling User Guide*. You can find a sample template snippet in the Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#aws-properties-as-policy--examples section of the AWS::AutoScaling::ScalingPolicy documentation. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustments.html .PARAMETER MetricIntervalLowerBound The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive the metric must be greater than or equal to the threshold plus the lower bound. Otherwise, it is exclusive the metric must be greater than the threshold plus the lower bound. A null value indicates negative infinity. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustments.html#cfn-autoscaling-scalingpolicy-stepadjustment-metricintervallowerbound PrimitiveType: Double UpdateType: Mutable .PARAMETER MetricIntervalUpperBound The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the upper bound is exclusive the metric must be less than the threshold plus the upper bound. Otherwise, it is inclusive the metric must be less than or equal to the threshold plus the upper bound. A null value indicates positive infinity. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustments.html#cfn-autoscaling-scalingpolicy-stepadjustment-metricintervalupperbound PrimitiveType: Double UpdateType: Mutable .PARAMETER ScalingAdjustment The amount by which to scale. The adjustment is based on the value that you specified in the AdjustmentType property either an absolute number or a percentage. A positive value adds to the current capacity and a negative number subtracts from the current capacity. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustments.html#cfn-autoscaling-scalingpolicy-stepadjustment-scalingadjustment PrimitiveType: Integer UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyStepAdjustment])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $MetricIntervalLowerBound, [parameter(Mandatory = $false)] [object] $MetricIntervalUpperBound, [parameter(Mandatory = $true)] [object] $ScalingAdjustment ) Process { $obj = [AutoScalingScalingPolicyStepAdjustment]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyStepAdjustment' function Add-VSAutoScalingScalingPolicyTargetTrackingConfiguration { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy.TargetTrackingConfiguration resource property to the template. TargetTrackingConfiguration is a subproperty of ScalingPolicy: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html that specifies a target tracking scaling policy to use with Amazon EC2 Auto Scaling. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy.TargetTrackingConfiguration resource property to the template. TargetTrackingConfiguration is a subproperty of ScalingPolicy: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html that specifies a target tracking scaling policy to use with Amazon EC2 Auto Scaling. For more information, see PutScalingPolicy: https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PutScalingPolicy.html in the *Amazon EC2 Auto Scaling API Reference*. For more information about scaling policies, see Dynamic Scaling: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html in the *Amazon EC2 Auto Scaling User Guide*. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html .PARAMETER CustomizedMetricSpecification A customized metric. You must specify either a predefined metric or a customized metric. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-customizedmetricspecification Type: CustomizedMetricSpecification UpdateType: Mutable .PARAMETER DisableScaleIn Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default is false. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-disablescalein PrimitiveType: Boolean UpdateType: Mutable .PARAMETER PredefinedMetricSpecification A predefined metric. You must specify either a predefined metric or a customized metric. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-predefinedmetricspecification Type: PredefinedMetricSpecification UpdateType: Mutable .PARAMETER TargetValue The target value for the metric. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-targetvalue PrimitiveType: Double UpdateType: Mutable .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicyTargetTrackingConfiguration])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] $CustomizedMetricSpecification, [parameter(Mandatory = $false)] [object] $DisableScaleIn, [parameter(Mandatory = $false)] $PredefinedMetricSpecification, [parameter(Mandatory = $true)] [object] $TargetValue ) Process { $obj = [AutoScalingScalingPolicyTargetTrackingConfiguration]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingScalingPolicyTargetTrackingConfiguration' function Add-VSAutoScalingWarmPoolInstanceReusePolicy { <# .SYNOPSIS Adds an AWS::AutoScaling::WarmPool.InstanceReusePolicy resource property to the template. .DESCRIPTION Adds an AWS::AutoScaling::WarmPool.InstanceReusePolicy resource property to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-warmpool-instancereusepolicy.html .PARAMETER ReuseOnScaleIn Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-warmpool-instancereusepolicy.html#cfn-autoscaling-warmpool-instancereusepolicy-reuseonscalein UpdateType: Mutable PrimitiveType: Boolean .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingWarmPoolInstanceReusePolicy])] [cmdletbinding()] Param( [parameter(Mandatory = $false)] [object] $ReuseOnScaleIn ) Process { $obj = [AutoScalingWarmPoolInstanceReusePolicy]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'Add-VSAutoScalingWarmPoolInstanceReusePolicy' function New-VSAutoScalingAutoScalingGroup { <# .SYNOPSIS Adds an AWS::AutoScaling::AutoScalingGroup resource to the template. Defines an Amazon EC2 Auto Scaling group with the specified name and attributes. .DESCRIPTION Adds an AWS::AutoScaling::AutoScalingGroup resource to the template. Defines an Amazon EC2 Auto Scaling group with the specified name and attributes. To configure Amazon EC2 instances launched as part of the group, you can specify a launch template or a launch configuration. We recommend that you use a launch template to make sure that you can use the latest features of Amazon EC2, such as T2 Unlimited instances. For more information, see Creating a Launch Template for an Auto Scaling Group: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html. **Important** You can add an UpdatePolicy attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html to your Auto Scaling group to perform rolling updates (or replace the group when a change has been made to the group. You can find sample update policies for rolling updates in the Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#aws-properties-as-group--examples section. For more information, see CreateAutoScalingGroup: https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateAutoScalingGroup.html and UpdateAutoScalingGroup: https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_UpdateAutoScalingGroup.html in the *Amazon EC2 Auto Scaling API Reference*. For more information about Amazon EC2 Auto Scaling, see the Amazon EC2 Auto Scaling User Guide: https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html .PARAMETER LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. .PARAMETER AutoScalingGroupName The name of the Auto Scaling group. This name must be unique per Region per account. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-autoscaling-autoscalinggroup-autoscalinggroupname PrimitiveType: String UpdateType: Immutable .PARAMETER AvailabilityZones A list of Availability Zones for the group. You must specify one of the following properties: VPCZoneIdentifier or AvailabilityZones. If your account supports EC2-Classic and VPC, this property is required to create an Auto Scaling group that launches instances into EC2-Classic. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-availabilityzones DuplicatesAllowed: True PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER CapacityRebalance + Suspending and Resuming Scaling Processes: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html in the *Amazon EC2 Auto Scaling User Guide* Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-capacityrebalance PrimitiveType: Boolean UpdateType: Mutable .PARAMETER Context + Suspending and Resuming Scaling Processes: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html in the *Amazon EC2 Auto Scaling User Guide* Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-context PrimitiveType: String UpdateType: Mutable .PARAMETER Cooldown The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. The default value is 300. Used only when a scaling-specific cooldown is not specified and not supported for target tracking scaling policies, step scaling policies, or scheduled scaling. For more information, see Scaling Cooldowns: https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-cooldown PrimitiveType: String UpdateType: Mutable .PARAMETER DesiredCapacity The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure automatic scaling. The number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity, the default is the minimum size of the group. CloudFormation marks the Auto Scaling group as successful by setting its status to CREATE_COMPLETE when the desired capacity is reached. However, if SpotPrice is set in the launch configuration: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html, then desired capacity is not used as a criteria for success, because whether your request is fulfilled depends on Spot Instance capacity and your maximum price. If the current Spot price is less than your specified maximum price, Amazon EC2 Auto Scaling uses DesiredCapacity as the target capacity for the group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity PrimitiveType: String UpdateType: Mutable .PARAMETER DesiredCapacityType + Suspending and Resuming Scaling Processes: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html in the *Amazon EC2 Auto Scaling User Guide* Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacitytype PrimitiveType: String UpdateType: Mutable .PARAMETER HealthCheckGracePeriod The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service. The default value is 0. For more information, see Health Checks for Auto Scaling Instances: https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html in the *Amazon EC2 Auto Scaling User Guide*. If you are adding an ELB health check, you must specify this property. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-healthcheckgraceperiod PrimitiveType: Integer UpdateType: Mutable .PARAMETER HealthCheckType The service to use for the health checks. The valid values are EC2 default and ELB. If you configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks. For more information, see Health Checks for Auto Scaling Instances: https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-healthchecktype PrimitiveType: String UpdateType: Mutable .PARAMETER InstanceId The ID of the instance used to create a launch configuration for the group. When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a new launch configuration and associates it with the Auto Scaling group. The new launch configuration derives all its properties from the instance, with the exception of BlockDeviceMapping and AssociatePublicIpAddress. For more information, see Create an Auto Scaling Group Using an EC2 Instance: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html in the *Amazon EC2 Auto Scaling User Guide*. You must specify one of the following properties: LaunchConfigurationName, LaunchTemplate, InstanceId, or MixedInstancesPolicy. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-instanceid PrimitiveType: String UpdateType: Immutable .PARAMETER LaunchConfigurationName The name of the launch configuration: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html to use to launch instances. You must specify one of the following properties: LaunchConfigurationName, LaunchTemplate, InstanceId, or MixedInstancesPolicy. When you update LaunchConfigurationName, existing Amazon EC2 instances continue to run with the configuration that they were originally launched with. To update existing instances, specify an UpdatePolicy attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html for the Auto Scaling group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-launchconfigurationname PrimitiveType: String UpdateType: Mutable .PARAMETER LaunchTemplate The EC2 launch template: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html to use to launch instances. You must specify one of the following properties: LaunchConfigurationName, LaunchTemplate, InstanceId, or MixedInstancesPolicy. When you update LaunchTemplate, existing Amazon EC2 instances continue to run with the configuration that they were originally launched with. To update existing instances, specify an UpdatePolicy attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html for the Auto Scaling group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-launchtemplate Type: LaunchTemplateSpecification UpdateType: Mutable .PARAMETER LifecycleHookSpecificationList The lifecycle hooks for the group, which specify actions to perform when Amazon EC2 Auto Scaling launches or terminates instances. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecificationlist DuplicatesAllowed: True ItemType: LifecycleHookSpecification Type: List UpdateType: Mutable .PARAMETER LoadBalancerNames A list of Classic Load Balancers associated with this Auto Scaling group. For Application Load Balancers and Network Load Balancers, specify a list of target groups using the TargetGroupARNs property instead. For more information, see Using a Load Balancer with an Auto Scaling Group: https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-loadbalancernames DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER MaxInstanceLifetime The maximum amount of time, in seconds, that an instance can be in service. Valid Range: Minimum value of 604800. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-maxinstancelifetime PrimitiveType: Integer UpdateType: Mutable .PARAMETER MaxSize The maximum size of the Auto Scaling group. With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above MaxSize by more than your maximum instance weight weights that define how many capacity units each instance contributes to the capacity of the group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-maxsize PrimitiveType: String UpdateType: Mutable .PARAMETER MetricsCollection Enables the monitoring of group metrics of an Auto Scaling group. By default, these metrics are disabled. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-metricscollection DuplicatesAllowed: True ItemType: MetricsCollection Type: List UpdateType: Mutable .PARAMETER MinSize The minimum size of the Auto Scaling group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-minsize PrimitiveType: String UpdateType: Mutable .PARAMETER MixedInstancesPolicy An embedded object that specifies a mixed instances policy. The policy includes properties that not only define the distribution of On-Demand Instances and Spot Instances, the maximum price to pay for Spot Instances, and how the Auto Scaling group allocates instance types to fulfill On-Demand and Spot capacity, but also the properties that specify the instance configuration information—the launch template and instance types. For more information, see Auto Scaling Groups with Multiple Instance Types and Purchase Options: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html in the *Amazon EC2 Auto Scaling User Guide*. You must specify one of the following properties: LaunchConfigurationName, LaunchTemplate, InstanceId, or MixedInstancesPolicy. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-mixedinstancespolicy Type: MixedInstancesPolicy UpdateType: Mutable .PARAMETER NewInstancesProtectedFromScaleIn + Suspending and Resuming Scaling Processes: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html in the *Amazon EC2 Auto Scaling User Guide* Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-newinstancesprotectedfromscalein PrimitiveType: Boolean UpdateType: Mutable .PARAMETER NotificationConfigurations Configures an Auto Scaling group to send notifications when specified events take place. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-notificationconfigurations DuplicatesAllowed: True ItemType: NotificationConfiguration Type: List UpdateType: Mutable .PARAMETER PlacementGroup The name of an existing cluster placement group into which you want to launch your instances. A placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a placement group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-placementgroup PrimitiveType: String UpdateType: Mutable .PARAMETER ServiceLinkedRoleARN The Amazon Resource Name ARN of the service-linked role that the Auto Scaling group uses to call other AWS services on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, which it creates if it does not exist. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-autoscaling-autoscalinggroup-servicelinkedrolearn PrimitiveType: String UpdateType: Mutable .PARAMETER Tags One or more tags. You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-tags DuplicatesAllowed: True ItemType: TagProperty Type: List UpdateType: Mutable .PARAMETER TargetGroupARNs A list of Amazon Resource Names ARN of target groups to associate with the Auto Scaling group. Instances are registered as targets in a target group, and traffic is routed to the target group. For more information, see Using a Load Balancer with an Auto Scaling Group: https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-targetgrouparns DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER TerminationPolicies A policy or a list of policies that are used to select the instances to terminate. The policies are executed in the order that you list them. The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance, OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default, OldestLaunchTemplate, and AllocationStrategy. For more information, see Controlling Which Auto Scaling Instances Terminate During Scale In: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-termpolicy DuplicatesAllowed: False PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER VPCZoneIdentifier A list of subnet IDs for a virtual private cloud VPC. If you specify VPCZoneIdentifier with AvailabilityZones, the subnets that you specify for this property must reside in those Availability Zones. If your account supports EC2-Classic and VPC, this property is required to create an Auto Scaling group that launches instances into a VPC. If this resource has a public IP address and is also in a VPC that is defined in the same stack template, you must use the DependsOn attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html to declare a dependency on the VPC-gateway attachment: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc-gateway-attachment.html. When you update VPCZoneIdentifier, this retains the same Auto Scaling group and replaces old instances with new ones, according to the specified subnets. You can specify how AWS CloudFormation handles these updates by using an UpdatePolicy attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-vpczoneidentifier DuplicatesAllowed: True PrimitiveItemType: String Type: List UpdateType: Mutable .PARAMETER CreationPolicy Use the CreationPolicy attribute when you want to wait on resource configuration actions before stack creation proceeds. For example, if you install and configure software applications on an EC2 instance, you might want those applications to be running before proceeding. In such cases, you can add a CreationPolicy attribute to the instance, and then send a success signal to the instance after the applications are installed and configured. You must use the "Add-CreationPolicy" function or the [CreationPolicy] class here. .PARAMETER DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. .PARAMETER Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. This will be returned when describing the resource using AWS CLI. .PARAMETER UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here. .PARAMETER Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingAutoScalingGroup])] [cmdletbinding()] Param( [parameter(Mandatory = $true,Position = 0)] [ValidateLogicalId()] [string] $LogicalId, [parameter(Mandatory = $false)] [object] $AutoScalingGroupName, [parameter(Mandatory = $false)] $AvailabilityZones, [parameter(Mandatory = $false)] [object] $CapacityRebalance, [parameter(Mandatory = $false)] [object] $Context, [parameter(Mandatory = $false)] [object] $Cooldown, [parameter(Mandatory = $false)] [object] $DesiredCapacity, [parameter(Mandatory = $false)] [object] $DesiredCapacityType, [parameter(Mandatory = $false)] [object] $HealthCheckGracePeriod, [parameter(Mandatory = $false)] [object] $HealthCheckType, [parameter(Mandatory = $false)] [object] $InstanceId, [parameter(Mandatory = $false)] [object] $LaunchConfigurationName, [parameter(Mandatory = $false)] $LaunchTemplate, [parameter(Mandatory = $false)] [object] $LifecycleHookSpecificationList, [parameter(Mandatory = $false)] $LoadBalancerNames, [parameter(Mandatory = $false)] [object] $MaxInstanceLifetime, [parameter(Mandatory = $true)] [object] $MaxSize, [parameter(Mandatory = $false)] [object] $MetricsCollection, [parameter(Mandatory = $true)] [object] $MinSize, [parameter(Mandatory = $false)] $MixedInstancesPolicy, [parameter(Mandatory = $false)] [object] $NewInstancesProtectedFromScaleIn, [parameter(Mandatory = $false)] [object] $NotificationConfigurations, [parameter(Mandatory = $false)] [object] $PlacementGroup, [parameter(Mandatory = $false)] [object] $ServiceLinkedRoleARN, [parameter(Mandatory = $false)] [object] $Tags, [parameter(Mandatory = $false)] $TargetGroupARNs, [parameter(Mandatory = $false)] $TerminationPolicies, [parameter(Mandatory = $false)] $VPCZoneIdentifier, [parameter(Mandatory = $false)] [CreationPolicy] $CreationPolicy, [parameter()] [DeletionPolicy] $DeletionPolicy, [parameter()] [UpdateReplacePolicy] $UpdateReplacePolicy, [parameter(Mandatory = $false)] [string[]] $DependsOn, [parameter(Mandatory = $false)] [VSJson] $Metadata, [parameter(Mandatory = $false)] [UpdatePolicy] $UpdatePolicy, [parameter(Mandatory = $false)] [string] $Condition ) Process { $obj = [AutoScalingAutoScalingGroup]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'New-VSAutoScalingAutoScalingGroup' function New-VSAutoScalingLaunchConfiguration { <# .SYNOPSIS Adds an AWS::AutoScaling::LaunchConfiguration resource to the template. .DESCRIPTION Adds an AWS::AutoScaling::LaunchConfiguration resource to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html .PARAMETER LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. .PARAMETER AssociatePublicIpAddress Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-associatepublicipaddress UpdateType: Immutable PrimitiveType: Boolean .PARAMETER BlockDeviceMappings Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-blockdevicemappings UpdateType: Immutable Type: List ItemType: BlockDeviceMapping DuplicatesAllowed: False .PARAMETER ClassicLinkVPCId Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-classiclinkvpcid UpdateType: Immutable PrimitiveType: String .PARAMETER ClassicLinkVPCSecurityGroups Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-classiclinkvpcsecuritygroups UpdateType: Immutable Type: List PrimitiveItemType: String .PARAMETER EbsOptimized Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-ebsoptimized UpdateType: Immutable PrimitiveType: Boolean .PARAMETER IamInstanceProfile Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-iaminstanceprofile UpdateType: Immutable PrimitiveType: String .PARAMETER ImageId Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-imageid UpdateType: Immutable PrimitiveType: String .PARAMETER InstanceId Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-instanceid UpdateType: Immutable PrimitiveType: String .PARAMETER InstanceMonitoring Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-instancemonitoring UpdateType: Immutable PrimitiveType: Boolean .PARAMETER InstanceType Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-instancetype UpdateType: Immutable PrimitiveType: String .PARAMETER KernelId Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-kernelid UpdateType: Immutable PrimitiveType: String .PARAMETER KeyName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-keyname UpdateType: Immutable PrimitiveType: String .PARAMETER LaunchConfigurationName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-launchconfigurationname UpdateType: Immutable PrimitiveType: String .PARAMETER MetadataOptions Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-metadataoptions UpdateType: Immutable Type: MetadataOptions .PARAMETER PlacementTenancy Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-placementtenancy UpdateType: Immutable PrimitiveType: String .PARAMETER RamDiskId Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-ramdiskid UpdateType: Immutable PrimitiveType: String .PARAMETER SecurityGroups Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-securitygroups UpdateType: Immutable Type: List PrimitiveItemType: String .PARAMETER SpotPrice Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-spotprice UpdateType: Immutable PrimitiveType: String .PARAMETER UserData Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-launchconfiguration.html#cfn-autoscaling-launchconfiguration-userdata UpdateType: Immutable PrimitiveType: String .PARAMETER DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. .PARAMETER Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. This will be returned when describing the resource using AWS CLI. .PARAMETER UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here. .PARAMETER Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingLaunchConfiguration])] [cmdletbinding()] Param( [parameter(Mandatory = $true,Position = 0)] [ValidateLogicalId()] [string] $LogicalId, [parameter(Mandatory = $false)] [object] $AssociatePublicIpAddress, [parameter(Mandatory = $false)] [object] $BlockDeviceMappings, [parameter(Mandatory = $false)] [object] $ClassicLinkVPCId, [parameter(Mandatory = $false)] $ClassicLinkVPCSecurityGroups, [parameter(Mandatory = $false)] [object] $EbsOptimized, [parameter(Mandatory = $false)] [object] $IamInstanceProfile, [parameter(Mandatory = $true)] [object] $ImageId, [parameter(Mandatory = $false)] [object] $InstanceId, [parameter(Mandatory = $false)] [object] $InstanceMonitoring, [parameter(Mandatory = $true)] [object] $InstanceType, [parameter(Mandatory = $false)] [object] $KernelId, [parameter(Mandatory = $false)] [object] $KeyName, [parameter(Mandatory = $false)] [object] $LaunchConfigurationName, [parameter(Mandatory = $false)] $MetadataOptions, [parameter(Mandatory = $false)] [object] $PlacementTenancy, [parameter(Mandatory = $false)] [object] $RamDiskId, [parameter(Mandatory = $false)] $SecurityGroups, [parameter(Mandatory = $false)] [object] $SpotPrice, [parameter(Mandatory = $false)] [TransformUserData()] [UserData] $UserData, [parameter()] [DeletionPolicy] $DeletionPolicy, [parameter()] [UpdateReplacePolicy] $UpdateReplacePolicy, [parameter(Mandatory = $false)] [string[]] $DependsOn, [parameter(Mandatory = $false)] [VSJson] $Metadata, [parameter(Mandatory = $false)] [UpdatePolicy] $UpdatePolicy, [parameter(Mandatory = $false)] [string] $Condition ) Process { $obj = [AutoScalingLaunchConfiguration]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'New-VSAutoScalingLaunchConfiguration' function New-VSAutoScalingLifecycleHook { <# .SYNOPSIS Adds an AWS::AutoScaling::LifecycleHook resource to the template. .DESCRIPTION Adds an AWS::AutoScaling::LifecycleHook resource to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html .PARAMETER LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. .PARAMETER AutoScalingGroupName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-autoscalinggroupname UpdateType: Immutable PrimitiveType: String .PARAMETER DefaultResult Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-defaultresult UpdateType: Mutable PrimitiveType: String .PARAMETER HeartbeatTimeout Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-heartbeattimeout UpdateType: Mutable PrimitiveType: Integer .PARAMETER LifecycleHookName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-lifecyclehookname UpdateType: Immutable PrimitiveType: String .PARAMETER LifecycleTransition Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-lifecycletransition UpdateType: Mutable PrimitiveType: String .PARAMETER NotificationMetadata Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-notificationmetadata UpdateType: Mutable PrimitiveType: String .PARAMETER NotificationTargetARN Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-notificationtargetarn UpdateType: Mutable PrimitiveType: String .PARAMETER RoleARN Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html#cfn-autoscaling-lifecyclehook-rolearn UpdateType: Mutable PrimitiveType: String .PARAMETER DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. .PARAMETER Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. This will be returned when describing the resource using AWS CLI. .PARAMETER UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here. .PARAMETER Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingLifecycleHook])] [cmdletbinding()] Param( [parameter(Mandatory = $true,Position = 0)] [ValidateLogicalId()] [string] $LogicalId, [parameter(Mandatory = $true)] [object] $AutoScalingGroupName, [parameter(Mandatory = $false)] [object] $DefaultResult, [parameter(Mandatory = $false)] [object] $HeartbeatTimeout, [parameter(Mandatory = $false)] [object] $LifecycleHookName, [parameter(Mandatory = $true)] [object] $LifecycleTransition, [parameter(Mandatory = $false)] [object] $NotificationMetadata, [parameter(Mandatory = $false)] [object] $NotificationTargetARN, [parameter(Mandatory = $false)] [object] $RoleARN, [parameter()] [DeletionPolicy] $DeletionPolicy, [parameter()] [UpdateReplacePolicy] $UpdateReplacePolicy, [parameter(Mandatory = $false)] [string[]] $DependsOn, [parameter(Mandatory = $false)] [VSJson] $Metadata, [parameter(Mandatory = $false)] [UpdatePolicy] $UpdatePolicy, [parameter(Mandatory = $false)] [string] $Condition ) Process { $obj = [AutoScalingLifecycleHook]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'New-VSAutoScalingLifecycleHook' function New-VSAutoScalingScalingPolicy { <# .SYNOPSIS Adds an AWS::AutoScaling::ScalingPolicy resource to the template. Specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can change the number of instances available for your application in response to changing demand. .DESCRIPTION Adds an AWS::AutoScaling::ScalingPolicy resource to the template. Specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can change the number of instances available for your application in response to changing demand. To update an existing scaling policy, use the existing policy name and set the property to change. If you leave a property unspecified when updating a scaling policy, the corresponding value remains unchanged. If you create either a step scaling policy or a simple scaling policy, you must also create a CloudWatch alarm that monitors a CloudWatch metric for your Auto Scaling group. Note that you can associate a CloudWatch alarm with only one scaling policy. For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic Scaling: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html in the *Amazon EC2 Auto Scaling User Guide*. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html .PARAMETER LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. .PARAMETER AdjustmentType Specifies whether the ScalingAdjustment property is an absolute number or a percentage of the current capacity. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity. Valid only if the policy type is StepScaling or SimpleScaling. For more information, see Scaling Adjustment Types: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-adjustmenttype PrimitiveType: String UpdateType: Mutable .PARAMETER AutoScalingGroupName The name or Amazon Resource Name ARN of the Auto Scaling group that you want to attach the policy to. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-autoscalinggroupname PrimitiveType: String UpdateType: Mutable .PARAMETER Cooldown The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities can start. If this property is not specified, the default cooldown period for the group applies. Valid only if the policy type is SimpleScaling. For more information, see Scaling Cooldowns: https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-cooldown PrimitiveType: String UpdateType: Mutable .PARAMETER EstimatedInstanceWarmup The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group. Valid only if the policy type is StepScaling or TargetTrackingScaling. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-estimatedinstancewarmup PrimitiveType: Integer UpdateType: Mutable .PARAMETER MetricAggregationType The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. By default, AWS CloudFormation specifies Average. Valid only if the policy type is StepScaling. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-metricaggregationtype PrimitiveType: String UpdateType: Mutable .PARAMETER MinAdjustmentMagnitude The minimum value to scale by when scaling by percentages. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances. Valid only if the policy type is StepScaling or SimpleScaling and the adjustment type is PercentChangeInCapacity. For more information, see Scaling Adjustment Types: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment in the *Amazon EC2 Auto Scaling User Guide*. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-minadjustmentmagnitude PrimitiveType: Integer UpdateType: Mutable .PARAMETER PolicyType The policy type. The default value is SimpleScaling. *Allowed Values*: SimpleScaling, StepScaling, or TargetTrackingScaling Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-policytype PrimitiveType: String UpdateType: Mutable .PARAMETER PredictiveScalingConfiguration Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-autoscaling-scalingpolicy-predictivescalingconfiguration Type: PredictiveScalingConfiguration UpdateType: Mutable .PARAMETER ScalingAdjustment The amount by which a simple scaling policy scales the Auto Scaling group in response to an alarm breach. The adjustment is based on the value that you specified in the AdjustmentType property either an absolute number or a percentage. A positive value adds to the current capacity and a negative value subtracts from the current capacity. For exact capacity, you must specify a positive value. If you specify SimpleScaling for the policy type, you must specify this property. Not used with any other policy type. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-scalingadjustment PrimitiveType: Integer UpdateType: Mutable .PARAMETER StepAdjustments A set of adjustments that enable you to scale based on the size of the alarm breach. If you specify StepScaling for the policy type, you must specify this property. Not used with any other policy type. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-as-scalingpolicy-stepadjustments DuplicatesAllowed: False ItemType: StepAdjustment Type: List UpdateType: Mutable .PARAMETER TargetTrackingConfiguration Configures a target tracking scaling policy. If you specify TargetTrackingScaling for the policy type, you must specify this property. Not used with any other policy type. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-policy.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration Type: TargetTrackingConfiguration UpdateType: Mutable .PARAMETER DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. .PARAMETER Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. This will be returned when describing the resource using AWS CLI. .PARAMETER UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here. .PARAMETER Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScalingPolicy])] [cmdletbinding()] Param( [parameter(Mandatory = $true,Position = 0)] [ValidateLogicalId()] [string] $LogicalId, [parameter(Mandatory = $false)] [object] $AdjustmentType, [parameter(Mandatory = $true)] [object] $AutoScalingGroupName, [parameter(Mandatory = $false)] [object] $Cooldown, [parameter(Mandatory = $false)] [object] $EstimatedInstanceWarmup, [parameter(Mandatory = $false)] [object] $MetricAggregationType, [parameter(Mandatory = $false)] [object] $MinAdjustmentMagnitude, [parameter(Mandatory = $false)] [object] $PolicyType, [parameter(Mandatory = $false)] $PredictiveScalingConfiguration, [parameter(Mandatory = $false)] [object] $ScalingAdjustment, [parameter(Mandatory = $false)] [object] $StepAdjustments, [parameter(Mandatory = $false)] $TargetTrackingConfiguration, [parameter()] [DeletionPolicy] $DeletionPolicy, [parameter()] [UpdateReplacePolicy] $UpdateReplacePolicy, [parameter(Mandatory = $false)] [string[]] $DependsOn, [parameter(Mandatory = $false)] [VSJson] $Metadata, [parameter(Mandatory = $false)] [UpdatePolicy] $UpdatePolicy, [parameter(Mandatory = $false)] [string] $Condition ) Process { $obj = [AutoScalingScalingPolicy]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'New-VSAutoScalingScalingPolicy' function New-VSAutoScalingScheduledAction { <# .SYNOPSIS Adds an AWS::AutoScaling::ScheduledAction resource to the template. Specifies an Amazon EC2 Auto Scaling scheduled action so that the Auto Scaling group can change the number of instances available for your application in response to predictable load changes. .DESCRIPTION Adds an AWS::AutoScaling::ScheduledAction resource to the template. Specifies an Amazon EC2 Auto Scaling scheduled action so that the Auto Scaling group can change the number of instances available for your application in response to predictable load changes. **Important** When you update a stack with an Auto Scaling group and scheduled action, AWS CloudFormation always sets the min size, max size, and desired capacity properties of your group to the values that are defined in the AWS::AutoScaling::AutoScalingGroup section of your template. However, you might not want CloudFormation to do that when you have a scheduled action in effect. You can use an UpdatePolicy attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html to prevent CloudFormation from changing the min size, max size, or desired capacity property values during a stack update unless you modified the individual values in your template. If you have rolling updates enabled, before you can update the Auto Scaling group, you must suspend scheduled actions by specifying an UpdatePolicy attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html for the Auto Scaling group. You can find sample update policies for rolling updates in the Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#aws-properties-as-group--examples section of the AWS::AutoScaling::AutoScalingGroup documentation. For more information, see Scheduled Scaling: https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html and Suspending and Resuming Scaling Processes: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html in the *Amazon EC2 Auto Scaling User Guide*. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html .PARAMETER LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. .PARAMETER AutoScalingGroupName The name or Amazon Resource Name ARN of the Auto Scaling group. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-asgname PrimitiveType: String UpdateType: Immutable .PARAMETER DesiredCapacity The desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain. It can scale beyond this capacity if you add more scaling conditions. You must specify at least one of the following properties: MaxSize, MinSize, or DesiredCapacity. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-desiredcapacity PrimitiveType: Integer UpdateType: Mutable .PARAMETER EndTime The date and time in UTC for the recurring schedule to end. For example, "2019-06-01T00:00:00Z". Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-endtime PrimitiveType: String UpdateType: Mutable .PARAMETER MaxSize The maximum size of the Auto Scaling group. You must specify at least one of the following properties: MaxSize, MinSize, or DesiredCapacity. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-maxsize PrimitiveType: Integer UpdateType: Mutable .PARAMETER MinSize The minimum size of the Auto Scaling group. You must specify at least one of the following properties: MaxSize, MinSize, or DesiredCapacity. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-minsize PrimitiveType: Integer UpdateType: Mutable .PARAMETER Recurrence The recurring schedule for this action, in Unix cron syntax format. For more information about cron syntax, see Crontab: http://crontab.org/. Specifying the StartTime and EndTime properties with Recurrence property forms the start and stop boundaries of the recurring action. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-recurrence PrimitiveType: String UpdateType: Mutable .PARAMETER StartTime The date and time in UTC for this action to start. For example, "2019-06-01T00:00:00Z". Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-starttime PrimitiveType: String UpdateType: Mutable .PARAMETER TimeZone Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-timezone PrimitiveType: String UpdateType: Mutable .PARAMETER DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. .PARAMETER Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. This will be returned when describing the resource using AWS CLI. .PARAMETER UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here. .PARAMETER Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingScheduledAction])] [cmdletbinding()] Param( [parameter(Mandatory = $true,Position = 0)] [ValidateLogicalId()] [string] $LogicalId, [parameter(Mandatory = $true)] [object] $AutoScalingGroupName, [parameter(Mandatory = $false)] [object] $DesiredCapacity, [parameter(Mandatory = $false)] [object] $EndTime, [parameter(Mandatory = $false)] [object] $MaxSize, [parameter(Mandatory = $false)] [object] $MinSize, [parameter(Mandatory = $false)] [object] $Recurrence, [parameter(Mandatory = $false)] [object] $StartTime, [parameter(Mandatory = $false)] [object] $TimeZone, [parameter()] [DeletionPolicy] $DeletionPolicy, [parameter()] [UpdateReplacePolicy] $UpdateReplacePolicy, [parameter(Mandatory = $false)] [string[]] $DependsOn, [parameter(Mandatory = $false)] [VSJson] $Metadata, [parameter(Mandatory = $false)] [UpdatePolicy] $UpdatePolicy, [parameter(Mandatory = $false)] [string] $Condition ) Process { $obj = [AutoScalingScheduledAction]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'New-VSAutoScalingScheduledAction' function New-VSAutoScalingWarmPool { <# .SYNOPSIS Adds an AWS::AutoScaling::WarmPool resource to the template. .DESCRIPTION Adds an AWS::AutoScaling::WarmPool resource to the template. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html .PARAMETER LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. .PARAMETER AutoScalingGroupName Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-autoscalinggroupname UpdateType: Immutable PrimitiveType: String .PARAMETER MaxGroupPreparedCapacity Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-maxgrouppreparedcapacity UpdateType: Mutable PrimitiveType: Integer .PARAMETER MinSize Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-minsize UpdateType: Mutable PrimitiveType: Integer .PARAMETER PoolState Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-poolstate UpdateType: Mutable PrimitiveType: String .PARAMETER InstanceReusePolicy Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-instancereusepolicy UpdateType: Mutable Type: InstanceReusePolicy .PARAMETER DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" .PARAMETER DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. .PARAMETER Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. This will be returned when describing the resource using AWS CLI. .PARAMETER UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function or the [UpdatePolicy] class here. .PARAMETER Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. .FUNCTIONALITY Vaporshell #> [OutputType([AutoScalingWarmPool])] [cmdletbinding()] Param( [parameter(Mandatory = $true,Position = 0)] [ValidateLogicalId()] [string] $LogicalId, [parameter(Mandatory = $true)] [object] $AutoScalingGroupName, [parameter(Mandatory = $false)] [object] $MaxGroupPreparedCapacity, [parameter(Mandatory = $false)] [object] $MinSize, [parameter(Mandatory = $false)] [object] $PoolState, [parameter(Mandatory = $false)] $InstanceReusePolicy, [parameter()] [DeletionPolicy] $DeletionPolicy, [parameter()] [UpdateReplacePolicy] $UpdateReplacePolicy, [parameter(Mandatory = $false)] [string[]] $DependsOn, [parameter(Mandatory = $false)] [VSJson] $Metadata, [parameter(Mandatory = $false)] [UpdatePolicy] $UpdatePolicy, [parameter(Mandatory = $false)] [string] $Condition ) Process { $obj = [AutoScalingWarmPool]::new($PSBoundParameters) Write-Debug "$($MyInvocation.MyCommand) PSBoundParameters:`n$($PSBoundParameters | ConvertTo-Json -Depth 20 | Format-Json)" Write-Verbose "Resulting object from $($MyInvocation.MyCommand): `n$($obj.ToJson() | Format-Json)" $obj } } Export-ModuleMember -Function 'New-VSAutoScalingWarmPool' |