Class ServerDeploymentGroupProps.Builder
java.lang.Object
software.amazon.awscdk.services.codedeploy.ServerDeploymentGroupProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerDeploymentGroupProps>
- Enclosing interface:
ServerDeploymentGroupProps
@Stability(Stable)
public static final class ServerDeploymentGroupProps.Builder
extends Object
implements software.amazon.jsii.Builder<ServerDeploymentGroupProps>
A builder for
ServerDeploymentGroupProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofServerDeploymentGroupProps.getAlarms()application(IServerApplication application) Sets the value ofServerDeploymentGroupProps.getApplication()autoRollback(AutoRollbackConfig autoRollback) Sets the value ofServerDeploymentGroupProps.getAutoRollback()autoScalingGroups(List<? extends IAutoScalingGroup> autoScalingGroups) Sets the value ofServerDeploymentGroupProps.getAutoScalingGroups()build()Builds the configured instance.deploymentConfig(IServerDeploymentConfig deploymentConfig) Sets the value ofServerDeploymentGroupProps.getDeploymentConfig()deploymentGroupName(String deploymentGroupName) Sets the value ofServerDeploymentGroupProps.getDeploymentGroupName()ec2InstanceTags(InstanceTagSet ec2InstanceTags) Sets the value ofServerDeploymentGroupProps.getEc2InstanceTags()ignoreAlarmConfiguration(Boolean ignoreAlarmConfiguration) Sets the value ofServerDeploymentGroupProps.getIgnoreAlarmConfiguration()ignorePollAlarmsFailure(Boolean ignorePollAlarmsFailure) Sets the value ofServerDeploymentGroupProps.getIgnorePollAlarmsFailure()installAgent(Boolean installAgent) Sets the value ofServerDeploymentGroupProps.getInstallAgent()loadBalancer(LoadBalancer loadBalancer) Deprecated.- Use `loadBalancers` instead.loadBalancers(List<? extends LoadBalancer> loadBalancers) Sets the value ofServerDeploymentGroupProps.getLoadBalancers()onPremiseInstanceTags(InstanceTagSet onPremiseInstanceTags) Sets the value ofServerDeploymentGroupProps.getOnPremiseInstanceTags()Sets the value ofServerDeploymentGroupProps.getRole()terminationHook(Boolean terminationHook) Sets the value ofServerDeploymentGroupProps.getTerminationHook()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alarms
Sets the value ofServerDeploymentGroupProps.getAlarms()- Parameters:
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
#addAlarmmethod.- Returns:
this
-
application
@Stability(Stable) public ServerDeploymentGroupProps.Builder application(IServerApplication application) Sets the value ofServerDeploymentGroupProps.getApplication()- Parameters:
application- The CodeDeploy EC2/on-premise Application this Deployment Group belongs to.- Returns:
this
-
autoRollback
@Stability(Stable) public ServerDeploymentGroupProps.Builder autoRollback(AutoRollbackConfig autoRollback) Sets the value ofServerDeploymentGroupProps.getAutoRollback()- Parameters:
autoRollback- The auto-rollback configuration for this Deployment Group.- Returns:
this
-
autoScalingGroups
@Stability(Stable) public ServerDeploymentGroupProps.Builder autoScalingGroups(List<? extends IAutoScalingGroup> autoScalingGroups) Sets the value ofServerDeploymentGroupProps.getAutoScalingGroups()- Parameters:
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#addAutoScalingGroupmethod.[disable-awslint:ref-via-interface] is needed because we update userdata for ASGs to install the codedeploy agent.
- Returns:
this
-
deploymentConfig
@Stability(Stable) public ServerDeploymentGroupProps.Builder deploymentConfig(IServerDeploymentConfig deploymentConfig) Sets the value ofServerDeploymentGroupProps.getDeploymentConfig()- Parameters:
deploymentConfig- The EC2/on-premise Deployment Configuration to use for this Deployment Group.- Returns:
this
-
deploymentGroupName
@Stability(Stable) public ServerDeploymentGroupProps.Builder deploymentGroupName(String deploymentGroupName) Sets the value ofServerDeploymentGroupProps.getDeploymentGroupName()- Parameters:
deploymentGroupName- The physical, human-readable name of the CodeDeploy Deployment Group.- Returns:
this
-
ec2InstanceTags
@Stability(Stable) public ServerDeploymentGroupProps.Builder ec2InstanceTags(InstanceTagSet ec2InstanceTags) Sets the value ofServerDeploymentGroupProps.getEc2InstanceTags()- Parameters:
ec2InstanceTags- All EC2 instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.- Returns:
this
-
ignoreAlarmConfiguration
@Stability(Stable) public ServerDeploymentGroupProps.Builder ignoreAlarmConfiguration(Boolean ignoreAlarmConfiguration) Sets the value ofServerDeploymentGroupProps.getIgnoreAlarmConfiguration()- Parameters:
ignoreAlarmConfiguration- Whether to skip the step of checking CloudWatch alarms during the deployment process.- Returns:
this
-
ignorePollAlarmsFailure
@Stability(Stable) public ServerDeploymentGroupProps.Builder ignorePollAlarmsFailure(Boolean ignorePollAlarmsFailure) Sets the value ofServerDeploymentGroupProps.getIgnorePollAlarmsFailure()- Parameters:
ignorePollAlarmsFailure- Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.- Returns:
this
-
installAgent
Sets the value ofServerDeploymentGroupProps.getInstallAgent()- Parameters:
installAgent- If you've provided any auto-scaling groups with the#autoScalingGroupsproperty, you can set this property to add User Data that installs the CodeDeploy agent on the instances.- Returns:
this
-
loadBalancer
@Stability(Deprecated) @Deprecated public ServerDeploymentGroupProps.Builder loadBalancer(LoadBalancer loadBalancer) Deprecated.- Use `loadBalancers` instead.Sets the value ofServerDeploymentGroupProps.getLoadBalancer()- Parameters:
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.- Returns:
this
-
loadBalancers
@Stability(Stable) public ServerDeploymentGroupProps.Builder loadBalancers(List<? extends LoadBalancer> loadBalancers) Sets the value ofServerDeploymentGroupProps.getLoadBalancers()- Parameters:
loadBalancers- CodeDeploy supports the deployment to multiple load balancers. Specify either multiple Classic Load Balancers, or Application Load Balancers / Network Load Balancers Target Groups.- Returns:
this
-
onPremiseInstanceTags
@Stability(Stable) public ServerDeploymentGroupProps.Builder onPremiseInstanceTags(InstanceTagSet onPremiseInstanceTags) Sets the value ofServerDeploymentGroupProps.getOnPremiseInstanceTags()- Parameters:
onPremiseInstanceTags- All on-premise instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.- Returns:
this
-
role
Sets the value ofServerDeploymentGroupProps.getRole()- Parameters:
role- The service Role of this Deployment Group.- Returns:
this
-
terminationHook
@Stability(Stable) public ServerDeploymentGroupProps.Builder terminationHook(Boolean terminationHook) Sets the value ofServerDeploymentGroupProps.getTerminationHook()- Parameters:
terminationHook- Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ServerDeploymentGroupProps>- Returns:
- a new instance of
ServerDeploymentGroupProps - Throws:
NullPointerException- if any required attribute was not provided
-