Class: AWSCDK::Codepipeline::Pipeline

Inherits:
Resource
  • Object
show all
Includes:
IPipeline
Defined in:
codepipeline/pipeline.rb

Overview

An AWS CodePipeline pipeline with its associated IAM role and S3 bucket.

Examples:

# create a pipeline
require 'aws-cdk-lib'

# add a source action to the stage
repo = nil # AWSCDK::Codecommit::Repository
source_artifact = nil # AWSCDK::Codepipeline::Artifact

pipeline = AWSCDK::Codepipeline::Pipeline.new(self, "Pipeline")

# add a stage
source_stage = pipeline.add_stage({stage_name: "Source"})
source_stage.add_action(AWSCDK::CodePipelineActions::CodeCommitSourceAction.new({
    action_name: "Source",
    output: source_artifact,
    repository: repo,
}))

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props = nil) ⇒ Pipeline

Returns a new instance of Pipeline.

Parameters:



31
32
33
34
35
36
37
# File 'codepipeline/pipeline.rb', line 31

def initialize(scope, id, props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::Codepipeline::PipelineProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlBpcGVsaW5lUHJvcHMifQ==")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.from_pipeline_arn(scope, id, pipeline_arn) ⇒ AWSCDK::Codepipeline::IPipeline

Import a pipeline into this app.

Parameters:

  • scope (Constructs::Construct)

    the scope into which to import this pipeline.

  • id (String)

    the logical ID of the returned pipeline construct.

  • pipeline_arn (String)

    The ARN of the pipeline (e.g. arn:aws:codepipeline:us-east-1:123456789012:MyDemoPipeline).

Returns:



83
84
85
86
87
88
# File 'codepipeline/pipeline.rb', line 83

def self.from_pipeline_arn(scope, id, pipeline_arn)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(pipeline_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pipelineArn")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline.Pipeline", "fromPipelineArn", [scope, id, pipeline_arn])
end

.jsii_overridable_methodsObject



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'codepipeline/pipeline.rb', line 39

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :physical_name => { kind: :property, name: "physicalName", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :artifact_bucket => { kind: :property, name: "artifactBucket", is_optional: false },
    :cross_region_support => { kind: :property, name: "crossRegionSupport", is_optional: false },
    :pipeline_arn => { kind: :property, name: "pipelineArn", is_optional: false },
    :pipeline_name => { kind: :property, name: "pipelineName", is_optional: false },
    :pipeline_ref => { kind: :property, name: "pipelineRef", is_optional: false },
    :pipeline_version => { kind: :property, name: "pipelineVersion", is_optional: false },
    :role => { kind: :property, name: "role", is_optional: false },
    :stage_count => { kind: :property, name: "stageCount", is_optional: false },
    :stages => { kind: :property, name: "stages", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false },
    :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false },
    :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false },
    :add_stage => { kind: :method, name: "addStage", is_optional: false },
    :add_to_role_policy => { kind: :method, name: "addToRolePolicy", is_optional: false },
    :add_trigger => { kind: :method, name: "addTrigger", is_optional: false },
    :add_variable => { kind: :method, name: "addVariable", is_optional: false },
    :bind_as_notification_rule_source => { kind: :method, name: "bindAsNotificationRuleSource", is_optional: false },
    :notify_on => { kind: :method, name: "notifyOn", is_optional: false },
    :notify_on_any_action_state_change => { kind: :method, name: "notifyOnAnyActionStateChange", is_optional: false },
    :notify_on_any_manual_approval_state_change => { kind: :method, name: "notifyOnAnyManualApprovalStateChange", is_optional: false },
    :notify_on_any_stage_state_change => { kind: :method, name: "notifyOnAnyStageStateChange", is_optional: false },
    :notify_on_execution_state_change => { kind: :method, name: "notifyOnExecutionStateChange", is_optional: false },
    :on_event => { kind: :method, name: "onEvent", is_optional: false },
    :on_state_change => { kind: :method, name: "onStateChange", is_optional: false },
    :stage => { kind: :method, name: "stage", is_optional: false },
  }
end

.PROPERTY_INJECTION_IDString

Uniquely identifies this class.

Returns:

  • (String)


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

def self.PROPERTY_INJECTION_ID()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_codepipeline.Pipeline", "PROPERTY_INJECTION_ID")
end

Instance Method Details

#add_stage(props) ⇒ AWSCDK::Codepipeline::IStage

Creates a new Stage, and adds it to this Pipeline.

Parameters:

Returns:



302
303
304
305
306
# File 'codepipeline/pipeline.rb', line 302

def add_stage(props)
  props = props.is_a?(Hash) ? ::AWSCDK::Codepipeline::StageOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlN0YWdlT3B0aW9ucyJ9")), "props")
  jsii_call_method("addStage", [props])
end

#add_to_role_policy(statement) ⇒ void

This method returns an undefined value.

Adds a statement to the pipeline role.

Parameters:



312
313
314
315
# File 'codepipeline/pipeline.rb', line 312

