Class: AWSCDK::CodePipelineActions::PipelineInvokeActionProps

Inherits:
AWSCDK::Codepipeline::CommonAWSActionProps
  • Object
show all
Defined in:
code_pipeline_actions/pipeline_invoke_action_props.rb

Overview

Construction properties of the PipelineInvokeAction.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, target_pipeline:, source_revisions: nil, variables: nil) ⇒ PipelineInvokeActionProps

Returns a new instance of PipelineInvokeActionProps.

Parameters:

  • action_name (String)

    The physical, human-readable name of the Action.

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

    The runOrder property for this Action.

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

    The name of the namespace to use for variables emitted by this action.

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

    The Role in which context's this Action will be executing in.

  • target_pipeline (AWSCDK::Interfaces::AWSCodepipeline::IPipelineRef)

    The pipeline that will, upon running, start the current target pipeline.

  • source_revisions (Array<AWSCDK::CodePipelineActions::SourceRevision>, nil) (defaults to: nil)

    The source revisions that you want the target pipeline to use when it is started by the invoking pipeline.

  • variables (Array<AWSCDK::CodePipelineActions::Variable>, nil) (defaults to: nil)

    The names and values of variables that you want the action to support.



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

def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, target_pipeline:, source_revisions: nil, variables: nil)
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName")
  @run_order = run_order
  Jsii::Type.check_type(@run_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "runOrder") unless @run_order.nil?
  @variables_namespace = variables_namespace
  Jsii::Type.check_type(@variables_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variablesNamespace") unless @variables_namespace.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @target_pipeline = target_pipeline
  Jsii::Type.check_type(@target_pipeline, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2RlcGlwZWxpbmUuSVBpcGVsaW5lUmVmIn0=")), "targetPipeline")
  @source_revisions = source_revisions.is_a?(Array) ? source_revisions.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CodePipelineActions::SourceRevision.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : source_revisions
  Jsii::Type.check_type(@source_revisions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmVfYWN0aW9ucy5Tb3VyY2VSZXZpc2lvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "sourceRevisions") unless @source_revisions.nil?
  @variables = variables.is_a?(Array) ? variables.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CodePipelineActions::Variable.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : variables
  Jsii::Type.check_type(@variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmVfYWN0aW9ucy5WYXJpYWJsZSJ9LCJraW5kIjoiYXJyYXkifX0=")), "variables") unless @variables.nil?
end

Instance Attribute Details

#action_nameString (readonly)

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

Returns:

  • (String)


36
37
38
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 36

def action_name
  @action_name
end

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

Note:

Default: a new Role will be generated

The Role in which context's this Action will be executing in.

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.

Returns:



60
61
62
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 60

def role
  @role
end

#run_orderNumeric? (readonly)

Note:

Default: 1

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.



44
45
46
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 44

def run_order
  @run_order
end

#source_revisionsArray<AWSCDK::CodePipelineActions::SourceRevision>? (readonly)

Note:

Default: - no specific revisions

The source revisions that you want the target pipeline to use when it is started by the invoking pipeline.



71
72
73
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 71

def source_revisions
  @source_revisions
end

#target_pipelineAWSCDK::Interfaces::AWSCodepipeline::IPipelineRef (readonly)

The pipeline that will, upon running, start the current target pipeline.

You must have already created the invoking pipeline.



66
67
68
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 66

def target_pipeline
  @target_pipeline
end

#variablesArray<AWSCDK::CodePipelineActions::Variable>? (readonly)

Note:

Default: - no specific variable

The names and values of variables that you want the action to support.

Returns:



76
77
78
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 76

def variables
  @variables
end

#variables_namespaceString? (readonly)

Note:

Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set

The name of the namespace to use for variables emitted by this action.

Returns:

  • (String, nil)


49
50
51
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 49

def variables_namespace
  @variables_namespace
end

Class Method Details

.jsii_propertiesObject



78
79
80
81
82
83
84
85
86
87
88
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 78

def self.jsii_properties
  {
    :action_name => "actionName",
    :run_order => "runOrder",
    :variables_namespace => "variablesNamespace",
    :role => "role",
    :target_pipeline => "targetPipeline",
    :source_revisions => "sourceRevisions",
    :variables => "variables",
  }
end

Instance Method Details

#to_jsiiObject



90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'code_pipeline_actions/pipeline_invoke_action_props.rb', line 90

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "actionName" => @action_name,
    "runOrder" => @run_order,
    "variablesNamespace" => @variables_namespace,
    "role" => @role,
    "targetPipeline" => @target_pipeline,
    "sourceRevisions" => @source_revisions,
    "variables" => @variables,
  })
  result.compact
end