Skip to content

Commit 629feaf

Browse files
author
awstools
committed
feat(client-keyspaces): This release adds support for Multi-Region Replication with provisioned tables, and Keyspaces auto scaling APIs
1 parent a43bd2f commit 629feaf

21 files changed

+1481
-45
lines changed

Diff for: clients/client-keyspaces/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,14 @@ GetTable
263263

264264
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/GetTableCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/GetTableCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/GetTableCommandOutput/)
265265

266+
</details>
267+
<details>
268+
<summary>
269+
GetTableAutoScalingSettings
270+
</summary>
271+
272+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/GetTableAutoScalingSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/GetTableAutoScalingSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/GetTableAutoScalingSettingsCommandOutput/)
273+
266274
</details>
267275
<details>
268276
<summary>

Diff for: clients/client-keyspaces/src/Keyspaces.ts

+23
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ import {
1515
} from "./commands/DeleteKeyspaceCommand";
1616
import { DeleteTableCommand, DeleteTableCommandInput, DeleteTableCommandOutput } from "./commands/DeleteTableCommand";
1717
import { GetKeyspaceCommand, GetKeyspaceCommandInput, GetKeyspaceCommandOutput } from "./commands/GetKeyspaceCommand";
18+
import {
19+
GetTableAutoScalingSettingsCommand,
20+
GetTableAutoScalingSettingsCommandInput,
21+
GetTableAutoScalingSettingsCommandOutput,
22+
} from "./commands/GetTableAutoScalingSettingsCommand";
1823
import { GetTableCommand, GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand";
1924
import {
2025
ListKeyspacesCommand,
@@ -48,6 +53,7 @@ const commands = {
4853
DeleteTableCommand,
4954
GetKeyspaceCommand,
5055
GetTableCommand,
56+
GetTableAutoScalingSettingsCommand,
5157
ListKeyspacesCommand,
5258
ListTablesCommand,
5359
ListTagsForResourceCommand,
@@ -130,6 +136,23 @@ export interface Keyspaces {
130136
cb: (err: any, data?: GetTableCommandOutput) => void
131137
): void;
132138

139+
/**
140+
* @see {@link GetTableAutoScalingSettingsCommand}
141+
*/
142+
getTableAutoScalingSettings(
143+
args: GetTableAutoScalingSettingsCommandInput,
144+
options?: __HttpHandlerOptions
145+
): Promise<GetTableAutoScalingSettingsCommandOutput>;
146+
getTableAutoScalingSettings(
147+
args: GetTableAutoScalingSettingsCommandInput,
148+
cb: (err: any, data?: GetTableAutoScalingSettingsCommandOutput) => void
149+
): void;
150+
getTableAutoScalingSettings(
151+
args: GetTableAutoScalingSettingsCommandInput,
152+
options: __HttpHandlerOptions,
153+
cb: (err: any, data?: GetTableAutoScalingSettingsCommandOutput) => void
154+
): void;
155+
133156
/**
134157
* @see {@link ListKeyspacesCommand}
135158
*/

Diff for: clients/client-keyspaces/src/KeyspacesClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ import { CreateTableCommandInput, CreateTableCommandOutput } from "./commands/Cr
5353
import { DeleteKeyspaceCommandInput, DeleteKeyspaceCommandOutput } from "./commands/DeleteKeyspaceCommand";
5454
import { DeleteTableCommandInput, DeleteTableCommandOutput } from "./commands/DeleteTableCommand";
5555
import { GetKeyspaceCommandInput, GetKeyspaceCommandOutput } from "./commands/GetKeyspaceCommand";
56+
import {
57+
GetTableAutoScalingSettingsCommandInput,
58+
GetTableAutoScalingSettingsCommandOutput,
59+
} from "./commands/GetTableAutoScalingSettingsCommand";
5660
import { GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand";
5761
import { ListKeyspacesCommandInput, ListKeyspacesCommandOutput } from "./commands/ListKeyspacesCommand";
5862
import { ListTablesCommandInput, ListTablesCommandOutput } from "./commands/ListTablesCommand";
@@ -84,6 +88,7 @@ export type ServiceInputTypes =
8488
| DeleteKeyspaceCommandInput
8589
| DeleteTableCommandInput
8690
| GetKeyspaceCommandInput
91+
| GetTableAutoScalingSettingsCommandInput
8792
| GetTableCommandInput
8893
| ListKeyspacesCommandInput
8994
| ListTablesCommandInput
@@ -102,6 +107,7 @@ export type ServiceOutputTypes =
102107
| DeleteKeyspaceCommandOutput
103108
| DeleteTableCommandOutput
104109
| GetKeyspaceCommandOutput
110+
| GetTableAutoScalingSettingsCommandOutput
105111
| GetTableCommandOutput
106112
| ListKeyspacesCommandOutput
107113
| ListTablesCommandOutput

Diff for: clients/client-keyspaces/src/commands/CreateKeyspaceCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ export interface CreateKeyspaceCommandOutput extends CreateKeyspaceResponse, __M
7171
* @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape.
7272
*
7373
* @throws {@link AccessDeniedException} (client fault)
74-
* <p>You do not have sufficient access to perform this action. </p>
74+
* <p>You don't have sufficient access permissions to perform this action. </p>
7575
*
7676
* @throws {@link ConflictException} (client fault)
77-
* <p>Amazon Keyspaces could not complete the requested action. This error may occur if you try to
77+
* <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to
7878
* perform an action and the same or a different action is already
7979
* in progress, or if you try to create a resource that already exists. </p>
8080
*

Diff for: clients/client-keyspaces/src/commands/CreateTableCommand.ts

+49-2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,53 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
9797
* clientSideTimestamps: { // ClientSideTimestamps
9898
* status: "STRING_VALUE", // required
9999
* },
100+
* autoScalingSpecification: { // AutoScalingSpecification
101+
* writeCapacityAutoScaling: { // AutoScalingSettings
102+
* autoScalingDisabled: true || false,
103+
* minimumUnits: Number("long"),
104+
* maximumUnits: Number("long"),
105+
* scalingPolicy: { // AutoScalingPolicy
106+
* targetTrackingScalingPolicyConfiguration: { // TargetTrackingScalingPolicyConfiguration
107+
* disableScaleIn: true || false,
108+
* scaleInCooldown: Number("int"),
109+
* scaleOutCooldown: Number("int"),
110+
* targetValue: Number("double"), // required
111+
* },
112+
* },
113+
* },
114+
* readCapacityAutoScaling: {
115+
* autoScalingDisabled: true || false,
116+
* minimumUnits: Number("long"),
117+
* maximumUnits: Number("long"),
118+
* scalingPolicy: {
119+
* targetTrackingScalingPolicyConfiguration: {
120+
* disableScaleIn: true || false,
121+
* scaleInCooldown: Number("int"),
122+
* scaleOutCooldown: Number("int"),
123+
* targetValue: Number("double"), // required
124+
* },
125+
* },
126+
* },
127+
* },
128+
* replicaSpecifications: [ // ReplicaSpecificationList
129+
* { // ReplicaSpecification
130+
* region: "STRING_VALUE", // required
131+
* readCapacityUnits: Number("long"),
132+
* readCapacityAutoScaling: {
133+
* autoScalingDisabled: true || false,
134+
* minimumUnits: Number("long"),
135+
* maximumUnits: Number("long"),
136+
* scalingPolicy: {
137+
* targetTrackingScalingPolicyConfiguration: {
138+
* disableScaleIn: true || false,
139+
* scaleInCooldown: Number("int"),
140+
* scaleOutCooldown: Number("int"),
141+
* targetValue: Number("double"), // required
142+
* },
143+
* },
144+
* },
145+
* },
146+
* ],
100147
* };
101148
* const command = new CreateTableCommand(input);
102149
* const response = await client.send(command);
@@ -113,10 +160,10 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
113160
* @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape.
114161
*
115162
* @throws {@link AccessDeniedException} (client fault)
116-
* <p>You do not have sufficient access to perform this action. </p>
163+
* <p>You don't have sufficient access permissions to perform this action. </p>
117164
*
118165
* @throws {@link ConflictException} (client fault)
119-
* <p>Amazon Keyspaces could not complete the requested action. This error may occur if you try to
166+
* <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to
120167
* perform an action and the same or a different action is already
121168
* in progress, or if you try to create a resource that already exists. </p>
122169
*

Diff for: clients/client-keyspaces/src/commands/DeleteKeyspaceCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ export interface DeleteKeyspaceCommandOutput extends DeleteKeyspaceResponse, __M
5151
* @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape.
5252
*
5353
* @throws {@link AccessDeniedException} (client fault)
54-
* <p>You do not have sufficient access to perform this action. </p>
54+
* <p>You don't have sufficient access permissions to perform this action. </p>
5555
*
5656
* @throws {@link ConflictException} (client fault)
57-
* <p>Amazon Keyspaces could not complete the requested action. This error may occur if you try to
57+
* <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to
5858
* perform an action and the same or a different action is already
5959
* in progress, or if you try to create a resource that already exists. </p>
6060
*

Diff for: clients/client-keyspaces/src/commands/DeleteTableCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ export interface DeleteTableCommandOutput extends DeleteTableResponse, __Metadat
5656
* @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape.
5757
*
5858
* @throws {@link AccessDeniedException} (client fault)
59-
* <p>You do not have sufficient access to perform this action. </p>
59+
* <p>You don't have sufficient access permissions to perform this action. </p>
6060
*
6161
* @throws {@link ConflictException} (client fault)
62-
* <p>Amazon Keyspaces could not complete the requested action. This error may occur if you try to
62+
* <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to
6363
* perform an action and the same or a different action is already
6464
* in progress, or if you try to create a resource that already exists. </p>
6565
*

Diff for: clients/client-keyspaces/src/commands/GetKeyspaceCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export interface GetKeyspaceCommandOutput extends GetKeyspaceResponse, __Metadat
5858
* @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape.
5959
*
6060
* @throws {@link AccessDeniedException} (client fault)
61-
* <p>You do not have sufficient access to perform this action. </p>
61+
* <p>You don't have sufficient access permissions to perform this action. </p>
6262
*
6363
* @throws {@link InternalServerException} (server fault)
6464
* <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { KeyspacesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KeyspacesClient";
9+
import { GetTableAutoScalingSettingsRequest, GetTableAutoScalingSettingsResponse } from "../models/models_0";
10+
import { de_GetTableAutoScalingSettingsCommand, se_GetTableAutoScalingSettingsCommand } from "../protocols/Aws_json1_0";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link GetTableAutoScalingSettingsCommand}.
20+
*/
21+
export interface GetTableAutoScalingSettingsCommandInput extends GetTableAutoScalingSettingsRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link GetTableAutoScalingSettingsCommand}.
26+
*/
27+
export interface GetTableAutoScalingSettingsCommandOutput
28+
extends GetTableAutoScalingSettingsResponse,
29+
__MetadataBearer {}
30+
31+
/**
32+
* @public
33+
* <p>Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the
34+
* Amazon Web Services Region specific auto scaling settings of the table are included.</p>
35+
* <p>Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing
36+
* your table's read and write capacity automatically in response to application traffic. For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer
37+
* Guide</i>.</p>
38+
* @example
39+
* Use a bare-bones client and the command you need to make an API call.
40+
* ```javascript
41+
* import { KeyspacesClient, GetTableAutoScalingSettingsCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import
42+
* // const { KeyspacesClient, GetTableAutoScalingSettingsCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import
43+
* const client = new KeyspacesClient(config);
44+
* const input = { // GetTableAutoScalingSettingsRequest
45+
* keyspaceName: "STRING_VALUE", // required
46+
* tableName: "STRING_VALUE", // required
47+
* };
48+
* const command = new GetTableAutoScalingSettingsCommand(input);
49+
* const response = await client.send(command);
50+
* // { // GetTableAutoScalingSettingsResponse
51+
* // keyspaceName: "STRING_VALUE", // required
52+
* // tableName: "STRING_VALUE", // required
53+
* // resourceArn: "STRING_VALUE", // required
54+
* // autoScalingSpecification: { // AutoScalingSpecification
55+
* // writeCapacityAutoScaling: { // AutoScalingSettings
56+
* // autoScalingDisabled: true || false,
57+
* // minimumUnits: Number("long"),
58+
* // maximumUnits: Number("long"),
59+
* // scalingPolicy: { // AutoScalingPolicy
60+
* // targetTrackingScalingPolicyConfiguration: { // TargetTrackingScalingPolicyConfiguration
61+
* // disableScaleIn: true || false,
62+
* // scaleInCooldown: Number("int"),
63+
* // scaleOutCooldown: Number("int"),
64+
* // targetValue: Number("double"), // required
65+
* // },
66+
* // },
67+
* // },
68+
* // readCapacityAutoScaling: {
69+
* // autoScalingDisabled: true || false,
70+
* // minimumUnits: Number("long"),
71+
* // maximumUnits: Number("long"),
72+
* // scalingPolicy: {
73+
* // targetTrackingScalingPolicyConfiguration: {
74+
* // disableScaleIn: true || false,
75+
* // scaleInCooldown: Number("int"),
76+
* // scaleOutCooldown: Number("int"),
77+
* // targetValue: Number("double"), // required
78+
* // },
79+
* // },
80+
* // },
81+
* // },
82+
* // replicaSpecifications: [ // ReplicaAutoScalingSpecificationList
83+
* // { // ReplicaAutoScalingSpecification
84+
* // region: "STRING_VALUE",
85+
* // autoScalingSpecification: {
86+
* // writeCapacityAutoScaling: {
87+
* // autoScalingDisabled: true || false,
88+
* // minimumUnits: Number("long"),
89+
* // maximumUnits: Number("long"),
90+
* // scalingPolicy: {
91+
* // targetTrackingScalingPolicyConfiguration: {
92+
* // disableScaleIn: true || false,
93+
* // scaleInCooldown: Number("int"),
94+
* // scaleOutCooldown: Number("int"),
95+
* // targetValue: Number("double"), // required
96+
* // },
97+
* // },
98+
* // },
99+
* // readCapacityAutoScaling: {
100+
* // autoScalingDisabled: true || false,
101+
* // minimumUnits: Number("long"),
102+
* // maximumUnits: Number("long"),
103+
* // scalingPolicy: {
104+
* // targetTrackingScalingPolicyConfiguration: {
105+
* // disableScaleIn: true || false,
106+
* // scaleInCooldown: Number("int"),
107+
* // scaleOutCooldown: Number("int"),
108+
* // targetValue: Number("double"), // required
109+
* // },
110+
* // },
111+
* // },
112+
* // },
113+
* // },
114+
* // ],
115+
* // };
116+
*
117+
* ```
118+
*
119+
* @param GetTableAutoScalingSettingsCommandInput - {@link GetTableAutoScalingSettingsCommandInput}
120+
* @returns {@link GetTableAutoScalingSettingsCommandOutput}
121+
* @see {@link GetTableAutoScalingSettingsCommandInput} for command's `input` shape.
122+
* @see {@link GetTableAutoScalingSettingsCommandOutput} for command's `response` shape.
123+
* @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape.
124+
*
125+
* @throws {@link AccessDeniedException} (client fault)
126+
* <p>You don't have sufficient access permissions to perform this action. </p>
127+
*
128+
* @throws {@link InternalServerException} (server fault)
129+
* <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
130+
*
131+
* @throws {@link ResourceNotFoundException} (client fault)
132+
* <p>The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
133+
*
134+
* @throws {@link ServiceQuotaExceededException} (client fault)
135+
* <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html">Quotas</a> in the <i>Amazon Keyspaces Developer
136+
* Guide</i>.</p>
137+
*
138+
* @throws {@link ValidationException} (client fault)
139+
* <p>The operation failed due to an invalid or malformed request.</p>
140+
*
141+
* @throws {@link KeyspacesServiceException}
142+
* <p>Base exception class for all service exceptions from Keyspaces service.</p>
143+
*
144+
*/
145+
export class GetTableAutoScalingSettingsCommand extends $Command
146+
.classBuilder<
147+
GetTableAutoScalingSettingsCommandInput,
148+
GetTableAutoScalingSettingsCommandOutput,
149+
KeyspacesClientResolvedConfig,
150+
ServiceInputTypes,
151+
ServiceOutputTypes
152+
>()
153+
.ep({
154+
...commonParams,
155+
})
156+
.m(function (this: any, Command: any, cs: any, config: KeyspacesClientResolvedConfig, o: any) {
157+
return [
158+
getSerdePlugin(config, this.serialize, this.deserialize),
159+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
160+
];
161+
})
162+
.s("KeyspacesService", "GetTableAutoScalingSettings", {})
163+
.n("KeyspacesClient", "GetTableAutoScalingSettingsCommand")
164+
.f(void 0, void 0)
165+
.ser(se_GetTableAutoScalingSettingsCommand)
166+
.de(de_GetTableAutoScalingSettingsCommand)
167+
.build() {}

Diff for: clients/client-keyspaces/src/commands/GetTableCommand.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ export interface GetTableCommandOutput extends GetTableResponse, __MetadataBeare
9898
* // clientSideTimestamps: { // ClientSideTimestamps
9999
* // status: "STRING_VALUE", // required
100100
* // },
101+
* // replicaSpecifications: [ // ReplicaSpecificationSummaryList
102+
* // { // ReplicaSpecificationSummary
103+
* // region: "STRING_VALUE",
104+
* // status: "STRING_VALUE",
105+
* // capacitySpecification: {
106+
* // throughputMode: "STRING_VALUE", // required
107+
* // readCapacityUnits: Number("long"),
108+
* // writeCapacityUnits: Number("long"),
109+
* // lastUpdateToPayPerRequestTimestamp: new Date("TIMESTAMP"),
110+
* // },
111+
* // },
112+
* // ],
101113
* // };
102114
*
103115
* ```
@@ -109,7 +121,7 @@ export interface GetTableCommandOutput extends GetTableResponse, __MetadataBeare
109121
* @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape.
110122
*
111123
* @throws {@link AccessDeniedException} (client fault)
112-
* <p>You do not have sufficient access to perform this action. </p>
124+
* <p>You don't have sufficient access permissions to perform this action. </p>
113125
*
114126
* @throws {@link InternalServerException} (server fault)
115127
* <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>

0 commit comments

Comments
 (0)