Class ServerDeploymentGroup.Builder

java.lang.Object
software.amazon.awscdk.services.codedeploy.ServerDeploymentGroup.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ServerDeploymentGroup>
Enclosing class:
ServerDeploymentGroup

@Stability(Stable) public static final class ServerDeploymentGroup.Builder extends Object implements software.amazon.jsii.Builder<ServerDeploymentGroup>
A fluent builder for ServerDeploymentGroup.
  • Method Details

    • create

      @Stability(Stable) public static ServerDeploymentGroup.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of ServerDeploymentGroup.Builder.
    • alarms

      @Stability(Stable) public ServerDeploymentGroup.Builder alarms(List<? extends IAlarm> alarms)
      The CloudWatch alarms associated with this Deployment Group.

      CodeDeploy will stop (and optionally roll back) a deployment if during it any of the alarms trigger. Alarms can also be added after the Deployment Group is created using the ServerDeploymentGroup.addAlarm(software.amazon.awscdk.services.cloudwatch.IAlarm) method.

      Default: []

      Parameters:
      alarms - The CloudWatch alarms associated with this Deployment Group. This parameter is required.
      Returns:
      this
      See Also:
    • application

      @Stability(Stable) public ServerDeploymentGroup.Builder application(IServerApplication application)
      The CodeDeploy EC2/on-premise Application this Deployment Group belongs to.

      Default: - A new Application will be created.

      Parameters:
      application - The CodeDeploy EC2/on-premise Application this Deployment Group belongs to. This parameter is required.
      Returns:
      this
    • autoRollback

      @Stability(Stable) public ServerDeploymentGroup.Builder autoRollback(AutoRollbackConfig autoRollback)
      The auto-rollback configuration for this Deployment Group.

      Default: - default AutoRollbackConfig.

      Parameters:
      autoRollback - The auto-rollback configuration for this Deployment Group. This parameter is required.
      Returns:
      this
    • autoScalingGroups

      @Stability(Stable) public ServerDeploymentGroup.Builder autoScalingGroups(List<? extends IAutoScalingGroup> autoScalingGroups)
      The auto-scaling groups belonging to this Deployment Group.

      Auto-scaling groups can also be added after the Deployment Group is created using the ServerDeploymentGroup.addAutoScalingGroup(software.amazon.awscdk.services.autoscaling.AutoScalingGroup) method. [disable-awslint:ref-via-interface] is needed because we update userdata for ASGs to install the codedeploy agent.

      Default: []

      Parameters:
      autoScalingGroups - The auto-scaling groups belonging to this Deployment Group. This parameter is required.
      Returns:
      this
    • deploymentConfig

      @Stability(Stable) public ServerDeploymentGroup.Builder deploymentConfig(IServerDeploymentConfig deploymentConfig)
      The EC2/on-premise Deployment Configuration to use for this Deployment Group.

      Default: ServerDeploymentConfig#OneAtATime

      Parameters:
      deploymentConfig - The EC2/on-premise Deployment Configuration to use for this Deployment Group. This parameter is required.
      Returns:
      this
    • deploymentGroupName

      @Stability(Stable) public ServerDeploymentGroup.Builder deploymentGroupName(String deploymentGroupName)
      The physical, human-readable name of the CodeDeploy Deployment Group.

      Default: - An auto-generated name will be used.

      Parameters:
      deploymentGroupName - The physical, human-readable name of the CodeDeploy Deployment Group. This parameter is required.
      Returns:
      this
    • ec2InstanceTags

      @Stability(Stable) public ServerDeploymentGroup.Builder ec2InstanceTags(InstanceTagSet ec2InstanceTags)
      All EC2 instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.

      Default: - No additional EC2 instances will be added to the Deployment Group.

      Parameters:
      ec2InstanceTags - All EC2 instances matching the given set of tags when a deployment occurs will be added to this Deployment Group. This parameter is required.
      Returns:
      this
    • ignorePollAlarmsFailure

      @Stability(Stable) public ServerDeploymentGroup.Builder ignorePollAlarmsFailure(Boolean ignorePollAlarmsFailure)
      Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.

      Default: false

      Parameters:
      ignorePollAlarmsFailure - Whether to continue a deployment even if fetching the alarm status from CloudWatch failed. This parameter is required.
      Returns:
      this
    • installAgent

      @Stability(Stable) public ServerDeploymentGroup.Builder installAgent(Boolean installAgent)
      If you've provided any auto-scaling groups with the autoScalingGroups(java.util.List<? extends software.amazon.awscdk.services.autoscaling.IAutoScalingGroup>) property, you can set this property to add User Data that installs the CodeDeploy agent on the instances.

      Default: true

      Parameters:
      installAgent - If you've provided any auto-scaling groups with the autoScalingGroups(java.util.List<? extends software.amazon.awscdk.services.autoscaling.IAutoScalingGroup>) property, you can set this property to add User Data that installs the CodeDeploy agent on the instances. This parameter is required.
      Returns:
      this
      See Also:
    • loadBalancer

      @Stability(Stable) public ServerDeploymentGroup.Builder loadBalancer(LoadBalancer loadBalancer)
      The load balancer to place in front of this Deployment Group.

      Can be created from either a classic Elastic Load Balancer, or an Application Load Balancer / Network Load Balancer Target Group.

      Default: - Deployment Group will not have a load balancer defined.

      Parameters:
      loadBalancer - The load balancer to place in front of this Deployment Group. This parameter is required.
      Returns:
      this
    • onPremiseInstanceTags

      @Stability(Stable) public ServerDeploymentGroup.Builder onPremiseInstanceTags(InstanceTagSet onPremiseInstanceTags)
      All on-premise instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.

      Default: - No additional on-premise instances will be added to the Deployment Group.

      Parameters:
      onPremiseInstanceTags - All on-premise instances matching the given set of tags when a deployment occurs will be added to this Deployment Group. This parameter is required.
      Returns:
      this
    • role

      @Stability(Stable) public ServerDeploymentGroup.Builder role(IRole role)
      The service Role of this Deployment Group.

      Default: - A new Role will be created.

      Parameters:
      role - The service Role of this Deployment Group. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public ServerDeploymentGroup build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ServerDeploymentGroup>
      Returns:
      a newly built instance of ServerDeploymentGroup.