def add_to_role_policy(statement)
  Jsii::Type.check_type(statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "statement")
  jsii_call_method("addToRolePolicy", [statement])
end

#add_trigger(props) ⇒ AWSCDK::Codepipeline::Trigger

Adds a new Trigger to this Pipeline.

Parameters:

Returns:



321
322
323
324
325
# File 'codepipeline/pipeline.rb', line 321

def add_trigger(props)
  props = props.is_a?(Hash) ? ::AWSCDK::Codepipeline::TriggerProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlRyaWdnZXJQcm9wcyJ9")), "props")
  jsii_call_method("addTrigger", [props])
end

#add_variable(variable) ⇒ AWSCDK::Codepipeline::Variable

Adds a new Variable to this Pipeline.

Parameters:

Returns:



331
332
333
334
# File 'codepipeline/pipeline.rb', line 331

def add_variable(variable)
  Jsii::Type.check_type(variable, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlZhcmlhYmxlIn0=")), "variable")
  jsii_call_method("addVariable", [variable])
end

#apply_cross_stack_reference_strength(strength) ⇒ void

This method returns an undefined value.

Override the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters:



241
242
243
244
# File 'codepipeline/pipeline.rb', line 241

def apply_cross_stack_reference_strength(strength)
  Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength")
  jsii_call_method("applyCrossStackReferenceStrength", [strength])
end

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



258
259
260
261
# File 'codepipeline/pipeline.rb', line 258

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#artifact_bucketAWSCDK::S3::IBucket

Bucket used to store output artifacts.

Returns:



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

def artifact_bucket()
  jsii_get_property("artifactBucket")
end

#bind_as_notification_rule_source(_scope) ⇒ AWSCDK::CodeStarNotifications::NotificationRuleSourceConfig

Returns a source configuration for notification rule.

Parameters:

  • _scope (Constructs::Construct)

Returns:



340
341
342
343
# File 'codepipeline/pipeline.rb', line 340

def bind_as_notification_rule_source(_scope)
  Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope")
  jsii_call_method("bindAsNotificationRuleSource", [_scope])
end

#cross_region_supportHash{String => AWSCDK::Codepipeline::CrossRegionSupport}

Returns all of the CrossRegionSupportStacks that were generated automatically when dealing with Actions that reside in a different region than the Pipeline itself.

Returns:



150
151
152
# File 'codepipeline/pipeline.rb', line 150

def cross_region_support()
  jsii_get_property("crossRegionSupport")
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



108
109
110
# File 'codepipeline/pipeline.rb', line 108

def env()
  jsii_get_property("env")
end

#generate_physical_nameString

Returns:

  • (String)


264
265
266
# File 'codepipeline/pipeline.rb', line 264

def generate_physical_name()
  jsii_call_method("generatePhysicalName", [])
end

#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String

Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn).

Normally, this token will resolve to arn_attr, but if the resource is referenced across environments, arn_components will be used to synthesize a concrete ARN with the resource's physical name. Make sure to reference this.physicalName in arn_components.

Parameters:

  • arn_attr (String)

    The CFN attribute which resolves to the ARN of the resource.

  • arn_components (AWSCDK::ARNComponents)

    The format of the ARN of this resource.

Returns:

  • (String)


278
279
280
281
282
283
# File 'codepipeline/pipeline.rb', line 278

def get_resource_arn_attribute(arn_attr, arn_components)
  Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr")
  arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components
  Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents")
  jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components])
end

#get_resource_name_attribute(name_attr) ⇒ String

Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName).

Normally, this token will resolve to name_attr, but if the resource is referenced across environments, it will be resolved to this.physicalName, which will be a concrete name.

Parameters:

  • name_attr (String)

    The CFN attribute which resolves to the resource's name.

Returns:

  • (String)


293
294
295
296
# File 'codepipeline/pipeline.rb', line 293

def get_resource_name_attribute(name_attr)
  Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr")
  jsii_call_method("getResourceNameAttribute", [name_attr])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


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

def node()
  jsii_get_property("node")
end

#notify_on(id, target, options) ⇒ AWSCDK::CodeStarNotifications::INotificationRule

Defines a CodeStar notification rule triggered when the pipeline events emitted by you specified, it very similar to onEvent API.

You can also use the methods notify_on_execution_state_change, notify_on_any_stage_state_change, notify_on_any_action_state_change and notify_on_any_manual_approval_state_change to define rules for these specific event emitted.



355
356
357
358
359
360
361
# File 'codepipeline/pipeline.rb', line 355

def notify_on(id, target, options)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target")
  options = options.is_a?(Hash) ? ::AWSCDK::Codepipeline::PipelineNotifyOnOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlBpcGVsaW5lTm90aWZ5T25PcHRpb25zIn0=")), "options")
  jsii_call_method("notifyOn", [id, target, options])
end

#notify_on_any_action_state_change(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule

Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.



369
370
371
372
373
374
375
# File 'codepipeline/pipeline.rb', line 369

