Skip to content

Commit 9b2c5e6

Browse files
author
awstools
committed
feat(client-opensearchserverless): Features: add Index APIs in OpenSearchServerless to support managed semantic enrichment
1 parent 25b3eb1 commit 9b2c5e6

File tree

12 files changed

+1133
-13
lines changed

12 files changed

+1133
-13
lines changed

clients/client-opensearchserverless/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,14 @@ CreateCollection
259259

260260
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/CreateCollectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/CreateCollectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/CreateCollectionCommandOutput/)
261261

262+
</details>
263+
<details>
264+
<summary>
265+
CreateIndex
266+
</summary>
267+
268+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/CreateIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/CreateIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/CreateIndexCommandOutput/)
269+
262270
</details>
263271
<details>
264272
<summary>
@@ -307,6 +315,14 @@ DeleteCollection
307315

308316
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/DeleteCollectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/DeleteCollectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/DeleteCollectionCommandOutput/)
309317

318+
</details>
319+
<details>
320+
<summary>
321+
DeleteIndex
322+
</summary>
323+
324+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/DeleteIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/DeleteIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/DeleteIndexCommandOutput/)
325+
310326
</details>
311327
<details>
312328
<summary>
@@ -355,6 +371,14 @@ GetAccountSettings
355371

356372
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/GetAccountSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/GetAccountSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/GetAccountSettingsCommandOutput/)
357373

374+
</details>
375+
<details>
376+
<summary>
377+
GetIndex
378+
</summary>
379+
380+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/GetIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/GetIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/GetIndexCommandOutput/)
381+
358382
</details>
359383
<details>
360384
<summary>
@@ -475,6 +499,14 @@ UpdateCollection
475499

476500
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/UpdateCollectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/UpdateCollectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/UpdateCollectionCommandOutput/)
477501

502+
</details>
503+
<details>
504+
<summary>
505+
UpdateIndex
506+
</summary>
507+
508+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearchserverless/command/UpdateIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/UpdateIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearchserverless/Interface/UpdateIndexCommandOutput/)
509+
478510
</details>
479511
<details>
480512
<summary>

