@aws-sdk/client-kendra 3.357.0 → 3.358.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist-cjs/Kendra.js +2 -0
- package/dist-cjs/commands/RetrieveCommand.js +46 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +96 -2
- package/dist-es/Kendra.js +2 -0
- package/dist-es/commands/RetrieveCommand.js +42 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +92 -0
- package/dist-types/Kendra.d.ts +7 -0
- package/dist-types/KendraClient.d.ts +3 -2
- package/dist-types/commands/QueryCommand.d.ts +15 -12
- package/dist-types/commands/RetrieveCommand.d.ts +263 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +30 -29
- package/dist-types/models/models_1.d.ts +145 -46
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/Kendra.d.ts +17 -0
- package/dist-types/ts3.4/KendraClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_1.d.ts +22 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -618,6 +618,14 @@ Query
|
|
|
618
618
|
|
|
619
619
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-kendra/classes/querycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-kendra/interfaces/querycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-kendra/interfaces/querycommandoutput.html)
|
|
620
620
|
|
|
621
|
+
</details>
|
|
622
|
+
<details>
|
|
623
|
+
<summary>
|
|
624
|
+
Retrieve
|
|
625
|
+
</summary>
|
|
626
|
+
|
|
627
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-kendra/classes/retrievecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-kendra/interfaces/retrievecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-kendra/interfaces/retrievecommandoutput.html)
|
|
628
|
+
|
|
621
629
|
</details>
|
|
622
630
|
<details>
|
|
623
631
|
<summary>
|
package/dist-cjs/Kendra.js
CHANGED
|
@@ -54,6 +54,7 @@ const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceComm
|
|
|
54
54
|
const ListThesauriCommand_1 = require("./commands/ListThesauriCommand");
|
|
55
55
|
const PutPrincipalMappingCommand_1 = require("./commands/PutPrincipalMappingCommand");
|
|
56
56
|
const QueryCommand_1 = require("./commands/QueryCommand");
|
|
57
|
+
const RetrieveCommand_1 = require("./commands/RetrieveCommand");
|
|
57
58
|
const StartDataSourceSyncJobCommand_1 = require("./commands/StartDataSourceSyncJobCommand");
|
|
58
59
|
const StopDataSourceSyncJobCommand_1 = require("./commands/StopDataSourceSyncJobCommand");
|
|
59
60
|
const SubmitFeedbackCommand_1 = require("./commands/SubmitFeedbackCommand");
|
|
@@ -121,6 +122,7 @@ const commands = {
|
|
|
121
122
|
ListThesauriCommand: ListThesauriCommand_1.ListThesauriCommand,
|
|
122
123
|
PutPrincipalMappingCommand: PutPrincipalMappingCommand_1.PutPrincipalMappingCommand,
|
|
123
124
|
QueryCommand: QueryCommand_1.QueryCommand,
|
|
125
|
+
RetrieveCommand: RetrieveCommand_1.RetrieveCommand,
|
|
124
126
|
StartDataSourceSyncJobCommand: StartDataSourceSyncJobCommand_1.StartDataSourceSyncJobCommand,
|
|
125
127
|
StopDataSourceSyncJobCommand: StopDataSourceSyncJobCommand_1.StopDataSourceSyncJobCommand,
|
|
126
128
|
SubmitFeedbackCommand: SubmitFeedbackCommand_1.SubmitFeedbackCommand,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetrieveCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
9
|
+
class RetrieveCommand extends smithy_client_1.Command {
|
|
10
|
+
static getEndpointParameterInstructions() {
|
|
11
|
+
return {
|
|
12
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
13
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
14
|
+
Region: { type: "builtInParams", name: "region" },
|
|
15
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
constructor(input) {
|
|
19
|
+
super();
|
|
20
|
+
this.input = input;
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, RetrieveCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "KendraClient";
|
|
28
|
+
const commandName = "RetrieveCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: (_) => _,
|
|
34
|
+
outputFilterSensitiveLog: (_) => _,
|
|
35
|
+
};
|
|
36
|
+
const { requestHandler } = configuration;
|
|
37
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
38
|
+
}
|
|
39
|
+
serialize(input, context) {
|
|
40
|
+
return (0, Aws_json1_1_1.se_RetrieveCommand)(input, context);
|
|
41
|
+
}
|
|
42
|
+
deserialize(output, context) {
|
|
43
|
+
return (0, Aws_json1_1_1.de_RetrieveCommand)(output, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.RetrieveCommand = RetrieveCommand;
|
|
@@ -53,6 +53,7 @@ tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
|
|
|
53
53
|
tslib_1.__exportStar(require("./ListThesauriCommand"), exports);
|
|
54
54
|
tslib_1.__exportStar(require("./PutPrincipalMappingCommand"), exports);
|
|
55
55
|
tslib_1.__exportStar(require("./QueryCommand"), exports);
|
|
56
|
+
tslib_1.__exportStar(require("./RetrieveCommand"), exports);
|
|
56
57
|
tslib_1.__exportStar(require("./StartDataSourceSyncJobCommand"), exports);
|
|
57
58
|
tslib_1.__exportStar(require("./StopDataSourceSyncJobCommand"), exports);
|
|
58
59
|
tslib_1.__exportStar(require("./SubmitFeedbackCommand"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.se_ListThesauriCommand = exports.se_ListTagsForResourceCommand = exports.se_ListQuerySuggestionsBlockListsCommand = exports.se_ListIndicesCommand = exports.se_ListGroupsOlderThanOrderingIdCommand = exports.se_ListFeaturedResultsSetsCommand = exports.se_ListFaqsCommand = exports.se_ListExperiencesCommand = exports.se_ListExperienceEntitiesCommand = exports.se_ListEntityPersonasCommand = exports.se_ListDataSourceSyncJobsCommand = exports.se_ListDataSourcesCommand = exports.se_ListAccessControlConfigurationsCommand = exports.se_GetSnapshotsCommand = exports.se_GetQuerySuggestionsCommand = exports.se_DisassociatePersonasFromEntitiesCommand = exports.se_DisassociateEntitiesFromExperienceCommand = exports.se_DescribeThesaurusCommand = exports.se_DescribeQuerySuggestionsConfigCommand = exports.se_DescribeQuerySuggestionsBlockListCommand = exports.se_DescribePrincipalMappingCommand = exports.se_DescribeIndexCommand = exports.se_DescribeFeaturedResultsSetCommand = exports.se_DescribeFaqCommand = exports.se_DescribeExperienceCommand = exports.se_DescribeDataSourceCommand = exports.se_DescribeAccessControlConfigurationCommand = exports.se_DeleteThesaurusCommand = exports.se_DeleteQuerySuggestionsBlockListCommand = exports.se_DeletePrincipalMappingCommand = exports.se_DeleteIndexCommand = exports.se_DeleteFaqCommand = exports.se_DeleteExperienceCommand = exports.se_DeleteDataSourceCommand = exports.se_DeleteAccessControlConfigurationCommand = exports.se_CreateThesaurusCommand = exports.se_CreateQuerySuggestionsBlockListCommand = exports.se_CreateIndexCommand = exports.se_CreateFeaturedResultsSetCommand = exports.se_CreateFaqCommand = exports.se_CreateExperienceCommand = exports.se_CreateDataSourceCommand = exports.se_CreateAccessControlConfigurationCommand = exports.se_ClearQuerySuggestionsCommand = exports.se_BatchPutDocumentCommand = exports.se_BatchGetDocumentStatusCommand = exports.se_BatchDeleteFeaturedResultsSetCommand = exports.se_BatchDeleteDocumentCommand = exports.se_AssociatePersonasToEntitiesCommand = exports.se_AssociateEntitiesToExperienceCommand = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.de_UpdateThesaurusCommand = exports.de_UpdateQuerySuggestionsConfigCommand = exports.de_UpdateQuerySuggestionsBlockListCommand = exports.de_UpdateIndexCommand = exports.de_UpdateFeaturedResultsSetCommand = exports.de_UpdateExperienceCommand = exports.de_UpdateDataSourceCommand = exports.de_UpdateAccessControlConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SubmitFeedbackCommand = exports.de_StopDataSourceSyncJobCommand = exports.de_StartDataSourceSyncJobCommand = exports.de_QueryCommand = exports.de_PutPrincipalMappingCommand = exports.de_ListThesauriCommand = exports.de_ListTagsForResourceCommand = exports.de_ListQuerySuggestionsBlockListsCommand = exports.de_ListIndicesCommand = exports.de_ListGroupsOlderThanOrderingIdCommand = exports.de_ListFeaturedResultsSetsCommand = exports.de_ListFaqsCommand = exports.de_ListExperiencesCommand = exports.de_ListExperienceEntitiesCommand = exports.de_ListEntityPersonasCommand = exports.de_ListDataSourceSyncJobsCommand = exports.de_ListDataSourcesCommand = exports.de_ListAccessControlConfigurationsCommand = exports.de_GetSnapshotsCommand = exports.de_GetQuerySuggestionsCommand = void 0;
|
|
4
|
+
exports.de_DisassociateEntitiesFromExperienceCommand = exports.de_DescribeThesaurusCommand = exports.de_DescribeQuerySuggestionsConfigCommand = exports.de_DescribeQuerySuggestionsBlockListCommand = exports.de_DescribePrincipalMappingCommand = exports.de_DescribeIndexCommand = exports.de_DescribeFeaturedResultsSetCommand = exports.de_DescribeFaqCommand = exports.de_DescribeExperienceCommand = exports.de_DescribeDataSourceCommand = exports.de_DescribeAccessControlConfigurationCommand = exports.de_DeleteThesaurusCommand = exports.de_DeleteQuerySuggestionsBlockListCommand = exports.de_DeletePrincipalMappingCommand = exports.de_DeleteIndexCommand = exports.de_DeleteFaqCommand = exports.de_DeleteExperienceCommand = exports.de_DeleteDataSourceCommand = exports.de_DeleteAccessControlConfigurationCommand = exports.de_CreateThesaurusCommand = exports.de_CreateQuerySuggestionsBlockListCommand = exports.de_CreateIndexCommand = exports.de_CreateFeaturedResultsSetCommand = exports.de_CreateFaqCommand = exports.de_CreateExperienceCommand = exports.de_CreateDataSourceCommand = exports.de_CreateAccessControlConfigurationCommand = exports.de_ClearQuerySuggestionsCommand = exports.de_BatchPutDocumentCommand = exports.de_BatchGetDocumentStatusCommand = exports.de_BatchDeleteFeaturedResultsSetCommand = exports.de_BatchDeleteDocumentCommand = exports.de_AssociatePersonasToEntitiesCommand = exports.de_AssociateEntitiesToExperienceCommand = exports.se_UpdateThesaurusCommand = exports.se_UpdateQuerySuggestionsConfigCommand = exports.se_UpdateQuerySuggestionsBlockListCommand = exports.se_UpdateIndexCommand = exports.se_UpdateFeaturedResultsSetCommand = exports.se_UpdateExperienceCommand = exports.se_UpdateDataSourceCommand = exports.se_UpdateAccessControlConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SubmitFeedbackCommand = exports.se_StopDataSourceSyncJobCommand = exports.se_StartDataSourceSyncJobCommand = exports.se_RetrieveCommand = exports.se_QueryCommand = exports.se_PutPrincipalMappingCommand = void 0;
|
|
5
|
+
exports.de_UpdateThesaurusCommand = exports.de_UpdateQuerySuggestionsConfigCommand = exports.de_UpdateQuerySuggestionsBlockListCommand = exports.de_UpdateIndexCommand = exports.de_UpdateFeaturedResultsSetCommand = exports.de_UpdateExperienceCommand = exports.de_UpdateDataSourceCommand = exports.de_UpdateAccessControlConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SubmitFeedbackCommand = exports.de_StopDataSourceSyncJobCommand = exports.de_StartDataSourceSyncJobCommand = exports.de_RetrieveCommand = exports.de_QueryCommand = exports.de_PutPrincipalMappingCommand = exports.de_ListThesauriCommand = exports.de_ListTagsForResourceCommand = exports.de_ListQuerySuggestionsBlockListsCommand = exports.de_ListIndicesCommand = exports.de_ListGroupsOlderThanOrderingIdCommand = exports.de_ListFeaturedResultsSetsCommand = exports.de_ListFaqsCommand = exports.de_ListExperiencesCommand = exports.de_ListExperienceEntitiesCommand = exports.de_ListEntityPersonasCommand = exports.de_ListDataSourceSyncJobsCommand = exports.de_ListDataSourcesCommand = exports.de_ListAccessControlConfigurationsCommand = exports.de_GetSnapshotsCommand = exports.de_GetQuerySuggestionsCommand = exports.de_DisassociatePersonasFromEntitiesCommand = void 0;
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
@@ -373,6 +373,13 @@ const se_QueryCommand = async (input, context) => {
|
|
|
373
373
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
374
374
|
};
|
|
375
375
|
exports.se_QueryCommand = se_QueryCommand;
|
|
376
|
+
const se_RetrieveCommand = async (input, context) => {
|
|
377
|
+
const headers = sharedHeaders("Retrieve");
|
|
378
|
+
let body;
|
|
379
|
+
body = JSON.stringify(se_RetrieveRequest(input, context));
|
|
380
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
381
|
+
};
|
|
382
|
+
exports.se_RetrieveCommand = se_RetrieveCommand;
|
|
376
383
|
const se_StartDataSourceSyncJobCommand = async (input, context) => {
|
|
377
384
|
const headers = sharedHeaders("StartDataSourceSyncJob");
|
|
378
385
|
let body;
|
|
@@ -2894,6 +2901,57 @@ const de_QueryCommandError = async (output, context) => {
|
|
|
2894
2901
|
});
|
|
2895
2902
|
}
|
|
2896
2903
|
};
|
|
2904
|
+
const de_RetrieveCommand = async (output, context) => {
|
|
2905
|
+
if (output.statusCode >= 300) {
|
|
2906
|
+
return de_RetrieveCommandError(output, context);
|
|
2907
|
+
}
|
|
2908
|
+
const data = await parseBody(output.body, context);
|
|
2909
|
+
let contents = {};
|
|
2910
|
+
contents = de_RetrieveResult(data, context);
|
|
2911
|
+
const response = {
|
|
2912
|
+
$metadata: deserializeMetadata(output),
|
|
2913
|
+
...contents,
|
|
2914
|
+
};
|
|
2915
|
+
return response;
|
|
2916
|
+
};
|
|
2917
|
+
exports.de_RetrieveCommand = de_RetrieveCommand;
|
|
2918
|
+
const de_RetrieveCommandError = async (output, context) => {
|
|
2919
|
+
const parsedOutput = {
|
|
2920
|
+
...output,
|
|
2921
|
+
body: await parseErrorBody(output.body, context),
|
|
2922
|
+
};
|
|
2923
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2924
|
+
switch (errorCode) {
|
|
2925
|
+
case "AccessDeniedException":
|
|
2926
|
+
case "com.amazonaws.kendra#AccessDeniedException":
|
|
2927
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2928
|
+
case "ConflictException":
|
|
2929
|
+
case "com.amazonaws.kendra#ConflictException":
|
|
2930
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2931
|
+
case "InternalServerException":
|
|
2932
|
+
case "com.amazonaws.kendra#InternalServerException":
|
|
2933
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2934
|
+
case "ResourceNotFoundException":
|
|
2935
|
+
case "com.amazonaws.kendra#ResourceNotFoundException":
|
|
2936
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2937
|
+
case "ServiceQuotaExceededException":
|
|
2938
|
+
case "com.amazonaws.kendra#ServiceQuotaExceededException":
|
|
2939
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2940
|
+
case "ThrottlingException":
|
|
2941
|
+
case "com.amazonaws.kendra#ThrottlingException":
|
|
2942
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2943
|
+
case "ValidationException":
|
|
2944
|
+
case "com.amazonaws.kendra#ValidationException":
|
|
2945
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2946
|
+
default:
|
|
2947
|
+
const parsedBody = parsedOutput.body;
|
|
2948
|
+
return throwDefaultError({
|
|
2949
|
+
output,
|
|
2950
|
+
parsedBody,
|
|
2951
|
+
errorCode,
|
|
2952
|
+
});
|
|
2953
|
+
}
|
|
2954
|
+
};
|
|
2897
2955
|
const de_StartDataSourceSyncJobCommand = async (output, context) => {
|
|
2898
2956
|
if (output.statusCode >= 300) {
|
|
2899
2957
|
return de_StartDataSourceSyncJobCommandError(output, context);
|
|
@@ -3912,6 +3970,18 @@ const se_QueryRequest = (input, context) => {
|
|
|
3912
3970
|
VisitorId: [],
|
|
3913
3971
|
});
|
|
3914
3972
|
};
|
|
3973
|
+
const se_RetrieveRequest = (input, context) => {
|
|
3974
|
+
return (0, smithy_client_1.take)(input, {
|
|
3975
|
+
AttributeFilter: (_) => se_AttributeFilter(_, context),
|
|
3976
|
+
DocumentRelevanceOverrideConfigurations: smithy_client_1._json,
|
|
3977
|
+
IndexId: [],
|
|
3978
|
+
PageNumber: [],
|
|
3979
|
+
PageSize: [],
|
|
3980
|
+
QueryText: [],
|
|
3981
|
+
RequestedDocumentAttributes: smithy_client_1._json,
|
|
3982
|
+
UserContext: smithy_client_1._json,
|
|
3983
|
+
});
|
|
3984
|
+
};
|
|
3915
3985
|
const se_SubmitFeedbackRequest = (input, context) => {
|
|
3916
3986
|
return (0, smithy_client_1.take)(input, {
|
|
3917
3987
|
ClickFeedbackItems: (_) => se_ClickFeedbackList(_, context),
|
|
@@ -4466,6 +4536,30 @@ const de_QuerySuggestionsBlockListSummaryItems = (output, context) => {
|
|
|
4466
4536
|
});
|
|
4467
4537
|
return retVal;
|
|
4468
4538
|
};
|
|
4539
|
+
const de_RetrieveResult = (output, context) => {
|
|
4540
|
+
return (0, smithy_client_1.take)(output, {
|
|
4541
|
+
QueryId: smithy_client_1.expectString,
|
|
4542
|
+
ResultItems: (_) => de_RetrieveResultItemList(_, context),
|
|
4543
|
+
});
|
|
4544
|
+
};
|
|
4545
|
+
const de_RetrieveResultItem = (output, context) => {
|
|
4546
|
+
return (0, smithy_client_1.take)(output, {
|
|
4547
|
+
Content: smithy_client_1.expectString,
|
|
4548
|
+
DocumentAttributes: (_) => de_DocumentAttributeList(_, context),
|
|
4549
|
+
DocumentId: smithy_client_1.expectString,
|
|
4550
|
+
DocumentTitle: smithy_client_1.expectString,
|
|
4551
|
+
DocumentURI: smithy_client_1.expectString,
|
|
4552
|
+
Id: smithy_client_1.expectString,
|
|
4553
|
+
});
|
|
4554
|
+
};
|
|
4555
|
+
const de_RetrieveResultItemList = (output, context) => {
|
|
4556
|
+
const retVal = (output || [])
|
|
4557
|
+
.filter((e) => e != null)
|
|
4558
|
+
.map((entry) => {
|
|
4559
|
+
return de_RetrieveResultItem(entry, context);
|
|
4560
|
+
});
|
|
4561
|
+
return retVal;
|
|
4562
|
+
};
|
|
4469
4563
|
const de_SourceDocument = (output, context) => {
|
|
4470
4564
|
return (0, smithy_client_1.take)(output, {
|
|
4471
4565
|
AdditionalAttributes: (_) => de_DocumentAttributeList(_, context),
|
package/dist-es/Kendra.js
CHANGED
|
@@ -51,6 +51,7 @@ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceComma
|
|
|
51
51
|
import { ListThesauriCommand, } from "./commands/ListThesauriCommand";
|
|
52
52
|
import { PutPrincipalMappingCommand, } from "./commands/PutPrincipalMappingCommand";
|
|
53
53
|
import { QueryCommand } from "./commands/QueryCommand";
|
|
54
|
+
import { RetrieveCommand } from "./commands/RetrieveCommand";
|
|
54
55
|
import { StartDataSourceSyncJobCommand, } from "./commands/StartDataSourceSyncJobCommand";
|
|
55
56
|
import { StopDataSourceSyncJobCommand, } from "./commands/StopDataSourceSyncJobCommand";
|
|
56
57
|
import { SubmitFeedbackCommand, } from "./commands/SubmitFeedbackCommand";
|
|
@@ -118,6 +119,7 @@ const commands = {
|
|
|
118
119
|
ListThesauriCommand,
|
|
119
120
|
PutPrincipalMappingCommand,
|
|
120
121
|
QueryCommand,
|
|
122
|
+
RetrieveCommand,
|
|
121
123
|
StartDataSourceSyncJobCommand,
|
|
122
124
|
StopDataSourceSyncJobCommand,
|
|
123
125
|
SubmitFeedbackCommand,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_RetrieveCommand, se_RetrieveCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class RetrieveCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, RetrieveCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "KendraClient";
|
|
25
|
+
const commandName = "RetrieveCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_RetrieveCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_RetrieveCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -50,6 +50,7 @@ export * from "./ListTagsForResourceCommand";
|
|
|
50
50
|
export * from "./ListThesauriCommand";
|
|
51
51
|
export * from "./PutPrincipalMappingCommand";
|
|
52
52
|
export * from "./QueryCommand";
|
|
53
|
+
export * from "./RetrieveCommand";
|
|
53
54
|
export * from "./StartDataSourceSyncJobCommand";
|
|
54
55
|
export * from "./StopDataSourceSyncJobCommand";
|
|
55
56
|
export * from "./SubmitFeedbackCommand";
|
|
@@ -316,6 +316,12 @@ export const se_QueryCommand = async (input, context) => {
|
|
|
316
316
|
body = JSON.stringify(se_QueryRequest(input, context));
|
|
317
317
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
318
318
|
};
|
|
319
|
+
export const se_RetrieveCommand = async (input, context) => {
|
|
320
|
+
const headers = sharedHeaders("Retrieve");
|
|
321
|
+
let body;
|
|
322
|
+
body = JSON.stringify(se_RetrieveRequest(input, context));
|
|
323
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
324
|
+
};
|
|
319
325
|
export const se_StartDataSourceSyncJobCommand = async (input, context) => {
|
|
320
326
|
const headers = sharedHeaders("StartDataSourceSyncJob");
|
|
321
327
|
let body;
|
|
@@ -2772,6 +2778,56 @@ const de_QueryCommandError = async (output, context) => {
|
|
|
2772
2778
|
});
|
|
2773
2779
|
}
|
|
2774
2780
|
};
|
|
2781
|
+
export const de_RetrieveCommand = async (output, context) => {
|
|
2782
|
+
if (output.statusCode >= 300) {
|
|
2783
|
+
return de_RetrieveCommandError(output, context);
|
|
2784
|
+
}
|
|
2785
|
+
const data = await parseBody(output.body, context);
|
|
2786
|
+
let contents = {};
|
|
2787
|
+
contents = de_RetrieveResult(data, context);
|
|
2788
|
+
const response = {
|
|
2789
|
+
$metadata: deserializeMetadata(output),
|
|
2790
|
+
...contents,
|
|
2791
|
+
};
|
|
2792
|
+
return response;
|
|
2793
|
+
};
|
|
2794
|
+
const de_RetrieveCommandError = async (output, context) => {
|
|
2795
|
+
const parsedOutput = {
|
|
2796
|
+
...output,
|
|
2797
|
+
body: await parseErrorBody(output.body, context),
|
|
2798
|
+
};
|
|
2799
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2800
|
+
switch (errorCode) {
|
|
2801
|
+
case "AccessDeniedException":
|
|
2802
|
+
case "com.amazonaws.kendra#AccessDeniedException":
|
|
2803
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2804
|
+
case "ConflictException":
|
|
2805
|
+
case "com.amazonaws.kendra#ConflictException":
|
|
2806
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2807
|
+
case "InternalServerException":
|
|
2808
|
+
case "com.amazonaws.kendra#InternalServerException":
|
|
2809
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2810
|
+
case "ResourceNotFoundException":
|
|
2811
|
+
case "com.amazonaws.kendra#ResourceNotFoundException":
|
|
2812
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2813
|
+
case "ServiceQuotaExceededException":
|
|
2814
|
+
case "com.amazonaws.kendra#ServiceQuotaExceededException":
|
|
2815
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2816
|
+
case "ThrottlingException":
|
|
2817
|
+
case "com.amazonaws.kendra#ThrottlingException":
|
|
2818
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2819
|
+
case "ValidationException":
|
|
2820
|
+
case "com.amazonaws.kendra#ValidationException":
|
|
2821
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2822
|
+
default:
|
|
2823
|
+
const parsedBody = parsedOutput.body;
|
|
2824
|
+
return throwDefaultError({
|
|
2825
|
+
output,
|
|
2826
|
+
parsedBody,
|
|
2827
|
+
errorCode,
|
|
2828
|
+
});
|
|
2829
|
+
}
|
|
2830
|
+
};
|
|
2775
2831
|
export const de_StartDataSourceSyncJobCommand = async (output, context) => {
|
|
2776
2832
|
if (output.statusCode >= 300) {
|
|
2777
2833
|
return de_StartDataSourceSyncJobCommandError(output, context);
|
|
@@ -3777,6 +3833,18 @@ const se_QueryRequest = (input, context) => {
|
|
|
3777
3833
|
VisitorId: [],
|
|
3778
3834
|
});
|
|
3779
3835
|
};
|
|
3836
|
+
const se_RetrieveRequest = (input, context) => {
|
|
3837
|
+
return take(input, {
|
|
3838
|
+
AttributeFilter: (_) => se_AttributeFilter(_, context),
|
|
3839
|
+
DocumentRelevanceOverrideConfigurations: _json,
|
|
3840
|
+
IndexId: [],
|
|
3841
|
+
PageNumber: [],
|
|
3842
|
+
PageSize: [],
|
|
3843
|
+
QueryText: [],
|
|
3844
|
+
RequestedDocumentAttributes: _json,
|
|
3845
|
+
UserContext: _json,
|
|
3846
|
+
});
|
|
3847
|
+
};
|
|
3780
3848
|
const se_SubmitFeedbackRequest = (input, context) => {
|
|
3781
3849
|
return take(input, {
|
|
3782
3850
|
ClickFeedbackItems: (_) => se_ClickFeedbackList(_, context),
|
|
@@ -4331,6 +4399,30 @@ const de_QuerySuggestionsBlockListSummaryItems = (output, context) => {
|
|
|
4331
4399
|
});
|
|
4332
4400
|
return retVal;
|
|
4333
4401
|
};
|
|
4402
|
+
const de_RetrieveResult = (output, context) => {
|
|
4403
|
+
return take(output, {
|
|
4404
|
+
QueryId: __expectString,
|
|
4405
|
+
ResultItems: (_) => de_RetrieveResultItemList(_, context),
|
|
4406
|
+
});
|
|
4407
|
+
};
|
|
4408
|
+
const de_RetrieveResultItem = (output, context) => {
|
|
4409
|
+
return take(output, {
|
|
4410
|
+
Content: __expectString,
|
|
4411
|
+
DocumentAttributes: (_) => de_DocumentAttributeList(_, context),
|
|
4412
|
+
DocumentId: __expectString,
|
|
4413
|
+
DocumentTitle: __expectString,
|
|
4414
|
+
DocumentURI: __expectString,
|
|
4415
|
+
Id: __expectString,
|
|
4416
|
+
});
|
|
4417
|
+
};
|
|
4418
|
+
const de_RetrieveResultItemList = (output, context) => {
|
|
4419
|
+
const retVal = (output || [])
|
|
4420
|
+
.filter((e) => e != null)
|
|
4421
|
+
.map((entry) => {
|
|
4422
|
+
return de_RetrieveResultItem(entry, context);
|
|
4423
|
+
});
|
|
4424
|
+
return retVal;
|
|
4425
|
+
};
|
|
4334
4426
|
const de_SourceDocument = (output, context) => {
|
|
4335
4427
|
return take(output, {
|
|
4336
4428
|
AdditionalAttributes: (_) => de_DocumentAttributeList(_, context),
|
package/dist-types/Kendra.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } fro
|
|
|
51
51
|
import { ListThesauriCommandInput, ListThesauriCommandOutput } from "./commands/ListThesauriCommand";
|
|
52
52
|
import { PutPrincipalMappingCommandInput, PutPrincipalMappingCommandOutput } from "./commands/PutPrincipalMappingCommand";
|
|
53
53
|
import { QueryCommandInput, QueryCommandOutput } from "./commands/QueryCommand";
|
|
54
|
+
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
|
|
54
55
|
import { StartDataSourceSyncJobCommandInput, StartDataSourceSyncJobCommandOutput } from "./commands/StartDataSourceSyncJobCommand";
|
|
55
56
|
import { StopDataSourceSyncJobCommandInput, StopDataSourceSyncJobCommandOutput } from "./commands/StopDataSourceSyncJobCommand";
|
|
56
57
|
import { SubmitFeedbackCommandInput, SubmitFeedbackCommandOutput } from "./commands/SubmitFeedbackCommand";
|
|
@@ -378,6 +379,12 @@ export interface Kendra {
|
|
|
378
379
|
query(args: QueryCommandInput, options?: __HttpHandlerOptions): Promise<QueryCommandOutput>;
|
|
379
380
|
query(args: QueryCommandInput, cb: (err: any, data?: QueryCommandOutput) => void): void;
|
|
380
381
|
query(args: QueryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryCommandOutput) => void): void;
|
|
382
|
+
/**
|
|
383
|
+
* @see {@link RetrieveCommand}
|
|
384
|
+
*/
|
|
385
|
+
retrieve(args: RetrieveCommandInput, options?: __HttpHandlerOptions): Promise<RetrieveCommandOutput>;
|
|
386
|
+
retrieve(args: RetrieveCommandInput, cb: (err: any, data?: RetrieveCommandOutput) => void): void;
|
|
387
|
+
retrieve(args: RetrieveCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetrieveCommandOutput) => void): void;
|
|
381
388
|
/**
|
|
382
389
|
* @see {@link StartDataSourceSyncJobCommand}
|
|
383
390
|
*/
|
|
@@ -60,6 +60,7 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } fro
|
|
|
60
60
|
import { ListThesauriCommandInput, ListThesauriCommandOutput } from "./commands/ListThesauriCommand";
|
|
61
61
|
import { PutPrincipalMappingCommandInput, PutPrincipalMappingCommandOutput } from "./commands/PutPrincipalMappingCommand";
|
|
62
62
|
import { QueryCommandInput, QueryCommandOutput } from "./commands/QueryCommand";
|
|
63
|
+
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
|
|
63
64
|
import { StartDataSourceSyncJobCommandInput, StartDataSourceSyncJobCommandOutput } from "./commands/StartDataSourceSyncJobCommand";
|
|
64
65
|
import { StopDataSourceSyncJobCommandInput, StopDataSourceSyncJobCommandOutput } from "./commands/StopDataSourceSyncJobCommand";
|
|
65
66
|
import { SubmitFeedbackCommandInput, SubmitFeedbackCommandOutput } from "./commands/SubmitFeedbackCommand";
|
|
@@ -78,11 +79,11 @@ export { __Client };
|
|
|
78
79
|
/**
|
|
79
80
|
* @public
|
|
80
81
|
*/
|
|
81
|
-
export type ServiceInputTypes = AssociateEntitiesToExperienceCommandInput | AssociatePersonasToEntitiesCommandInput | BatchDeleteDocumentCommandInput | BatchDeleteFeaturedResultsSetCommandInput | BatchGetDocumentStatusCommandInput | BatchPutDocumentCommandInput | ClearQuerySuggestionsCommandInput | CreateAccessControlConfigurationCommandInput | CreateDataSourceCommandInput | CreateExperienceCommandInput | CreateFaqCommandInput | CreateFeaturedResultsSetCommandInput | CreateIndexCommandInput | CreateQuerySuggestionsBlockListCommandInput | CreateThesaurusCommandInput | DeleteAccessControlConfigurationCommandInput | DeleteDataSourceCommandInput | DeleteExperienceCommandInput | DeleteFaqCommandInput | DeleteIndexCommandInput | DeletePrincipalMappingCommandInput | DeleteQuerySuggestionsBlockListCommandInput | DeleteThesaurusCommandInput | DescribeAccessControlConfigurationCommandInput | DescribeDataSourceCommandInput | DescribeExperienceCommandInput | DescribeFaqCommandInput | DescribeFeaturedResultsSetCommandInput | DescribeIndexCommandInput | DescribePrincipalMappingCommandInput | DescribeQuerySuggestionsBlockListCommandInput | DescribeQuerySuggestionsConfigCommandInput | DescribeThesaurusCommandInput | DisassociateEntitiesFromExperienceCommandInput | DisassociatePersonasFromEntitiesCommandInput | GetQuerySuggestionsCommandInput | GetSnapshotsCommandInput | ListAccessControlConfigurationsCommandInput | ListDataSourceSyncJobsCommandInput | ListDataSourcesCommandInput | ListEntityPersonasCommandInput | ListExperienceEntitiesCommandInput | ListExperiencesCommandInput | ListFaqsCommandInput | ListFeaturedResultsSetsCommandInput | ListGroupsOlderThanOrderingIdCommandInput | ListIndicesCommandInput | ListQuerySuggestionsBlockListsCommandInput | ListTagsForResourceCommandInput | ListThesauriCommandInput | PutPrincipalMappingCommandInput | QueryCommandInput | StartDataSourceSyncJobCommandInput | StopDataSourceSyncJobCommandInput | SubmitFeedbackCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAccessControlConfigurationCommandInput | UpdateDataSourceCommandInput | UpdateExperienceCommandInput | UpdateFeaturedResultsSetCommandInput | UpdateIndexCommandInput | UpdateQuerySuggestionsBlockListCommandInput | UpdateQuerySuggestionsConfigCommandInput | UpdateThesaurusCommandInput;
|
|
82
|
+
export type ServiceInputTypes = AssociateEntitiesToExperienceCommandInput | AssociatePersonasToEntitiesCommandInput | BatchDeleteDocumentCommandInput | BatchDeleteFeaturedResultsSetCommandInput | BatchGetDocumentStatusCommandInput | BatchPutDocumentCommandInput | ClearQuerySuggestionsCommandInput | CreateAccessControlConfigurationCommandInput | CreateDataSourceCommandInput | CreateExperienceCommandInput | CreateFaqCommandInput | CreateFeaturedResultsSetCommandInput | CreateIndexCommandInput | CreateQuerySuggestionsBlockListCommandInput | CreateThesaurusCommandInput | DeleteAccessControlConfigurationCommandInput | DeleteDataSourceCommandInput | DeleteExperienceCommandInput | DeleteFaqCommandInput | DeleteIndexCommandInput | DeletePrincipalMappingCommandInput | DeleteQuerySuggestionsBlockListCommandInput | DeleteThesaurusCommandInput | DescribeAccessControlConfigurationCommandInput | DescribeDataSourceCommandInput | DescribeExperienceCommandInput | DescribeFaqCommandInput | DescribeFeaturedResultsSetCommandInput | DescribeIndexCommandInput | DescribePrincipalMappingCommandInput | DescribeQuerySuggestionsBlockListCommandInput | DescribeQuerySuggestionsConfigCommandInput | DescribeThesaurusCommandInput | DisassociateEntitiesFromExperienceCommandInput | DisassociatePersonasFromEntitiesCommandInput | GetQuerySuggestionsCommandInput | GetSnapshotsCommandInput | ListAccessControlConfigurationsCommandInput | ListDataSourceSyncJobsCommandInput | ListDataSourcesCommandInput | ListEntityPersonasCommandInput | ListExperienceEntitiesCommandInput | ListExperiencesCommandInput | ListFaqsCommandInput | ListFeaturedResultsSetsCommandInput | ListGroupsOlderThanOrderingIdCommandInput | ListIndicesCommandInput | ListQuerySuggestionsBlockListsCommandInput | ListTagsForResourceCommandInput | ListThesauriCommandInput | PutPrincipalMappingCommandInput | QueryCommandInput | RetrieveCommandInput | StartDataSourceSyncJobCommandInput | StopDataSourceSyncJobCommandInput | SubmitFeedbackCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAccessControlConfigurationCommandInput | UpdateDataSourceCommandInput | UpdateExperienceCommandInput | UpdateFeaturedResultsSetCommandInput | UpdateIndexCommandInput | UpdateQuerySuggestionsBlockListCommandInput | UpdateQuerySuggestionsConfigCommandInput | UpdateThesaurusCommandInput;
|
|
82
83
|
/**
|
|
83
84
|
* @public
|
|
84
85
|
*/
|
|
85
|
-
export type ServiceOutputTypes = AssociateEntitiesToExperienceCommandOutput | AssociatePersonasToEntitiesCommandOutput | BatchDeleteDocumentCommandOutput | BatchDeleteFeaturedResultsSetCommandOutput | BatchGetDocumentStatusCommandOutput | BatchPutDocumentCommandOutput | ClearQuerySuggestionsCommandOutput | CreateAccessControlConfigurationCommandOutput | CreateDataSourceCommandOutput | CreateExperienceCommandOutput | CreateFaqCommandOutput | CreateFeaturedResultsSetCommandOutput | CreateIndexCommandOutput | CreateQuerySuggestionsBlockListCommandOutput | CreateThesaurusCommandOutput | DeleteAccessControlConfigurationCommandOutput | DeleteDataSourceCommandOutput | DeleteExperienceCommandOutput | DeleteFaqCommandOutput | DeleteIndexCommandOutput | DeletePrincipalMappingCommandOutput | DeleteQuerySuggestionsBlockListCommandOutput | DeleteThesaurusCommandOutput | DescribeAccessControlConfigurationCommandOutput | DescribeDataSourceCommandOutput | DescribeExperienceCommandOutput | DescribeFaqCommandOutput | DescribeFeaturedResultsSetCommandOutput | DescribeIndexCommandOutput | DescribePrincipalMappingCommandOutput | DescribeQuerySuggestionsBlockListCommandOutput | DescribeQuerySuggestionsConfigCommandOutput | DescribeThesaurusCommandOutput | DisassociateEntitiesFromExperienceCommandOutput | DisassociatePersonasFromEntitiesCommandOutput | GetQuerySuggestionsCommandOutput | GetSnapshotsCommandOutput | ListAccessControlConfigurationsCommandOutput | ListDataSourceSyncJobsCommandOutput | ListDataSourcesCommandOutput | ListEntityPersonasCommandOutput | ListExperienceEntitiesCommandOutput | ListExperiencesCommandOutput | ListFaqsCommandOutput | ListFeaturedResultsSetsCommandOutput | ListGroupsOlderThanOrderingIdCommandOutput | ListIndicesCommandOutput | ListQuerySuggestionsBlockListsCommandOutput | ListTagsForResourceCommandOutput | ListThesauriCommandOutput | PutPrincipalMappingCommandOutput | QueryCommandOutput | StartDataSourceSyncJobCommandOutput | StopDataSourceSyncJobCommandOutput | SubmitFeedbackCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAccessControlConfigurationCommandOutput | UpdateDataSourceCommandOutput | UpdateExperienceCommandOutput | UpdateFeaturedResultsSetCommandOutput | UpdateIndexCommandOutput | UpdateQuerySuggestionsBlockListCommandOutput | UpdateQuerySuggestionsConfigCommandOutput | UpdateThesaurusCommandOutput;
|
|
86
|
+
export type ServiceOutputTypes = AssociateEntitiesToExperienceCommandOutput | AssociatePersonasToEntitiesCommandOutput | BatchDeleteDocumentCommandOutput | BatchDeleteFeaturedResultsSetCommandOutput | BatchGetDocumentStatusCommandOutput | BatchPutDocumentCommandOutput | ClearQuerySuggestionsCommandOutput | CreateAccessControlConfigurationCommandOutput | CreateDataSourceCommandOutput | CreateExperienceCommandOutput | CreateFaqCommandOutput | CreateFeaturedResultsSetCommandOutput | CreateIndexCommandOutput | CreateQuerySuggestionsBlockListCommandOutput | CreateThesaurusCommandOutput | DeleteAccessControlConfigurationCommandOutput | DeleteDataSourceCommandOutput | DeleteExperienceCommandOutput | DeleteFaqCommandOutput | DeleteIndexCommandOutput | DeletePrincipalMappingCommandOutput | DeleteQuerySuggestionsBlockListCommandOutput | DeleteThesaurusCommandOutput | DescribeAccessControlConfigurationCommandOutput | DescribeDataSourceCommandOutput | DescribeExperienceCommandOutput | DescribeFaqCommandOutput | DescribeFeaturedResultsSetCommandOutput | DescribeIndexCommandOutput | DescribePrincipalMappingCommandOutput | DescribeQuerySuggestionsBlockListCommandOutput | DescribeQuerySuggestionsConfigCommandOutput | DescribeThesaurusCommandOutput | DisassociateEntitiesFromExperienceCommandOutput | DisassociatePersonasFromEntitiesCommandOutput | GetQuerySuggestionsCommandOutput | GetSnapshotsCommandOutput | ListAccessControlConfigurationsCommandOutput | ListDataSourceSyncJobsCommandOutput | ListDataSourcesCommandOutput | ListEntityPersonasCommandOutput | ListExperienceEntitiesCommandOutput | ListExperiencesCommandOutput | ListFaqsCommandOutput | ListFeaturedResultsSetsCommandOutput | ListGroupsOlderThanOrderingIdCommandOutput | ListIndicesCommandOutput | ListQuerySuggestionsBlockListsCommandOutput | ListTagsForResourceCommandOutput | ListThesauriCommandOutput | PutPrincipalMappingCommandOutput | QueryCommandOutput | RetrieveCommandOutput | StartDataSourceSyncJobCommandOutput | StopDataSourceSyncJobCommandOutput | SubmitFeedbackCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAccessControlConfigurationCommandOutput | UpdateDataSourceCommandOutput | UpdateExperienceCommandOutput | UpdateFeaturedResultsSetCommandOutput | UpdateIndexCommandOutput | UpdateQuerySuggestionsBlockListCommandOutput | UpdateQuerySuggestionsConfigCommandOutput | UpdateThesaurusCommandOutput;
|
|
86
87
|
/**
|
|
87
88
|
* @public
|
|
88
89
|
*/
|
|
@@ -23,27 +23,30 @@ export interface QueryCommandOutput extends QueryResult, __MetadataBearer {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
|
-
* <p>Searches an
|
|
27
|
-
*
|
|
28
|
-
* document attributes
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* <p>
|
|
32
|
-
* content. By default the response contains three types of results.</p>
|
|
26
|
+
* <p>Searches an index given an input query.</p>
|
|
27
|
+
* <p>You can configure boosting or relevance tuning at the query level to override boosting
|
|
28
|
+
* at the index level, filter based on document fields/attributes and faceted search, and
|
|
29
|
+
* filter based on the user or their group access to documents. You can also include certain
|
|
30
|
+
* fields in the response that might provide useful additional information.</p>
|
|
31
|
+
* <p>A query response contains three types of results.</p>
|
|
33
32
|
* <ul>
|
|
34
33
|
* <li>
|
|
35
|
-
* <p>Relevant
|
|
34
|
+
* <p>Relevant suggested answers. The answers can be either a text excerpt or table
|
|
35
|
+
* excerpt. The answer can be highlighted in the excerpt.</p>
|
|
36
36
|
* </li>
|
|
37
37
|
* <li>
|
|
38
|
-
* <p>Matching FAQs
|
|
38
|
+
* <p>Matching FAQs or questions-answer from your FAQ file.</p>
|
|
39
39
|
* </li>
|
|
40
40
|
* <li>
|
|
41
|
-
* <p>Relevant documents
|
|
41
|
+
* <p>Relevant documents. This result type includes an excerpt of the document with
|
|
42
|
+
* the document title. The searched terms can be highlighted in the excerpt.</p>
|
|
42
43
|
* </li>
|
|
43
44
|
* </ul>
|
|
44
45
|
* <p>You can specify that the query return only one type of result using the
|
|
45
|
-
*
|
|
46
|
-
*
|
|
46
|
+
* <code>QueryResultTypeFilter</code> parameter. Each query returns the 100
|
|
47
|
+
* most relevant results. If you filter result type to only question-answers,
|
|
48
|
+
* a maximum of four results are returned. If you filter result type to only
|
|
49
|
+
* answers, a maximum of three results are returned.</p>
|
|
47
50
|
* @example
|
|
48
51
|
* Use a bare-bones client and the command you need to make an API call.
|
|
49
52
|
* ```javascript
|