def notify_on_any_action_state_change(id, target, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target")
  options = options.is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless options.nil?
  jsii_call_method("notifyOnAnyActionStateChange", [id, target, options])
end

#notify_on_any_manual_approval_state_change(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule

Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.



383
384
385
386
387
388
389
# File 'codepipeline/pipeline.rb', line 383

def notify_on_any_manual_approval_state_change(id, target, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target")
  options = options.is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless options.nil?
  jsii_call_method("notifyOnAnyManualApprovalStateChange", [id, target, options])
end

#notify_on_any_stage_state_change(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule

Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.



397
398
399
400
401
402
403
# File 'codepipeline/pipeline.rb', line 397

def notify_on_any_stage_state_change(id, target, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target")
  options = options.is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless options.nil?
  jsii_call_method("notifyOnAnyStageStateChange", [id, target, options])
end

#notify_on_execution_state_change(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule

Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.



411
412
413
414
415
416
417
# File 'codepipeline/pipeline.rb', line 411

def notify_on_execution_state_change(id, target, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target")
  options = options.is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless options.nil?
  jsii_call_method("notifyOnExecutionStateChange", [id, target, options])
end

#on_event(id, options = nil) ⇒ AWSCDK::Events::Rule

Defines an event rule triggered by this CodePipeline.

Parameters:

  • id (String)

    Identifier for this event handler.

  • options (AWSCDK::Events::OnEventOptions, nil) (defaults to: nil)

    Additional options to pass to the event rule.

Returns:



424
425
426
427
428
429
# File 'codepipeline/pipeline.rb', line 424

def on_event(id, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  options = options.is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless options.nil?
  jsii_call_method("onEvent", [id, options])
end

#on_state_change(id, options = nil) ⇒ AWSCDK::Events::Rule

Defines an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.

Parameters:

  • id (String)

    Identifier for this event handler.

  • options (AWSCDK::Events::OnEventOptions, nil) (defaults to: nil)

    Additional options to pass to the event rule.

Returns:



436
437
438
439
440
441
# File 'codepipeline/pipeline.rb', line 436

def on_state_change(id, options = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  options = options.is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless options.nil?
  jsii_call_method("onStateChange", [id, options])
end

#physical_nameString

Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.

This value will resolve to one of the following:

  • a concrete value (e.g. "my-awesome-bucket")
  • undefined, when a name should be generated by CloudFormation
  • a concrete name generated automatically during synthesis, in cross-environment scenarios.

Returns:

  • (String)


122
123
124
# File 'codepipeline/pipeline.rb', line 122

def physical_name()
  jsii_get_property("physicalName")
end

#pipeline_arnString

ARN of this pipeline.

Returns:

  • (String)


157
158
159
# File 'codepipeline/pipeline.rb', line 157

def pipeline_arn()
  jsii_get_property("pipelineArn")
end

#pipeline_nameString

The name of the pipeline.

Returns:

  • (String)


164
165
166
# File 'codepipeline/pipeline.rb', line 164

def pipeline_name()
  jsii_get_property("pipelineName")
end

#pipeline_refAWSCDK::Interfaces::AWSCodepipeline::PipelineReference

A reference to a Pipeline resource.



171
172
173
# File 'codepipeline/pipeline.rb', line 171

def pipeline_ref()
  jsii_get_property("pipelineRef")
end

#pipeline_versionString

The version of the pipeline.

Returns:

  • (String)


178
179
180
# File 'codepipeline/pipeline.rb', line 178

def pipeline_version()
  jsii_get_property("pipelineVersion")
end

#roleAWSCDK::IAM::IRole

The IAM role AWS CodePipeline will use to perform actions or assume roles for actions with a more specific IAM role.

Returns:



185
186
187
# File 'codepipeline/pipeline.rb', line 185

def role()
  jsii_get_property("role")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



129
130
131
# File 'codepipeline/pipeline.rb', line 129

def stack()
  jsii_get_property("stack")
end

#stage(stage_name) ⇒ AWSCDK::Codepipeline::IStage

Access one of the pipeline's stages by stage name.

Parameters:

  • stage_name (String)

Returns:



447
448
449
450
# File 'codepipeline/pipeline.rb', line 447

def stage(stage_name)
  Jsii::Type.check_type(stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName")
  jsii_call_method("stage", [stage_name])
end

#stage_countNumeric

Get the number of Stages in this Pipeline.

Returns:

  • (Numeric)


192
193
194
# File 'codepipeline/pipeline.rb', line 192

def stage_count()
  jsii_get_property("stageCount")
end

#stagesArray<AWSCDK::Codepipeline::IStage>

Returns the stages that comprise the pipeline.

Note: the returned array is a defensive copy, so adding elements to it has no effect. Instead, use the add_stage method if you want to add more stages to the pipeline.

Returns:



204
205
206
# File 'codepipeline/pipeline.rb', line 204

def stages()
  jsii_get_property("stages")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


211
212
213
# File 'codepipeline/pipeline.rb', line 211

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

Returns:

  • (Constructs::IConstruct)


224
225
226
227
228
229
# File 'codepipeline/pipeline.rb', line 224

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end