Class: AWSCDK::CodePipelineActions::CommonCloudFormationStackSetOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_pipeline_actions/common_cloud_formation_stack_set_options.rb

Overview

Options in common between both StackSet actions.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(failure_tolerance_percentage: nil, max_account_concurrency_percentage: nil, stack_set_region: nil) ⇒ CommonCloudFormationStackSetOptions

Returns a new instance of CommonCloudFormationStackSetOptions.

Parameters:

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

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

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

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

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

    The AWS Region the StackSet is in.



10
11
12
13
14
15
16
17
# File 'code_pipeline_actions/common_cloud_formation_stack_set_options.rb', line 10

def initialize(failure_tolerance_percentage: nil, max_account_concurrency_percentage: nil, stack_set_region: 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_account_concurrency_percentage = 
  Jsii::Type.check_type(@max_account_concurrency_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxAccountConcurrencyPercentage") unless @max_account_concurrency_percentage.nil?
  @stack_set_region = stack_set_region
  Jsii::Type.check_type(@stack_set_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackSetRegion") unless @stack_set_region.nil?
end

Instance Attribute Details

#failure_tolerance_percentageNumeric? (readonly)

Note:

Default: 0%

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

If the operation is stopped in a Region, AWS CloudFormation doesn't attempt the operation in subsequent Regions. When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number.

Returns:

  • (Numeric, nil)


27
28
29
# File 'code_pipeline_actions/common_cloud_formation_stack_set_options.rb', line 27

def failure_tolerance_percentage
  @failure_tolerance_percentage
end

#max_account_concurrency_percentageNumeric? (readonly)

Note:

Default: 1%

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, AWS CloudFormation rounds down to the next whole number. If rounding down would result in zero, AWS CloudFormation sets the number as one instead. Although you use this setting to specify the maximum, for large deployments the actual number of accounts acted upon concurrently may be lower due to service throttling.

Returns:

  • (Numeric, nil)


37
38
39
# File 'code_pipeline_actions/common_cloud_formation_stack_set_options.rb', line 37

def 
  @max_account_concurrency_percentage
end

#stack_set_regionString? (readonly)

Note:

Default: - same region as the Pipeline

The AWS Region the StackSet is in.

Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the PipelineProps.crossRegionReplicationBuckets property. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to cdk deploy before deploying the main, Pipeline-containing Stack.

Returns:

  • (String, nil)


47
48
49
# File 'code_pipeline_actions/common_cloud_formation_stack_set_options.rb', line 47

def stack_set_region
  @stack_set_region
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
# File 'code_pipeline_actions/common_cloud_formation_stack_set_options.rb', line 49

def self.jsii_properties
  {
    :failure_tolerance_percentage => "failureTolerancePercentage",
    :max_account_concurrency_percentage => "maxAccountConcurrencyPercentage",
    :stack_set_region => "stackSetRegion",
  }
end

Instance Method Details

#to_jsiiObject



57
58
59
60
61
62
63
64
65
# File 'code_pipeline_actions/common_cloud_formation_stack_set_options.rb', line 57

def to_jsii
  result = {}
  result.merge!({
    "failureTolerancePercentage" => @failure_tolerance_percentage,
    "maxAccountConcurrencyPercentage" => @max_account_concurrency_percentage,
    "stackSetRegion" => @stack_set_region,
  })
  result.compact
end