Class: AWSCDK::Codepipeline::Rule

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

Overview

Represents a rule in AWS CodePipeline that can be used to add conditions and controls to pipeline execution.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props) ⇒ Rule

Creates a new Rule instance.

Parameters:



11
12
13
14
15
# File 'codepipeline/rule.rb', line 11

def initialize(props)
  props = props.is_a?(Hash) ? ::AWSCDK::Codepipeline::RuleProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlJ1bGVQcm9wcyJ9")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(props)
end

Class Method Details

.jsii_overridable_methodsObject



17
18
19
20
21
22
# File 'codepipeline/rule.rb', line 17

def self.jsii_overridable_methods
  {
    :rule_name => { kind: :property, name: "ruleName", is_optional: true },
    :reference => { kind: :method, name: "reference", is_optional: false },
  }
end

Instance Method Details

#referenceString

Returns a reference to the rule that can be used in pipeline stage conditions.

Returns:

  • (String)

    A string in the format "#AWSCDK::Codepipeline::Rule.rulerule.ruleName" that can be used to reference this rule



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

def reference()
  jsii_call_method("reference", [])
end

#rule_nameString?

The name of the rule, if specified in the properties.

Returns:

  • (String, nil)


27
28
29
# File 'codepipeline/rule.rb', line 27

def rule_name()
  jsii_get_property("ruleName")
end