AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS CodeDeploy UpdateDeploymentGroup API operation.

Syntax

Update-CDDeploymentGroup
-ApplicationName <String>
-GreenFleetProvisioningOptionAction <GreenFleetProvisioningAction>
-OnSuccessBlueInstanceTerminationAction <InstanceAction>
-DeploymentReadyOptionTimeoutAction <DeploymentReadyAction>
-AlarmConfiguration_Alarm <Alarm[]>
-AutoScalingGroup <String[]>
-CurrentDeploymentGroupName <String>
-DeploymentConfigName <String>
-DeploymentStyleOption <DeploymentOption>
-DeploymentStyleType <DeploymentType>
-Ec2TagFilter <EC2TagFilter[]>
-Ec2TagSetList <EC2TagFilter[][]>
-EcsService <ECSService[]>
-LoadBalancerInfoList <ELBInfo[]>
-AlarmConfiguration_Enabled <Boolean>
-AutoRollbackConfiguration_Enabled <Boolean>
-AutoRollbackConfiguration_Event <String[]>
-AlarmConfiguration_IgnorePollAlarmFailure <Boolean>
-IsAutoScalingGroupsSet <Boolean>
-NewDeploymentGroupName <String>
-OnPremisesInstanceTagFilter <TagFilter[]>
-OnPremisesTagSetList <TagFilter[][]>
-OutdatedInstancesStrategy <OutdatedInstancesStrategy>
-ServiceRoleArn <String>
-LoadBalancerInfo_TargetGroupInfoList <TargetGroupInfo[]>
-LoadBalancerInfo_TargetGroupPairInfoList <TargetGroupPairInfo[]>
-TerminationHookEnabled <Boolean>
-OnSuccessBlueInstanceTerminationWaitTime <Int32>
-TriggerConfiguration <TriggerConfig[]>
-DeploymentReadyOptionWaitTime <Int32>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonCodeDeployConfig>

Description

Changes information about a deployment group.

Parameters

-AlarmConfiguration_Alarm <Alarm[]>
A list of alarms configured for the deployment or deployment group. A maximum of 10 alarms can be added.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAlarmConfiguration_Alarms
-AlarmConfiguration_Enabled <Boolean>
Indicates whether the alarm configuration is enabled.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-AlarmConfiguration_IgnorePollAlarmFailure <Boolean>
Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.
  • true: The deployment proceeds even if alarm status information can't be retrieved from Amazon CloudWatch.
  • false: The deployment stops if alarm status information can't be retrieved from Amazon CloudWatch.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ApplicationName <String>
The application name that corresponds to the deployment group to update.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-AutoRollbackConfiguration_Enabled <Boolean>
Indicates whether a defined automatic rollback configuration is currently enabled.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-AutoRollbackConfiguration_Event <String[]>
The event type or types that trigger a rollback.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAutoRollbackConfiguration_Events
-AutoScalingGroup <String[]>
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAutoScalingGroups
-ClientConfig <AmazonCodeDeployConfig>
Amazon.PowerShell.Cmdlets.CD.AmazonCodeDeployClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CurrentDeploymentGroupName <String>
The current name of the deployment group.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-DeploymentConfigName <String>
The replacement deployment configuration name to use, if you want to change it.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DeploymentReadyOptionTimeoutAction <DeploymentReadyAction>
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
  • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.
  • STOP_DEPLOYMENT: Do not register new instances with a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesBlueGreenDeploymentConfiguration_DeploymentReadyOption_ActionOnTimeout, DeploymentReadyOption_ActionOnTimeout
-DeploymentReadyOptionWaitTime <Int32>
The number of minutes to wait before the status of a blue/green deployment is changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesBlueGreenDeploymentConfiguration_DeploymentReadyOption_WaitTimeInMinutes, DeploymentReadyOption_WaitTimeInMinute
-DeploymentStyleOption <DeploymentOption>
Indicates whether to route deployment traffic behind a load balancer.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesDeploymentStyle_DeploymentOption
-DeploymentStyleType <DeploymentType>
Indicates whether to run an in-place deployment or a blue/green deployment.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesDeploymentStyle_DeploymentType
-Ec2TagFilter <EC2TagFilter[]>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesEc2TagFilters
-Ec2TagSetList <EC2TagFilter[][]>
A list that contains other lists of Amazon EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EcsService <ECSService[]>
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 <clustername>:<servicename>.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesEcsServices
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GreenFleetProvisioningOptionAction <GreenFleetProvisioningAction>
The method used to add instances to a replacement environment.
  • DISCOVER_EXISTING: Use instances that already exist or will be created manually.
  • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesBlueGreenDeploymentConfiguration_GreenFleetProvisioningOption_Action, GreenFleetProvisioningOption_Action
