Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class DescribeCasesCommandProtected

Returns a list of cases that you specify by passing one or more case IDs. You can use the afterTime and beforeTime parameters to filter the cases by date. You can set values for the includeResolvedCases and includeCommunications parameters to specify how much information to return.

The response returns the following in JSON format:

  • One or more CaseDetails data types.

  • One or more nextToken values, which specify where to paginate the returned records represented by the CaseDetails objects.

Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request might return an error.

  • You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.

  • If you call the Amazon Web Services Support API from an account that doesn't have a Business, Enterprise On-Ramp, or Enterprise Support plan, the SubscriptionRequiredException error message appears. For information about changing your support plan, see Amazon Web Services Support.

Example

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

import { SupportClient, DescribeCasesCommand } from "@aws-sdk/client-support"; // ES Modules import
// const { SupportClient, DescribeCasesCommand } = require("@aws-sdk/client-support"); // CommonJS import
const client = new SupportClient(config);
const input = { // DescribeCasesRequest
caseIdList: [ // CaseIdList
"STRING_VALUE",
],
displayId: "STRING_VALUE",
afterTime: "STRING_VALUE",
beforeTime: "STRING_VALUE",
includeResolvedCases: true || false,
nextToken: "STRING_VALUE",
maxResults: Number("int"),
language: "STRING_VALUE",
includeCommunications: true || false,
};
const command = new DescribeCasesCommand(input);
const response = await client.send(command);
// { // DescribeCasesResponse
// cases: [ // CaseList
// { // CaseDetails
// caseId: "STRING_VALUE",
// displayId: "STRING_VALUE",
// subject: "STRING_VALUE",
// status: "STRING_VALUE",
// serviceCode: "STRING_VALUE",
// categoryCode: "STRING_VALUE",
// severityCode: "STRING_VALUE",
// submittedBy: "STRING_VALUE",
// timeCreated: "STRING_VALUE",
// recentCommunications: { // RecentCaseCommunications
// communications: [ // CommunicationList
// { // Communication
// caseId: "STRING_VALUE",
// body: "STRING_VALUE",
// submittedBy: "STRING_VALUE",
// timeCreated: "STRING_VALUE",
// attachmentSet: [ // AttachmentSet
// { // AttachmentDetails
// attachmentId: "STRING_VALUE",
// fileName: "STRING_VALUE",
// },
// ],
// },
// ],
// nextToken: "STRING_VALUE",
// },
// ccEmailAddresses: [ // CcEmailAddressList
// "STRING_VALUE",
// ],
// language: "STRING_VALUE",
// },
// ],
// nextToken: "STRING_VALUE",
// };

Param

DescribeCasesCommandInput

Returns

DescribeCasesCommandOutput

See

Throws

CaseIdNotFound (client fault)

The requested caseId couldn't be located.

Throws

InternalServerError (server fault)

An internal server error occurred.

Throws

SupportServiceException

Base exception class for all service exceptions from Support service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods