Class ServerDeploymentGroup.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerDeploymentGroup>
- Enclosing class:
ServerDeploymentGroup
ServerDeploymentGroup
.-
Method Summary
Modifier and TypeMethodDescriptionThe CloudWatch alarms associated with this Deployment Group.application
(IServerApplication application) The CodeDeploy EC2/on-premise Application this Deployment Group belongs to.autoRollback
(AutoRollbackConfig autoRollback) The auto-rollback configuration for this Deployment Group.autoScalingGroups
(List<? extends IAutoScalingGroup> autoScalingGroups) The auto-scaling groups belonging to this Deployment Group.build()
deploymentConfig
(IServerDeploymentConfig deploymentConfig) The EC2/on-premise Deployment Configuration to use for this Deployment Group.deploymentGroupName
(String deploymentGroupName) The physical, human-readable name of the CodeDeploy Deployment Group.ec2InstanceTags
(InstanceTagSet ec2InstanceTags) All EC2 instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.ignoreAlarmConfiguration
(Boolean ignoreAlarmConfiguration) Whether to skip the step of checking CloudWatch alarms during the deployment process.ignorePollAlarmsFailure
(Boolean ignorePollAlarmsFailure) Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.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.loadBalancer
(LoadBalancer loadBalancer) Deprecated.loadBalancers
(List<? extends LoadBalancer> loadBalancers) CodeDeploy supports the deployment to multiple load balancers.onPremiseInstanceTags
(InstanceTagSet onPremiseInstanceTags) All on-premise instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.The service Role of this Deployment Group.terminationHook
(Boolean terminationHook) Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.
-
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
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
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
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
- Use
-
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
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServerDeploymentGroup>
- Returns:
- a newly built instance of
ServerDeploymentGroup
.
-
loadBalancers
instead.