Class ServerDeploymentGroup

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.codedeploy.ServerDeploymentGroup
All Implemented Interfaces:
IResource, IServerDeploymentGroup, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-21T06:34:05.241Z") @Stability(Stable) public class ServerDeploymentGroup extends Resource implements IServerDeploymentGroup
A CodeDeploy Deployment Group that deploys to EC2/on-premise instances.

Example:

 ApplicationLoadBalancer alb;
 ApplicationListener listener = alb.addListener("Listener", BaseApplicationListenerProps.builder().port(80).build());
 ApplicationTargetGroup targetGroup = listener.addTargets("Fleet", AddApplicationTargetsProps.builder().port(80).build());
 ServerDeploymentGroup deploymentGroup = ServerDeploymentGroup.Builder.create(this, "DeploymentGroup")
         .loadBalancer(LoadBalancer.application(targetGroup))
         .build();
 
  • Constructor Details

    • ServerDeploymentGroup

      protected ServerDeploymentGroup(software.amazon.jsii.JsiiObjectRef objRef)
    • ServerDeploymentGroup

      protected ServerDeploymentGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ServerDeploymentGroup

      @Stability(Stable) public ServerDeploymentGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ServerDeploymentGroupProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • ServerDeploymentGroup

      @Stability(Stable) public ServerDeploymentGroup(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromServerDeploymentGroupAttributes

      @Stability(Stable) @NotNull public static IServerDeploymentGroup fromServerDeploymentGroupAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ServerDeploymentGroupAttributes attrs)
      Import an EC2/on-premise Deployment Group defined either outside the CDK app, or in a different region.

      Parameters:
      scope - the parent Construct for this new Construct. This parameter is required.
      id - the logical ID of this new Construct. This parameter is required.
      attrs - the properties of the referenced Deployment Group. This parameter is required.
      Returns:
      a Construct representing a reference to an existing Deployment Group
    • addAlarm

      @Stability(Stable) public void addAlarm(@NotNull IAlarm alarm)
      Associates an additional alarm with this Deployment Group.

      Parameters:
      alarm - the alarm to associate with this Deployment Group. This parameter is required.
    • addAutoScalingGroup

      @Stability(Stable) public void addAutoScalingGroup(@NotNull AutoScalingGroup asg)
      Adds an additional auto-scaling group to this Deployment Group.

      Parameters:
      asg - the auto-scaling group to add to this Deployment Group. This parameter is required.
    • getApplication

      @Stability(Stable) @NotNull public IServerApplication getApplication()
      Specified by:
      getApplication in interface IServerDeploymentGroup
    • getDeploymentConfig

      @Stability(Stable) @NotNull public IServerDeploymentConfig getDeploymentConfig()
      Specified by:
      getDeploymentConfig in interface IServerDeploymentGroup
    • getDeploymentGroupArn

      @Stability(Stable) @NotNull public String getDeploymentGroupArn()
      The ARN of the Deployment Group.
      Specified by:
      getDeploymentGroupArn in interface IServerDeploymentGroup
    • getDeploymentGroupName

      @Stability(Stable) @NotNull public String getDeploymentGroupName()
      The name of the Deployment Group.
      Specified by:
      getDeploymentGroupName in interface IServerDeploymentGroup
    • getAutoScalingGroups

      @Stability(Stable) @Nullable public List<IAutoScalingGroup> getAutoScalingGroups()
      Specified by:
      getAutoScalingGroups in interface IServerDeploymentGroup
    • getRole

      @Stability(Stable) @Nullable public IRole getRole()
      The service Role of this Deployment Group.
      Specified by:
      getRole in interface IServerDeploymentGroup