updateDeploymentGroup method
- required String applicationName,
- required String currentDeploymentGroupName,
- AlarmConfiguration? alarmConfiguration,
- AutoRollbackConfiguration? autoRollbackConfiguration,
- List<
String> ? autoScalingGroups, - BlueGreenDeploymentConfiguration? blueGreenDeploymentConfiguration,
- String? deploymentConfigName,
- DeploymentStyle? deploymentStyle,
- List<
EC2TagFilter> ? ec2TagFilters, - EC2TagSet? ec2TagSet,
- List<
ECSService> ? ecsServices, - LoadBalancerInfo? loadBalancerInfo,
- String? newDeploymentGroupName,
- List<
TagFilter> ? onPremisesInstanceTagFilters, - OnPremisesTagSet? onPremisesTagSet,
- OutdatedInstancesStrategy? outdatedInstancesStrategy,
- String? serviceRoleArn,
- bool? terminationHookEnabled,
- List<
TriggerConfig> ? triggerConfigurations,
Changes information about a deployment group.
May throw AlarmsLimitExceededException.
May throw ApplicationDoesNotExistException.
May throw ApplicationNameRequiredException.
May throw DeploymentConfigDoesNotExistException.
May throw DeploymentGroupAlreadyExistsException.
May throw DeploymentGroupDoesNotExistException.
May throw DeploymentGroupNameRequiredException.
May throw ECSServiceMappingLimitExceededException.
May throw InvalidAlarmConfigException.
May throw InvalidApplicationNameException.
May throw InvalidAutoRollbackConfigException.
May throw InvalidAutoScalingGroupException.
May throw InvalidBlueGreenDeploymentConfigurationException.
May throw InvalidDeploymentConfigNameException.
May throw InvalidDeploymentGroupNameException.
May throw InvalidDeploymentStyleException.
May throw InvalidEC2TagCombinationException.
May throw InvalidEC2TagException.
May throw InvalidECSServiceException.
May throw InvalidInputException.
May throw InvalidLoadBalancerInfoException.
May throw InvalidOnPremisesTagCombinationException.
May throw InvalidRoleException.
May throw InvalidTagException.
May throw InvalidTargetGroupPairException.
May throw InvalidTrafficRoutingConfigurationException.
May throw InvalidTriggerConfigException.
May throw LifecycleHookLimitExceededException.
May throw TagSetListLimitExceededException.
May throw ThrottlingException.
May throw TriggerTargetsLimitExceededException.
Parameter applicationName :
The application name that corresponds to the deployment group to update.
Parameter currentDeploymentGroupName :
The current name of the deployment group.
Parameter alarmConfiguration :
Information to add or change about Amazon CloudWatch alarms when the
deployment group is updated.
Parameter autoRollbackConfiguration :
Information for an automatic rollback configuration that is added or
changed when a deployment group is updated.
Parameter autoScalingGroups :
The replacement list of Auto Scaling groups to be included in the
deployment group, if you want to change them.
- To keep the Auto Scaling groups, enter their names or do not specify this parameter.
- To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error "Heartbeat Timeout" in the CodeDeploy User Guide.
Parameter blueGreenDeploymentConfiguration :
Information about blue/green deployment options for a deployment group.
Parameter deploymentConfigName :
The replacement deployment configuration name to use, if you want to
change it.
Parameter deploymentStyle :
Information about the type of deployment, either in-place or blue/green,
you want to run and whether to route deployment traffic behind a load
balancer.
Parameter ec2TagFilters :
The replacement set of Amazon EC2 tags on which to filter, if you want to
change them. To keep the existing tags, enter their names. To remove tags,
do not enter any tag names.
Parameter ec2TagSet :
Information about groups of tags applied to on-premises instances. The
deployment group includes only Amazon EC2 instances identified by all the
tag groups.
Parameter ecsServices :
The target Amazon ECS services in the deployment group. This applies only
to deployment groups that use the Amazon ECS compute platform. A target
Amazon ECS service is specified as an Amazon ECS cluster and service name
pair using the format .
Parameter loadBalancerInfo :
Information about the load balancer used in a deployment.
Parameter newDeploymentGroupName :
The new name of the deployment group, if you want to change it.
Parameter onPremisesInstanceTagFilters :
The replacement set of on-premises instance tags on which to filter, if
you want to change them. To keep the existing tags, enter their names. To
remove tags, do not enter any tag names.
Parameter onPremisesTagSet :
Information about an on-premises instance tag set. The deployment group
includes only on-premises instances identified by all the tag groups.
Parameter outdatedInstancesStrategy :
Indicates what happens when new Amazon EC2 instances are launched
mid-deployment and do not receive the deployed application revision.
If this option is set to UPDATE or is unspecified, CodeDeploy
initiates one or more 'auto-update outdated instances' deployments to
apply the deployed application revision to the new Amazon EC2 instances.
If this option is set to IGNORE, CodeDeploy does not initiate
a deployment to update the new Amazon EC2 instances. This may result in
instances having different revisions.
Parameter serviceRoleArn :
A replacement ARN for the service role, if you want to change it.
Parameter terminationHookEnabled :
This parameter only applies if you are using CodeDeploy with Amazon EC2
Auto Scaling. For more information, see Integrating
CodeDeploy with Amazon EC2 Auto Scaling in the CodeDeploy User
Guide.
Set terminationHookEnabled to true to have
CodeDeploy install a termination hook into your Auto Scaling group when
you update a deployment group. When this hook is installed, CodeDeploy
will perform termination deployments.
For information about termination deployments, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide.
For more information about Auto Scaling scale-in events, see the Scale in topic in the Amazon EC2 Auto Scaling User Guide.
Parameter triggerConfigurations :
Information about triggers to change when the deployment group is updated.
For examples, see Edit
a Trigger in a CodeDeploy Deployment Group in the CodeDeploy User
Guide.
Implementation
Future<UpdateDeploymentGroupOutput> updateDeploymentGroup({
required String applicationName,
required String currentDeploymentGroupName,
AlarmConfiguration? alarmConfiguration,
AutoRollbackConfiguration? autoRollbackConfiguration,
List<String>? autoScalingGroups,
BlueGreenDeploymentConfiguration? blueGreenDeploymentConfiguration,
String? deploymentConfigName,
DeploymentStyle? deploymentStyle,
List<EC2TagFilter>? ec2TagFilters,
EC2TagSet? ec2TagSet,
List<ECSService>? ecsServices,
LoadBalancerInfo? loadBalancerInfo,
String? newDeploymentGroupName,
List<TagFilter>? onPremisesInstanceTagFilters,
OnPremisesTagSet? onPremisesTagSet,
OutdatedInstancesStrategy? outdatedInstancesStrategy,
String? serviceRoleArn,
bool? terminationHookEnabled,
List<TriggerConfig>? triggerConfigurations,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeDeploy_20141006.UpdateDeploymentGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'applicationName': applicationName,
'currentDeploymentGroupName': currentDeploymentGroupName,
if (alarmConfiguration != null)
'alarmConfiguration': alarmConfiguration,
if (autoRollbackConfiguration != null)
'autoRollbackConfiguration': autoRollbackConfiguration,
if (autoScalingGroups != null) 'autoScalingGroups': autoScalingGroups,
if (blueGreenDeploymentConfiguration != null)
'blueGreenDeploymentConfiguration': blueGreenDeploymentConfiguration,
if (deploymentConfigName != null)
'deploymentConfigName': deploymentConfigName,
if (deploymentStyle != null) 'deploymentStyle': deploymentStyle,
if (ec2TagFilters != null) 'ec2TagFilters': ec2TagFilters,
if (ec2TagSet != null) 'ec2TagSet': ec2TagSet,
if (ecsServices != null) 'ecsServices': ecsServices,
if (loadBalancerInfo != null) 'loadBalancerInfo': loadBalancerInfo,
if (newDeploymentGroupName != null)
'newDeploymentGroupName': newDeploymentGroupName,
if (onPremisesInstanceTagFilters != null)
'onPremisesInstanceTagFilters': onPremisesInstanceTagFilters,
if (onPremisesTagSet != null) 'onPremisesTagSet': onPremisesTagSet,
if (outdatedInstancesStrategy != null)
'outdatedInstancesStrategy': outdatedInstancesStrategy.value,
if (serviceRoleArn != null) 'serviceRoleArn': serviceRoleArn,
if (terminationHookEnabled != null)
'terminationHookEnabled': terminationHookEnabled,
if (triggerConfigurations != null)
'triggerConfigurations': triggerConfigurations,
},
);
return UpdateDeploymentGroupOutput.fromJson(jsonResponse.body);
}