Class: AWSCDK::CloudFormation::CfnStackSet::OperationPreferencesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_formation/cfn_stack_set.rb

Overview

The user-specified preferences for how CloudFormation performs a StackSet operation.

For more information on maximum concurrent accounts and failure tolerance, see StackSet operation options in the CloudFormation User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(concurrency_mode: nil, failure_tolerance_count: nil, failure_tolerance_percentage: nil, max_concurrent_count: nil, max_concurrent_percentage: nil, region_concurrency_type: nil, region_order: nil) ⇒ OperationPreferencesProperty

Returns a new instance of OperationPreferencesProperty.

Parameters:

  • concurrency_mode (String, nil) (defaults to: nil)

    Specifies how the concurrency level behaves during the operation execution.

  • failure_tolerance_count (Numeric, nil) (defaults to: nil)

    The number of accounts per Region this operation can fail in before CloudFormation stops the operation in that Region.

  • failure_tolerance_percentage (Numeric, nil) (defaults to: nil)

    The percentage of accounts per Region this stack operation can fail in before CloudFormation stops the operation in that Region.

  • max_concurrent_count (Numeric, nil) (defaults to: nil)

    The maximum number of accounts in which to perform this operation at one time.

  • max_concurrent_percentage (Numeric, nil) (defaults to: nil)

    The maximum percentage of accounts in which to perform this operation at one time.

  • region_concurrency_type (String, nil) (defaults to: nil)

    The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.

  • region_order (Array<String>, nil) (defaults to: nil)

    The order of the Regions where you want to perform the stack operation.



896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
# File 'cloud_formation/cfn_stack_set.rb', line 896

def initialize(concurrency_mode: nil, failure_tolerance_count: nil, failure_tolerance_percentage: nil, max_concurrent_count: nil, max_concurrent_percentage: nil, region_concurrency_type: nil, region_order: nil)
  @concurrency_mode = concurrency_mode
  Jsii::Type.check_type(@concurrency_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "concurrencyMode") unless @concurrency_mode.nil?
  @failure_tolerance_count = failure_tolerance_count
  Jsii::Type.check_type(@failure_tolerance_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "failureToleranceCount") unless @failure_tolerance_count.nil?
  @failure_tolerance_percentage = failure_tolerance_percentage
  Jsii::Type.check_type(@failure_tolerance_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "failureTolerancePercentage") unless @failure_tolerance_percentage.nil?
  @max_concurrent_count = max_concurrent_count
  Jsii::Type.check_type(@max_concurrent_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxConcurrentCount") unless @max_concurrent_count.nil?
  @max_concurrent_percentage = max_concurrent_percentage
  Jsii::Type.check_type(@max_concurrent_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxConcurrentPercentage") unless @max_concurrent_percentage.nil?
  @region_concurrency_type = region_concurrency_type
  Jsii::Type.check_type(@region_concurrency_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "regionConcurrencyType") unless @region_concurrency_type.nil?
  @region_order = region_order
  Jsii::Type.check_type(@region_order, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "regionOrder") unless @region_order.nil?
end

Instance Attribute Details

#concurrency_modeString? (readonly)

Specifies how the concurrency level behaves during the operation execution.

  • STRICT_FAILURE_TOLERANCE : This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount , or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.

If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.

  • SOFT_FAILURE_TOLERANCE : This option decouples FailureToleranceCount from the actual concurrency. This allows StackSet operations to run at the concurrency level set by the MaxConcurrentCount value, or MaxConcurrentPercentage , regardless of the number of failures.


923
924
925
# File 'cloud_formation/cfn_stack_set.rb', line 923

def concurrency_mode
  @concurrency_mode
end

#failure_tolerance_countNumeric? (readonly)

The number of accounts per Region this operation can fail in before CloudFormation stops the operation in that Region.

If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions.

Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage (but not both).



932
933
934
# File 'cloud_formation/cfn_stack_set.rb', line 932

def failure_tolerance_count
  @failure_tolerance_count
end

#failure_tolerance_percentageNumeric? (readonly)

The percentage of accounts per Region this stack operation can fail in before CloudFormation stops the operation in that Region.

If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions.

When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number.

Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage , but not both.



943
944
945
# File 'cloud_formation/cfn_stack_set.rb', line 943

def failure_tolerance_percentage
  @failure_tolerance_percentage
end

#max_concurrent_countNumeric? (readonly)

The maximum number of accounts in which to perform this operation at one time.

This is dependent on the value of FailureToleranceCount . MaxConcurrentCount is at most one more than the FailureToleranceCount .

Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.

Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage , but not both.



954
955
956
# File 'cloud_formation/cfn_stack_set.rb', line 954

def max_concurrent_count
  @max_concurrent_count
end

#max_concurrent_percentageNumeric? (readonly)

The maximum percentage of accounts in which to perform this operation at one time.

When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, CloudFormation sets the number as one instead.

Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.

Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage , but not both.



965
966
967
# File 'cloud_formation/cfn_stack_set.rb', line 965

def max_concurrent_percentage
  @max_concurrent_percentage
end

#region_concurrency_typeString? (readonly)

The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.



970
971
972
# File 'cloud_formation/cfn_stack_set.rb', line 970

def region_concurrency_type
  @region_concurrency_type
end

#region_orderArray<String>? (readonly)

The order of the Regions where you want to perform the stack operation.



975
976
977
# File 'cloud_formation/cfn_stack_set.rb', line 975

def region_order
  @region_order
end

Class Method Details

.jsii_propertiesObject



977
978
979
980
981
982
983
984
985
986
987
# File 'cloud_formation/cfn_stack_set.rb', line 977

def self.jsii_properties
  {
    :concurrency_mode => "concurrencyMode",
    :failure_tolerance_count => "failureToleranceCount",
    :failure_tolerance_percentage => "failureTolerancePercentage",
    :max_concurrent_count => "maxConcurrentCount",
    :max_concurrent_percentage => "maxConcurrentPercentage",
    :region_concurrency_type => "regionConcurrencyType",
    :region_order => "regionOrder",
  }
end

Instance Method Details

#to_jsiiObject



989
990
991
992
993
994
995
996
997
998
999
1000
1001
# File 'cloud_formation/cfn_stack_set.rb', line 989

def to_jsii
  result = {}
  result.merge!({
    "concurrencyMode" => @concurrency_mode,
    "failureToleranceCount" => @failure_tolerance_count,
    "failureTolerancePercentage" => @failure_tolerance_percentage,
    "maxConcurrentCount" => @max_concurrent_count,
    "maxConcurrentPercentage" => @max_concurrent_percentage,
    "regionConcurrencyType" => @region_concurrency_type,
    "regionOrder" => @region_order,
  })
  result.compact
end