Class: AWSCDK::Codepipeline::Pipeline
- Inherits:
-
Resource
- Object
- Resource
- AWSCDK::Codepipeline::Pipeline
- Includes:
- IPipeline
- Defined in:
- codepipeline/pipeline.rb
Overview
An AWS CodePipeline pipeline with its associated IAM role and S3 bucket.
Class Method Summary collapse
-
.from_pipeline_arn(scope, id, pipeline_arn) ⇒ AWSCDK::Codepipeline::IPipeline
Import a pipeline into this app.
- .jsii_overridable_methods ⇒ Object
-
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
Instance Method Summary collapse
-
#add_stage(props) ⇒ AWSCDK::Codepipeline::IStage
Creates a new Stage, and adds it to this Pipeline.
-
#add_to_role_policy(statement) ⇒ void
Adds a statement to the pipeline role.
-
#add_trigger(props) ⇒ AWSCDK::Codepipeline::Trigger
Adds a new Trigger to this Pipeline.
-
#add_variable(variable) ⇒ AWSCDK::Codepipeline::Variable
Adds a new Variable to this Pipeline.
-
#apply_cross_stack_reference_strength(strength) ⇒ void
Override the cross-stack reference strength for this resource.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#artifact_bucket ⇒ AWSCDK::S3::IBucket
Bucket used to store output artifacts.
-
#bind_as_notification_rule_source(_scope) ⇒ AWSCDK::CodeStarNotifications::NotificationRuleSourceConfig
Returns a source configuration for notification rule.
-
#cross_region_support ⇒ Hash{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. -
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
- #generate_physical_name ⇒ String
-
#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). -
#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). -
#initialize(scope, id, props = nil) ⇒ Pipeline
constructor
A new instance of Pipeline.
-
#node ⇒ Constructs::Node
The tree node.
-
#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
onEventAPI. -
#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.
-
#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.
-
#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.
-
#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.
-
#on_event(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines an event rule triggered by this CodePipeline.
-
#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.
-
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
-
#pipeline_arn ⇒ String
ARN of this pipeline.
-
#pipeline_name ⇒ String
The name of the pipeline.
-
#pipeline_ref ⇒ AWSCDK::Interfaces::AWSCodepipeline::PipelineReference
A reference to a Pipeline resource.
-
#pipeline_version ⇒ String
The version of the pipeline.
-
#role ⇒ AWSCDK::IAM::IRole
The IAM role AWS CodePipeline will use to perform actions or assume roles for actions with a more specific IAM role.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#stage(stage_name) ⇒ AWSCDK::Codepipeline::IStage
Access one of the pipeline's stages by stage name.
-
#stage_count ⇒ Numeric
Get the number of Stages in this Pipeline.
-
#stages ⇒ Array<AWSCDK::Codepipeline::IStage>
Returns the stages that comprise the pipeline.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props = nil) ⇒ Pipeline
Returns a new instance of Pipeline.
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.
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_methods ⇒ Object
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_ID ⇒ String
Uniquely identifies this class.
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.
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.
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.
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.
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.
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).
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_bucket ⇒ AWSCDK::S3::IBucket
Bucket used to store output artifacts.
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.
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_support ⇒ Hash{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.
150 151 152 |
# File 'codepipeline/pipeline.rb', line 150 def cross_region_support() jsii_get_property("crossRegionSupport") end |
#env ⇒ AWSCDK::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_name ⇒ 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.
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.
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 |
#node ⇒ Constructs::Node
The tree 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, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::Codepipeline::PipelineNotifyOnOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLlBpcGVsaW5lTm90aWZ5T25PcHRpb25zIn0=")), "options") jsii_call_method("notifyOn", [id, target, ]) 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, = 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") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnAnyActionStateChange", [id, target, ]) 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, = 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") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnAnyManualApprovalStateChange", [id, target, ]) 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, = 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") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnAnyStageStateChange", [id, target, ]) 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, = 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") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnExecutionStateChange", [id, target, ]) end |
#on_event(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines an event rule triggered by this CodePipeline.
424 425 426 427 428 429 |
# File 'codepipeline/pipeline.rb', line 424 def on_event(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onEvent", [id, ]) 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.
436 437 438 439 440 441 |
# File 'codepipeline/pipeline.rb', line 436 def on_state_change(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onStateChange", [id, ]) end |
#physical_name ⇒ String
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.
122 123 124 |
# File 'codepipeline/pipeline.rb', line 122 def physical_name() jsii_get_property("physicalName") end |
#pipeline_arn ⇒ String
ARN of this pipeline.
157 158 159 |
# File 'codepipeline/pipeline.rb', line 157 def pipeline_arn() jsii_get_property("pipelineArn") end |
#pipeline_name ⇒ String
The name of the pipeline.
164 165 166 |
# File 'codepipeline/pipeline.rb', line 164 def pipeline_name() jsii_get_property("pipelineName") end |
#pipeline_ref ⇒ AWSCDK::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_version ⇒ String
The version of the pipeline.
178 179 180 |
# File 'codepipeline/pipeline.rb', line 178 def pipeline_version() jsii_get_property("pipelineVersion") end |
#role ⇒ AWSCDK::IAM::IRole
The IAM role AWS CodePipeline will use to perform actions or assume roles for actions with a more specific IAM role.
185 186 187 |
# File 'codepipeline/pipeline.rb', line 185 def role() jsii_get_property("role") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
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.
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_count ⇒ Numeric
Get the number of Stages in this Pipeline.
192 193 194 |
# File 'codepipeline/pipeline.rb', line 192 def stage_count() jsii_get_property("stageCount") end |
#stages ⇒ Array<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.
204 205 206 |
# File 'codepipeline/pipeline.rb', line 204 def stages() jsii_get_property("stages") end |
#to_string ⇒ String
Returns a string representation of this construct.
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.
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 |