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 { GetDocumentContentRequest, GetDocumentContentResponse } from "../models/models_1";
9
+
import { de_GetDocumentContentCommand, se_GetDocumentContentCommand } 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 GetDocumentContentCommand}.
21
+
*/
22
+
export interface GetDocumentContentCommandInput extends GetDocumentContentRequest {}
23
+
/**
24
+
* @public
25
+
*
26
+
* The output of {@link GetDocumentContentCommand}.
27
+
*/
28
+
export interface GetDocumentContentCommandOutput extends GetDocumentContentResponse, __MetadataBearer {}
29
+
30
+
/**
31
+
* <p>Retrieves the content of a document that was ingested into Amazon Q Business. This API validates user authorization against document ACLs before returning a pre-signed URL for secure document access. You can download or view source documents referenced in chat responses through the URL.</p>
32
+
* @example
33
+
* Use a bare-bones client and the command you need to make an API call.
34
+
* ```javascript
35
+
* import { QBusinessClient, GetDocumentContentCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import
36
+
* // const { QBusinessClient, GetDocumentContentCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import
37
+
* const client = new QBusinessClient(config);
38
+
* const input = { // GetDocumentContentRequest
39
+
* applicationId: "STRING_VALUE", // required
40
+
* indexId: "STRING_VALUE", // required
41
+
* dataSourceId: "STRING_VALUE",
42
+
* documentId: "STRING_VALUE", // required
43
+
* outputFormat: "RAW",
44
+
* };
45
+
* const command = new GetDocumentContentCommand(input);
46
+
* const response = await client.send(command);
47
+
* // { // GetDocumentContentResponse
48
+
* // presignedUrl: "STRING_VALUE", // required
49
+
* // mimeType: "STRING_VALUE", // required
50
+
* // };
51
+
*
52
+
* ```
53
+
*
54
+
* @param GetDocumentContentCommandInput - {@link GetDocumentContentCommandInput}
55
+
* @returns {@link GetDocumentContentCommandOutput}
56
+
* @see {@link GetDocumentContentCommandInput} for command's `input` shape.
57
+
* @see {@link GetDocumentContentCommandOutput} for command's `response` shape.
58
+
* @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape.
59
+
*
60
+
* @throws {@link AccessDeniedException} (client fault)
61
+
* <p> You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.</p>
62
+
*
63
+
* @throws {@link InternalServerException} (server fault)
64
+
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> for help.</p>
65
+
*
66
+
* @throws {@link ResourceNotFoundException} (client fault)
67
+
* <p>The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.</p>
68
+
*
69
+
* @throws {@link ThrottlingException} (client fault)
70
+
* <p>The request was denied due to throttling. Reduce the number of requests and try again.</p>
71
+
*
72
+
* @throws {@link ValidationException} (client fault)
73
+
* <p>The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.</p>
74
+
*
75
+
* @throws {@link QBusinessServiceException}
76
+
* <p>Base exception class for all service exceptions from QBusiness service.</p>
77
+
*
78
+
*
79
+
* @public
80
+
*/
81
+
export class GetDocumentContentCommand extends $Command
82
+
.classBuilder<
83
+
GetDocumentContentCommandInput,
84
+
GetDocumentContentCommandOutput,
85
+
QBusinessClientResolvedConfig,
86
+
ServiceInputTypes,
87
+
ServiceOutputTypes
88
+
>()
89
+
.ep(commonParams)
90
+
.m(function (this: any, Command: any, cs: any, config: QBusinessClientResolvedConfig, o: any) {
91
+
return [
92
+
getSerdePlugin(config, this.serialize, this.deserialize),
93
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
94
+
];
95
+
})
96
+
.s("ExpertQ", "GetDocumentContent", {})
97
+
.n("QBusinessClient", "GetDocumentContentCommand")
98
+
.f(void 0, void 0)
99
+
.ser(se_GetDocumentContentCommand)
100
+
.de(de_GetDocumentContentCommand)
101
+
.build() {
102
+
/** @internal type navigation helper, not in runtime. */
103
+
protected declare static __types: {
104
+
api: {
105
+
input: GetDocumentContentRequest;
106
+
output: GetDocumentContentResponse;
107
+
};
108
+
sdk: {
109
+
input: GetDocumentContentCommandInput;
110
+
output: GetDocumentContentCommandOutput;
111
+
};
112
+
};
113
+
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4