GetCaseAuditEventsCommand

Returns the audit history about a specific case if it exists.

Example Syntax

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

import { ConnectCasesClient, GetCaseAuditEventsCommand } from "@aws-sdk/client-connectcases"; // ES Modules import
// const { ConnectCasesClient, GetCaseAuditEventsCommand } = require("@aws-sdk/client-connectcases"); // CommonJS import
const client = new ConnectCasesClient(config);
const input = { // GetCaseAuditEventsRequest
  caseId: "STRING_VALUE", // required
  domainId: "STRING_VALUE", // required
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new GetCaseAuditEventsCommand(input);
const response = await client.send(command);
// { // GetCaseAuditEventsResponse
//   nextToken: "STRING_VALUE",
//   auditEvents: [ // AuditEventsList // required
//     { // AuditEvent
//       eventId: "STRING_VALUE", // required
//       type: "STRING_VALUE", // required
//       relatedItemType: "STRING_VALUE",
//       performedTime: new Date("TIMESTAMP"), // required
//       fields: [ // AuditEventFieldList // required
//         { // AuditEventField
//           eventFieldId: "STRING_VALUE", // required
//           oldValue: { // AuditEventFieldValueUnion Union: only one key present
//             stringValue: "STRING_VALUE",
//             doubleValue: Number("double"),
//             booleanValue: true || false,
//             emptyValue: {},
//             userArnValue: "STRING_VALUE",
//           },
//           newValue: {//  Union: only one key present
//             stringValue: "STRING_VALUE",
//             doubleValue: Number("double"),
//             booleanValue: true || false,
//             emptyValue: {},
//             userArnValue: "STRING_VALUE",
//           },
//         },
//       ],
//       performedBy: { // AuditEventPerformedBy
//         user: { // UserUnion Union: only one key present
//           userArn: "STRING_VALUE",
//         },
//         iamPrincipalArn: "STRING_VALUE", // required
//       },
//     },
//   ],
// };

GetCaseAuditEventsCommand Input

See GetCaseAuditEventsCommandInput for more details

Parameter
Type
Description
caseId
Required
string | undefined

A unique identifier of the case.

domainId
Required
string | undefined

The unique identifier of the Cases domain.

maxResults
number | undefined

The maximum number of audit events to return. The current maximum supported value is 25. This is also the default when no other value is provided.

nextToken
string | undefined

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

GetCaseAuditEventsCommand Output

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

A list of case audits where each represents a particular edit of the case.

nextToken
string | undefined

The token for the next set of results. This is null if there are no more results to return.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

We couldn't process your request because of an issue with the server. Try again later.

ResourceNotFoundException
client

We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.

ThrottlingException
client

The rate has been exceeded for this API. Please try again after a few minutes.

ValidationException
client

The request isn't valid. Check the syntax and try again.

ConnectCasesServiceException
Base exception class for all service exceptions from ConnectCases service.