- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListApplicationRevisionsCommand
Lists information about revisions for an application.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CodeDeployClient, ListApplicationRevisionsCommand } from "@aws-sdk/client-codedeploy"; // ES Modules import
// const { CodeDeployClient, ListApplicationRevisionsCommand } = require("@aws-sdk/client-codedeploy"); // CommonJS import
const client = new CodeDeployClient(config);
const input = { // ListApplicationRevisionsInput
applicationName: "STRING_VALUE", // required
sortBy: "registerTime" || "firstUsedTime" || "lastUsedTime",
sortOrder: "ascending" || "descending",
s3Bucket: "STRING_VALUE",
s3KeyPrefix: "STRING_VALUE",
deployed: "include" || "exclude" || "ignore",
nextToken: "STRING_VALUE",
};
const command = new ListApplicationRevisionsCommand(input);
const response = await client.send(command);
// { // ListApplicationRevisionsOutput
// revisions: [ // RevisionLocationList
// { // RevisionLocation
// revisionType: "S3" || "GitHub" || "String" || "AppSpecContent",
// s3Location: { // S3Location
// bucket: "STRING_VALUE",
// key: "STRING_VALUE",
// bundleType: "tar" || "tgz" || "zip" || "YAML" || "JSON",
// version: "STRING_VALUE",
// eTag: "STRING_VALUE",
// },
// gitHubLocation: { // GitHubLocation
// repository: "STRING_VALUE",
// commitId: "STRING_VALUE",
// },
// string: { // RawString
// content: "STRING_VALUE",
// sha256: "STRING_VALUE",
// },
// appSpecContent: { // AppSpecContent
// content: "STRING_VALUE",
// sha256: "STRING_VALUE",
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListApplicationRevisionsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
applicationName Required | string | undefined | The name of an CodeDeploy application associated with the user or Amazon Web Services account. |
deployed | ListStateFilterAction | undefined | Whether to list revisions based on whether the revision is the target revision of a deployment group:
|
nextToken | string | undefined | An identifier returned from the previous |
s3Bucket | string | undefined | An Amazon S3 bucket name to limit the search for revisions. If set to null, all of the user's buckets are searched. |
s3KeyPrefix | string | undefined | A key prefix for the set of Amazon S3 objects to limit the search for revisions. |
sortBy | ApplicationRevisionSortBy | undefined | The column name to use to sort the list results:
If not specified or set to null, the results are returned in an arbitrary order. |
sortOrder | SortOrder | undefined | The order in which to sort the list results:
If not specified, the results are sorted in ascending order. If set to null, the results are sorted in an arbitrary order. |
ListApplicationRevisionsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
nextToken | string | undefined | 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. |
revisions | RevisionLocation[] | undefined | A list of locations that contain the matching revisions. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ApplicationDoesNotExistException | client | The application does not exist with the user or Amazon Web Services account. |
ApplicationNameRequiredException | client | The minimum number of required application names was not specified. |
BucketNameFilterRequiredException | client | A bucket name is required, but was not provided. |
InvalidApplicationNameException | client | The application name was specified in an invalid format. |
InvalidBucketNameFilterException | client | The bucket name either doesn't exist or was specified in an invalid format. |
InvalidDeployedStateFilterException | client | The deployed state filter was specified in an invalid format. |
InvalidKeyPrefixFilterException | client | The specified key prefix filter was specified in an invalid format. |
InvalidNextTokenException | client | The next token was specified in an invalid format. |
InvalidSortByException | client | The column name to sort by is either not present or was specified in an invalid format. |
InvalidSortOrderException | client | The sort order was specified in an invalid format. |
CodeDeployServiceException | Base exception class for all service exceptions from CodeDeploy service. |