-IsAutoScalingGroupsSet <Boolean>
This property is set to true if the property is set; false otherwise. This property can be used to determine if the related property was returned by a service response or if the related property should be sent to the service during a service call.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LoadBalancerInfo_TargetGroupInfoList <TargetGroupInfo[]>
An array that contains information about the target groups to use for load balancing in a deployment. If you're using Application Load Balancers and Network Load Balancers, specify their associated target groups in this array.You can add up to 10 target groups to the array.If you're using Classic Load Balancers, use the elbInfoList array instead of this one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LoadBalancerInfo_TargetGroupPairInfoList <TargetGroupPairInfo[]>
The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LoadBalancerInfoList <ELBInfo[]>
An array that contains information about the load balancers to use for load balancing in a deployment. If you're using Classic Load Balancers, specify those load balancers in this array. You can add up to 10 load balancers to the array.If you're using Application Load Balancers or Network Load Balancers, use the targetGroupInfoList array instead of this one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesLoadBalancerInfo_ElbInfoList
-NewDeploymentGroupName <String>
The new name of the deployment group, if you want to change it.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OnPremisesInstanceTagFilter <TagFilter[]>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOnPremisesInstanceTagFilters
-OnPremisesTagSetList <TagFilter[][]>
A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OnSuccessBlueInstanceTerminationAction <InstanceAction>
The action to take on instances in the original environment after a successful blue/green deployment.
  • TERMINATE: Instances are terminated after a specified wait time.
  • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesBlueGreenDeploymentConfiguration_TerminateBlueInstancesOnDeploymentSuccess_Action, TerminateBlueInstancesOnDeploymentSuccess_Action
-OnSuccessBlueInstanceTerminationWaitTime <Int32>
For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set. The maximum setting is 2880 minutes (2 days).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesBlueGreenDeploymentConfiguration_TerminateBlueInstancesOnDeploymentSuccess_TerminationWaitTimeInMinutes, TerminateBlueInstancesOnDeploymentSuccess_TerminationWaitTimeInMinute
-OutdatedInstancesStrategy <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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the ApplicationName parameter. The -PassThru parameter is deprecated, use -Select '^ApplicationName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'HooksNotCleanedUp'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CodeDeploy.Model.UpdateDeploymentGroupResponse). Specifying the name of a property of type Amazon.CodeDeploy.Model.UpdateDeploymentGroupResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ServiceRoleArn <String>
A replacement ARN for the service role, if you want to change it.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TerminationHookEnabled <Boolean>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TriggerConfiguration <TriggerConfig[]>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTriggerConfigurations

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns a collection of Amazon.CodeDeploy.Model.AutoScalingGroup objects. The service call response (type Amazon.CodeDeploy.Model.UpdateDeploymentGroupResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Examples

Example 1

Update-CDDeploymentGroup -ApplicationName MyNewApplication -CurrentDeploymentGroupName MyNewDeploymentGroup -NewDeploymentGroupName MyNewDeploymentGroup-2
This example changes the name of the specified deployment group for the specified application.

Example 2

Update-CDDeploymentGroup -ApplicationName MyNewApplication -CurrentDeploymentGroupName MyNewDeploymentGroup -NewDeploymentGroupName MyNewDeploymentGroup-2 -Ec2TagSetList @(@{Key="key1";Type="KEY_ONLY"},@{Key="Key2";Type="KEY_AND_VALUE";Value="Value2"}),@(@{Key="Key3";Type="VALUE_ONLY";Value="Value3"})
This example shows how to specify groups of EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment.

Supported Version

AWS Tools for PowerShell: 2.x.y.z