Interface CommandsActionProps
- All Superinterfaces:
CommonActionProps,CommonAwsActionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CommandsActionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:35.145Z")
@Stability(Stable)
public interface CommandsActionProps
extends software.amazon.jsii.JsiiSerializable, CommonAwsActionProps
Construction properties of the
CommandsAction.
Example:
Artifact sourceArtifact;
Artifact outputArtifact;
CommandsAction commandsAction = CommandsAction.Builder.create()
.actionName("Commands")
.commands(List.of("export MY_OUTPUT=my-key"))
.input(sourceArtifact)
.output(outputArtifact)
.outputVariables(List.of("MY_OUTPUT", "CODEBUILD_BUILD_ID"))
.build();
// Deploy action
S3DeployAction deployAction = S3DeployAction.Builder.create()
.actionName("DeployAction")
.extract(true)
.input(outputArtifact)
.bucket(new Bucket(this, "DeployBucket"))
.objectKey(commandsAction.variable("MY_OUTPUT"))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCommandsActionPropsstatic final classAn implementation forCommandsActionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandsActionProps.Builderbuilder()Shell commands for the Commands action to run.The list of additional input artifacts for this action.getInput()The source to use as input for this action.default ArtifactThe output artifact for this action.The names of the variables in your environment that you want to export.Methods inherited from interface software.amazon.awscdk.services.codepipeline.CommonActionProps
getActionName, getRunOrder, getVariablesNamespaceMethods inherited from interface software.amazon.awscdk.services.codepipeline.CommonAwsActionProps
getRoleMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCommands
Shell commands for the Commands action to run.All formats are supported except multi-line formats.
The length of the commands array must be between 1 and 50.
-
getInput
The source to use as input for this action. -
getExtraInputs
The list of additional input artifacts for this action.Default: - no extra inputs
-
getOutput
The output artifact for this action.You can filter files that you want to export as the output artifact for the action.
Default: - no output artifact
Example:
new Artifact("CommandsArtifact", List.of("my-dir/**")); -
getOutputVariables
The names of the variables in your environment that you want to export.These variables can be referenced in other actions by using the
variablemethod of this class.Default: - No output variables are exported
- See Also:
-
builder
- Returns:
- a
CommandsActionProps.BuilderofCommandsActionProps
-