Skip to content

Commit e1738b0

Browse files
author
awstools
committed
feat(client-opensearch): Support RegisterCapability, GetCapability, DeregisterCapability API for AI Assistant feature management for OpenSearch UI Applications
1 parent 03f108d commit e1738b0

21 files changed

Lines changed: 1871 additions & 426 deletions

clients/client-opensearch/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,13 @@ DeleteVpcEndpoint
353353
</details>
354354
<details>
355355
<summary>
356+
DeregisterCapability
357+
</summary>
358+
359+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/DeregisterCapabilityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/DeregisterCapabilityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/DeregisterCapabilityCommandOutput/)
360+
</details>
361+
<details>
362+
<summary>
356363
DescribeDomain
357364
</summary>
358365

@@ -486,6 +493,13 @@ GetApplication
486493
</details>
487494
<details>
488495
<summary>
496+
GetCapability
497+
</summary>
498+
499+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/GetCapabilityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/GetCapabilityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/GetCapabilityCommandOutput/)
500+
</details>
501+
<details>
502+
<summary>
489503
GetCompatibleVersions
490504
</summary>
491505

@@ -668,6 +682,13 @@ PutDefaultApplicationSetting
668682
</details>
669683
<details>
670684
<summary>
685+
RegisterCapability
686+
</summary>
687+
688+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/RegisterCapabilityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/RegisterCapabilityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/RegisterCapabilityCommandOutput/)
689+
</details>
690+
<details>
691+
<summary>
671692
RejectInboundConnection
672693
</summary>
673694

