Class: AWSCDK::Codepipeline::RuleProps

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

Overview

Properties for defining a CodePipeline Rule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commands: nil, configuration: nil, input_artifacts: nil, name: nil, provider: nil, region: nil, role: nil, version: nil) ⇒ RuleProps

Returns a new instance of RuleProps.

Parameters:

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

    The shell commands to run with your commands rule in CodePipeline.

  • configuration (Hash, nil) (defaults to: nil)

    The action configuration fields for the rule.

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

    The input artifacts fields for the rule, such as specifying an input file for the rule.

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

    The name of the rule that is created for the condition.

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

    The rule provider that implements the rule's functionality.

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

    The AWS Region for the condition associated with the rule.

  • role (AWSCDK::IAM::Role, nil) (defaults to: nil)

    The IAM role that the rule will use to execute its actions.

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

    The version of the rule to use.



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

def initialize(commands: nil, configuration: nil, input_artifacts: nil, name: nil, provider: nil, region: nil, role: nil, version: nil)
  @commands = commands
  Jsii::Type.check_type(@commands, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "commands") unless @commands.nil?
  @configuration = configuration
  Jsii::Type.check_type(@configuration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJqc29uIn0=")), "configuration") unless @configuration.nil?
  @input_artifacts = input_artifacts
  Jsii::Type.check_type(@input_artifacts, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "inputArtifacts") unless @input_artifacts.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @provider = provider
  Jsii::Type.check_type(@provider, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "provider") unless @provider.nil?
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlJvbGUifQ==")), "role") unless @role.nil?
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil?
end

Instance Attribute Details

#commandsArray<String>? (readonly)

Note:

Default: - No commands

The shell commands to run with your commands rule in CodePipeline.

All commands are supported except multi-line formats. While CodeBuild logs and permissions are used, you do not need to create any resources in CodeBuild.

Returns:

  • (Array<String>, nil)


41
42
43
# File 'codepipeline/rule_props.rb', line 41

def commands
  @commands
end

#configurationHash? (readonly)

Note:

Default: - No configuration

The action configuration fields for the rule.

This can include custom parameters specific to the rule type.

Returns:

  • (Hash, nil)


48
49
50
# File 'codepipeline/rule_props.rb', line 48

def configuration
  @configuration
end

#input_artifactsArray<String>? (readonly)

Note:

Default: - No input artifacts

The input artifacts fields for the rule, such as specifying an input file for the rule.

Each string in the array represents an artifact name that this rule will use as input.

Returns:

  • (Array<String>, nil)


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

def input_artifacts
  @input_artifacts
end

#nameString? (readonly)

Note:

Default: - A unique name will be generated

The name of the rule that is created for the condition.

Must be unique within the pipeline.

Examples:

"VariableCheck"

Returns:

  • (String, nil)


64
65
66
# File 'codepipeline/rule_props.rb', line 64

def name
  @name
end

#providerString? (readonly)

Note:

Default: - No provider, must be specified if rule is used

The rule provider that implements the rule's functionality.

Examples:

"DeploymentWindow"

Returns:

  • (String, nil)

See Also:



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

def provider
  @provider
end

#regionString? (readonly)

Note:

Default: - Pipeline's region

The AWS Region for the condition associated with the rule.

If not specified, uses the pipeline's region.

Returns:

  • (String, nil)


79
80
81
# File 'codepipeline/rule_props.rb', line 79

def region
  @region
end

#roleAWSCDK::IAM::Role? (readonly)

Note:

Default: - A new role will be created

The IAM role that the rule will use to execute its actions.

The role must have sufficient permissions to perform the rule's tasks.

Returns:



86
87
88
# File 'codepipeline/rule_props.rb', line 86

def role
  @role
end

#versionString? (readonly)

Note:

Default: '1'

The version of the rule to use.

Different versions may have different features or behaviors.

Returns:

  • (String, nil)


93
94
95
# File 'codepipeline/rule_props.rb', line 93

def version
  @version
end

Class Method Details

.jsii_propertiesObject



95
96
97
98
99
100
101
102
103
104
105
106
# File 'codepipeline/rule_props.rb', line 95

def self.jsii_properties
  {
    :commands => "commands",
    :configuration => "configuration",
    :input_artifacts => "inputArtifacts",
    :name => "name",
    :provider => "provider",
    :region => "region",
    :role => "role",
    :version => "version",
  }
end

Instance Method Details

#to_jsiiObject



108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'codepipeline/rule_props.rb', line 108

def to_jsii
  result = {}
  result.merge!({
    "commands" => @commands,
    "configuration" => @configuration,
    "inputArtifacts" => @input_artifacts,
    "name" => @name,
    "provider" => @provider,
    "region" => @region,
    "role" => @role,
    "version" => @version,
  })
  result.compact
end