ListAppAssessmentsCommand

Lists the assessments for an Resilience Hub application. You can use request parameters to refine the results for the response object.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ResiliencehubClient, ListAppAssessmentsCommand } from "@aws-sdk/client-resiliencehub"; // ES Modules import
// const { ResiliencehubClient, ListAppAssessmentsCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
const client = new ResiliencehubClient(config);
const input = { // ListAppAssessmentsRequest
  appArn: "STRING_VALUE",
  assessmentName: "STRING_VALUE",
  assessmentStatus: [ // AssessmentStatusList
    "Pending" || "InProgress" || "Failed" || "Success",
  ],
  complianceStatus: "PolicyBreached" || "PolicyMet" || "NotApplicable" || "MissingPolicy",
  invoker: "User" || "System",
  reverseOrder: true || false,
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListAppAssessmentsCommand(input);
const response = await client.send(command);
// { // ListAppAssessmentsResponse
//   nextToken: "STRING_VALUE",
//   assessmentSummaries: [ // AppAssessmentSummaryList // required
//     { // AppAssessmentSummary
//       appArn: "STRING_VALUE",
//       appVersion: "STRING_VALUE",
//       assessmentStatus: "Pending" || "InProgress" || "Failed" || "Success", // required
//       invoker: "User" || "System",
//       startTime: new Date("TIMESTAMP"),
//       endTime: new Date("TIMESTAMP"),
//       message: "STRING_VALUE",
//       assessmentName: "STRING_VALUE",
//       assessmentArn: "STRING_VALUE", // required
//       complianceStatus: "PolicyBreached" || "PolicyMet" || "NotApplicable" || "MissingPolicy",
//       cost: { // Cost
//         amount: Number("double"), // required
//         currency: "STRING_VALUE", // required
//         frequency: "Hourly" || "Daily" || "Monthly" || "Yearly", // required
//       },
//       resiliencyScore: Number("double"),
//       versionName: "STRING_VALUE",
//       driftStatus: "NotChecked" || "NotDetected" || "Detected",
//     },
//   ],
// };

ListAppAssessmentsCommand Input

See ListAppAssessmentsCommandInput for more details

Parameter
Type
Description
appArn
string | undefined

Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs)  in the Amazon Web Services General Reference guide.

assessmentName
string | undefined

The name for the assessment.

assessmentStatus
AssessmentStatus[] | undefined

The current status of the assessment for the resiliency policy.

complianceStatus
ComplianceStatus | undefined

The current status of compliance for the resiliency policy.

invoker
AssessmentInvoker | undefined

Specifies the entity that invoked a specific assessment, either a User or the System.

maxResults
number | undefined

Maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

nextToken
string | undefined

Null, or the token from a previous call to get the next set of results.

reverseOrder
boolean | undefined

The default is to sort by ascending startTime. To sort by descending startTime, set reverseOrder to true.

ListAppAssessmentsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
assessmentSummaries
Required
AppAssessmentSummary[] | undefined

The summaries for the specified assessments, returned as an object. This object includes application versions, associated Amazon Resource Numbers (ARNs), cost, messages, resiliency scores, and more.

nextToken
string | undefined

Token for the next set of results, or null if there are no more results.

Throws

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.

ResourceNotFoundException
client

This exception occurs when the specified resource could not be found.

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.