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 #addAlarm 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 #addAutoScalingGroup 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
    • ignoreAlarmConfiguration

      @Stability(Stable) public ServerDeploymentGroup.Builder ignoreAlarmConfiguration(Boolean ignoreAlarmConfiguration)
      Whether to skip the step of checking CloudWatch alarms during the deployment process.

      Default: - false

      Parameters:
      ignoreAlarmConfiguration - Whether to skip the step of checking CloudWatch alarms during the deployment process. 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 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 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(Deprecated) @Deprecated public ServerDeploymentGroup.Builder loadBalancer(LoadBalancer loadBalancer)
      Deprecated.
      • Use loadBalancers instead.
      (deprecated) 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
    • loadBalancers

      @Stability(Stable) public ServerDeploymentGroup.Builder loadBalancers(List<? extends LoadBalancer> loadBalancers)
      CodeDeploy supports the deployment to multiple load balancers.

      Specify either multiple Classic Load Balancers, or Application Load Balancers / Network Load Balancers Target Groups.

      Default: - Deployment Group will not have load balancers defined.

      Parameters:
      loadBalancers - CodeDeploy supports the deployment to multiple load balancers. 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
    • terminationHook

      @Stability(Stable) public ServerDeploymentGroup.Builder terminationHook(Boolean terminationHook)
      Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.

      Default: - false

      Parameters:
      terminationHook - Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group. This parameter is required.
      Returns:
      this
      See Also:
    • build

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