Class: AWSCDK::Codepipeline::ActionProperties

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_name:, artifact_bounds:, category:, provider:, account: nil, commands: nil, inputs: nil, outputs: nil, output_variables: nil, owner: nil, region: nil, resource: nil, role: nil, run_order: nil, timeout: nil, variables_namespace: nil, version: nil) ⇒ ActionProperties

Returns a new instance of ActionProperties.

Parameters:

  • action_name (String)
  • artifact_bounds (AWSCDK::Codepipeline::ActionArtifactBounds)
  • category (AWSCDK::Codepipeline::ActionCategory)

    The category of the action.

  • provider (String)

    The service provider that the action calls.

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

    The account the Action is supposed to live in.

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

    Shell commands for the Commands action to run.

  • inputs (Array<AWSCDK::Codepipeline::Artifact>, nil) (defaults to: nil)
  • outputs (Array<AWSCDK::Codepipeline::Artifact>, nil) (defaults to: nil)
  • output_variables (Array<String>, nil) (defaults to: nil)

    The names of the variables in your environment that you want to export.

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

    The AWS region the given Action resides in.

  • resource (AWSCDK::IResource, nil) (defaults to: nil)

    The optional resource that is backing this Action.

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

    The order in which AWS CodePipeline runs this action. For more information, see the AWS CodePipeline User Guide.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    A timeout duration that can be applied against the ActionType’s default timeout value specified in Quotas for AWS CodePipeline.

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

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

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


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'codepipeline/action_properties.rb', line 23

def initialize(action_name:, artifact_bounds:, category:, provider:, account: nil, commands: nil, inputs: nil, outputs: nil, output_variables: nil, owner: nil, region: nil, resource: nil, role: nil, run_order: nil, timeout: nil, variables_namespace: nil, version: nil)
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName")
  @artifact_bounds = artifact_bounds.is_a?(Hash) ? ::AWSCDK::Codepipeline::ActionArtifactBounds.new(**artifact_bounds.transform_keys(&:to_sym)) : artifact_bounds
  Jsii::Type.check_type(@artifact_bounds, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFjdGlvbkFydGlmYWN0Qm91bmRzIn0=")), "artifactBounds")
  @category = category
  Jsii::Type.check_type(@category, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFjdGlvbkNhdGVnb3J5In0=")), "category")
  @provider = provider
  Jsii::Type.check_type(@provider, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "provider")
  @account = 
  Jsii::Type.check_type(@account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "account") unless @account.nil?
  @commands = commands
  Jsii::Type.check_type(@commands, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "commands") unless @commands.nil?
  @inputs = inputs
  Jsii::Type.check_type(@inputs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQXJ0aWZhY3QifSwia2luZCI6ImFycmF5In19")), "inputs") unless @inputs.nil?
  @outputs = outputs
  Jsii::Type.check_type(@outputs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQXJ0aWZhY3QifSwia2luZCI6ImFycmF5In19")), "outputs") unless @outputs.nil?
  @output_variables = output_variables
  Jsii::Type.check_type(@output_variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "outputVariables") unless @output_variables.nil?
  @owner = owner
  Jsii::Type.check_type(@owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "owner") unless @owner.nil?
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil?
  @resource = resource
  Jsii::Type.check_type(@resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb3VyY2UifQ==")), "resource") unless @resource.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @run_order = run_order
  Jsii::Type.check_type(@run_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "runOrder") unless @run_order.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
  @variables_namespace = variables_namespace
  Jsii::Type.check_type(@variables_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variablesNamespace") unless @variables_namespace.nil?
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil?
end

Instance Attribute Details

#accountString? (readonly)

The account the Action is supposed to live in.

For Actions backed by resources, this is inferred from the Stack resource is part of. However, some Actions, like the CloudFormation ones, are not backed by any resource, and they still might want to be cross-account. In general, a concrete Action class should specify either resource, or account - but not both.

Returns:

  • (String, nil)


85
86
87
# File 'codepipeline/action_properties.rb', line 85

def 
  @account
end

#action_nameString (readonly)

Returns:

  • (String)


61
62
63
# File 'codepipeline/action_properties.rb', line 61

def action_name
  @action_name
end

#artifact_boundsAWSCDK::Codepipeline::ActionArtifactBounds (readonly)



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

def artifact_bounds
  @artifact_bounds
end

#categoryAWSCDK::Codepipeline::ActionCategory (readonly)

The category of the action.

The category defines which action type the owner (the entity that performs the action) performs.



70
71
72
# File 'codepipeline/action_properties.rb', line 70

def category
  @category
end

#commandsArray<String>? (readonly)

Note:

Default: - no commands

Shell commands for the Commands action to run.

Returns:

  • (Array<String>, nil)


90
91
92
# File 'codepipeline/action_properties.rb', line 90

def commands
  @commands
end

#inputsArray<AWSCDK::Codepipeline::Artifact>? (readonly)

Returns:



92
93
94
# File 'codepipeline/action_properties.rb', line 92

def inputs
  @inputs
end

#output_variablesArray<String>? (readonly)

Note:

Default: - no output variables

The names of the variables in your environment that you want to export.

Returns:

  • (Array<String>, nil)


99
100
101
# File 'codepipeline/action_properties.rb', line 99

def output_variables
  @output_variables
end

#outputsArray<AWSCDK::Codepipeline::Artifact>? (readonly)

Returns:



94
95
96
# File 'codepipeline/action_properties.rb', line 94

def outputs
  @outputs
end

#ownerString? (readonly)

Returns:

  • (String, nil)


101
102
103
# File 'codepipeline/action_properties.rb', line 101

def owner
  @owner
end

#providerString (readonly)

The service provider that the action calls.

Returns:

  • (String)


74
75
76
# File 'codepipeline/action_properties.rb', line 74

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


111
112
113
# File 'codepipeline/action_properties.rb', line 111

def region
  @region
end

#resourceAWSCDK::IResource? (readonly)

The optional resource that is backing this Action.

This is used for automatically handling Actions backed by resources from a different account and/or region.

Returns:



118
119
120
# File 'codepipeline/action_properties.rb', line 118

def resource
  @resource
end

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

Returns:



120
121
122
# File 'codepipeline/action_properties.rb', line 120

def role
  @role
end

#run_orderNumeric? (readonly)

The order in which AWS CodePipeline runs this action. For more information, see the AWS CodePipeline User Guide.

https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements

Returns:

  • (Numeric, nil)


126
127
128
# File 'codepipeline/action_properties.rb', line 126

def run_order
  @run_order
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: - default timeout value defined by each ActionType

A timeout duration that can be applied against the ActionType’s default timeout value specified in Quotas for AWS CodePipeline.

This attribute is available only to the ManualApprovalAction.

It is configurable up to 86400 minutes (60 days) with a minimum value of 5 minutes.



136
137
138
# File 'codepipeline/action_properties.rb', line 136

def timeout
  @timeout
end

#variables_namespaceString? (readonly)

Note:

Default: - a name will be generated, based on the stage and action names

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

Returns:

  • (String, nil)


141
142
143
# File 'codepipeline/action_properties.rb', line 141

def variables_namespace
  @variables_namespace
end

#versionString? (readonly)

Returns:

  • (String, nil)


143
144
145
# File 'codepipeline/action_properties.rb', line 143

def version
  @version
end

Class Method Details

.jsii_propertiesObject



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'codepipeline/action_properties.rb', line 145

def self.jsii_properties
  {
    :action_name => "actionName",
    :artifact_bounds => "artifactBounds",
    :category => "category",
    :provider => "provider",
    :account => "account",
    :commands => "commands",
    :inputs => "inputs",
    :outputs => "outputs",
    :output_variables => "outputVariables",
    :owner => "owner",
    :region => "region",
    :resource => "resource",
    :role => "role",
    :run_order => "runOrder",
    :timeout => "timeout",
    :variables_namespace => "variablesNamespace",
    :version => "version",
  }
end

Instance Method Details

#to_jsiiObject



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'codepipeline/action_properties.rb', line 167

def to_jsii
  result = {}
  result.merge!({
    "actionName" => @action_name,
    "artifactBounds" => @artifact_bounds,
    "category" => @category,
    "provider" => @provider,
    "account" => @account,
    "commands" => @commands,
    "inputs" => @inputs,
    "outputs" => @outputs,
    "outputVariables" => @output_variables,
    "owner" => @owner,
    "region" => @region,
    "resource" => @resource,
    "role" => @role,
    "runOrder" => @run_order,
    "timeout" => @timeout,
    "variablesNamespace" => @variables_namespace,
    "version" => @version,
  })
  result.compact
end