BatchGetApplicationRevisions
Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25.
Request Syntax
{
"applicationName": "string
",
"revisions": [
{
"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
"
}
}
]
}
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 about which to get revision information.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
- revisions
-
An array of
RevisionLocation
objects that specify information to get about the application revisions, including type and location. The maximum number ofRevisionLocation
objects you can specify is 25.Type: Array of RevisionLocation objects
Required: Yes
Response Syntax
{
"applicationName": "string",
"errorMessage": "string",
"revisions": [
{
"genericRevisionInfo": {
"deploymentGroups": [ "string" ],
"description": "string",
"firstUsedTime": number,
"lastUsedTime": number,
"registerTime": number
},
"revisionLocation": {
"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"
}
}
}
]
}
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.
- applicationName
-
The name of the application that corresponds to the revisions.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
- errorMessage
-
Information about errors that might have occurred during the API call.
Type: String
- revisions
-
Additional information about the revisions, including the type and location.
Type: Array of RevisionInfo objects
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
- InvalidApplicationNameException
-
The application name was specified in an invalid format.
HTTP Status Code: 400
- InvalidRevisionException
-
The revision was specified in an invalid format.
HTTP Status Code: 400
- RevisionRequiredException
-
The revision ID was not specified.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of BatchGetApplicationRevisions.
Sample Request
POST / HTTP/1.1
Host: codedeploy.us-east-1.amazonaws.com
Accept-Encoding: identity
Content-Length: 284
X-Amz-Target: CodeDeploy_20141006.BatchGetApplicationRevisions
X-Amz-Date: 20160707T172627Z
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/20160707/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",
"revisions": [
{
"revisionType": "S3",
"s3Location": {
"bundleType": "zip",
"version": "4eQLXx7nw0iP22hxwt2_YXrUq972qkG6",
"bucket": "project-123",
"key": "North-App.zip",
"eTag": "3fdd7b9196697a096d5af1d649e26a4a"
}
},
{
"revisionType": "S3",
"s3Location": {
"bundleType": "zip",
"version": "BXrUq974e0iP22hxwt2_QLXx7nw3kjB9",
"bucket": "project-123",
"key": "North-App-2.zip",
"eTag": "4hfj7b911d649e26a4a45390a096d5af"
}
}
]
}
Sample Response
{
"applicationName": "TestApp-us-east-1",
"errorMessage": "",
"revisions": [
{
"genericRevisionInfo": {
"deploymentGroups": [
"dep-group-def-456"
],
"description": "Application revision registered by Deployment ID: d-D1EGTDV3C",
"firstUsedTime": 1446232255.734,
"lastUsedTime": 1446232255.734,
"registerTime": 1446232255.734
},
"revisionType": "S3",
"s3Location": {
"bucket": "project-1234",
"bundleType": "zip",
"eTag": "3fdd7b9196697a096d5af1d649e26a4a",
"key": "North-App.zip",
"version": "4eQLXx7nw0iP22hxwt2_YXrUq972qkG6"
}
},
{
"genericRevisionInfo": {
"deploymentGroups": [
"dep-group-def-456"
],
"description": "Application revision registered by Deployment ID: d-F8ROHSIK3K",
"firstUsedTime": 1455988916.108,
"lastUsedTime": 1455988916.288,
"registerTime": 1455988912.217
},
"revisionType": "S3",
"s3Location": {
"bucket": "project-1234",
"bundleType": "zip",
"eTag": "4hfj7b911d649e26a4a45390a096d5af",
"key": "North-App-2.zip",
"version": "BXrUq974e0iP22hxwt2_QLXx7nw3kjB9"
}
}
]
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: