class CodePipeline
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Events.Targets.CodePipeline |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awseventstargets#CodePipeline |
Java | software.amazon.awscdk.services.events.targets.CodePipeline |
Python | aws_cdk.aws_events_targets.CodePipeline |
TypeScript (source) | aws-cdk-lib » aws_events_targets » CodePipeline |
Implements
IRule
Allows the pipeline to be used as an EventBridge rule target.
Example
// A pipeline being used as a target for a CloudWatch event rule.
import * as targets from 'aws-cdk-lib/aws-events-targets';
import * as events from 'aws-cdk-lib/aws-events';
// kick off the pipeline every day
const rule = new events.Rule(this, 'Daily', {
schedule: events.Schedule.rate(Duration.days(1)),
});
declare const pipeline: codepipeline.Pipeline;
rule.addTarget(new targets.CodePipeline(pipeline));
Initializer
new CodePipeline(pipeline: IPipeline, options?: CodePipelineTargetOptions)
Parameters
- pipeline
IPipeline
- options
Code
Pipeline Target Options
Methods
Name | Description |
---|---|
bind(_rule, _id?) | Returns the rule target specification. |
bind(_rule, _id?)
public bind(_rule: IRule, _id?: string): RuleTargetConfig
Parameters
- _rule
IRule
- _id
string
Returns
Returns the rule target specification.
NOTE: Do not use the various inputXxx
options. They can be set in a call to addTarget
.