clients/client-opensearch/src/OpenSearch.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ import {
118118
type DeleteVpcEndpointCommandOutput,
119119
DeleteVpcEndpointCommand,
120120
} from "./commands/DeleteVpcEndpointCommand";
121+
import {
122+
type DeregisterCapabilityCommandInput,
123+
type DeregisterCapabilityCommandOutput,
124+
DeregisterCapabilityCommand,
125+
} from "./commands/DeregisterCapabilityCommand";
121126
import {
122127
type DescribeDomainAutoTunesCommandInput,
123128
type DescribeDomainAutoTunesCommandOutput,
@@ -213,6 +218,11 @@ import {
213218
type GetApplicationCommandOutput,
214219
GetApplicationCommand,
215220
} from "./commands/GetApplicationCommand";
221+
import {
222+
type GetCapabilityCommandInput,
223+
type GetCapabilityCommandOutput,
224+
GetCapabilityCommand,
225+
} from "./commands/GetCapabilityCommand";
216226
import {
217227
type GetCompatibleVersionsCommandInput,
218228
type GetCompatibleVersionsCommandOutput,
@@ -335,6 +345,11 @@ import {
335345
type PutDefaultApplicationSettingCommandOutput,
336346
PutDefaultApplicationSettingCommand,
337347
} from "./commands/PutDefaultApplicationSettingCommand";
348+
import {
349+
type RegisterCapabilityCommandInput,
350+
type RegisterCapabilityCommandOutput,
351+
RegisterCapabilityCommand,
352+
} from "./commands/RegisterCapabilityCommand";
338353
import {
339354
type RejectInboundConnectionCommandInput,
340355
type RejectInboundConnectionCommandOutput,
@@ -452,6 +467,7 @@ const commands = {
452467
DeleteOutboundConnectionCommand,
453468
DeletePackageCommand,
454469
DeleteVpcEndpointCommand,
470+
DeregisterCapabilityCommand,
455471
DescribeDomainCommand,
456472
DescribeDomainAutoTunesCommand,
457473
DescribeDomainChangeProgressCommand,
@@ -471,6 +487,7 @@ const commands = {
471487
DissociatePackageCommand,
472488
DissociatePackagesCommand,
473489
GetApplicationCommand,
490+
GetCapabilityCommand,
474491
GetCompatibleVersionsCommand,
475492
GetDataSourceCommand,
476493
GetDefaultApplicationSettingCommand,
@@ -497,6 +514,7 @@ const commands = {
497514
ListVpcEndpointsForDomainCommand,
498515
PurchaseReservedInstanceOfferingCommand,
499516
PutDefaultApplicationSettingCommand,
517+
RegisterCapabilityCommand,
500518
RejectInboundConnectionCommand,
501519
RemoveTagsCommand,
502520
RevokeVpcEndpointAccessCommand,
@@ -940,6 +958,23 @@ export interface OpenSearch {
940958
cb: (err: any, data?: DeleteVpcEndpointCommandOutput) => void
941959
): void;
942960

961+
/**
962+
* @see {@link DeregisterCapabilityCommand}
963+
*/
964+
deregisterCapability(
965+
args: DeregisterCapabilityCommandInput,
966+
options?: __HttpHandlerOptions
967+
): Promise<DeregisterCapabilityCommandOutput>;
968+
deregisterCapability(
969+
args: DeregisterCapabilityCommandInput,
970+
cb: (err: any, data?: DeregisterCapabilityCommandOutput) => void
971+
): void;
972+
deregisterCapability(
973+
args: DeregisterCapabilityCommandInput,
974+
options: __HttpHandlerOptions,
975+
cb: (err: any, data?: DeregisterCapabilityCommandOutput) => void
976+
): void;
977+
943978
/**
944979
* @see {@link DescribeDomainCommand}
945980
*/
@@ -1268,6 +1303,23 @@ export interface OpenSearch {
12681303
cb: (err: any, data?: GetApplicationCommandOutput) => void
12691304
): void;
12701305

1306+
/**
1307+
* @see {@link GetCapabilityCommand}
1308+
*/
1309+
getCapability(
1310+
args: GetCapabilityCommandInput,
1311+
options?: __HttpHandlerOptions
1312+
): Promise<GetCapabilityCommandOutput>;
1313+
getCapability(
1314+
args: GetCapabilityCommandInput,
1315+
cb: (err: any, data?: GetCapabilityCommandOutput) => void
1316+
): void;
1317+
getCapability(
1318+
args: GetCapabilityCommandInput,
1319+
options: __HttpHandlerOptions,
1320+
cb: (err: any, data?: GetCapabilityCommandOutput) => void
1321+
): void;
1322+
12711323
/**
12721324
* @see {@link GetCompatibleVersionsCommand}
12731325
*/
@@ -1717,6 +1769,23 @@ export interface OpenSearch {
17171769
cb: (err: any, data?: PutDefaultApplicationSettingCommandOutput) => void
17181770
): void;
17191771

1772+
/**
1773+
* @see {@link RegisterCapabilityCommand}
1774+
*/
1775+
registerCapability(
1776+
args: RegisterCapabilityCommandInput,
1777+
options?: __HttpHandlerOptions
1778+
): Promise<RegisterCapabilityCommandOutput>;
1779+
registerCapability(
1780+
args: RegisterCapabilityCommandInput,
1781+
cb: (err: any, data?: RegisterCapabilityCommandOutput) => void
1782+
): void;
1783+
registerCapability(
1784+
args: RegisterCapabilityCommandInput,
1785+
options: __HttpHandlerOptions,
1786+
cb: (err: any, data?: RegisterCapabilityCommandOutput) => void
1787+
): void;
1788+
17201789
/**
17211790
* @see {@link RejectInboundConnectionCommand}
17221791
*/

clients/client-opensearch/src/OpenSearchClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ import type {
127127
DeleteVpcEndpointCommandInput,
128128
DeleteVpcEndpointCommandOutput,
129129
} from "./commands/DeleteVpcEndpointCommand";
130+
import type {
131+
DeregisterCapabilityCommandInput,
132+
DeregisterCapabilityCommandOutput,
133+
} from "./commands/DeregisterCapabilityCommand";
130134
import type {
131135
DescribeDomainAutoTunesCommandInput,
132136
DescribeDomainAutoTunesCommandOutput,
@@ -191,6 +195,7 @@ import type {
191195
DissociatePackagesCommandOutput,
192196
} from "./commands/DissociatePackagesCommand";
193197
import type { GetApplicationCommandInput, GetApplicationCommandOutput } from "./commands/GetApplicationCommand";
198+
import type { GetCapabilityCommandInput, GetCapabilityCommandOutput } from "./commands/GetCapabilityCommand";
194199
import type {
195200
GetCompatibleVersionsCommandInput,
196201
GetCompatibleVersionsCommandOutput,
@@ -265,6 +270,10 @@ import type {
265270
PutDefaultApplicationSettingCommandInput,
266271
PutDefaultApplicationSettingCommandOutput,
267272
} from "./commands/PutDefaultApplicationSettingCommand";
273+
import type {
274+
RegisterCapabilityCommandInput,
275+
RegisterCapabilityCommandOutput,
276+
} from "./commands/RegisterCapabilityCommand";
268277
import type {
269278
RejectInboundConnectionCommandInput,
270279
RejectInboundConnectionCommandOutput,
@@ -349,6 +358,7 @@ export type ServiceInputTypes =
349358
| DeleteOutboundConnectionCommandInput
350359
| DeletePackageCommandInput
351360
| DeleteVpcEndpointCommandInput
361+
| DeregisterCapabilityCommandInput
352362
| DescribeDomainAutoTunesCommandInput
353363
| DescribeDomainChangeProgressCommandInput
354364
| DescribeDomainCommandInput
@@ -368,6 +378,7 @@ export type ServiceInputTypes =
368378
| DissociatePackageCommandInput
369379
| DissociatePackagesCommandInput
370380
| GetApplicationCommandInput
381+
| GetCapabilityCommandInput
371382
| GetCompatibleVersionsCommandInput
372383
| GetDataSourceCommandInput
373384
| GetDefaultApplicationSettingCommandInput
@@ -394,6 +405,7 @@ export type ServiceInputTypes =
394405
| ListVpcEndpointsForDomainCommandInput
395406
| PurchaseReservedInstanceOfferingCommandInput
396407
| PutDefaultApplicationSettingCommandInput
408+
| RegisterCapabilityCommandInput
397409
| RejectInboundConnectionCommandInput
398410
| RemoveTagsCommandInput
399411
| RevokeVpcEndpointAccessCommandInput
@@ -438,6 +450,7 @@ export type ServiceOutputTypes =
438450
| DeleteOutboundConnectionCommandOutput
439451
| DeletePackageCommandOutput
440452
| DeleteVpcEndpointCommandOutput
453+
| DeregisterCapabilityCommandOutput
441454
| DescribeDomainAutoTunesCommandOutput
442455
| DescribeDomainChangeProgressCommandOutput
443456
| DescribeDomainCommandOutput
@@ -457,6 +470,7 @@ export type ServiceOutputTypes =
457470
| DissociatePackageCommandOutput
458471
| DissociatePackagesCommandOutput
459472
| GetApplicationCommandOutput
473+
| GetCapabilityCommandOutput
460474
| GetCompatibleVersionsCommandOutput
461475
| GetDataSourceCommandOutput
462476
| GetDefaultApplicationSettingCommandOutput
@@ -483,6 +497,7 @@ export type ServiceOutputTypes =
483497
| ListVpcEndpointsForDomainCommandOutput
484498
| PurchaseReservedInstanceOfferingCommandOutput
485499
| PutDefaultApplicationSettingCommandOutput
500+
| RegisterCapabilityCommandOutput
486501
| RejectInboundConnectionCommandOutput
487502
| RemoveTagsCommandOutput
488503
| RevokeVpcEndpointAccessCommandOutput
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { Command as $Command } from "@smithy/smithy-client";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
5+
6+
import { commonParams } from "../endpoint/EndpointParameters";
7+
import type { DeregisterCapabilityRequest, DeregisterCapabilityResponse } from "../models/models_0";
8+
import type { OpenSearchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OpenSearchClient";
9+
import { DeregisterCapability$ } from "../schemas/schemas_0";
10+
11+
/**
12+
* @public
13+
*/
14+
export type { __MetadataBearer };
15+
export { $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link DeregisterCapabilityCommand}.
20+
*/
21+
export interface DeregisterCapabilityCommandInput extends DeregisterCapabilityRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link DeregisterCapabilityCommand}.
26+
*/
27+
export interface DeregisterCapabilityCommandOutput extends DeregisterCapabilityResponse, __MetadataBearer {}
28+
29+
/**
30+
* <p>Deregisters a capability from an OpenSearch UI application. This operation removes the capability and its associated configuration.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { OpenSearchClient, DeregisterCapabilityCommand } from "@aws-sdk/client-opensearch"; // ES Modules import
35+
* // const { OpenSearchClient, DeregisterCapabilityCommand } = require("@aws-sdk/client-opensearch"); // CommonJS import
36+
* // import type { OpenSearchClientConfig } from "@aws-sdk/client-opensearch";
37+
* const config = {}; // type is OpenSearchClientConfig
38+
* const client = new OpenSearchClient(config);
39+
* const input = { // DeregisterCapabilityRequest
40+
* applicationId: "STRING_VALUE", // required
41+
* capabilityName: "STRING_VALUE", // required
42+
* };
43+
* const command = new DeregisterCapabilityCommand(input);
44+
* const response = await client.send(command);
45+
* // { // DeregisterCapabilityResponse
46+
* // status: "creating" || "create_failed" || "active" || "updating" || "update_failed" || "deleting" || "delete_failed",
47+
* // };
48+
*
49+
* ```
50+
*
51+
* @param DeregisterCapabilityCommandInput - {@link DeregisterCapabilityCommandInput}
52+
* @returns {@link DeregisterCapabilityCommandOutput}
53+
* @see {@link DeregisterCapabilityCommandInput} for command's `input` shape.
54+
* @see {@link DeregisterCapabilityCommandOutput} for command's `response` shape.
55+
* @see {@link OpenSearchClientResolvedConfig | config} for OpenSearchClient's `config` shape.
56+
*
57+
* @throws {@link AccessDeniedException} (client fault)
58+
* <p>An error occurred because you don't have permissions to access the resource.</p>
59+
*
60+
* @throws {@link ConflictException} (client fault)
61+
* <p>An error occurred because the client attempts to remove a resource that is currently in use.</p>
62+
*
63+
* @throws {@link DisabledOperationException} (client fault)
64+
* <p>An error occured because the client wanted to access an unsupported operation.</p>
65+
*
66+
* @throws {@link InternalException} (server fault)
67+
* <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
68+
*
69+
* @throws {@link ResourceNotFoundException} (client fault)
70+
* <p>An exception for accessing or deleting a resource that doesn't exist.</p>
71+
*
72+
* @throws {@link ValidationException} (client fault)
73+
* <p>An exception for accessing or deleting a resource that doesn't exist.</p>
74+
*
75+
* @throws {@link OpenSearchServiceException}
76+
* <p>Base exception class for all service exceptions from OpenSearch service.</p>
77+
*
78+
*
79+
* @public
80+
*/
81+
export class DeregisterCapabilityCommand extends $Command
82+
.classBuilder<
83+
DeregisterCapabilityCommandInput,
84+
DeregisterCapabilityCommandOutput,
85+
OpenSearchClientResolvedConfig,
86+
ServiceInputTypes,
87+
ServiceOutputTypes
88+
>()
89+
.ep(commonParams)
90+
.m(function (this: any, Command: any, cs: any, config: OpenSearchClientResolvedConfig, o: any) {
91+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
92+
})
93+
.s("AmazonOpenSearchService", "DeregisterCapability", {})
94+
.n("OpenSearchClient", "DeregisterCapabilityCommand")
95+
.sc(DeregisterCapability$)
96+
.build() {
97+
/** @internal type navigation helper, not in runtime. */
98+
protected declare static __types: {
99+
api: {
100+
input: DeregisterCapabilityRequest;
101+
output: DeregisterCapabilityResponse;
102+
};
103+
sdk: {
104+
input: DeregisterCapabilityCommandInput;
105+
output: DeregisterCapabilityCommandOutput;
106+
};
107+
};
108+
}

0 commit comments

Comments
 (0)