Class: AWSCDK::CodePipelineActions::CloudFormationExecuteChangeSetActionProps

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

Overview

Properties for the CloudFormationExecuteChangeSetAction.

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, change_set_name:, stack_name:, account: nil, output: nil, output_file_name: nil, region: nil) ⇒ CloudFormationExecuteChangeSetActionProps

Returns a new instance of CloudFormationExecuteChangeSetActionProps.

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.

  • change_set_name (String)

    Name of the change set to execute.

  • stack_name (String)

    The name of the stack to apply this action to.

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

    The AWS account this Action is supposed to operate in.

  • output (AWSCDK::Codepipeline::Artifact, nil) (defaults to: nil)

    The name of the output artifact to generate.

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

    A name for the filename in the output artifact to store the AWS CloudFormation call's result.

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

    The AWS region the given Action resides in.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 17

def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, change_set_name:, stack_name:, account: nil, output: nil, output_file_name: nil, region: 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?
  @change_set_name = change_set_name
  Jsii::Type.check_type(@change_set_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "changeSetName")
  @stack_name = stack_name
  Jsii::Type.check_type(@stack_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackName")
  @account = 
  Jsii::Type.check_type(@account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "account") unless @account.nil?
  @output = output
  Jsii::Type.check_type(@output, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFydGlmYWN0In0=")), "output") unless @output.nil?
  @output_file_name = output_file_name
  Jsii::Type.check_type(@output_file_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputFileName") unless @output_file_name.nil?
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil?
end

Instance Attribute Details

#accountString? (readonly)

Note:

Default: - action resides in the same account as the pipeline

The AWS account this Action is supposed to operate in.

Note: if you specify the role property, this is ignored - the action will operate in the same region the passed role does.

Returns:

  • (String, nil)


85
86
87
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 85

def 
  @account
end

#action_nameString (readonly)

The physical, human-readable name of the Action.

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

Returns:

  • (String)


45
46
47
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 45

def action_name
  @action_name
end

#change_set_nameString (readonly)

Name of the change set to execute.

Returns:

  • (String)


73
74
75
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 73

def change_set_name
  @change_set_name
end

#outputAWSCDK::Codepipeline::Artifact? (readonly)

Note:

Default: Automatically generated artifact name.

The name of the output artifact to generate.

Only applied if output_file_name is set as well.



92
93
94
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 92

def output
  @output
end

#output_file_nameString? (readonly)

Note:

Default: No output artifact generated

A name for the filename in the output artifact to store the AWS CloudFormation call's result.

The file will contain the result of the call to AWS CloudFormation (for example the call to UpdateStack or CreateChangeSet).

AWS CodePipeline adds the file to the output artifact after performing the specified action.

Returns:

  • (String, nil)


103
104
105
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 103

def output_file_name
  @output_file_name
end

#regionString? (readonly)

Note:

Default: the Action resides in the same region as the Pipeline

The AWS region the given Action resides in.

Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the PipelineProps#crossRegionReplicationBuckets property. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to cdk deploy before deploying the main, Pipeline-containing Stack.

Returns:

  • (String, nil)


113
114
115
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 113

def region
  @region
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:



69
70
71
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 69

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.



53
54
55
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 53

def run_order
  @run_order
end

#stack_nameString (readonly)

The name of the stack to apply this action to.

Returns:

  • (String)


77
78
79
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 77

def stack_name
  @stack_name
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)


58
59
60
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 58

def variables_namespace
  @variables_namespace
end

Class Method Details

.jsii_propertiesObject



115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 115

def self.jsii_properties
  {
    :action_name => "actionName",
    :run_order => "runOrder",
    :variables_namespace => "variablesNamespace",
    :role => "role",
    :change_set_name => "changeSetName",
    :stack_name => "stackName",
    :account => "account",
    :output => "output",
    :output_file_name => "outputFileName",
    :region => "region",
  }
end

Instance Method Details

#to_jsiiObject



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'code_pipeline_actions/cloud_formation_execute_change_set_action_props.rb', line 130

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "actionName" => @action_name,
    "runOrder" => @run_order,
    "variablesNamespace" => @variables_namespace,
    "role" => @role,
    "changeSetName" => @change_set_name,
    "stackName" => @stack_name,
    "account" => @account,
    "output" => @output,
    "outputFileName" => @output_file_name,
    "region" => @region,
  })
  result.compact
end