There are more AWS SDK examples available in the AWS Doc SDK Examples
Use ListDeploymentGroups with a CLI
The following code examples show how to use ListDeploymentGroups.
- CLI
-
- AWS CLI
-
To get information about deployment groups
The following
list-deployment-groupsexample displays information about all deployment groups that are associated with the specified application.aws deploy list-deployment-groups --application-nameWordPress_AppOutput:
{ "applicationName": "WordPress_App", "deploymentGroups": [ "WordPress_DG", "WordPress_Beta_DG" ] }-
For API details, see ListDeploymentGroups
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example gets a list of deployment groups for the specified application.
Get-CDDeploymentGroupList -ApplicationName CodeDeployDemoApplicationOutput:
ApplicationName DeploymentGroups NextToken --------------- ---------------- --------- CodeDeployDemoApplication {CodeDeployDemoFleet, CodeDeployProductionFleet}-
For API details, see ListDeploymentGroups in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example gets a list of deployment groups for the specified application.
Get-CDDeploymentGroupList -ApplicationName CodeDeployDemoApplicationOutput:
ApplicationName DeploymentGroups NextToken --------------- ---------------- --------- CodeDeployDemoApplication {CodeDeployDemoFleet, CodeDeployProductionFleet}-
For API details, see ListDeploymentGroups in AWS Tools for PowerShell Cmdlet Reference (V5).
-