Skip to content

Commit

Permalink
feat(client-opensearch): Adds Support for new AssociatePackages and D…
Browse files Browse the repository at this point in the history
…issociatePackages API in Amazon OpenSearch Service that allows association and dissociation operations to be carried out on multiple packages at the same time.
  • Loading branch information
awstools committed Nov 11, 2024
1 parent 925e731 commit aad1fc8
Show file tree
Hide file tree
Showing 26 changed files with 2,006 additions and 226 deletions.
24 changes: 24 additions & 0 deletions clients/client-opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,14 @@ AssociatePackage

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/AssociatePackageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/AssociatePackageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/AssociatePackageCommandOutput/)

</details>
<details>
<summary>
AssociatePackages
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/AssociatePackagesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/AssociatePackagesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/AssociatePackagesCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -486,6 +494,14 @@ DissociatePackage

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/DissociatePackageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/DissociatePackageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/DissociatePackageCommandOutput/)

</details>
<details>
<summary>
DissociatePackages
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/DissociatePackagesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/DissociatePackagesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/DissociatePackagesCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -726,6 +742,14 @@ UpdatePackage

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/UpdatePackageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/UpdatePackageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/UpdatePackageCommandOutput/)

</details>
<details>
<summary>
UpdatePackageScope
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/opensearch/command/UpdatePackageScopeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/UpdatePackageScopeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-opensearch/Interface/UpdatePackageScopeCommandOutput/)

