Public/SDK Wrappers/Helpers/VSStackSetOperationPreferences.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function VSStackSetOperationPreferences {
    [cmdletbinding(DefaultParameterSetName="FailureToleranceCountMaxConcurrentCount")]
    Param
    (
      [parameter(Mandatory=$true,Position=0,ParameterSetName="FailureToleranceCountMaxConcurrentCount")]
      [parameter(Mandatory=$true,Position=0,ParameterSetName="FailureToleranceCountMaxConcurrentPercentage")]
      [System.Int32]
      $FailureToleranceCount,
      [parameter(Mandatory=$true,Position=0,ParameterSetName="FailureTolerancePercentageMaxConcurrentCount")]
      [parameter(Mandatory=$true,Position=0,ParameterSetName="FailureTolerancePercentageMaxConcurrentPercentage")]
      [System.Int32]
      $FailureTolerancePercentage,
      [parameter(Mandatory=$true,Position=1,ParameterSetName="FailureToleranceCountMaxConcurrentCount")]
      [parameter(Mandatory=$true,Position=1,ParameterSetName="FailureTolerancePercentageMaxConcurrentCount")]
      [System.Int32]
      $MaxConcurrentCount,
      [parameter(Mandatory=$true,Position=1,ParameterSetName="FailureToleranceCountMaxConcurrentPercentage")]
      [parameter(Mandatory=$true,Position=1,ParameterSetName="FailureTolerancePercentageMaxConcurrentPercentage")]
      [System.Int32]
      $MaxConcurrentPercentage,
      [parameter(Mandatory=$false,Position=2)]
      [System.String[]]
      $RegionOrder
    )
    Write-Verbose "Parameter Set: $($PSCmdlet.ParameterSetName)"
    $obj = New-Object Amazon.CloudFormation.Model.StackSetOperationPreferences
    foreach ($key in $PSBoundParameters.Keys) {
        if ($obj.PSObject.Properties.Name -contains $key) {
            $obj.$key = $PSBoundParameters[$key]
        }
    }
    return $obj
}