Public/SDK Wrappers/CloudFormation/Stop-VSStackUpdate.ps1
function Stop-VSStackUpdate { <# .SYNOPSIS Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and reverts to the previous stack configuration. You can cancel only stacks that are in the UPDATE_IN_PROGRESS state. .PARAMETER StackName The name or the unique stack ID that is associated with the stack. .PARAMETER ClientRequestToken A unique identifier for this CancelUpdateStack request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to cancel an update on a stack with the same name. You might retry CancelUpdateStack requests to ensure that AWS CloudFormation successfully received them. .PARAMETER ProfileName The name of the configuration profile to deploy the stack with. Defaults to $env:AWS_PROFILE, if set. .FUNCTIONALITY Vaporshell #> [cmdletbinding()] Param ( [parameter(Mandatory = $false)] [String] $ClientRequestToken, [parameter(Mandatory = $false)] [String] $StackName, [parameter(Mandatory = $false)] [String] $ProfileName = $env:AWS_PROFILE ) Process { $method = "CancelUpdateStack" $requestType = "Amazon.CloudFormation.Model.$($method)Request" $request = New-Object $requestType foreach ($key in $PSBoundParameters.Keys) { if ($request.PSObject.Properties.Name -contains $key) { $request.$key = $PSBoundParameters[$key] } } $results = ProcessRequest $PSCmdlet.ParameterSetName $ProfileName $method $request if (!$results) { return } elseif ($results -is 'System.Management.Automation.ErrorRecord') { $PSCmdlet.ThrowTerminatingError($results) } elseif ($results) { return $results } } } |