From be0249fe4be6673605bd9bc0e6b14b5706c456ca Mon Sep 17 00:00:00 2001 From: awstools Date: Mon, 12 Jun 2023 18:16:04 +0000 Subject: [PATCH] feat(client-opensearch): This release adds support for SkipUnavailable connection property for cross cluster search --- .../CreateOutboundConnectionCommand.ts | 9 ++++ .../DeleteOutboundConnectionCommand.ts | 3 ++ .../DescribeOutboundConnectionsCommand.ts | 3 ++ .../client-opensearch/src/models/models_0.ts | 54 ++++++++++++++++--- .../src/protocols/Aws_restJson1.ts | 9 ++++ .../sdk-codegen/aws-models/opensearch.json | 53 +++++++++++++++--- 6 files changed, 117 insertions(+), 14 deletions(-) diff --git a/clients/client-opensearch/src/commands/CreateOutboundConnectionCommand.ts b/clients/client-opensearch/src/commands/CreateOutboundConnectionCommand.ts index 9659bf81018b..5be9b7c147e3 100644 --- a/clients/client-opensearch/src/commands/CreateOutboundConnectionCommand.ts +++ b/clients/client-opensearch/src/commands/CreateOutboundConnectionCommand.ts @@ -62,6 +62,12 @@ export interface CreateOutboundConnectionCommandOutput extends CreateOutboundCon * }, * ConnectionAlias: "STRING_VALUE", // required * ConnectionMode: "DIRECT" || "VPC_ENDPOINT", + * ConnectionProperties: { // ConnectionProperties + * Endpoint: "STRING_VALUE", + * CrossClusterSearch: { // CrossClusterSearchConnectionProperties + * SkipUnavailable: "ENABLED" || "DISABLED", + * }, + * }, * }; * const command = new CreateOutboundConnectionCommand(input); * const response = await client.send(command); @@ -89,6 +95,9 @@ export interface CreateOutboundConnectionCommandOutput extends CreateOutboundCon * // ConnectionMode: "DIRECT" || "VPC_ENDPOINT", * // ConnectionProperties: { // ConnectionProperties * // Endpoint: "STRING_VALUE", + * // CrossClusterSearch: { // CrossClusterSearchConnectionProperties + * // SkipUnavailable: "ENABLED" || "DISABLED", + * // }, * // }, * // }; * diff --git a/clients/client-opensearch/src/commands/DeleteOutboundConnectionCommand.ts b/clients/client-opensearch/src/commands/DeleteOutboundConnectionCommand.ts index fb9678623d69..ba915ac1af9b 100644 --- a/clients/client-opensearch/src/commands/DeleteOutboundConnectionCommand.ts +++ b/clients/client-opensearch/src/commands/DeleteOutboundConnectionCommand.ts @@ -75,6 +75,9 @@ export interface DeleteOutboundConnectionCommandOutput extends DeleteOutboundCon * // ConnectionMode: "DIRECT" || "VPC_ENDPOINT", * // ConnectionProperties: { // ConnectionProperties * // Endpoint: "STRING_VALUE", + * // CrossClusterSearch: { // CrossClusterSearchConnectionProperties + * // SkipUnavailable: "ENABLED" || "DISABLED", + * // }, * // }, * // }, * // }; diff --git a/clients/client-opensearch/src/commands/DescribeOutboundConnectionsCommand.ts b/clients/client-opensearch/src/commands/DescribeOutboundConnectionsCommand.ts index 18fafba5e31f..dd1bb90dce2a 100644 --- a/clients/client-opensearch/src/commands/DescribeOutboundConnectionsCommand.ts +++ b/clients/client-opensearch/src/commands/DescribeOutboundConnectionsCommand.ts @@ -90,6 +90,9 @@ export interface DescribeOutboundConnectionsCommandOutput * // ConnectionMode: "DIRECT" || "VPC_ENDPOINT", * // ConnectionProperties: { // ConnectionProperties * // Endpoint: "STRING_VALUE", + * // CrossClusterSearch: { // CrossClusterSearchConnectionProperties + * // SkipUnavailable: "ENABLED" || "DISABLED", + * // }, * // }, * // }, * // ], diff --git a/clients/client-opensearch/src/models/models_0.ts b/clients/client-opensearch/src/models/models_0.ts index 03e971fc8ab4..18a239360626 100644 --- a/clients/client-opensearch/src/models/models_0.ts +++ b/clients/client-opensearch/src/models/models_0.ts @@ -2109,6 +2109,50 @@ export class ResourceAlreadyExistsException extends __BaseException { } } +/** + * @public + * @enum + */ +export const SkipUnavailableStatus = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +} as const; + +/** + * @public + */ +export type SkipUnavailableStatus = (typeof SkipUnavailableStatus)[keyof typeof SkipUnavailableStatus]; + +/** + * @public + *

Cross cluster search specific connection properties.