clients/client-opensearchserverless/src/OpenSearchServerless.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
CreateCollectionCommandInput,
3333
CreateCollectionCommandOutput,
3434
} from "./commands/CreateCollectionCommand";
35+
import { CreateIndexCommand, CreateIndexCommandInput, CreateIndexCommandOutput } from "./commands/CreateIndexCommand";
3536
import {
3637
CreateLifecyclePolicyCommand,
3738
CreateLifecyclePolicyCommandInput,
@@ -62,6 +63,7 @@ import {
6263
DeleteCollectionCommandInput,
6364
DeleteCollectionCommandOutput,
6465
} from "./commands/DeleteCollectionCommand";
66+
import { DeleteIndexCommand, DeleteIndexCommandInput, DeleteIndexCommandOutput } from "./commands/DeleteIndexCommand";
6567
import {
6668
DeleteLifecyclePolicyCommand,
6769
DeleteLifecyclePolicyCommandInput,
@@ -92,6 +94,7 @@ import {
9294
GetAccountSettingsCommandInput,
9395
GetAccountSettingsCommandOutput,
9496
} from "./commands/GetAccountSettingsCommand";
97+
import { GetIndexCommand, GetIndexCommandInput, GetIndexCommandOutput } from "./commands/GetIndexCommand";
9598
import {
9699
GetPoliciesStatsCommand,
97100
GetPoliciesStatsCommandInput,
@@ -163,6 +166,7 @@ import {
163166
UpdateCollectionCommandInput,
164167
UpdateCollectionCommandOutput,
165168
} from "./commands/UpdateCollectionCommand";
169+
import { UpdateIndexCommand, UpdateIndexCommandInput, UpdateIndexCommandOutput } from "./commands/UpdateIndexCommand";
166170
import {
167171
UpdateLifecyclePolicyCommand,
168172
UpdateLifecyclePolicyCommandInput,
@@ -192,18 +196,21 @@ const commands = {
192196
BatchGetVpcEndpointCommand,
193197
CreateAccessPolicyCommand,
194198
CreateCollectionCommand,
199+
CreateIndexCommand,
195200
CreateLifecyclePolicyCommand,
196201
CreateSecurityConfigCommand,
197202
CreateSecurityPolicyCommand,
198203
CreateVpcEndpointCommand,
199204
DeleteAccessPolicyCommand,
200205
DeleteCollectionCommand,
206+
DeleteIndexCommand,
201207
DeleteLifecyclePolicyCommand,
202208
DeleteSecurityConfigCommand,
203209
DeleteSecurityPolicyCommand,
204210
DeleteVpcEndpointCommand,
205211
GetAccessPolicyCommand,
206212
GetAccountSettingsCommand,
213+
GetIndexCommand,
207214
GetPoliciesStatsCommand,
208215
GetSecurityConfigCommand,
209216
GetSecurityPolicyCommand,
@@ -219,6 +226,7 @@ const commands = {
219226
UpdateAccessPolicyCommand,
220227
UpdateAccountSettingsCommand,
221228
UpdateCollectionCommand,
229+
UpdateIndexCommand,
222230
UpdateLifecyclePolicyCommand,
223231
UpdateSecurityConfigCommand,
224232
UpdateSecurityPolicyCommand,
@@ -329,6 +337,17 @@ export interface OpenSearchServerless {
329337
cb: (err: any, data?: CreateCollectionCommandOutput) => void
330338
): void;
331339

340+
/**
341+
* @see {@link CreateIndexCommand}
342+
*/
343+
createIndex(args: CreateIndexCommandInput, options?: __HttpHandlerOptions): Promise<CreateIndexCommandOutput>;
344+
createIndex(args: CreateIndexCommandInput, cb: (err: any, data?: CreateIndexCommandOutput) => void): void;
345+
createIndex(
346+
args: CreateIndexCommandInput,
347+
options: __HttpHandlerOptions,
348+
cb: (err: any, data?: CreateIndexCommandOutput) => void
349+
): void;
350+
332351
/**
333352
* @see {@link CreateLifecyclePolicyCommand}
334353
*/
@@ -431,6 +450,17 @@ export interface OpenSearchServerless {
431450
cb: (err: any, data?: DeleteCollectionCommandOutput) => void
432451
): void;
433452

453+
/**
454+
* @see {@link DeleteIndexCommand}
455+
*/
456+
deleteIndex(args: DeleteIndexCommandInput, options?: __HttpHandlerOptions): Promise<DeleteIndexCommandOutput>;
457+
deleteIndex(args: DeleteIndexCommandInput, cb: (err: any, data?: DeleteIndexCommandOutput) => void): void;
458+
deleteIndex(
459+
args: DeleteIndexCommandInput,
460+
options: __HttpHandlerOptions,
461+
cb: (err: any, data?: DeleteIndexCommandOutput) => void
462+
): void;
463+
434464
/**
435465
* @see {@link DeleteLifecyclePolicyCommand}
436466
*/
@@ -531,6 +561,17 @@ export interface OpenSearchServerless {
531561
cb: (err: any, data?: GetAccountSettingsCommandOutput) => void
532562
): void;
533563

564+
/**
565+
* @see {@link GetIndexCommand}
566+
*/
567+
getIndex(args: GetIndexCommandInput, options?: __HttpHandlerOptions): Promise<GetIndexCommandOutput>;
568+
getIndex(args: GetIndexCommandInput, cb: (err: any, data?: GetIndexCommandOutput) => void): void;
569+
getIndex(
570+
args: GetIndexCommandInput,
571+
options: __HttpHandlerOptions,
572+
cb: (err: any, data?: GetIndexCommandOutput) => void
573+
): void;
574+
534575
/**
535576
* @see {@link GetPoliciesStatsCommand}
536577
*/
@@ -775,6 +816,17 @@ export interface OpenSearchServerless {
775816
cb: (err: any, data?: UpdateCollectionCommandOutput) => void
776817
): void;
777818

819+
/**
820+
* @see {@link UpdateIndexCommand}
821+
*/
822+
updateIndex(args: UpdateIndexCommandInput, options?: __HttpHandlerOptions): Promise<UpdateIndexCommandOutput>;
823+
updateIndex(args: UpdateIndexCommandInput, cb: (err: any, data?: UpdateIndexCommandOutput) => void): void;
824+
updateIndex(
825+
args: UpdateIndexCommandInput,
826+
options: __HttpHandlerOptions,
827+
cb: (err: any, data?: UpdateIndexCommandOutput) => void
828+
): void;
829+
778830
/**
779831
* @see {@link UpdateLifecyclePolicyCommand}
780832
*/

clients/client-opensearchserverless/src/OpenSearchServerlessClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ import {
6868
} from "./commands/BatchGetVpcEndpointCommand";
6969
import { CreateAccessPolicyCommandInput, CreateAccessPolicyCommandOutput } from "./commands/CreateAccessPolicyCommand";
7070
import { CreateCollectionCommandInput, CreateCollectionCommandOutput } from "./commands/CreateCollectionCommand";
71+
import { CreateIndexCommandInput, CreateIndexCommandOutput } from "./commands/CreateIndexCommand";
7172
import {
7273
CreateLifecyclePolicyCommandInput,
7374
CreateLifecyclePolicyCommandOutput,
@@ -83,6 +84,7 @@ import {
8384
import { CreateVpcEndpointCommandInput, CreateVpcEndpointCommandOutput } from "./commands/CreateVpcEndpointCommand";
8485
import { DeleteAccessPolicyCommandInput, DeleteAccessPolicyCommandOutput } from "./commands/DeleteAccessPolicyCommand";
8586
import { DeleteCollectionCommandInput, DeleteCollectionCommandOutput } from "./commands/DeleteCollectionCommand";
87+
import { DeleteIndexCommandInput, DeleteIndexCommandOutput } from "./commands/DeleteIndexCommand";
8688
import {
8789
DeleteLifecyclePolicyCommandInput,
8890
DeleteLifecyclePolicyCommandOutput,
@@ -98,6 +100,7 @@ import {
98100
import { DeleteVpcEndpointCommandInput, DeleteVpcEndpointCommandOutput } from "./commands/DeleteVpcEndpointCommand";
99101
import { GetAccessPolicyCommandInput, GetAccessPolicyCommandOutput } from "./commands/GetAccessPolicyCommand";
100102
import { GetAccountSettingsCommandInput, GetAccountSettingsCommandOutput } from "./commands/GetAccountSettingsCommand";
103+
import { GetIndexCommandInput, GetIndexCommandOutput } from "./commands/GetIndexCommand";
101104
import { GetPoliciesStatsCommandInput, GetPoliciesStatsCommandOutput } from "./commands/GetPoliciesStatsCommand";
102105
import { GetSecurityConfigCommandInput, GetSecurityConfigCommandOutput } from "./commands/GetSecurityConfigCommand";
103106
import { GetSecurityPolicyCommandInput, GetSecurityPolicyCommandOutput } from "./commands/GetSecurityPolicyCommand";
@@ -128,6 +131,7 @@ import {
128131
UpdateAccountSettingsCommandOutput,
129132
} from "./commands/UpdateAccountSettingsCommand";
130133
import { UpdateCollectionCommandInput, UpdateCollectionCommandOutput } from "./commands/UpdateCollectionCommand";
134+
import { UpdateIndexCommandInput, UpdateIndexCommandOutput } from "./commands/UpdateIndexCommand";
131135
import {
132136
UpdateLifecyclePolicyCommandInput,
133137
UpdateLifecyclePolicyCommandOutput,
@@ -162,18 +166,21 @@ export type ServiceInputTypes =
162166
| BatchGetVpcEndpointCommandInput
163167
| CreateAccessPolicyCommandInput
164168
| CreateCollectionCommandInput
169+
| CreateIndexCommandInput
165170
| CreateLifecyclePolicyCommandInput
166171
| CreateSecurityConfigCommandInput
167172
| CreateSecurityPolicyCommandInput
168173
| CreateVpcEndpointCommandInput
169174
| DeleteAccessPolicyCommandInput
170175
| DeleteCollectionCommandInput
176+
| DeleteIndexCommandInput
171177
| DeleteLifecyclePolicyCommandInput
172178
| DeleteSecurityConfigCommandInput
173179
| DeleteSecurityPolicyCommandInput
174180
| DeleteVpcEndpointCommandInput
175181
| GetAccessPolicyCommandInput
176182
| GetAccountSettingsCommandInput
183+
| GetIndexCommandInput
177184
| GetPoliciesStatsCommandInput
178185
| GetSecurityConfigCommandInput
179186
| GetSecurityPolicyCommandInput
@@ -189,6 +196,7 @@ export type ServiceInputTypes =
189196
| UpdateAccessPolicyCommandInput
190197
| UpdateAccountSettingsCommandInput
191198
| UpdateCollectionCommandInput
199+
| UpdateIndexCommandInput
192200
| UpdateLifecyclePolicyCommandInput
193201
| UpdateSecurityConfigCommandInput
194202
| UpdateSecurityPolicyCommandInput
@@ -204,18 +212,21 @@ export type ServiceOutputTypes =
204212
| BatchGetVpcEndpointCommandOutput
205213
| CreateAccessPolicyCommandOutput
206214
| CreateCollectionCommandOutput
215+
| CreateIndexCommandOutput
207216
| CreateLifecyclePolicyCommandOutput
208217
| CreateSecurityConfigCommandOutput
209218
| CreateSecurityPolicyCommandOutput
210219
| CreateVpcEndpointCommandOutput
211220
| DeleteAccessPolicyCommandOutput
212221
| DeleteCollectionCommandOutput
222+
| DeleteIndexCommandOutput
213223
| DeleteLifecyclePolicyCommandOutput
214224
| DeleteSecurityConfigCommandOutput
215225
| DeleteSecurityPolicyCommandOutput
216226
| DeleteVpcEndpointCommandOutput
217227
| GetAccessPolicyCommandOutput
218228
| GetAccountSettingsCommandOutput
229+
| GetIndexCommandOutput
219230
| GetPoliciesStatsCommandOutput
220231
| GetSecurityConfigCommandOutput
221232
| GetSecurityPolicyCommandOutput
@@ -231,6 +242,7 @@ export type ServiceOutputTypes =
231242
| UpdateAccessPolicyCommandOutput
232243
| UpdateAccountSettingsCommandOutput
233244
| UpdateCollectionCommandOutput
245+
| UpdateIndexCommandOutput
234246
| UpdateLifecyclePolicyCommandOutput
235247
| UpdateSecurityConfigCommandOutput
236248
| UpdateSecurityPolicyCommandOutput

clients/client-opensearchserverless/src/commands/CreateCollectionCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export interface CreateCollectionCommandOutput extends CreateCollectionResponse,
8888
*
8989
* @throws {@link OcuLimitExceededException} (client fault)
9090
* <p>Thrown when the collection you're attempting to create results in a number of search
91-
* or indexing OCUs that exceeds the account limit.</p>
91+
* or indexing OCUs that exceeds the account limit. </p>
9292
*
9393
* @throws {@link ServiceQuotaExceededException} (client fault)
9494
* <p>Thrown when you attempt to create more resources than the service allows based on

0 commit comments

Comments
 (0)