Enum Class Ec2InstanceType

java.lang.Object
java.lang.Enum<Ec2InstanceType>
software.amazon.awscdk.services.codepipeline.actions.Ec2InstanceType
All Implemented Interfaces:
Serializable, Comparable<Ec2InstanceType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-07-04T12:43:04.278Z") @Stability(Stable) public enum Ec2InstanceType extends Enum<Ec2InstanceType>
The type of instances or SSM nodes created in Amazon EC2.

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());
 

See Also:
  • Enum Constant Details

    • EC2

      @Stability(Stable) public static final Ec2InstanceType EC2
      Amazon EC2 instances.
    • SSM_MANAGED_NODE

      @Stability(Stable) public static final Ec2InstanceType SSM_MANAGED_NODE
      AWS System Manager (SSM) managed nodes.
  • Method Details

    • values

      public static Ec2InstanceType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Ec2InstanceType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null