</details>
<details>
<summary>
Expand Down
69 changes: 69 additions & 0 deletions clients/client-opensearch/src/OpenSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import {
AssociatePackageCommandInput,
AssociatePackageCommandOutput,
} from "./commands/AssociatePackageCommand";
import {
AssociatePackagesCommand,
AssociatePackagesCommandInput,
AssociatePackagesCommandOutput,
} from "./commands/AssociatePackagesCommand";
import {
AuthorizeVpcEndpointAccessCommand,
AuthorizeVpcEndpointAccessCommandInput,
Expand Down Expand Up @@ -173,6 +178,11 @@ import {
DissociatePackageCommandInput,
DissociatePackageCommandOutput,
} from "./commands/DissociatePackageCommand";
import {
DissociatePackagesCommand,
DissociatePackagesCommandInput,
DissociatePackagesCommandOutput,
} from "./commands/DissociatePackagesCommand";
import {
GetApplicationCommand,
GetApplicationCommandInput,
Expand Down Expand Up @@ -315,6 +325,11 @@ import {
UpdatePackageCommandInput,
UpdatePackageCommandOutput,
} from "./commands/UpdatePackageCommand";
import {
UpdatePackageScopeCommand,
UpdatePackageScopeCommandInput,
UpdatePackageScopeCommandOutput,
} from "./commands/UpdatePackageScopeCommand";
import {
UpdateScheduledActionCommand,
UpdateScheduledActionCommandInput,
Expand All @@ -337,6 +352,7 @@ const commands = {
AddDataSourceCommand,
AddTagsCommand,
AssociatePackageCommand,
AssociatePackagesCommand,
AuthorizeVpcEndpointAccessCommand,
CancelDomainConfigChangeCommand,
CancelServiceSoftwareUpdateCommand,
Expand Down Expand Up @@ -368,6 +384,7 @@ const commands = {
DescribeReservedInstancesCommand,
DescribeVpcEndpointsCommand,
DissociatePackageCommand,
DissociatePackagesCommand,
GetApplicationCommand,
GetCompatibleVersionsCommand,
GetDataSourceCommand,
Expand Down Expand Up @@ -398,6 +415,7 @@ const commands = {
UpdateDataSourceCommand,
UpdateDomainConfigCommand,
UpdatePackageCommand,
UpdatePackageScopeCommand,
UpdateScheduledActionCommand,
UpdateVpcEndpointCommand,
UpgradeDomainCommand,
Expand Down Expand Up @@ -460,6 +478,23 @@ export interface OpenSearch {
cb: (err: any, data?: AssociatePackageCommandOutput) => void
): void;

/**
* @see {@link AssociatePackagesCommand}
*/
associatePackages(
args: AssociatePackagesCommandInput,
options?: __HttpHandlerOptions
): Promise<AssociatePackagesCommandOutput>;
associatePackages(
args: AssociatePackagesCommandInput,
cb: (err: any, data?: AssociatePackagesCommandOutput) => void
): void;
associatePackages(
args: AssociatePackagesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: AssociatePackagesCommandOutput) => void
): void;

/**
* @see {@link AuthorizeVpcEndpointAccessCommand}
*/
Expand Down Expand Up @@ -962,6 +997,23 @@ export interface OpenSearch {
cb: (err: any, data?: DissociatePackageCommandOutput) => void
): void;

/**
* @see {@link DissociatePackagesCommand}
*/
dissociatePackages(
args: DissociatePackagesCommandInput,
options?: __HttpHandlerOptions
): Promise<DissociatePackagesCommandOutput>;
dissociatePackages(
args: DissociatePackagesCommandInput,
cb: (err: any, data?: DissociatePackagesCommandOutput) => void
): void;
dissociatePackages(
args: DissociatePackagesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DissociatePackagesCommandOutput) => void
): void;

/**
* @see {@link GetApplicationCommand}
*/
Expand Down Expand Up @@ -1438,6 +1490,23 @@ export interface OpenSearch {
cb: (err: any, data?: UpdatePackageCommandOutput) => void
): void;

/**
* @see {@link UpdatePackageScopeCommand}
*/
updatePackageScope(
args: UpdatePackageScopeCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdatePackageScopeCommandOutput>;
updatePackageScope(
args: UpdatePackageScopeCommandInput,
cb: (err: any, data?: UpdatePackageScopeCommandOutput) => void
): void;
updatePackageScope(
args: UpdatePackageScopeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdatePackageScopeCommandOutput) => void
): void;

/**
* @see {@link UpdateScheduledActionCommand}
*/
Expand Down
9 changes: 9 additions & 0 deletions clients/client-opensearch/src/OpenSearchClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import {
import { AddDataSourceCommandInput, AddDataSourceCommandOutput } from "./commands/AddDataSourceCommand";
import { AddTagsCommandInput, AddTagsCommandOutput } from "./commands/AddTagsCommand";
import { AssociatePackageCommandInput, AssociatePackageCommandOutput } from "./commands/AssociatePackageCommand";
import { AssociatePackagesCommandInput, AssociatePackagesCommandOutput } from "./commands/AssociatePackagesCommand";
import {
AuthorizeVpcEndpointAccessCommandInput,
AuthorizeVpcEndpointAccessCommandOutput,
Expand Down Expand Up @@ -145,6 +146,7 @@ import {
DescribeVpcEndpointsCommandOutput,
} from "./commands/DescribeVpcEndpointsCommand";
import { DissociatePackageCommandInput, DissociatePackageCommandOutput } from "./commands/DissociatePackageCommand";
import { DissociatePackagesCommandInput, DissociatePackagesCommandOutput } from "./commands/DissociatePackagesCommand";
import { GetApplicationCommandInput, GetApplicationCommandOutput } from "./commands/GetApplicationCommand";
import {
GetCompatibleVersionsCommandInput,
Expand Down Expand Up @@ -220,6 +222,7 @@ import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from ".
import { UpdateDataSourceCommandInput, UpdateDataSourceCommandOutput } from "./commands/UpdateDataSourceCommand";
import { UpdateDomainConfigCommandInput, UpdateDomainConfigCommandOutput } from "./commands/UpdateDomainConfigCommand";
import { UpdatePackageCommandInput, UpdatePackageCommandOutput } from "./commands/UpdatePackageCommand";
import { UpdatePackageScopeCommandInput, UpdatePackageScopeCommandOutput } from "./commands/UpdatePackageScopeCommand";
import {
UpdateScheduledActionCommandInput,
UpdateScheduledActionCommandOutput,
Expand All @@ -245,6 +248,7 @@ export type ServiceInputTypes =
| AddDataSourceCommandInput
| AddTagsCommandInput
| AssociatePackageCommandInput
| AssociatePackagesCommandInput
| AuthorizeVpcEndpointAccessCommandInput
| CancelDomainConfigChangeCommandInput
| CancelServiceSoftwareUpdateCommandInput
Expand Down Expand Up @@ -276,6 +280,7 @@ export type ServiceInputTypes =
| DescribeReservedInstancesCommandInput
| DescribeVpcEndpointsCommandInput
| DissociatePackageCommandInput
| DissociatePackagesCommandInput
| GetApplicationCommandInput
| GetCompatibleVersionsCommandInput
| GetDataSourceCommandInput
Expand Down Expand Up @@ -306,6 +311,7 @@ export type ServiceInputTypes =
| UpdateDataSourceCommandInput
| UpdateDomainConfigCommandInput
| UpdatePackageCommandInput
| UpdatePackageScopeCommandInput
| UpdateScheduledActionCommandInput
| UpdateVpcEndpointCommandInput
| UpgradeDomainCommandInput;
Expand All @@ -318,6 +324,7 @@ export type ServiceOutputTypes =
| AddDataSourceCommandOutput
| AddTagsCommandOutput
| AssociatePackageCommandOutput
| AssociatePackagesCommandOutput
| AuthorizeVpcEndpointAccessCommandOutput
| CancelDomainConfigChangeCommandOutput
| CancelServiceSoftwareUpdateCommandOutput
Expand Down Expand Up @@ -349,6 +356,7 @@ export type ServiceOutputTypes =
| DescribeReservedInstancesCommandOutput
| DescribeVpcEndpointsCommandOutput
| DissociatePackageCommandOutput
| DissociatePackagesCommandOutput
| GetApplicationCommandOutput
| GetCompatibleVersionsCommandOutput
| GetDataSourceCommandOutput
Expand Down Expand Up @@ -379,6 +387,7 @@ export type ServiceOutputTypes =
| UpdateDataSourceCommandOutput
| UpdateDomainConfigCommandOutput
| UpdatePackageCommandOutput
| UpdatePackageScopeCommandOutput
| UpdateScheduledActionCommandOutput
| UpdateVpcEndpointCommandOutput
| UpgradeDomainCommandOutput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,41 @@ export interface AssociatePackageCommandOutput extends AssociatePackageResponse,
* const input = { // AssociatePackageRequest
* PackageID: "STRING_VALUE", // required
* DomainName: "STRING_VALUE", // required
* PrerequisitePackageIDList: [ // PackageIDList
* "STRING_VALUE",
* ],
* AssociationConfiguration: { // PackageAssociationConfiguration
* KeyStoreAccessOption: { // KeyStoreAccessOption
* KeyAccessRoleArn: "STRING_VALUE",
* KeyStoreAccessEnabled: true || false, // required
* },
* },
* };
* const command = new AssociatePackageCommand(input);
* const response = await client.send(command);
* // { // AssociatePackageResponse
* // DomainPackageDetails: { // DomainPackageDetails
* // PackageID: "STRING_VALUE",
* // PackageName: "STRING_VALUE",
* // PackageType: "TXT-DICTIONARY" || "ZIP-PLUGIN",
* // PackageType: "TXT-DICTIONARY" || "ZIP-PLUGIN" || "PACKAGE-LICENSE" || "PACKAGE-CONFIG",
* // LastUpdated: new Date("TIMESTAMP"),
* // DomainName: "STRING_VALUE",
* // DomainPackageStatus: "ASSOCIATING" || "ASSOCIATION_FAILED" || "ACTIVE" || "DISSOCIATING" || "DISSOCIATION_FAILED",
* // PackageVersion: "STRING_VALUE",
* // PrerequisitePackageIDList: [ // PackageIDList
* // "STRING_VALUE",
* // ],
* // ReferencePath: "STRING_VALUE",
* // ErrorDetails: { // ErrorDetails
* // ErrorType: "STRING_VALUE",
* // ErrorMessage: "STRING_VALUE",
* // },
* // AssociationConfiguration: { // PackageAssociationConfiguration
* // KeyStoreAccessOption: { // KeyStoreAccessOption
* // KeyAccessRoleArn: "STRING_VALUE",
* // KeyStoreAccessEnabled: true || false, // required
* // },
* // },
* // },
* // };
*
Expand Down
Loading

0 comments on commit aad1fc8

Please sign in to comment.