@aws-sdk/client-kendra 3.357.0 → 3.359.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.
@@ -0,0 +1,263 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { KendraClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KendraClient";
5
+ import { RetrieveRequest, RetrieveResult } from "../models/models_1";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link RetrieveCommand}.
14
+ */
15
+ export interface RetrieveCommandInput extends RetrieveRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link RetrieveCommand}.
21
+ */
22
+ export interface RetrieveCommandOutput extends RetrieveResult, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Retrieves relevant passages or text excerpts given an input query.</p>
27
+ * <p>This API is similar to the <a href="https://docs.aws.amazon.com/kendra/latest/APIReference/API_Query.html">Query</a>
28
+ * API. However, by default, the <code>Query</code> API only
29
+ * returns excerpt passages of up to 100 token words. With the
30
+ * <code>Retrieve</code> API, you can retrieve longer passages of up to
31
+ * 200 token words and up to 100 semantically relevant passages. This doesn't
32
+ * include question-answer or FAQ type responses from your index. The passages
33
+ * are text excerpts that can be semantically extracted from multiple documents
34
+ * and multiple parts of the same document. If in extreme cases your documents
35
+ * produce no relevant passages using the <code>Retrieve</code> API, you can
36
+ * alternatively use the <code>Query</code> API.</p>
37
+ * <p>You can also do the following:</p>
38
+ * <ul>
39
+ * <li>
40
+ * <p>Override boosting at the index level</p>
41
+ * </li>
42
+ * <li>
43
+ * <p>Filter based on document fields or attributes</p>
44
+ * </li>
45
+ * <li>
46
+ * <p>Filter based on the user or their group access to documents</p>
47
+ * </li>
48
+ * </ul>
49
+ * <p>You can also include certain fields in the response that might provide useful
50
+ * additional information.</p>
51
+ * @example
52
+ * Use a bare-bones client and the command you need to make an API call.
53
+ * ```javascript
54
+ * import { KendraClient, RetrieveCommand } from "@aws-sdk/client-kendra"; // ES Modules import
55
+ * // const { KendraClient, RetrieveCommand } = require("@aws-sdk/client-kendra"); // CommonJS import
56
+ * const client = new KendraClient(config);
57
+ * const input = { // RetrieveRequest
58
+ * IndexId: "STRING_VALUE", // required
59
+ * QueryText: "STRING_VALUE", // required
60
+ * AttributeFilter: { // AttributeFilter
61
+ * AndAllFilters: [ // AttributeFilterList
62
+ * {
63
+ * AndAllFilters: [
64
+ * "<AttributeFilter>",
65
+ * ],
66
+ * OrAllFilters: [
67
+ * "<AttributeFilter>",
68
+ * ],
69
+ * NotFilter: "<AttributeFilter>",
70
+ * EqualsTo: { // DocumentAttribute
71
+ * Key: "STRING_VALUE", // required
72
+ * Value: { // DocumentAttributeValue
73
+ * StringValue: "STRING_VALUE",
74
+ * StringListValue: [ // DocumentAttributeStringListValue
75
+ * "STRING_VALUE",
76
+ * ],
77
+ * LongValue: Number("long"),
78
+ * DateValue: new Date("TIMESTAMP"),
79
+ * },
80
+ * },
81
+ * ContainsAll: {
82
+ * Key: "STRING_VALUE", // required
83
+ * Value: {
84
+ * StringValue: "STRING_VALUE",
85
+ * StringListValue: [
86
+ * "STRING_VALUE",
87
+ * ],
88
+ * LongValue: Number("long"),
89
+ * DateValue: new Date("TIMESTAMP"),
90
+ * },
91
+ * },
92
+ * ContainsAny: {
93
+ * Key: "STRING_VALUE", // required
94
+ * Value: {
95
+ * StringValue: "STRING_VALUE",
96
+ * StringListValue: [
97
+ * "STRING_VALUE",
98
+ * ],
99
+ * LongValue: Number("long"),
100
+ * DateValue: new Date("TIMESTAMP"),
101
+ * },
102
+ * },
103
+ * GreaterThan: {
104
+ * Key: "STRING_VALUE", // required
105
+ * Value: {
106
+ * StringValue: "STRING_VALUE",
107
+ * StringListValue: [
108
+ * "STRING_VALUE",
109
+ * ],
110
+ * LongValue: Number("long"),
111
+ * DateValue: new Date("TIMESTAMP"),
112
+ * },
113
+ * },
114
+ * GreaterThanOrEquals: {
115
+ * Key: "STRING_VALUE", // required
116
+ * Value: {
117
+ * StringValue: "STRING_VALUE",
118
+ * StringListValue: [
119
+ * "STRING_VALUE",
120
+ * ],
121
+ * LongValue: Number("long"),
122
+ * DateValue: new Date("TIMESTAMP"),
123
+ * },
124
+ * },
125
+ * LessThan: "<DocumentAttribute>",
126
+ * LessThanOrEquals: "<DocumentAttribute>",
127
+ * },
128
+ * ],
129
+ * OrAllFilters: [
130
+ * "<AttributeFilter>",
131
+ * ],
132
+ * NotFilter: "<AttributeFilter>",
133
+ * EqualsTo: "<DocumentAttribute>",
134
+ * ContainsAll: "<DocumentAttribute>",
135
+ * ContainsAny: "<DocumentAttribute>",
136
+ * GreaterThan: "<DocumentAttribute>",
137
+ * GreaterThanOrEquals: "<DocumentAttribute>",
138
+ * LessThan: "<DocumentAttribute>",
139
+ * LessThanOrEquals: "<DocumentAttribute>",
140
+ * },
141
+ * RequestedDocumentAttributes: [ // DocumentAttributeKeyList
142
+ * "STRING_VALUE",
143
+ * ],
144
+ * DocumentRelevanceOverrideConfigurations: [ // DocumentRelevanceOverrideConfigurationList
145
+ * { // DocumentRelevanceConfiguration
146
+ * Name: "STRING_VALUE", // required
147
+ * Relevance: { // Relevance
148
+ * Freshness: true || false,
149
+ * Importance: Number("int"),
150
+ * Duration: "STRING_VALUE",
151
+ * RankOrder: "ASCENDING" || "DESCENDING",
152
+ * ValueImportanceMap: { // ValueImportanceMap
153
+ * "<keys>": Number("int"),
154
+ * },
155
+ * },
156
+ * },
157
+ * ],
158
+ * PageNumber: Number("int"),
159
+ * PageSize: Number("int"),
160
+ * UserContext: { // UserContext
161
+ * Token: "STRING_VALUE",
162
+ * UserId: "STRING_VALUE",
163
+ * Groups: [ // Groups
164
+ * "STRING_VALUE",
165
+ * ],
166
+ * DataSourceGroups: [ // DataSourceGroups
167
+ * { // DataSourceGroup
168
+ * GroupId: "STRING_VALUE", // required
169
+ * DataSourceId: "STRING_VALUE", // required
170
+ * },
171
+ * ],
172
+ * },
173
+ * };
174
+ * const command = new RetrieveCommand(input);
175
+ * const response = await client.send(command);
176
+ * // { // RetrieveResult
177
+ * // QueryId: "STRING_VALUE",
178
+ * // ResultItems: [ // RetrieveResultItemList
179
+ * // { // RetrieveResultItem
180
+ * // Id: "STRING_VALUE",
181
+ * // DocumentId: "STRING_VALUE",
182
+ * // DocumentTitle: "STRING_VALUE",
183
+ * // Content: "STRING_VALUE",
184
+ * // DocumentURI: "STRING_VALUE",
185
+ * // DocumentAttributes: [ // DocumentAttributeList
186
+ * // { // DocumentAttribute
187
+ * // Key: "STRING_VALUE", // required
188
+ * // Value: { // DocumentAttributeValue
189
+ * // StringValue: "STRING_VALUE",
190
+ * // StringListValue: [ // DocumentAttributeStringListValue
191
+ * // "STRING_VALUE",
192
+ * // ],
193
+ * // LongValue: Number("long"),
194
+ * // DateValue: new Date("TIMESTAMP"),
195
+ * // },
196
+ * // },
197
+ * // ],
198
+ * // },
199
+ * // ],
200
+ * // };
201
+ *
202
+ * ```
203
+ *
204
+ * @param RetrieveCommandInput - {@link RetrieveCommandInput}
205
+ * @returns {@link RetrieveCommandOutput}
206
+ * @see {@link RetrieveCommandInput} for command's `input` shape.
207
+ * @see {@link RetrieveCommandOutput} for command's `response` shape.
208
+ * @see {@link KendraClientResolvedConfig | config} for KendraClient's `config` shape.
209
+ *
210
+ * @throws {@link AccessDeniedException} (client fault)
211
+ * <p>You don't have sufficient access to perform this action. Please ensure you have the
212
+ * required permission policies and user accounts and try again.</p>
213
+ *
214
+ * @throws {@link ConflictException} (client fault)
215
+ * <p>A conflict occurred with the request. Please fix any inconsistences with your
216
+ * resources and try again.</p>
217
+ *
218
+ * @throws {@link InternalServerException} (server fault)
219
+ * <p>An issue occurred with the internal server used for your Amazon Kendra service.
220
+ * Please wait a few minutes and try again, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> for help.</p>
221
+ *
222
+ * @throws {@link ResourceNotFoundException} (client fault)
223
+ * <p>The resource you want to use doesn’t exist. Please check you have provided the correct
224
+ * resource and try again.</p>
225
+ *
226
+ * @throws {@link ServiceQuotaExceededException} (client fault)
227
+ * <p>You have exceeded the set limits for your Amazon Kendra service. Please see
228
+ * <a href="https://docs.aws.amazon.com/kendra/latest/dg/quotas.html">Quotas</a> for
229
+ * more information, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> to inquire about
230
+ * an increase of limits.</p>
231
+ *
232
+ * @throws {@link ThrottlingException} (client fault)
233
+ * <p>The request was denied due to request throttling. Please reduce the number of requests
234
+ * and try again.</p>
235
+ *
236
+ * @throws {@link ValidationException} (client fault)
237
+ * <p>The input fails to satisfy the constraints set by the Amazon Kendra service.
238
+ * Please provide the correct input and try again.</p>
239
+ *
240
+ * @throws {@link KendraServiceException}
241
+ * <p>Base exception class for all service exceptions from Kendra service.</p>
242
+ *
243
+ */
244
+ export declare class RetrieveCommand extends $Command<RetrieveCommandInput, RetrieveCommandOutput, KendraClientResolvedConfig> {
245
+ readonly input: RetrieveCommandInput;
246
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
247
+ /**
248
+ * @public
249
+ */
250
+ constructor(input: RetrieveCommandInput);
251
+ /**
252
+ * @internal
253
+ */
254
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: KendraClientResolvedConfig, options?: __HttpHandlerOptions): Handler<RetrieveCommandInput, RetrieveCommandOutput>;
255
+ /**
256
+ * @internal
257
+ */
258
+ private serialize;
259
+ /**
260
+ * @internal
261
+ */
262
+ private deserialize;
263
+ }
@@ -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";
@@ -209,9 +209,9 @@ export interface DataSourceVpcConfiguration {
209
209
  * <p>Provides the configuration information to connect to Alfresco as your data
210
210
  * source.</p>
211
211
  * <note>
212
- * <p>Alfresco data source connector is currently in preview mode. Basic authentication
213
- * is currently supported. If you would like to use Alfresco connector in production,
214
- * contact <a href="http://aws.amazon.com/contact-us/">Support</a>.</p>
212
+ * <p>Support for <code>AlfrescoConfiguration</code> ended May 2023.
213
+ * We recommend migrating to or using the Alfresco data source template
214
+ * schema / <a href="https://docs.aws.amazon.com/kendra/latest/APIReference/API_TemplateConfiguration.html">TemplateConfiguration</a> API.</p>
215
215
  * </note>
216
216
  */
217
217
  export interface AlfrescoConfiguration {
@@ -1326,6 +1326,9 @@ export interface Document {
1326
1326
  HierarchicalAccessControlList?: HierarchicalPrincipal[];
1327
1327
  /**
1328
1328
  * <p>The file type of the document in the <code>Blob</code> field.</p>
1329
+ * <p>If you want to index snippets or subsets of HTML documents instead of the entirety
1330
+ * of the HTML documents, you must add the <code>HTML</code> start and closing tags
1331
+ * (<code><HTML>content</HTML></code>) around the content.</p>
1329
1332
  */
1330
1333
  ContentType?: ContentType | string;
1331
1334
  /**
@@ -3233,23 +3236,19 @@ export interface ServiceNowKnowledgeArticleConfiguration {
3233
3236
  */
3234
3237
  CrawlAttachments?: boolean;
3235
3238
  /**
3236
- * <p>A list of regular expression patterns to include certain attachments of knowledge
3237
- * articles in your ServiceNow. Item that match the patterns are included in the index.
3238
- * Items that don't match the patterns are excluded from the index. If an item matches both
3239
- * an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
3239
+ * <p>A list of regular expression patterns applied to include knowledge article
3240
+ * attachments. Attachments that match the patterns are included in the index. Items that
3241
+ * don't match the patterns are excluded from the index. If an item matches both an
3242
+ * inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
3240
3243
  * isn't included in the index.</p>
3241
- * <p>The regex is applied to the field specified in the
3242
- * <code>PatternTargetField</code>.</p>
3243
3244
  */
3244
3245
  IncludeAttachmentFilePatterns?: string[];
3245
3246
  /**
3246
- * <p>A list of regular expression patterns to exclude certain attachments of knowledge
3247
- * articles in your ServiceNow. Item that match the patterns are excluded from the index.
3248
- * Items that don't match the patterns are included in the index. If an item matches both
3249
- * an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
3250
- * isn't included in the index.</p>
3251
- * <p>The regex is applied to the field specified in the
3252
- * <code>PatternTargetField</code>.</p>
3247
+ * <p>A list of regular expression patterns applied to exclude certain knowledge article
3248
+ * attachments. Attachments that match the patterns are excluded from the index. Items that
3249
+ * don't match the patterns are included in the index. If an item matches both an inclusion
3250
+ * and exclusion pattern, the exclusion pattern takes precedence and the item isn't
3251
+ * included in the index.</p>
3253
3252
  */
3254
3253
  ExcludeAttachmentFilePatterns?: string[];
3255
3254
  /**
@@ -3685,19 +3684,19 @@ export interface SeedUrlConfiguration {
3685
3684
  * <ul>
3686
3685
  * <li>
3687
3686
  * <p>
3688
- * <code>HOST_ONLY</code> – crawl only the website host names. For
3687
+ * <code>HOST_ONLY</code>—crawl only the website host names. For
3689
3688
  * example, if the seed URL is "abc.example.com", then only URLs with host name
3690
3689
  * "abc.example.com" are crawled.</p>
3691
3690
  * </li>
3692
3691
  * <li>
3693
3692
  * <p>
3694
- * <code>SUBDOMAINS</code> – crawl the website host names with subdomains.
3693
+ * <code>SUBDOMAINS</code>—crawl the website host names with subdomains.
3695
3694
  * For example, if the seed URL is "abc.example.com", then "a.abc.example.com" and
3696
3695
  * "b.abc.example.com" are also crawled.</p>
3697
3696
  * </li>
3698
3697
  * <li>
3699
3698
  * <p>
3700
- * <code>EVERYTHING</code> – crawl the website host names with subdomains
3699
+ * <code>EVERYTHING</code>—crawl the website host names with subdomains
3701
3700
  * and other domains that the web pages link to.</p>
3702
3701
  * </li>
3703
3702
  * </ul>
@@ -3775,12 +3774,8 @@ export interface WebCrawlerConfiguration {
3775
3774
  */
3776
3775
  Urls: Urls | undefined;
3777
3776
  /**
3778
- * <p>Specifies the number of levels in a website that you want to crawl.</p>
3779
- * <p>The first level begins from the website seed or starting point URL. For example, if a
3780
- * website has three levels—index level (the seed in this example), sections level, and
3781
- * subsections level—and you are only interested in crawling information up to the
3782
- * sections level (levels 0-1), you can set your depth to 1.</p>
3783
- * <p>The default crawl depth is set to 2.</p>
3777
+ * <p>The 'depth' or number of levels from the seed level to crawl. For example, the seed
3778
+ * URL page is depth 1 and any hyperlinks on this page that are also crawled are depth 2.</p>
3784
3779
  */
3785
3780
  CrawlDepth?: number;
3786
3781
  /**
@@ -3985,7 +3980,12 @@ export interface DataSourceConfiguration {
3985
3980
  */
3986
3981
  GitHubConfiguration?: GitHubConfiguration;
3987
3982
  /**
3983
+ * @deprecated
3984
+ *
3988
3985
  * <p>Provides the configuration information to connect to Alfresco as your data source.</p>
3986
+ * <p>Support for <code>AlfrescoConfiguration</code> ended May 2023.
3987
+ * We recommend migrating to or using the Alfresco data source template
3988
+ * schema / <a href="https://docs.aws.amazon.com/kendra/latest/APIReference/API_TemplateConfiguration.html">TemplateConfiguration</a> API.</p>
3989
3989
  */
3990
3990
  AlfrescoConfiguration?: AlfrescoConfiguration;
3991
3991
  /**
@@ -4283,8 +4283,9 @@ export interface CreateFaqRequest {
4283
4283
  * <p>The format of the FAQ input file. You can choose between a basic CSV format, a CSV
4284
4284
  * format that includes customs attributes in a header, and a JSON format that includes
4285
4285
  * custom attributes.</p>
4286
- * <p>The format must match the format of the file stored in the S3 bucket identified in the
4287
- * <code>S3Path</code> parameter.</p>
4286
+ * <p>The default format is CSV.</p>
4287
+ * <p>The format must match the format of the file stored in the S3 bucket identified in
4288
+ * the <code>S3Path</code> parameter.</p>
4288
4289
  * <p>For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/in-creating-faq.html">Adding questions and
4289
4290
  * answers</a>.</p>
4290
4291
  */
@@ -7679,11 +7680,11 @@ export type ScoreConfidence = (typeof ScoreConfidence)[keyof typeof ScoreConfide
7679
7680
  /**
7680
7681
  * @public
7681
7682
  * <p>Provides a relative ranking that indicates how confident Amazon Kendra is that the
7682
- * response matches the query.</p>
7683
+ * response is relevant to the query.</p>
7683
7684
  */
7684
7685
  export interface ScoreAttributes {
7685
7686
  /**
7686
- * <p>A relative ranking for how well the response matches the query.</p>
7687
+ * <p>A relative ranking for how relevant the response is to the query.</p>
7687
7688
  */
7688
7689
  ScoreConfidence?: ScoreConfidence | string;
7689
7690
  }