From 50ae05611aedc07445371d943a7a71b1a29e24fd Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Fri, 27 Jul 2018 15:35:22 -0700 Subject: [PATCH] [BREAKING] Rename Lambda's PipelineInvokeAction to just InvokeAction. --- packages/@aws-cdk/aws-lambda-codepipeline/README.md | 2 +- .../aws-lambda-codepipeline/lib/pipeline-action.ts | 10 +++++----- .../aws-lambda-codepipeline/test/integ.pipeline.ts | 2 +- .../test/test.pipeline-action.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-codepipeline/README.md b/packages/@aws-cdk/aws-lambda-codepipeline/README.md index 1a16b93ca42a0..9dfe3da99aaa6 100644 --- a/packages/@aws-cdk/aws-lambda-codepipeline/README.md +++ b/packages/@aws-cdk/aws-lambda-codepipeline/README.md @@ -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, }); ``` diff --git a/packages/@aws-cdk/aws-lambda-codepipeline/lib/pipeline-action.ts b/packages/@aws-cdk/aws-lambda-codepipeline/lib/pipeline-action.ts index f9959bb3b40bf..13e7fdc7b0d4a 100644 --- a/packages/@aws-cdk/aws-lambda-codepipeline/lib/pipeline-action.ts +++ b/packages/@aws-cdk/aws-lambda-codepipeline/lib/pipeline-action.ts @@ -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. */ @@ -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', @@ -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; } diff --git a/packages/@aws-cdk/aws-lambda-codepipeline/test/integ.pipeline.ts b/packages/@aws-cdk/aws-lambda-codepipeline/test/integ.pipeline.ts index fd132d3b1dfe1..a8a26eea770c4 100644 --- a/packages/@aws-cdk/aws-lambda-codepipeline/test/integ.pipeline.ts +++ b/packages/@aws-cdk/aws-lambda-codepipeline/test/integ.pipeline.ts @@ -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, }); diff --git a/packages/@aws-cdk/aws-lambda-codepipeline/test/test.pipeline-action.ts b/packages/@aws-cdk/aws-lambda-codepipeline/test/test.pipeline-action.ts index e2c5ed26a3e2a..eaa3f37932157 100644 --- a/packages/@aws-cdk/aws-lambda-codepipeline/test/test.pipeline-action.ts +++ b/packages/@aws-cdk/aws-lambda-codepipeline/test/test.pipeline-action.ts @@ -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', { @@ -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' });