- 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.
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
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: |
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 |
maxResults | number | undefined | Maximum number of results to include in the response. If more results exist than the specified |
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 |
ListAppAssessmentsCommand Output
Parameter | Type | Description |
---|
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 |
---|
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. |