There are more AWS SDK examples available in the AWS Doc SDK Examples
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-deploymentsexample displays information about all deployments that are associated with the specified application and deployment group.aws deploy list-deployments \ --application-nameWordPress_App\ --create-time-rangestart=2014-08-19T00:00:00,end=2014-08-20T00:00:00\ --deployment-group-nameWordPress_DG\ --include-only-statusesFailedOutput:
{ "deployments": [ "d-EXAMPLE11", "d-EXAMPLE22", "d-EXAMPLE33" ] }-
For API details, see ListDeployments
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example gets a list of deployment IDs for the specified application and deployment group.
Get-CDDeploymentList -ApplicationName CodeDeployDemoApplication -DeploymentGroupName CodeDeployDemoFleetOutput:
d-QZMRGSTEX d-RR0T5KTEX-
For API details, see ListDeployments in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example gets a list of deployment IDs for the specified application and deployment group.
Get-CDDeploymentList -ApplicationName CodeDeployDemoApplication -DeploymentGroupName CodeDeployDemoFleetOutput:
d-QZMRGSTEX d-RR0T5KTEX-
For API details, see ListDeployments in AWS Tools for PowerShell Cmdlet Reference (V5).
-