+ */ +export interface CrossClusterSearchConnectionProperties { + /** + *

Status of SkipUnavailable param for outbound connection.

+ */ + SkipUnavailable?: SkipUnavailableStatus | string; +} + +/** + * @public + *

The connection properties of an outbound connection.

+ */ +export interface ConnectionProperties { + /** + * + *

The Endpoint attribute cannot be modified.

+ *
+ *

The endpoint of the remote domain. Applicable for VPC_ENDPOINT connection mode.

+ */ + Endpoint?: string; + + /** + *

The connection properties for cross cluster search.

+ */ + CrossClusterSearch?: CrossClusterSearchConnectionProperties; +} + /** * @public *

Container for the parameters to the CreateOutboundConnection operation.

@@ -2133,17 +2177,11 @@ export interface CreateOutboundConnectionRequest { *

The connection mode.

*/ ConnectionMode?: ConnectionMode | string; -} -/** - * @public - *

The connection properties of an outbound connection.

- */ -export interface ConnectionProperties { /** - *

The endpoint of the remote domain.

+ *

The ConnectionProperties for the outbound connection.

*/ - Endpoint?: string; + ConnectionProperties?: ConnectionProperties; } /** diff --git a/clients/client-opensearch/src/protocols/Aws_restJson1.ts b/clients/client-opensearch/src/protocols/Aws_restJson1.ts index e45a2e0e469d..36abf86e2edd 100644 --- a/clients/client-opensearch/src/protocols/Aws_restJson1.ts +++ b/clients/client-opensearch/src/protocols/Aws_restJson1.ts @@ -192,6 +192,8 @@ import { CognitoOptionsStatus, ColdStorageOptions, ConflictException, + ConnectionProperties, + CrossClusterSearchConnectionProperties, DependencyFailureException, DescribePackagesFilter, DisabledOperationException, @@ -466,6 +468,7 @@ export const se_CreateOutboundConnectionCommand = async ( take(input, { ConnectionAlias: [], ConnectionMode: [], + ConnectionProperties: (_) => _json(_), LocalDomainInfo: (_) => _json(_), RemoteDomainInfo: (_) => _json(_), }) @@ -5367,6 +5370,10 @@ const se_AutoTuneOptionsInput = (input: AutoTuneOptionsInput, context: __SerdeCo // se_ColdStorageOptions omitted. +// se_ConnectionProperties omitted. + +// se_CrossClusterSearchConnectionProperties omitted. + // se_DescribePackagesFilter omitted. // se_DescribePackagesFilterList omitted. @@ -5653,6 +5660,8 @@ const de_CognitoOptionsStatus = (output: any, context: __SerdeContext): CognitoO // de_ConnectionProperties omitted. +// de_CrossClusterSearchConnectionProperties omitted. + /** * deserializeAws_restJson1DomainConfig */ diff --git a/codegen/sdk-codegen/aws-models/opensearch.json b/codegen/sdk-codegen/aws-models/opensearch.json index 7c5980845448..d740332a9d78 100644 --- a/codegen/sdk-codegen/aws-models/opensearch.json +++ b/codegen/sdk-codegen/aws-models/opensearch.json @@ -2766,7 +2766,13 @@ "Endpoint": { "target": "com.amazonaws.opensearch#Endpoint", "traits": { - "smithy.api#documentation": "

The endpoint of the remote domain.

" + "smithy.api#documentation": "\n

The Endpoint attribute cannot be modified.

\n
\n

The endpoint of the remote domain. Applicable for VPC_ENDPOINT connection mode.

" + } + }, + "CrossClusterSearch": { + "target": "com.amazonaws.opensearch#CrossClusterSearchConnectionProperties", + "traits": { + "smithy.api#documentation": "

The connection properties for cross cluster search.

" } } }, @@ -3009,6 +3015,12 @@ "traits": { "smithy.api#documentation": "

The connection mode.

" } + }, + "ConnectionProperties": { + "target": "com.amazonaws.opensearch#ConnectionProperties", + "traits": { + "smithy.api#documentation": "

The ConnectionProperties for the outbound connection.

" + } } }, "traits": { @@ -3241,6 +3253,20 @@ "com.amazonaws.opensearch#CreatedAt": { "type": "timestamp" }, + "com.amazonaws.opensearch#CrossClusterSearchConnectionProperties": { + "type": "structure", + "members": { + "SkipUnavailable": { + "target": "com.amazonaws.opensearch#SkipUnavailableStatus", + "traits": { + "smithy.api#documentation": "

Status of SkipUnavailable param for outbound connection.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Cross cluster search specific connection properties.

" + } + }, "com.amazonaws.opensearch#DeleteDomain": { "type": "operation", "input": { @@ -4597,11 +4623,6 @@ "type": "list", "member": { "target": "com.amazonaws.opensearch#DescribePackagesFilterValue" - }, - "traits": { - "smithy.api#length": { - "min": 1 - } } }, "com.amazonaws.opensearch#DescribePackagesRequest": { @@ -9929,6 +9950,26 @@ "smithy.api#documentation": "

The domain endpoint to which index and search requests are submitted. For example,\n search-imdb-movies-oopcnjfn6ugo.eu-west-1.es.amazonaws.com or\n doc-imdb-movies-oopcnjfn6u.eu-west-1.es.amazonaws.com.

" } }, + "com.amazonaws.opensearch#SkipUnavailableStatus": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + }, + "traits": { + "smithy.api#documentation": "

Status of SkipUnavailable param for outbound connection.

\n " + } + }, "com.amazonaws.opensearch#SlotList": { "type": "list", "member": {