- 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.
ListAppsCommand
Lists your Resilience Hub applications.
You can filter applications using only one filter at a time or without using any filter. If you try to filter applications using multiple filters, you will get the following error:
An error occurred (ValidationException) when calling the ListApps operation: Only one filter is supported for this operation.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ResiliencehubClient, ListAppsCommand } from "@aws-sdk/client-resiliencehub"; // ES Modules import
// const { ResiliencehubClient, ListAppsCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
const client = new ResiliencehubClient(config);
const input = { // ListAppsRequest
nextToken: "STRING_VALUE",
maxResults: Number("int"),
name: "STRING_VALUE",
appArn: "STRING_VALUE",
fromLastAssessmentTime: new Date("TIMESTAMP"),
toLastAssessmentTime: new Date("TIMESTAMP"),
reverseOrder: true || false,
awsApplicationArn: "STRING_VALUE",
};
const command = new ListAppsCommand(input);
const response = await client.send(command);
// { // ListAppsResponse
// appSummaries: [ // AppSummaryList // required
// { // AppSummary
// appArn: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// description: "STRING_VALUE",
// creationTime: new Date("TIMESTAMP"), // required
// complianceStatus: "PolicyBreached" || "PolicyMet" || "NotAssessed" || "ChangesDetected" || "NotApplicable" || "MissingPolicy",
// resiliencyScore: Number("double"),
// assessmentSchedule: "Disabled" || "Daily",
// status: "Active" || "Deleting",
// driftStatus: "NotChecked" || "NotDetected" || "Detected",
// lastAppComplianceEvaluationTime: new Date("TIMESTAMP"),
// rtoInSecs: Number("int"),
// rpoInSecs: Number("int"),
// awsApplicationArn: "STRING_VALUE",
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListAppsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
appArn | string | undefined | Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn: |
awsApplicationArn | string | undefined | Amazon Resource Name (ARN) of Resource Groups group that is integrated with an AppRegistry application. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide. |
fromLastAssessmentTime | Date | undefined | Lower limit of the range that is used to filter applications based on their last assessment times. |
maxResults | number | undefined | Maximum number of results to include in the response. If more results exist than the specified |
name | string | undefined | The name for the one of the listed applications. |
nextToken | string | undefined | Null, or the token from a previous call to get the next set of results. |
reverseOrder | boolean | undefined | The application list is sorted based on the values of |
toLastAssessmentTime | Date | undefined | Upper limit of the range that is used to filter the applications based on their last assessment times. |
ListAppsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
appSummaries Required | AppSummary[] | undefined | Summaries for the Resilience Hub application. |
nextToken | string | undefined | Token for the next set of results, or null if there are no more results. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. |
InternalServerException | server | This exception occurs when there is an internal failure in the Resilience Hub service. |
ThrottlingException | client | This exception occurs when you have exceeded the limit on the number of requests per second. |
ValidationException | client | This exception occurs when a request is not valid. |
ResiliencehubServiceException | Base exception class for all service exceptions from Resiliencehub service. |