Interface Ec2DeployActionProps
- All Superinterfaces:
CommonActionProps,CommonAwsActionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
Ec2DeployActionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:17.166Z")
@Stability(Stable)
public interface Ec2DeployActionProps
extends software.amazon.jsii.JsiiSerializable, CommonAwsActionProps
Construction properties of
Ec2DeployAction.
Example:
Artifact sourceOutput = new Artifact();
Pipeline pipeline = Pipeline.Builder.create(this, "MyPipeline")
.pipelineType(PipelineType.V2)
.build();
Ec2DeployAction deployAction = Ec2DeployAction.Builder.create()
.actionName("Ec2Deploy")
.input(sourceOutput)
.instanceType(Ec2InstanceType.EC2)
.instanceTagKey("Name")
.instanceTagValue("MyInstance")
.deploySpecifications(Ec2DeploySpecifications.inline(Ec2DeploySpecificationsInlineProps.builder()
.targetDirectory("/home/ec2-user/deploy")
.preScript("scripts/pre-deploy.sh")
.postScript("scripts/post-deploy.sh")
.build()))
.build();
IStage deployStage = pipeline.addStage(StageOptions.builder()
.stageName("Deploy")
.actions(List.of(deployAction))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEc2DeployActionPropsstatic final classAn implementation forEc2DeployActionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic Ec2DeployActionProps.Builderbuilder()The deploy specifications.getInput()The input artifact to deploy to EC2 instances.The tag key of the instances that you created in Amazon EC2.default StringThe tag value of the instances that you created in Amazon EC2.The type of instances or SSM nodes created in Amazon EC2.default Ec2MaxInstancesThe number or percentage of instances that can deploy in parallel.default Ec2MaxInstancesStop the task after the task fails on the specified number or percentage of instances.default List<ITargetGroup> The list of target groups for deployment.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
-
getDeploySpecifications
The deploy specifications. -
getInput
The input artifact to deploy to EC2 instances. -
getInstanceTagKey
The tag key of the instances that you created in Amazon EC2. -
getInstanceType
The type of instances or SSM nodes created in Amazon EC2.You must have already created, tagged, and installed the SSM agent on all instances.
-
getInstanceTagValue
The tag value of the instances that you created in Amazon EC2.Default: - all instances with `instanceTagKey` will be matched
-
getMaxBatch
The number or percentage of instances that can deploy in parallel.Default: - No configuration
-
getMaxError
Stop the task after the task fails on the specified number or percentage of instances.Default: - No configuration
-
getTargetGroups
The list of target groups for deployment. You must have already created the target groups.Target groups provide a set of instances to process specific requests. If the target group is specified, instances will be removed from the target group before deployment and added back to the target group after deployment.
Default: - No target groups
-
builder
- Returns:
- a
Ec2DeployActionProps.BuilderofEc2DeployActionProps
-