ListCasesCommand

Grants permission to list all cases the requester has access to.

Example Syntax

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

import { SecurityIRClient, ListCasesCommand } from "@aws-sdk/client-security-ir"; // ES Modules import
// const { SecurityIRClient, ListCasesCommand } = require("@aws-sdk/client-security-ir"); // CommonJS import
const client = new SecurityIRClient(config);
const input = { // ListCasesRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListCasesCommand(input);
const response = await client.send(command);
// { // ListCasesResponse
//   nextToken: "STRING_VALUE",
//   items: [ // ListCasesItems
//     { // ListCasesItem
//       caseId: "STRING_VALUE", // required
//       lastUpdatedDate: new Date("TIMESTAMP"),
//       title: "STRING_VALUE",
//       caseArn: "STRING_VALUE",
//       engagementType: "Security Incident" || "Investigation",
//       caseStatus: "Submitted" || "Acknowledged" || "Detection and Analysis" || "Containment, Eradication and Recovery" || "Post-incident Activities" || "Ready to Close" || "Closed",
//       createdDate: new Date("TIMESTAMP"),
//       closedDate: new Date("TIMESTAMP"),
//       resolverType: "AWS" || "Self",
//       pendingAction: "Customer" || "None",
//     },
//   ],
//   total: Number("long"),
// };

Example Usage

//
const input = {
maxResults: 10
};
const command = new ListCasesCommand(input);
const response = await client.send(command);
/* response is
{
items: [
{
caseArn: "arn:aws:security-ir:us-west-1:123456789012:case/1234567890",
caseId: "8403556009",
caseStatus: "Acknowledged",
createdDate: "2023-01-27T15:32:01.789Z",
engagementType: "Security Incident",
lastUpdatedDate: "2023-03-27T15:32:01.789Z",
pendingAction: "None",
resolverType: "Self",
title: "Example case title"
}
],
total: 1
}
*\/
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
JavaScriptLn 1, Col 1
Errors: 0 Warnings: 0

ListCasesCommand Input

See ListCasesCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

Optional element for ListCases to limit the number of responses.

nextToken
string | undefined

Optional element.

ListCasesCommand Output

See ListCasesCommandOutput for details

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

Response element for ListCases that includes caseARN, caseID, caseStatus, closedDate, createdDate, engagementType, lastUpdatedDate, pendingAction, resolverType, and title for each response.

nextToken
string | undefined

Optional element.

total
number | undefined

Response element for ListCases providing the total number of responses.

Throws

Name
Fault
Details
AccessDeniedException
client
<p/>
ConflictException
client
<p/>
InternalServerException
server
<p/>
InvalidTokenException
client
<p/>
ResourceNotFoundException
client
<p/>
SecurityIncidentResponseNotActiveException
client
<p/>
ServiceQuotaExceededException
client
<p/>
ThrottlingException
client
<p/>
ValidationException
client
<p/>
SecurityIRServiceException
Base exception class for all service exceptions from SecurityIR service.