Class: AWSCDK::Codepipeline::StageOptions

Inherits:
StageProps
  • Object
show all
Defined in:
codepipeline/stage_options.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stage_name:, actions: nil, before_entry: nil, on_failure: nil, on_success: nil, transition_disabled_reason: nil, transition_to_enabled: nil, placement: nil) ⇒ StageOptions

Returns a new instance of StageOptions.

Parameters:

  • stage_name (String)

    The physical, human-readable name to assign to this Pipeline Stage.

  • actions (Array<AWSCDK::Codepipeline::IAction>, nil) (defaults to: nil)

    The list of Actions to create this Stage with.

  • before_entry (AWSCDK::Codepipeline::Conditions, nil) (defaults to: nil)

    The method to use when a stage allows entry.

  • on_failure (AWSCDK::Codepipeline::FailureConditions, nil) (defaults to: nil)

    The method to use when a stage has not completed successfully.

  • on_success (AWSCDK::Codepipeline::Conditions, nil) (defaults to: nil)

    The method to use when a stage has succeeded.

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

    The reason for disabling transition to this stage.

  • transition_to_enabled (Boolean, nil) (defaults to: nil)

    Whether to enable transition to this stage.

  • placement (AWSCDK::Codepipeline::StagePlacement, nil) (defaults to: nil)


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'codepipeline/stage_options.rb', line 14

def initialize(stage_name:, actions: nil, before_entry: nil, on_failure: nil, on_success: nil, transition_disabled_reason: nil, transition_to_enabled: nil, placement: nil)
  @stage_name = stage_name
  Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName")
  @actions = actions
  Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuSUFjdGlvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "actions") unless @actions.nil?
  @before_entry = before_entry.is_a?(Hash) ? ::AWSCDK::Codepipeline::Conditions.new(**before_entry.transform_keys(&:to_sym)) : before_entry
  Jsii::Type.check_type(@before_entry, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkNvbmRpdGlvbnMifQ==")), "beforeEntry") unless @before_entry.nil?
  @on_failure = on_failure.is_a?(Hash) ? ::AWSCDK::Codepipeline::FailureConditions.new(**on_failure.transform_keys(&:to_sym)) : on_failure
  Jsii::Type.check_type(@on_failure, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkZhaWx1cmVDb25kaXRpb25zIn0=")), "onFailure") unless @on_failure.nil?
  @on_success = on_success.is_a?(Hash) ? ::AWSCDK::Codepipeline::Conditions.new(**on_success.transform_keys(&:to_sym)) : on_success
  Jsii::Type.check_type(@on_success, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkNvbmRpdGlvbnMifQ==")), "onSuccess") unless @on_success.nil?
  @transition_disabled_reason = transition_disabled_reason
  Jsii::Type.check_type(@transition_disabled_reason, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transitionDisabledReason") unless @transition_disabled_reason.nil?
  @transition_to_enabled = transition_to_enabled
  Jsii::Type.check_type(@transition_to_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "transitionToEnabled") unless @transition_to_enabled.nil?
  @placement = placement.is_a?(Hash) ? ::AWSCDK::Codepipeline::StagePlacement.new(**placement.transform_keys(&:to_sym)) : placement
  Jsii::Type.check_type(@placement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlN0YWdlUGxhY2VtZW50In0=")), "placement") unless @placement.nil?
end

Instance Attribute Details

#actionsArray<AWSCDK::Codepipeline::IAction>? (readonly)

The list of Actions to create this Stage with.

You can always add more Actions later by calling IStage#addAction.

Returns:



42
43
44
# File 'codepipeline/stage_options.rb', line 42

def actions
  @actions
end

#before_entryAWSCDK::Codepipeline::Conditions? (readonly)

Note:

Default: - No conditions are applied before stage entry

The method to use when a stage allows entry.



47
48
49
# File 'codepipeline/stage_options.rb', line 47

def before_entry
  @before_entry
end

#on_failureAWSCDK::Codepipeline::FailureConditions? (readonly)

Note:

Default: - No failure conditions are applied

The method to use when a stage has not completed successfully.



52
53
54
# File 'codepipeline/stage_options.rb', line 52

def on_failure
  @on_failure
end

#on_successAWSCDK::Codepipeline::Conditions? (readonly)

Note:

Default: - No success conditions are applied

The method to use when a stage has succeeded.



57
58
59
# File 'codepipeline/stage_options.rb', line 57

def on_success
  @on_success
end

#placementAWSCDK::Codepipeline::StagePlacement? (readonly)



72
73
74
# File 'codepipeline/stage_options.rb', line 72

def placement
  @placement
end

#stage_nameString (readonly)

The physical, human-readable name to assign to this Pipeline Stage.

Returns:

  • (String)


36
37
38
# File 'codepipeline/stage_options.rb', line 36

def stage_name
  @stage_name
end

#transition_disabled_reasonString? (readonly)

Note:

Default: 'Transition disabled'

The reason for disabling transition to this stage.

Only applicable if transition_to_enabled is set to false.

Returns:

  • (String, nil)


65
66
67
# File 'codepipeline/stage_options.rb', line 65

def transition_disabled_reason
  @transition_disabled_reason
end

#transition_to_enabledBoolean? (readonly)

Note:

Default: true

Whether to enable transition to this stage.

Returns:

  • (Boolean, nil)


70
71
72
# File 'codepipeline/stage_options.rb', line 70

def transition_to_enabled
  @transition_to_enabled
end

Class Method Details

.jsii_propertiesObject



74
75
76
77
78
79
80
81
82
83
84
85
# File 'codepipeline/stage_options.rb', line 74

def self.jsii_properties
  {
    :stage_name => "stageName",
    :actions => "actions",
    :before_entry => "beforeEntry",
    :on_failure => "onFailure",
    :on_success => "onSuccess",
    :transition_disabled_reason => "transitionDisabledReason",
    :transition_to_enabled => "transitionToEnabled",
    :placement => "placement",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'codepipeline/stage_options.rb', line 87

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "stageName" => @stage_name,
    "actions" => @actions,
    "beforeEntry" => @before_entry,
    "onFailure" => @on_failure,
    "onSuccess" => @on_success,
    "transitionDisabledReason" => @transition_disabled_reason,
    "transitionToEnabled" => @transition_to_enabled,
    "placement" => @placement,
  })
  result.compact
end