BatchGetDeploymentGroups
Gets information about one or more deployment groups.
Request Syntax
{
"applicationName": "string
",
"deploymentGroupNames": [ "string
" ]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- applicationName
-
The name of an AWS CodeDeploy application associated with the applicable user or AWS account.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
- deploymentGroupNames
-
The names of the deployment groups.
Type: Array of strings
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
Response Syntax
{
"deploymentGroupsInfo": [
{
"alarmConfiguration": {
"alarms": [
{
"name": "string"
}
],
"enabled": boolean,
"ignorePollAlarmFailure": boolean
},
"applicationName": "string",
"autoRollbackConfiguration": {
"enabled": boolean,
"events": [ "string" ]
},
"autoScalingGroups": [
{
"hook": "string",
"name": "string",
"terminationHook": "string"
}
],
"blueGreenDeploymentConfiguration": {
"deploymentReadyOption": {
"actionOnTimeout": "string",
"waitTimeInMinutes": number
},
"greenFleetProvisioningOption": {
"action": "string"
},
"terminateBlueInstancesOnDeploymentSuccess": {
"action": "string",
"terminationWaitTimeInMinutes": number
}
},
"computePlatform": "string",
"deploymentConfigName": "string",
"deploymentGroupId": "string",
"deploymentGroupName": "string",
"deploymentStyle": {
"deploymentOption": "string",
"deploymentType": "string"
},
"ec2TagFilters": [
{
"Key": "string",
"Type": "string",
"Value": "string"
}
],
"ec2TagSet": {
"ec2TagSetList": [
[
{
"Key": "string",
"Type": "string",
"Value": "string"
}
]
]
},
"ecsServices": [
{
"clusterName": "string",
"serviceName": "string"
}
],
"lastAttemptedDeployment": {
"createTime": number,
"deploymentId": "string",
"endTime": number,
"status": "string"
},
"lastSuccessfulDeployment": {
"createTime": number,
"deploymentId": "string",
"endTime": number,
"status": "string"
},
"loadBalancerInfo": {
"elbInfoList": [
{
"name": "string"
}
],
"targetGroupInfoList": [
{
"name": "string"
}
],
"targetGroupPairInfoList": [
{
"prodTrafficRoute": {
"listenerArns": [ "string" ]
},
"targetGroups": [
{
"name": "string"
}
],
"testTrafficRoute": {
"listenerArns": [ "string" ]
}
}
]
},
"onPremisesInstanceTagFilters": [
{
"Key": "string",
"Type": "string",
"Value": "string"
}
],
"onPremisesTagSet": {
"onPremisesTagSetList": [
[
{
"Key": "string",
"Type": "string",
"Value": "string"
}
]
]
},
"outdatedInstancesStrategy": "string",
"serviceRoleArn": "string",
"targetRevision": {
"appSpecContent": {
"content": "string",
"sha256": "string"
},
"gitHubLocation": {
"commitId": "string",
"repository": "string"
},
"revisionType": "string",
"s3Location": {
"bucket": "string",
"bundleType": "string",
"eTag": "string",
"key": "string",
"version": "string"
},
"string": {
"content": "string",
"sha256": "string"
}
},
"terminationHookEnabled": boolean,
"triggerConfigurations": [
{
"triggerEvents": [ "string" ],
"triggerName": "string",
"triggerTargetArn": "string"
}
]
}
],
"errorMessage": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- deploymentGroupsInfo
-
Information about the deployment groups.
Type: Array of DeploymentGroupInfo objects
- errorMessage
-
Information about errors that might have occurred during the API call.
Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
- ApplicationDoesNotExistException
-
The application does not exist with the user or AWS account.
HTTP Status Code: 400
- ApplicationNameRequiredException
-
The minimum number of required application names was not specified.
HTTP Status Code: 400
- BatchLimitExceededException
-
The maximum number of names or IDs allowed for this request (100) was exceeded.
HTTP Status Code: 400
- DeploymentConfigDoesNotExistException
-
The deployment configuration does not exist with the user or AWS account.
HTTP Status Code: 400
- DeploymentGroupNameRequiredException
-
The deployment group name was not specified.
HTTP Status Code: 400
- InvalidApplicationNameException
-
The application name was specified in an invalid format.
HTTP Status Code: 400
- InvalidDeploymentGroupNameException
-
The deployment group name was specified in an invalid format.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of BatchGetDeploymentGroups.
Sample Request
POST / HTTP/1.1
Host: codedeploy.us-east-1.amazonaws.com
Accept-Encoding: identity
Content-Length: 90
X-Amz-Target: CodeDeploy_20141006.BatchGetDeploymentGroups
X-Amz-Date: 20160317T175340Z
User-Agent: aws-cli/1.10.6 Python/2.7.9 Windows/7 botocore/1.3.28
Content-Type: application/x-amz-json-1.1
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20160317/us-east-1/codedeploy/aws4_request,
SignedHeaders=content-type;host;user-agent;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE
{
"applicationName": "TestApp-us-east-1",
"deploymentGroupNames": [
"dep-group-def-456",
"dep-group-jkl-234"
]
}
Sample Response
{
"deploymentGroupsInfo": [
{
"applicationName": "TestApp-us-east-1",
"autoRollbackConfiguration": {
"enabled": false
},
"autoScalingGroups": [],
"deploymentConfigName": "CodeDeployDefault.OneAtATime",
"deploymentGroupId": "d-DBF57CS3H",
"deploymentGroupName": "dep-group-def-456",
"deploymentStyle": {
"deploymentOption": "WITHOUT_TRAFFIC_CONTROL",
"deploymentType": "IN_PLACE"
},
"ec2TagFilters": [
{
"Key": "Name",
"Type": "KEY_AND_VALUE",
"Value": "Project-ABC"
}
],
"onPremisesInstanceTagFilters": [],
"serviceRoleArn": "arn:aws:iam::444455556666:role/AnyCompany-service-role",
"targetRevision": {
"revisionType": "S3",
"s3Location": {
"bucket": "project-abc",
"bundleType": "zip",
"eTag": "ffe5402cff48b652bf903700453f7408",
"key": "North-App-3.zip",
"version": "4eQLXx7nw0iP22hxwt2_YXrUq972qkG6"
}
},
"triggerConfigurations": [
{
"triggerEvents": [
"DeploymentFailure"
],
"triggerName": "Trigger-group-us-east-1-deploy-fail",
"triggerTargetArn": "arn:aws:sns:us-east-1:80398EXAMPLE:us-east-deploy-fail"
}
]
},
{
"applicationName": "TestApp-us-east-1",
"autoRollbackConfiguration": {
"enabled": false
},
"autoScalingGroups": [],
"deploymentConfigName": "CodeDeployDefault.OneAtATime",
"deploymentGroupId": "d-DCS73HBF5",
"deploymentGroupName": "dep-group-def-456",
"deploymentStyle": {
"deploymentOption": "WITHOUT_TRAFFIC_CONTROL",
"deploymentType": "IN_PLACE"
},
"ec2TagFilters": [
{
"Key": "Name",
"Type": "KEY_AND_VALUE",
"Value": "Project-DEF"
}
],
"onPremisesInstanceTagFilters": [],
"serviceRoleArn": "arn:aws:iam::444455556666:role/AnyCompany-service-role",
"targetRevision": {
"revisionType": "S3",
"s3Location": {
"bucket": "project-def",
"bundleType": "zip",
"eTag": "3fdd7b9196697a096d5af1d649e26a4a",
"key": "North-App-3.zip",
"version": "BXrUq974e0iP22hxwt2_QLXx7nw3kjB9"
}
},
"triggerConfigurations": [
{
"triggerEvents": [
"DeploymentSuccess"
],
"triggerName": "Trigger-group-us-east-1-deploy-succeed",
"triggerTargetArn": "arn:aws:sns:us-east-1:80398EXAMPLE:us-east-deploy-succeed"
}
]
}
],
"errorMessage": ""
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: