|
| 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 { commonParams } from "../endpoint/EndpointParameters"; |
| 8 | +import { DeleteAttachmentRequest, DeleteAttachmentResponse } from "../models/models_0"; |
| 9 | +import { de_DeleteAttachmentCommand, se_DeleteAttachmentCommand } from "../protocols/Aws_restJson1"; |
| 10 | +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link DeleteAttachmentCommand}. |
| 21 | + */ |
| 22 | +export interface DeleteAttachmentCommandInput extends DeleteAttachmentRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link DeleteAttachmentCommand}. |
| 27 | + */ |
| 28 | +export interface DeleteAttachmentCommandOutput extends DeleteAttachmentResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Deletes an attachment associated with a specific Amazon Q Business conversation.</p> |
| 32 | + * @example |
| 33 | + * Use a bare-bones client and the command you need to make an API call. |
| 34 | + * ```javascript |
| 35 | + * import { QBusinessClient, DeleteAttachmentCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import |
| 36 | + * // const { QBusinessClient, DeleteAttachmentCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import |
| 37 | + * const client = new QBusinessClient(config); |
| 38 | + * const input = { // DeleteAttachmentRequest |
| 39 | + * applicationId: "STRING_VALUE", // required |
| 40 | + * conversationId: "STRING_VALUE", // required |
| 41 | + * attachmentId: "STRING_VALUE", // required |
| 42 | + * userId: "STRING_VALUE", |
| 43 | + * }; |
| 44 | + * const command = new DeleteAttachmentCommand(input); |
| 45 | + * const response = await client.send(command); |
| 46 | + * // {}; |
| 47 | + * |
| 48 | + * ``` |
| 49 | + * |
| 50 | + * @param DeleteAttachmentCommandInput - {@link DeleteAttachmentCommandInput} |
| 51 | + * @returns {@link DeleteAttachmentCommandOutput} |
| 52 | + * @see {@link DeleteAttachmentCommandInput} for command's `input` shape. |
| 53 | + * @see {@link DeleteAttachmentCommandOutput} for command's `response` shape. |
| 54 | + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. |
| 55 | + * |
| 56 | + * @throws {@link AccessDeniedException} (client fault) |
| 57 | + * <p> You don't have access to perform this action. Make sure you have the required |
| 58 | + * permission policies and user accounts and try again.</p> |
| 59 | + * |
| 60 | + * @throws {@link InternalServerException} (server fault) |
| 61 | + * <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait |
| 62 | + * some minutes and try again, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> for help.</p> |
| 63 | + * |
| 64 | + * @throws {@link LicenseNotFoundException} (client fault) |
| 65 | + * <p>You don't have permissions to perform the action because your license is inactive. Ask |
| 66 | + * your admin to activate your license and try again after your licence is active.</p> |
| 67 | + * |
| 68 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 69 | + * <p>The application or plugin resource you want to use doesn’t exist. Make sure you have |
| 70 | + * provided the correct resource and try again.</p> |
| 71 | + * |
| 72 | + * @throws {@link ThrottlingException} (client fault) |
| 73 | + * <p>The request was denied due to throttling. Reduce the number of requests and try |
| 74 | + * again.</p> |
| 75 | + * |
| 76 | + * @throws {@link ValidationException} (client fault) |
| 77 | + * <p>The input doesn't meet the constraints set by the Amazon Q Business service. Provide the |
| 78 | + * correct input and try again.</p> |
| 79 | + * |
| 80 | + * @throws {@link QBusinessServiceException} |
| 81 | + * <p>Base exception class for all service exceptions from QBusiness service.</p> |
| 82 | + * |
| 83 | + * @public |
| 84 | + */ |
| 85 | +export class DeleteAttachmentCommand extends $Command |
| 86 | + .classBuilder< |
| 87 | + DeleteAttachmentCommandInput, |
| 88 | + DeleteAttachmentCommandOutput, |
| 89 | + QBusinessClientResolvedConfig, |
| 90 | + ServiceInputTypes, |
| 91 | + ServiceOutputTypes |
| 92 | + >() |
| 93 | + .ep(commonParams) |
| 94 | + .m(function (this: any, Command: any, cs: any, config: QBusinessClientResolvedConfig, o: any) { |
| 95 | + return [ |
| 96 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 97 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 98 | + ]; |
| 99 | + }) |
| 100 | + .s("ExpertQ", "DeleteAttachment", {}) |
| 101 | + .n("QBusinessClient", "DeleteAttachmentCommand") |
| 102 | + .f(void 0, void 0) |
| 103 | + .ser(se_DeleteAttachmentCommand) |
| 104 | + .de(de_DeleteAttachmentCommand) |
| 105 | + .build() { |
| 106 | + /** @internal type navigation helper, not in runtime. */ |
| 107 | + protected declare static __types: { |
| 108 | + api: { |
| 109 | + input: DeleteAttachmentRequest; |
| 110 | + output: {}; |
| 111 | + }; |
| 112 | + sdk: { |
| 113 | + input: DeleteAttachmentCommandInput; |
| 114 | + output: DeleteAttachmentCommandOutput; |
| 115 | + }; |
| 116 | + }; |
| 117 | +} |
0 commit comments