Skip to content

Commit

Permalink
feat(client-keyspaces): This release adds support for MRR GA launch, …
Browse files Browse the repository at this point in the history
…and includes multiregion support in create-keyspace, get-keyspace, and list-keyspace.
  • Loading branch information
awstools committed Jun 5, 2023
1 parent 074bc89 commit 581ae9b
Show file tree
Hide file tree
Showing 7 changed files with 353 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ export interface CreateKeyspaceCommandOutput extends CreateKeyspaceResponse, __M
* value: "STRING_VALUE", // required
* },
* ],
* replicationSpecification: { // ReplicationSpecification
* replicationStrategy: "STRING_VALUE", // required
* regionList: [ // RegionList
* "STRING_VALUE",
* ],
* },
* };
* const command = new CreateKeyspaceCommand(input);
* const response = await client.send(command);
Expand Down
4 changes: 4 additions & 0 deletions clients/client-keyspaces/src/commands/GetKeyspaceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export interface GetKeyspaceCommandOutput extends GetKeyspaceResponse, __Metadat
* // { // GetKeyspaceResponse
* // keyspaceName: "STRING_VALUE", // required
* // resourceArn: "STRING_VALUE", // required
* // replicationStrategy: "STRING_VALUE", // required
* // replicationRegions: [ // RegionList
* // "STRING_VALUE",
* // ],
* // };
*
* ```
Expand Down
4 changes: 4 additions & 0 deletions clients/client-keyspaces/src/commands/ListKeyspacesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export interface ListKeyspacesCommandOutput extends ListKeyspacesResponse, __Met
* // { // KeyspaceSummary
* // keyspaceName: "STRING_VALUE", // required
* // resourceArn: "STRING_VALUE", // required
* // replicationStrategy: "STRING_VALUE", // required
* // replicationRegions: [ // RegionList
* // "STRING_VALUE",
* // ],
* // },
* // ],
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
* For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html">Adding tags and labels to Amazon Keyspaces resources</a> in the <i>Amazon Keyspaces Developer
* Guide</i>.</p>
* <p>For IAM policy examples that show how to control access to Amazon Keyspaces resources based on tags,
* see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/security_iam_id-based-policy-examples-tags">Amazon Keyspaces resource access based on tags</a>
* see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-tags">Amazon Keyspaces resource access based on tags</a>
* in the <i>Amazon Keyspaces Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
98 changes: 97 additions & 1 deletion clients/client-keyspaces/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,53 @@ export class ConflictException extends __BaseException {
}
}

/**
* @public
* @enum
*/
export const Rs = {
MULTI_REGION: "MULTI_REGION",
SINGLE_REGION: "SINGLE_REGION",
} as const;

/**
* @public
*/
export type Rs = (typeof Rs)[keyof typeof Rs];

/**
* @public
* <p>
* The replication specification of the keyspace includes:</p>
* <ul>
* <li>
* <p>
* <code>regionList</code> - up to six Amazon Web Services Regions where the keyspace is replicated in.</p>
* </li>
* <li>
* <p>
* <code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or
* <code>MULTI_REGION</code>.</p>
* </li>
* </ul>
*/
export interface ReplicationSpecification {
/**
* <p>
* The <code>replicationStrategy</code> of a keyspace, the required value is <code>SINGLE_REGION</code> or
* <code>MULTI_REGION</code>.
* </p>
*/
replicationStrategy: Rs | string | undefined;

/**
* <p>
* The <code>regionList</code> can contain up to six Amazon Web Services Regions where the keyspace is replicated in.
* </p>
*/
regionList?: string[];
}

/**
* @public
* <p>Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single Amazon Keyspaces resource.</p>
Expand Down Expand Up @@ -283,6 +330,26 @@ export interface CreateKeyspaceRequest {
* Guide</i>.</p>
*/
tags?: Tag[];

/**
* <p>
* The replication specification of the keyspace includes:</p>
* <ul>
* <li>
* <p>
* <code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or
* <code>MULTI_REGION</code>.</p>
* </li>
* <li>
* <p>
* <code>regionList</code> - if the <code>replicationStrategy</code> is <code>MULTI_REGION</code>, the
* <code>regionList</code> requires the current Region and at least one additional Amazon Web Services Region where
* the keyspace is going to be replicated in. The maximum number of supported replication Regions including the current
* Region is six.</p>
* </li>
* </ul>
*/
replicationSpecification?: ReplicationSpecification;
}

/**
Expand Down Expand Up @@ -819,9 +886,23 @@ export interface GetKeyspaceResponse {
keyspaceName: string | undefined;

/**
* <p>The ARN of the keyspace.</p>
* <p>Returns the ARN of the keyspace.</p>
*/
resourceArn: string | undefined;

/**
* <p>
* Returns the replication strategy of the keyspace. The options are <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.
* </p>
*/
replicationStrategy: Rs | string | undefined;

/**
* <p>
* If the <code>replicationStrategy</code> of the keyspace is <code>MULTI_REGION</code>, a list of replication Regions is returned.
* </p>
*/
replicationRegions?: string[];
}

/**
Expand Down Expand Up @@ -988,6 +1069,21 @@ export interface KeyspaceSummary {
* <p>The unique identifier of the keyspace in the format of an Amazon Resource Name (ARN).</p>
*/
resourceArn: string | undefined;

/**
* <p>
* This property specifies if a keyspace is a single Region keyspace or a multi-Region keyspace. The available
* values are <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.
* </p>
*/
replicationStrategy: Rs | string | undefined;

/**
* <p>
* If the <code>replicationStrategy</code> of the keyspace is <code>MULTI_REGION</code>, a list of replication Regions is returned.
* </p>
*/
replicationRegions?: string[];
}

/**
Expand Down
7 changes: 7 additions & 0 deletions clients/client-keyspaces/src/protocols/Aws_json1_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import {
PartitionKey,
PointInTimeRecovery,
PointInTimeRecoverySummary,
ReplicationSpecification,
ResourceNotFoundException,
RestoreTableRequest,
SchemaDefinition,
Expand Down Expand Up @@ -1140,6 +1141,10 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont

// se_PointInTimeRecovery omitted.

// se_RegionList omitted.

// se_ReplicationSpecification omitted.

/**
* serializeAws_json1_0RestoreTableRequest
*/
Expand Down Expand Up @@ -1262,6 +1267,8 @@ const de_PointInTimeRecoverySummary = (output: any, context: __SerdeContext): Po
}) as any;
};

// de_RegionList omitted.

// de_ResourceNotFoundException omitted.

// de_RestoreTableResponse omitted.
Expand Down
Loading

0 comments on commit 581ae9b

Please sign in to comment.