interface LambdaInvokeActionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodePipeline.Actions.LambdaInvokeActionProps |
Java | software.amazon.awscdk.services.codepipeline.actions.LambdaInvokeActionProps |
Python | aws_cdk.aws_codepipeline_actions.LambdaInvokeActionProps |
TypeScript (source) | @aws-cdk/aws-codepipeline-actions » LambdaInvokeActionProps |
Construction properties of the {@link LambdaInvokeAction Lambda invoke CodePipeline Action}.
Example
declare const fn: lambda.Function;
const sourceOutput = new codepipeline.Artifact();
const buildOutput = new codepipeline.Artifact();
const lambdaAction = new codepipeline_actions.LambdaInvokeAction({
actionName: 'Lambda',
inputs: [
sourceOutput,
buildOutput,
],
outputs: [
new codepipeline.Artifact('Out1'),
new codepipeline.Artifact('Out2'),
],
lambda: fn,
});
Properties
Name | Type | Description |
---|---|---|
action | string | The physical, human-readable name of the Action. |
lambda | IFunction | The lambda function to invoke. |
inputs? | Artifact [] | The optional input Artifacts of the Action. |
outputs? | Artifact [] | The optional names of the output Artifacts of the Action. |
role? | IRole | The Role in which context's this Action will be executing in. |
run | number | The runOrder property for this Action. |
user | { [string]: any } | A set of key-value pairs that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with. |
user | string | The string representation of the user parameters that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with. |
variables | string | The name of the namespace to use for variables emitted by this action. |
actionName
Type:
string
The physical, human-readable name of the Action.
Note that Action names must be unique within a single Stage.
lambda
Type:
IFunction
The lambda function to invoke.
inputs?
Type:
Artifact
[]
(optional, default: the Action will not have any inputs)
The optional input Artifacts of the Action.
A Lambda Action can have up to 5 inputs.
The inputs will appear in the event passed to the Lambda,
under the 'CodePipeline.job'.data.inputArtifacts
path.
outputs?
Type:
Artifact
[]
(optional, default: the Action will not have any outputs)
The optional names of the output Artifacts of the Action.
A Lambda Action can have up to 5 outputs.
The outputs will appear in the event passed to the Lambda,
under the 'CodePipeline.job'.data.outputArtifacts
path.
It is the responsibility of the Lambda to upload ZIP files with the Artifact contents to the provided locations.
role?
Type:
IRole
(optional, default: a new Role will be generated)
The Role in which context's this Action will be executing in.
The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your {@link IAction.bind} method in the {@link ActionBindOptions.role} property.
runOrder?
Type:
number
(optional, default: 1)
The runOrder property for this Action.
RunOrder determines the relative order in which multiple Actions in the same Stage execute.
See also: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
userParameters?
Type:
{ [string]: any }
(optional, default: no user parameters will be passed)
A set of key-value pairs that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.
Only one of userParameters
or userParametersString
can be specified.
userParametersString?
Type:
string
(optional, default: no user parameters will be passed)
The string representation of the user parameters that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.
Only one of userParametersString
or userParameters
can be specified.
variablesNamespace?
Type:
string
(optional, default: a name will be generated, based on the stage and action names,
if any of the action's variables were referenced - otherwise,
no namespace will be set)
The name of the namespace to use for variables emitted by this action.