Skip to content

Commit

Permalink
[BREAKING] Rename Lambda's PipelineInvokeAction to just InvokeAction.
Browse files Browse the repository at this point in the history
  • Loading branch information
skinny85 committed Aug 2, 2018
1 parent 93fabc4 commit 50ae056
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-codepipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const lambdaFun = new lambda.Lambda(// ...

const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const lambdaStage = new codepipeline.Stage(pipeline, 'Lambda');
new lambdaCodepipeline.PipelineInvokeAction(lambdaStage, 'Lambda', {
new lambdaCodepipeline.InvokeAction(lambdaStage, 'Lambda', {
lambda: lambdaFun,
});
```
Expand Down
10 changes: 5 additions & 5 deletions packages/@aws-cdk/aws-lambda-codepipeline/lib/pipeline-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import lambda = require('@aws-cdk/aws-lambda');
import cdk = require('@aws-cdk/cdk');

/**
* Construction properties of the {@link PipelineInvokeAction Lambda invoke CodePipeline Action}.
* Construction properties of the {@link InvokeAction Lambda invoke CodePipeline Action}.
*/
export interface PipelineInvokeActionProps {
export interface InvokeActionProps {
/**
* The lambda function to invoke.
*/
Expand Down Expand Up @@ -44,8 +44,8 @@ export interface PipelineInvokeActionProps {
*
* @see https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html
*/
export class PipelineInvokeAction extends codepipeline.Action {
constructor(parent: codepipeline.Stage, name: string, props: PipelineInvokeActionProps) {
export class InvokeAction extends codepipeline.Action {
constructor(parent: codepipeline.Stage, name: string, props: InvokeActionProps) {
super(parent, name, {
category: codepipeline.ActionCategory.Invoke,
provider: 'Lambda',
Expand Down Expand Up @@ -80,7 +80,7 @@ export class PipelineInvokeAction extends codepipeline.Action {
* Add an input artifact
* @param artifact
*/
public addInputArtifact(artifact: codepipeline.Artifact): PipelineInvokeAction {
public addInputArtifact(artifact: codepipeline.Artifact): InvokeAction {
super.addInputArtifact(artifact);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const lambdaFun = new lambda.Lambda(stack, 'LambdaFun', {
runtime: lambda.LambdaRuntime.NodeJS610,
});
const lambdaStage = new codepipeline.Stage(pipeline, 'Lambda');
new lambda_codepipeline.PipelineInvokeAction(lambdaStage, 'Lambda', {
new lambda_codepipeline.InvokeAction(lambdaStage, 'Lambda', {
lambda: lambdaFun,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import codepipeline = require('@aws-cdk/aws-codepipeline');
import lambda = require('@aws-cdk/aws-lambda');
import cdk = require('@aws-cdk/cdk');
import { Test } from 'nodeunit';
import { PipelineInvokeAction } from '../lib/pipeline-action';
import { InvokeAction } from '../lib/pipeline-action';

// tslint:disable:object-literal-key-quotes

export = {
'PipelineInvokeAction can be used to invoke lambda functions from a CodePipeline'(test: Test) {
'Pipeline InvokeAction can be used to invoke a Lambda function from a CodePipeline'(test: Test) {
const stack = new cdk.Stack();

const lambdaFun = new lambda.Lambda(stack, 'Function', {
Expand All @@ -19,7 +19,7 @@ export = {

const pipeline = new codepipeline.Pipeline(stack, 'Pipeline');

new PipelineInvokeAction(new codepipeline.Stage(pipeline, 'Stage'), 'InvokeAction', {
new InvokeAction(new codepipeline.Stage(pipeline, 'Stage'), 'InvokeAction', {
lambda: lambdaFun,
userParameters: 'foo-bar/42'
});
Expand Down

0 comments on commit 50ae056

Please sign in to comment.