Skip to content

Commit

Permalink
docs: added API documentation for AdditionalTrigger
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfadr committed Jun 13, 2022
1 parent 137e015 commit 3076164
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/mixins/AdditionalTrigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@ import { CodePipeline as CodePipelineTarget } from 'aws-cdk-lib/aws-events-targe
import { CodePipeline } from 'aws-cdk-lib/pipelines';
import { CodePipelineMixin } from './Mixin';

/**
* Convenience class to create additional trigger {CodePipelineMixin}s for
* executing a CodePipeline if certain events occur other than a code change.
*/
export abstract class AdditionalTrigger {

/**
* Create an additional trigger {CodePipelineMixin} for a SSM parameter value change.
* @param parameterNames
*/
public static ssmParameterChange(...parameterNames: string[]): CodePipelineMixin {
return new SsmParameterChangeTrigger(parameterNames);
}

/**
* Create an additional trigger {CodePipelineMixin} based on a schedule.
* @param schedule
*/
public static schedule(schedule: Schedule): CodePipelineMixin {
return new ScheduledTrigger(schedule);
}
Expand Down

0 comments on commit 3076164

Please sign in to comment.