Skip to content
v2.274.0

ServerDeploymentGroupProps Struct ​

Construction properties for ServerDeploymentGroup.

Example ​

ts
declare const alb: elbv2.ApplicationLoadBalancer;
const listener = alb.addListener('Listener', { port: 80 });
const targetGroup = listener.addTargets('Fleet', { port: 80 });

const deploymentGroup = new codedeploy.ServerDeploymentGroup(this, 'DeploymentGroup', {
  loadBalancer: codedeploy.LoadBalancer.application(targetGroup),
});

Properties ​

alarmsoptionalIAlarmRef[]alarmsoptionaltyping.List[IAlarmRef]alarmsoptionalList<IAlarmRef>AlarmsoptionalIAlarmRef[]Alarmsoptional*[]IAlarmRef= []#
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.

applicationoptionalIApplicationRefapplicationoptionalIApplicationRefapplicationoptionalIApplicationRefApplicationoptionalIApplicationRefApplicationoptionalIApplicationRef#
The CodeDeploy EC2/on-premise Application this Deployment Group belongs to.

Default: A new Application will be created.

autoRollbackoptionalAutoRollbackConfigauto_rollbackoptionalAutoRollbackConfigautoRollbackoptionalAutoRollbackConfigAutoRollbackoptionalAutoRollbackConfigAutoRollbackoptionalAutoRollbackConfig#
The auto-rollback configuration for this Deployment Group.

Default: default AutoRollbackConfig.

autoScalingGroupsoptionalIAutoScalingGroup[]auto_scaling_groupsoptionaltyping.List[IAutoScalingGroup]autoScalingGroupsoptionalList<IAutoScalingGroup>AutoScalingGroupsoptionalIAutoScalingGroup[]AutoScalingGroupsoptional*[]IAutoScalingGroup= []#
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.

deploymentConfigoptionalIDeploymentConfigRefdeployment_configoptionalIDeploymentConfigRefdeploymentConfigoptionalIDeploymentConfigRefDeploymentConfigoptionalIDeploymentConfigRefDeploymentConfigoptionalIDeploymentConfigRef#
The EC2/on-premise Deployment Configuration to use for this Deployment Group.

Default: ServerDeploymentConfig#OneAtATime

deploymentGroupNameoptionalstringdeployment_group_nameoptionalstrdeploymentGroupNameoptionalStringDeploymentGroupNameoptionalstringDeploymentGroupNameoptional*string#
The physical, human-readable name of the CodeDeploy Deployment Group.

Default: An auto-generated name will be used.

ec2InstanceTagsoptionalInstanceTagSetec2_instance_tagsoptionalInstanceTagSetec2InstanceTagsoptionalInstanceTagSetEc2InstanceTagsoptionalInstanceTagSetEc2InstanceTagsoptionalInstanceTagSet#
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.

ignoreAlarmConfigurationoptionalbooleanignore_alarm_configurationoptionalboolignoreAlarmConfigurationoptionalBooleanIgnoreAlarmConfigurationoptionalboolIgnoreAlarmConfigurationoptional*bool= false#
Whether to skip the step of checking CloudWatch alarms during the deployment process.
ignorePollAlarmsFailureoptionalbooleanignore_poll_alarms_failureoptionalboolignorePollAlarmsFailureoptionalBooleanIgnorePollAlarmsFailureoptionalboolIgnorePollAlarmsFailureoptional*bool= false#
Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.
installAgentoptionalbooleaninstall_agentoptionalboolinstallAgentoptionalBooleanInstallAgentoptionalboolInstallAgentoptional*bool= true#
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.
loadBalanceroptionalLoadBalancerload_balanceroptionalLoadBalancerloadBalanceroptionalLoadBalancerLoadBalanceroptionalLoadBalancerLoadBalanceroptionalLoadBalancerdeprecated#
- Use `loadBalancers` instead.

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

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

loadBalancersoptionalLoadBalancer[]load_balancersoptionaltyping.List[LoadBalancer]loadBalancersoptionalList<LoadBalancer>LoadBalancersoptionalLoadBalancer[]LoadBalancersoptional*[]LoadBalancer#
CodeDeploy supports the deployment to multiple load balancers.

Default: Deployment Group will not have load balancers defined.

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

onPremiseInstanceTagsoptionalInstanceTagSeton_premise_instance_tagsoptionalInstanceTagSetonPremiseInstanceTagsoptionalInstanceTagSetOnPremiseInstanceTagsoptionalInstanceTagSetOnPremiseInstanceTagsoptionalInstanceTagSet#
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.

roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole#
The service Role of this Deployment Group.

Default: A new Role will be created.

terminationHookoptionalbooleantermination_hookoptionalboolterminationHookoptionalBooleanTerminationHookoptionalboolTerminationHookoptional*bool= false#
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.