Skip to content

Commit

Permalink
feat(client-opensearchserverless): Amazon OpenSearch Serverless colle…
Browse files Browse the repository at this point in the history
…ctions support an additional attribute called standby-replicas. This allows to specify whether a collection should have redundancy enabled.
  • Loading branch information
awstools committed Nov 29, 2023
1 parent 229dcf8 commit c180057
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export interface CreateCollectionCommandOutput extends CreateCollectionResponse,
* value: "STRING_VALUE", // required
* },
* ],
* standbyReplicas: "STRING_VALUE",
* clientToken: "STRING_VALUE",
* };
* const command = new CreateCollectionCommand(input);
Expand All @@ -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"),
* // },
Expand Down
38 changes: 38 additions & 0 deletions clients/client-opensearchserverless/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -615,6 +635,12 @@ export interface CollectionDetail {
*/
kmsKeyArn?: string;

/**
* @public
* <p>Details about an OpenSearch Serverless collection.</p>
*/
standbyReplicas?: StandbyReplicas;

/**
* @public
* <p>The Epoch time when the collection was created.</p>
Expand Down Expand Up @@ -1142,6 +1168,12 @@ export interface CreateCollectionRequest {
*/
tags?: Tag[];

/**
* @public
* <p>Indicates whether standby replicas should be used for a collection.</p>
*/
standbyReplicas?: StandbyReplicas;

/**
* @public
* <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
Expand Down Expand Up @@ -1196,6 +1228,12 @@ export interface CreateCollectionDetail {
*/
kmsKeyArn?: string;

/**
* @public
* <p>Creates details about an OpenSearch Serverless collection.</p>
*/
standbyReplicas?: StandbyReplicas;

/**
* @public
* <p>The Epoch time when the collection was created.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2728,6 +2728,7 @@ const se_CreateCollectionRequest = (input: CreateCollectionRequest, context: __S
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
description: [],
name: [],
standbyReplicas: [],
tags: _json,
type: [],
});
Expand Down
46 changes: 46 additions & 0 deletions codegen/sdk-codegen/aws-models/opensearchserverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,12 @@
"smithy.api#documentation": "<p>The ARN of the Amazon Web Services KMS key used to encrypt the collection.</p>"
}
},
"standbyReplicas": {
"target": "com.amazonaws.opensearchserverless#StandbyReplicas",
"traits": {
"smithy.api#documentation": "<p>Details about an OpenSearch Serverless collection.</p>"
}
},
"createdDate": {
"target": "smithy.api#Long",
"traits": {
Expand Down Expand Up @@ -906,6 +912,12 @@
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the KMS key with which to encrypt the collection.</p>"
}
},
"standbyReplicas": {
"target": "com.amazonaws.opensearchserverless#StandbyReplicas",
"traits": {
"smithy.api#documentation": "<p>Creates details about an OpenSearch Serverless collection.</p>"
}
},
"createdDate": {
"target": "smithy.api#Long",
"traits": {
Expand Down Expand Up @@ -954,6 +966,12 @@
"smithy.api#documentation": "<p>An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection.</p>"
}
},
"standbyReplicas": {
"target": "com.amazonaws.opensearchserverless#StandbyReplicas",
"traits": {
"smithy.api#documentation": "<p>Indicates whether standby replicas should be used for a collection.</p>"
}
},
"clientToken": {
"target": "com.amazonaws.opensearchserverless#ClientToken",
"traits": {
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit c180057

Please sign in to comment.