|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { ConnectCasesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectCasesClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { GetCaseAuditEventsRequest, GetCaseAuditEventsResponse } from "../models/models_0"; |
| 10 | +import { de_GetCaseAuditEventsCommand, se_GetCaseAuditEventsCommand } from "../protocols/Aws_restJson1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export { __MetadataBearer, $Command }; |
| 16 | +/** |
| 17 | + * @public |
| 18 | + * |
| 19 | + * The input for {@link GetCaseAuditEventsCommand}. |
| 20 | + */ |
| 21 | +export interface GetCaseAuditEventsCommandInput extends GetCaseAuditEventsRequest {} |
| 22 | +/** |
| 23 | + * @public |
| 24 | + * |
| 25 | + * The output of {@link GetCaseAuditEventsCommand}. |
| 26 | + */ |
| 27 | +export interface GetCaseAuditEventsCommandOutput extends GetCaseAuditEventsResponse, __MetadataBearer {} |
| 28 | + |
| 29 | +/** |
| 30 | + * @public |
| 31 | + * <p>Returns the audit history about a specific case if it exists.</p> |
| 32 | + * @example |
| 33 | + * Use a bare-bones client and the command you need to make an API call. |
| 34 | + * ```javascript |
| 35 | + * import { ConnectCasesClient, GetCaseAuditEventsCommand } from "@aws-sdk/client-connectcases"; // ES Modules import |
| 36 | + * // const { ConnectCasesClient, GetCaseAuditEventsCommand } = require("@aws-sdk/client-connectcases"); // CommonJS import |
| 37 | + * const client = new ConnectCasesClient(config); |
| 38 | + * const input = { // GetCaseAuditEventsRequest |
| 39 | + * caseId: "STRING_VALUE", // required |
| 40 | + * domainId: "STRING_VALUE", // required |
| 41 | + * maxResults: Number("int"), |
| 42 | + * nextToken: "STRING_VALUE", |
| 43 | + * }; |
| 44 | + * const command = new GetCaseAuditEventsCommand(input); |
| 45 | + * const response = await client.send(command); |
| 46 | + * // { // GetCaseAuditEventsResponse |
| 47 | + * // nextToken: "STRING_VALUE", |
| 48 | + * // auditEvents: [ // AuditEventsList // required |
| 49 | + * // { // AuditEvent |
| 50 | + * // eventId: "STRING_VALUE", // required |
| 51 | + * // type: "STRING_VALUE", // required |
| 52 | + * // relatedItemType: "STRING_VALUE", |
| 53 | + * // performedTime: new Date("TIMESTAMP"), // required |
| 54 | + * // fields: [ // AuditEventFieldList // required |
| 55 | + * // { // AuditEventField |
| 56 | + * // eventFieldId: "STRING_VALUE", // required |
| 57 | + * // oldValue: { // AuditEventFieldValueUnion Union: only one key present |
| 58 | + * // stringValue: "STRING_VALUE", |
| 59 | + * // doubleValue: Number("double"), |
| 60 | + * // booleanValue: true || false, |
| 61 | + * // emptyValue: {}, |
| 62 | + * // userArnValue: "STRING_VALUE", |
| 63 | + * // }, |
| 64 | + * // newValue: {// Union: only one key present |
| 65 | + * // stringValue: "STRING_VALUE", |
| 66 | + * // doubleValue: Number("double"), |
| 67 | + * // booleanValue: true || false, |
| 68 | + * // emptyValue: {}, |
| 69 | + * // userArnValue: "STRING_VALUE", |
| 70 | + * // }, |
| 71 | + * // }, |
| 72 | + * // ], |
| 73 | + * // performedBy: { // AuditEventPerformedBy |
| 74 | + * // user: { // UserUnion Union: only one key present |
| 75 | + * // userArn: "STRING_VALUE", |
| 76 | + * // }, |
| 77 | + * // iamPrincipalArn: "STRING_VALUE", // required |
| 78 | + * // }, |
| 79 | + * // }, |
| 80 | + * // ], |
| 81 | + * // }; |
| 82 | + * |
| 83 | + * ``` |
| 84 | + * |
| 85 | + * @param GetCaseAuditEventsCommandInput - {@link GetCaseAuditEventsCommandInput} |
| 86 | + * @returns {@link GetCaseAuditEventsCommandOutput} |
| 87 | + * @see {@link GetCaseAuditEventsCommandInput} for command's `input` shape. |
| 88 | + * @see {@link GetCaseAuditEventsCommandOutput} for command's `response` shape. |
| 89 | + * @see {@link ConnectCasesClientResolvedConfig | config} for ConnectCasesClient's `config` shape. |
| 90 | + * |
| 91 | + * @throws {@link AccessDeniedException} (client fault) |
| 92 | + * <p>You do not have sufficient access to perform this action.</p> |
| 93 | + * |
| 94 | + * @throws {@link InternalServerException} (server fault) |
| 95 | + * <p>We couldn't process your request because of an issue with the server. Try again |
| 96 | + * later.</p> |
| 97 | + * |
| 98 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 99 | + * <p>We couldn't find the requested resource. Check that your resources exists and were created |
| 100 | + * in the same Amazon Web Services Region as your request, and try your request again.</p> |
| 101 | + * |
| 102 | + * @throws {@link ThrottlingException} (client fault) |
| 103 | + * <p>The rate has been exceeded for this API. Please try again after a few minutes.</p> |
| 104 | + * |
| 105 | + * @throws {@link ValidationException} (client fault) |
| 106 | + * <p>The request isn't valid. Check the syntax and try again.</p> |
| 107 | + * |
| 108 | + * @throws {@link ConnectCasesServiceException} |
| 109 | + * <p>Base exception class for all service exceptions from ConnectCases service.</p> |
| 110 | + * |
| 111 | + */ |
| 112 | +export class GetCaseAuditEventsCommand extends $Command |
| 113 | + .classBuilder< |
| 114 | + GetCaseAuditEventsCommandInput, |
| 115 | + GetCaseAuditEventsCommandOutput, |
| 116 | + ConnectCasesClientResolvedConfig, |
| 117 | + ServiceInputTypes, |
| 118 | + ServiceOutputTypes |
| 119 | + >() |
| 120 | + .ep({ |
| 121 | + ...commonParams, |
| 122 | + }) |
| 123 | + .m(function (this: any, Command: any, cs: any, config: ConnectCasesClientResolvedConfig, o: any) { |
| 124 | + return [ |
| 125 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 126 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 127 | + ]; |
| 128 | + }) |
| 129 | + .s("AmazonConnectCases", "GetCaseAuditEvents", {}) |
| 130 | + .n("ConnectCasesClient", "GetCaseAuditEventsCommand") |
| 131 | + .f(void 0, void 0) |
| 132 | + .ser(se_GetCaseAuditEventsCommand) |
| 133 | + .de(de_GetCaseAuditEventsCommand) |
| 134 | + .build() {} |
0 commit comments