Use ListDeployments with a CLI - AWS SDK Code Examples

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

Use ListDeployments with a CLI

The following code examples show how to use ListDeployments.

CLI
AWS CLI

To get information about deployments

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

aws deploy list-deployments \ --application-name WordPress_App \ --create-time-range start=2014-08-19T00:00:00,end=2014-08-20T00:00:00 \ --deployment-group-name WordPress_DG \ --include-only-statuses Failed

Output:

{ "deployments": [ "d-EXAMPLE11", "d-EXAMPLE22", "d-EXAMPLE33" ] }
PowerShell
Tools for PowerShell

Example 1: This example gets a list of deployment IDs for the specified application and deployment group.

Get-CDDeploymentList -ApplicationName CodeDeployDemoApplication -DeploymentGroupName CodeDeployDemoFleet

Output:

d-QZMRGSTEX d-RR0T5KTEX
  • For API details, see ListDeployments in AWS Tools for PowerShell Cmdlet Reference.