From c1800572ef17e01c6a4b6f60f733b0e6bd97b1ec Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 29 Nov 2023 18:56:25 +0000 Subject: [PATCH] feat(client-opensearchserverless): Amazon OpenSearch Serverless collections support an additional attribute called standby-replicas. This allows to specify whether a collection should have redundancy enabled. --- .../src/commands/BatchGetCollectionCommand.ts | 1 + .../src/commands/CreateCollectionCommand.ts | 2 + .../src/models/models_0.ts | 38 +++++++++++++++ .../src/protocols/Aws_json1_0.ts | 1 + .../aws-models/opensearchserverless.json | 46 +++++++++++++++++++ 5 files changed, 88 insertions(+) diff --git a/clients/client-opensearchserverless/src/commands/BatchGetCollectionCommand.ts b/clients/client-opensearchserverless/src/commands/BatchGetCollectionCommand.ts index fa1007015b3d7..b1a670379c1e4 100644 --- a/clients/client-opensearchserverless/src/commands/BatchGetCollectionCommand.ts +++ b/clients/client-opensearchserverless/src/commands/BatchGetCollectionCommand.ts @@ -70,6 +70,7 @@ export interface BatchGetCollectionCommandOutput extends BatchGetCollectionRespo * // description: "STRING_VALUE", * // arn: "STRING_VALUE", * // kmsKeyArn: "STRING_VALUE", + * // standbyReplicas: "STRING_VALUE", * // createdDate: Number("long"), * // lastModifiedDate: Number("long"), * // collectionEndpoint: "STRING_VALUE", diff --git a/clients/client-opensearchserverless/src/commands/CreateCollectionCommand.ts b/clients/client-opensearchserverless/src/commands/CreateCollectionCommand.ts index 8cfea6693005c..065239194c294 100644 --- a/clients/client-opensearchserverless/src/commands/CreateCollectionCommand.ts +++ b/clients/client-opensearchserverless/src/commands/CreateCollectionCommand.ts @@ -59,6 +59,7 @@ export interface CreateCollectionCommandOutput extends CreateCollectionResponse, * value: "STRING_VALUE", // required * }, * ], + * standbyReplicas: "STRING_VALUE", * clientToken: "STRING_VALUE", * }; * const command = new CreateCollectionCommand(input); @@ -72,6 +73,7 @@ export interface CreateCollectionCommandOutput extends CreateCollectionResponse, * // description: "STRING_VALUE", * // arn: "STRING_VALUE", * // kmsKeyArn: "STRING_VALUE", + * // standbyReplicas: "STRING_VALUE", * // createdDate: Number("long"), * // lastModifiedDate: Number("long"), * // }, diff --git a/clients/client-opensearchserverless/src/models/models_0.ts b/clients/client-opensearchserverless/src/models/models_0.ts index 0967549382f34..a0f192f7fce46 100644 --- a/clients/client-opensearchserverless/src/models/models_0.ts +++ b/clients/client-opensearchserverless/src/models/models_0.ts @@ -515,6 +515,26 @@ export interface BatchGetCollectionRequest { names?: string[]; } +/** + * @public + * @enum + */ +export const StandbyReplicas = { + /** + * Standby replicas disabled + */ + DISABLED: "DISABLED", + /** + * Standby replicas enabled + */ + ENABLED: "ENABLED", +} as const; + +/** + * @public + */ +export type StandbyReplicas = (typeof StandbyReplicas)[keyof typeof StandbyReplicas]; + /** * @public * @enum @@ -615,6 +635,12 @@ export interface CollectionDetail { */ kmsKeyArn?: string; + /** + * @public + *

Details about an OpenSearch Serverless collection.

+ */ + standbyReplicas?: StandbyReplicas; + /** * @public *

The Epoch time when the collection was created.

@@ -1142,6 +1168,12 @@ export interface CreateCollectionRequest { */ tags?: Tag[]; + /** + * @public + *

Indicates whether standby replicas should be used for a collection.

+ */ + standbyReplicas?: StandbyReplicas; + /** * @public *

Unique, case-sensitive identifier to ensure idempotency of the request.

@@ -1196,6 +1228,12 @@ export interface CreateCollectionDetail { */ kmsKeyArn?: string; + /** + * @public + *

Creates details about an OpenSearch Serverless collection.

+ */ + standbyReplicas?: StandbyReplicas; + /** * @public *

The Epoch time when the collection was created.

diff --git a/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts b/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts index 2c0200c3717f9..04053d50d7f21 100644 --- a/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts +++ b/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts @@ -2728,6 +2728,7 @@ const se_CreateCollectionRequest = (input: CreateCollectionRequest, context: __S clientToken: [true, (_) => _ ?? generateIdempotencyToken()], description: [], name: [], + standbyReplicas: [], tags: _json, type: [], }); diff --git a/codegen/sdk-codegen/aws-models/opensearchserverless.json b/codegen/sdk-codegen/aws-models/opensearchserverless.json index fd7f8bb4ba9f8..ca2f3d719169f 100644 --- a/codegen/sdk-codegen/aws-models/opensearchserverless.json +++ b/codegen/sdk-codegen/aws-models/opensearchserverless.json @@ -497,6 +497,12 @@ "smithy.api#documentation": "

The ARN of the Amazon Web Services KMS key used to encrypt the collection.

" } }, + "standbyReplicas": { + "target": "com.amazonaws.opensearchserverless#StandbyReplicas", + "traits": { + "smithy.api#documentation": "

Details about an OpenSearch Serverless collection.

" + } + }, "createdDate": { "target": "smithy.api#Long", "traits": { @@ -906,6 +912,12 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the KMS key with which to encrypt the collection.

" } }, + "standbyReplicas": { + "target": "com.amazonaws.opensearchserverless#StandbyReplicas", + "traits": { + "smithy.api#documentation": "

Creates details about an OpenSearch Serverless collection.

" + } + }, "createdDate": { "target": "smithy.api#Long", "traits": { @@ -954,6 +966,12 @@ "smithy.api#documentation": "

An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection.

" } }, + "standbyReplicas": { + "target": "com.amazonaws.opensearchserverless#StandbyReplicas", + "traits": { + "smithy.api#documentation": "

Indicates whether standby replicas should be used for a collection.

" + } + }, "clientToken": { "target": "com.amazonaws.opensearchserverless#ClientToken", "traits": { @@ -3604,6 +3622,17 @@ "expect": { "error": "Invalid Configuration: Missing Region" } + }, + { + "documentation": "Partition doesn't support DualStack", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } } ], "version": "1.0" @@ -4126,6 +4155,23 @@ "smithy.api#httpError": 402 } }, + "com.amazonaws.opensearchserverless#StandbyReplicas": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ENABLED", + "value": "ENABLED", + "documentation": "Standby replicas enabled" + }, + { + "name": "DISABLED", + "value": "DISABLED", + "documentation": "Standby replicas disabled" + } + ] + } + }, "com.amazonaws.opensearchserverless#SubnetId": { "type": "string", "traits": {