Use ListDeploymentGroups with an AWS SDK or CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use ListDeploymentGroups with an AWS SDK or CLI

The following code examples show how to use ListDeploymentGroups.

CLI
AWS CLI

To get information about deployment groups

The following list-deployment-groups example displays information about all deployment groups that are associated with the specified application.

aws deploy list-deployment-groups --application-name WordPress_App

Output:

{ "applicationName": "WordPress_App", "deploymentGroups": [ "WordPress_DG", "WordPress_Beta_DG" ] }
PowerShell
Tools for PowerShell

Example 1: This example gets a list of deployment groups for the specified application.

Get-CDDeploymentGroupList -ApplicationName CodeDeployDemoApplication

Output:

ApplicationName DeploymentGroups NextToken --------------- ---------------- --------- CodeDeployDemoApplication {CodeDeployDemoFleet, CodeDeployProductionFleet}