ListApplicationRevisions - Amazon CodeDeploy
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ListApplicationRevisions

Lists information about revisions for an application.

Request Syntax

{ "applicationName": "string", "deployed": "string", "nextToken": "string", "s3Bucket": "string", "s3KeyPrefix": "string", "sortBy": "string", "sortOrder": "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 Amazon CodeDeploy application associated with the user or Amazon Web Services account.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: Yes

deployed

Whether to list revisions based on whether the revision is the target revision of a deployment group:

  • include: List revisions that are target revisions of a deployment group.

  • exclude: Do not list revisions that are target revisions of a deployment group.

  • ignore: List all revisions.

Type: String

Valid Values: include | exclude | ignore

Required: No

nextToken

An identifier returned from the previous ListApplicationRevisions call. It can be used to return the next set of applications in the list.

Type: String

Required: No

s3Bucket

An Amazon S3 bucket name to limit the search for revisions.

If set to null, all of the user's buckets are searched.

Type: String

Required: No

s3KeyPrefix

A key prefix for the set of Amazon S3 objects to limit the search for revisions.

Type: String

Required: No

sortBy

The column name to use to sort the list results:

  • registerTime: Sort by the time the revisions were registered with Amazon CodeDeploy.

  • firstUsedTime: Sort by the time the revisions were first used in a deployment.

  • lastUsedTime: Sort by the time the revisions were last used in a deployment.

If not specified or set to null, the results are returned in an arbitrary order.

Type: String

Valid Values: registerTime | firstUsedTime | lastUsedTime

Required: No

sortOrder

The order in which to sort the list results:

  • ascending: ascending order.

  • descending: descending order.

If not specified, the results are sorted in ascending order.

If set to null, the results are sorted in an arbitrary order.

Type: String

Valid Values: ascending | descending

Required: No

Response Syntax

{ "nextToken": "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" } } ] }

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.

nextToken

If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list application revisions call to return the next set of application revisions in the list.

Type: String

revisions

A list of locations that contain the matching revisions.

Type: Array of RevisionLocation 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 Amazon Web Services account.

HTTP Status Code: 400

ApplicationNameRequiredException

The minimum number of required application names was not specified.

HTTP Status Code: 400

BucketNameFilterRequiredException

A bucket name is required, but was not provided.

HTTP Status Code: 400

InvalidApplicationNameException

The application name was specified in an invalid format.

HTTP Status Code: 400

InvalidBucketNameFilterException

The bucket name either doesn't exist or was specified in an invalid format.

HTTP Status Code: 400

InvalidDeployedStateFilterException

The deployed state filter was specified in an invalid format.

HTTP Status Code: 400

InvalidKeyPrefixFilterException

The specified key prefix filter was specified in an invalid format.

HTTP Status Code: 400

InvalidNextTokenException

The next token was specified in an invalid format.

HTTP Status Code: 400

InvalidSortByException

The column name to sort by is either not present or was specified in an invalid format.

HTTP Status Code: 400

InvalidSortOrderException

The sort order was specified in an invalid format.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of ListApplicationRevisions.

Sample Request

POST / HTTP/1.1 Host: codedeploy.us-east-1.amazonaws.com Accept-Encoding: identity Content-Length: 45 X-Amz-Target: CodeDeploy_20141006.ListApplicationRevisions X-Amz-Date: 20160707T021008Z 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" }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: 8000a419-88e2-11e5-b497-75c493756c4d Content-Type: application/x-amz-json-1.1 Content-Length: 611 { "revisions": [ { "revisionType": "S3", "s3Location": { "bucket": "project-1234", "bundleType": "zip", "eTag": "3fdd7b3456697a096d5af1d649e26a4a", "key": "North-App.zip" } }, { "revisionType": "S3", "s3Location": { "bucket": "project-1234", "bundleType": "zip", "eTag": "\"3fdd7b9142497a096d5af1d649e26a4a\"", "key": "North-App.zip" } }, { "revisionType": "S3", "s3Location": { "bucket": "project-1234", "bundleType": "zip", "eTag": "ffe5402cff48b652bf903700453f7408", "key": "North-App.zip" } }, { "revisionType": "S3", "s3Location": { "bucket": "project-1234", "bundleType": "zip", "eTag": "fff9102vdf48b652bf903700453f7408", "key": "North-App.zip" } } ] }

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: