Class: AWSCDK::Codepipeline::StageProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
codepipeline/stage_props.rb

Overview

Construction properties of a Pipeline Stage.

Direct Known Subclasses

StageOptions

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) ⇒ StageProps

Returns a new instance of StageProps.

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.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'codepipeline/stage_props.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)
  @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?
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:



40
41
42
# File 'codepipeline/stage_props.rb', line 40

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.



45
46
47
# File 'codepipeline/stage_props.rb', line 45

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.



50
51
52
# File 'codepipeline/stage_props.rb', line 50

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.



55
56
57
# File 'codepipeline/stage_props.rb', line 55

def on_success
  @on_success
end

#stage_nameString (readonly)

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

Returns:

  • (String)


34
35
36
# File 'codepipeline/stage_props.rb', line 34

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)


63
64
65
# File 'codepipeline/stage_props.rb', line 63

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)


68
69
70
# File 'codepipeline/stage_props.rb', line 68

def transition_to_enabled
  @transition_to_enabled
end

Class Method Details

.jsii_propertiesObject



70
71
72
73
74
75
76
77
78
79
80
# File 'codepipeline/stage_props.rb', line 70

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",
  }
end

Instance Method Details

#to_jsiiObject



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'codepipeline/stage_props.rb', line 82

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