Skip to content

Commit e96f70e

Browse files
author
awstools
committed
feat(client-keyspaces): Adds support for interacting with user-defined types (UDTs) through the following new operations: Create-Type, Delete-Type, List-Types, Get-Type.
1 parent 189b398 commit e96f70e

27 files changed

+1614
-30
lines changed

clients/client-keyspaces/README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Guide</i>.</p>
2323

2424
## Installing
2525

26-
To install the this package, simply type add or install @aws-sdk/client-keyspaces
26+
To install this package, simply type add or install @aws-sdk/client-keyspaces
2727
using your favorite package manager:
2828

2929
- `npm install @aws-sdk/client-keyspaces`
@@ -231,6 +231,14 @@ CreateTable
231231

232232
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/CreateTableCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/CreateTableCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/CreateTableCommandOutput/)
233233

234+
</details>
235+
<details>
236+
<summary>
237+
CreateType
238+
</summary>
239+
240+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/CreateTypeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/CreateTypeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/CreateTypeCommandOutput/)
241+
234242
</details>
235243
<details>
236244
<summary>
@@ -247,6 +255,14 @@ DeleteTable
247255

248256
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/DeleteTableCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/DeleteTableCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/DeleteTableCommandOutput/)
249257

258+
</details>
259+
<details>
260+
<summary>
261+
DeleteType
262+
</summary>
263+
264+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/DeleteTypeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/DeleteTypeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/DeleteTypeCommandOutput/)
265+
250266
</details>
251267
<details>
252268
<summary>
@@ -271,6 +287,14 @@ GetTableAutoScalingSettings
271287

272288
[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/)
273289

290+
</details>
291+
<details>
292+
<summary>
293+
GetType
294+
</summary>
295+
296+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/GetTypeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/GetTypeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/GetTypeCommandOutput/)
297+
274298
</details>
275299
<details>
276300
<summary>
@@ -295,6 +319,14 @@ ListTagsForResource
295319

296320
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/ListTagsForResourceCommandOutput/)
297321

322+
</details>
323+
<details>
324+
<summary>
325+
ListTypes
326+
</summary>
327+
328+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/keyspaces/command/ListTypesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/ListTypesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-keyspaces/Interface/ListTypesCommandOutput/)
329+
298330
</details>
299331
<details>
300332
<summary>

clients/client-keyspaces/src/Keyspaces.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ import {
88
CreateKeyspaceCommandOutput,
99
} from "./commands/CreateKeyspaceCommand";
1010
import { CreateTableCommand, CreateTableCommandInput, CreateTableCommandOutput } from "./commands/CreateTableCommand";
11+
import { CreateTypeCommand, CreateTypeCommandInput, CreateTypeCommandOutput } from "./commands/CreateTypeCommand";
1112
import {
1213
DeleteKeyspaceCommand,
1314
DeleteKeyspaceCommandInput,
1415
DeleteKeyspaceCommandOutput,
1516
} from "./commands/DeleteKeyspaceCommand";
1617
import { DeleteTableCommand, DeleteTableCommandInput, DeleteTableCommandOutput } from "./commands/DeleteTableCommand";
18+
import { DeleteTypeCommand, DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
1719
import { GetKeyspaceCommand, GetKeyspaceCommandInput, GetKeyspaceCommandOutput } from "./commands/GetKeyspaceCommand";
1820
import {
1921
GetTableAutoScalingSettingsCommand,
2022
GetTableAutoScalingSettingsCommandInput,
2123
GetTableAutoScalingSettingsCommandOutput,
2224
} from "./commands/GetTableAutoScalingSettingsCommand";
2325
import { GetTableCommand, GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand";
26+
import { GetTypeCommand, GetTypeCommandInput, GetTypeCommandOutput } from "./commands/GetTypeCommand";
2427
import {
2528
ListKeyspacesCommand,
2629
ListKeyspacesCommandInput,
@@ -32,6 +35,7 @@ import {
3235
ListTagsForResourceCommandInput,
3336
ListTagsForResourceCommandOutput,
3437
} from "./commands/ListTagsForResourceCommand";
38+
import { ListTypesCommand, ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand";
3539
import {
3640
RestoreTableCommand,
3741
RestoreTableCommandInput,
@@ -49,14 +53,18 @@ import { KeyspacesClient, KeyspacesClientConfig } from "./KeyspacesClient";
4953
const commands = {
5054
CreateKeyspaceCommand,
5155
CreateTableCommand,
56+
CreateTypeCommand,
5257
DeleteKeyspaceCommand,
5358
DeleteTableCommand,
59+
DeleteTypeCommand,
5460
GetKeyspaceCommand,
5561
GetTableCommand,
5662
GetTableAutoScalingSettingsCommand,
63+
GetTypeCommand,
5764
ListKeyspacesCommand,
5865
ListTablesCommand,
5966
ListTagsForResourceCommand,
67+
ListTypesCommand,
6068
RestoreTableCommand,
6169
TagResourceCommand,
6270
UntagResourceCommand,
@@ -89,6 +97,17 @@ export interface Keyspaces {
8997
cb: (err: any, data?: CreateTableCommandOutput) => void
9098
): void;
9199

100+
/**
101+
* @see {@link CreateTypeCommand}
102+
*/
103+
createType(args: CreateTypeCommandInput, options?: __HttpHandlerOptions): Promise<CreateTypeCommandOutput>;
104+
createType(args: CreateTypeCommandInput, cb: (err: any, data?: CreateTypeCommandOutput) => void): void;
105+
createType(
106+
args: CreateTypeCommandInput,
107+
options: __HttpHandlerOptions,
108+
cb: (err: any, data?: CreateTypeCommandOutput) => void
109+
): void;
110+
92111
/**
93112
* @see {@link DeleteKeyspaceCommand}
94113
*/
@@ -114,6 +133,17 @@ export interface Keyspaces {
114133
cb: (err: any, data?: DeleteTableCommandOutput) => void
115134
): void;
116135

136+
/**
137+
* @see {@link DeleteTypeCommand}
138+
*/
139+
deleteType(args: DeleteTypeCommandInput, options?: __HttpHandlerOptions): Promise<DeleteTypeCommandOutput>;
140+
deleteType(args: DeleteTypeCommandInput, cb: (err: any, data?: DeleteTypeCommandOutput) => void): void;
141+
deleteType(
142+
args: DeleteTypeCommandInput,
143+
options: __HttpHandlerOptions,
144+
cb: (err: any, data?: DeleteTypeCommandOutput) => void
145+
): void;
146+
117147
/**
118148
* @see {@link GetKeyspaceCommand}
119149
*/
@@ -153,6 +183,17 @@ export interface Keyspaces {
153183
cb: (err: any, data?: GetTableAutoScalingSettingsCommandOutput) => void
154184
): void;
155185

186+
/**
187+
* @see {@link GetTypeCommand}
188+
*/
189+
getType(args: GetTypeCommandInput, options?: __HttpHandlerOptions): Promise<GetTypeCommandOutput>;
190+
getType(args: GetTypeCommandInput, cb: (err: any, data?: GetTypeCommandOutput) => void): void;
191+
getType(
192+
args: GetTypeCommandInput,
193+
options: __HttpHandlerOptions,
194+
cb: (err: any, data?: GetTypeCommandOutput) => void
195+
): void;
196+
156197
/**
157198
* @see {@link ListKeyspacesCommand}
158199
*/
@@ -193,6 +234,17 @@ export interface Keyspaces {
193234
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
194235
): void;
195236

237+
/**
238+
* @see {@link ListTypesCommand}
239+
*/
240+
listTypes(args: ListTypesCommandInput, options?: __HttpHandlerOptions): Promise<ListTypesCommandOutput>;
241+
listTypes(args: ListTypesCommandInput, cb: (err: any, data?: ListTypesCommandOutput) => void): void;
242+
listTypes(
243+
args: ListTypesCommandInput,
244+
options: __HttpHandlerOptions,
245+
cb: (err: any, data?: ListTypesCommandOutput) => void
246+
): void;
247+
196248
/**
197249
* @see {@link RestoreTableCommand}
198250
*/

clients/client-keyspaces/src/KeyspacesClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,24 @@ import {
5555
} from "./auth/httpAuthSchemeProvider";
5656
import { CreateKeyspaceCommandInput, CreateKeyspaceCommandOutput } from "./commands/CreateKeyspaceCommand";
5757
import { CreateTableCommandInput, CreateTableCommandOutput } from "./commands/CreateTableCommand";
58+
import { CreateTypeCommandInput, CreateTypeCommandOutput } from "./commands/CreateTypeCommand";
5859
import { DeleteKeyspaceCommandInput, DeleteKeyspaceCommandOutput } from "./commands/DeleteKeyspaceCommand";
5960
import { DeleteTableCommandInput, DeleteTableCommandOutput } from "./commands/DeleteTableCommand";
61+
import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
6062
import { GetKeyspaceCommandInput, GetKeyspaceCommandOutput } from "./commands/GetKeyspaceCommand";
6163
import {
6264
GetTableAutoScalingSettingsCommandInput,
6365
GetTableAutoScalingSettingsCommandOutput,
6466
} from "./commands/GetTableAutoScalingSettingsCommand";
6567
import { GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand";
68+
import { GetTypeCommandInput, GetTypeCommandOutput } from "./commands/GetTypeCommand";
6669
import { ListKeyspacesCommandInput, ListKeyspacesCommandOutput } from "./commands/ListKeyspacesCommand";
6770
import { ListTablesCommandInput, ListTablesCommandOutput } from "./commands/ListTablesCommand";
6871
import {
6972
ListTagsForResourceCommandInput,
7073
ListTagsForResourceCommandOutput,
7174
} from "./commands/ListTagsForResourceCommand";
75+
import { ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand";
7276
import { RestoreTableCommandInput, RestoreTableCommandOutput } from "./commands/RestoreTableCommand";
7377
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
7478
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -90,14 +94,18 @@ export { __Client };
9094
export type ServiceInputTypes =
9195
| CreateKeyspaceCommandInput
9296
| CreateTableCommandInput
97+
| CreateTypeCommandInput
9398
| DeleteKeyspaceCommandInput
9499
| DeleteTableCommandInput
100+
| DeleteTypeCommandInput
95101
| GetKeyspaceCommandInput
96102
| GetTableAutoScalingSettingsCommandInput
97103
| GetTableCommandInput
104+
| GetTypeCommandInput
98105
| ListKeyspacesCommandInput
99106
| ListTablesCommandInput
100107
| ListTagsForResourceCommandInput
108+
| ListTypesCommandInput
101109
| RestoreTableCommandInput
102110
| TagResourceCommandInput
103111
| UntagResourceCommandInput
@@ -109,14 +117,18 @@ export type ServiceInputTypes =
109117
export type ServiceOutputTypes =
110118
| CreateKeyspaceCommandOutput
111119
| CreateTableCommandOutput
120+
| CreateTypeCommandOutput
112121
| DeleteKeyspaceCommandOutput
113122
| DeleteTableCommandOutput
123+
| DeleteTypeCommandOutput
114124
| GetKeyspaceCommandOutput
115125
| GetTableAutoScalingSettingsCommandOutput
116126
| GetTableCommandOutput
127+
| GetTypeCommandOutput
117128
| ListKeyspacesCommandOutput
118129
| ListTablesCommandOutput
119130
| ListTagsForResourceCommandOutput
131+
| ListTypesCommandOutput
120132
| RestoreTableCommandOutput
121133
| TagResourceCommandOutput
122134
| UntagResourceCommandOutput

clients/client-keyspaces/src/commands/CreateKeyspaceCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface CreateKeyspaceCommandOutput extends CreateKeyspaceResponse, __M
3333
* <p>
3434
* <code>CreateKeyspace</code> is an asynchronous operation. You can monitor the creation status of the new keyspace
3535
* by using the <code>GetKeyspace</code> operation.</p>
36-
* <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-keyspaces.html#keyspaces-create">Creating keyspaces</a> in the <i>Amazon Keyspaces Developer
36+
* <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/getting-started.keyspaces.html">Create a keyspace</a> in the <i>Amazon Keyspaces Developer
3737
* Guide</i>.</p>
3838
* @example
3939
* Use a bare-bones client and the command you need to make an API call.

clients/client-keyspaces/src/commands/CreateTableCommand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
3434
* <code>CreateTable</code> is an asynchronous operation. When the request is received, the status of the table is set to <code>CREATING</code>.
3535
* You can monitor the creation status of the new table by using the <code>GetTable</code>
3636
* operation, which returns the current <code>status</code> of the table. You can start using a table when the status is <code>ACTIVE</code>.</p>
37-
* <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-tables.html#tables-create">Creating tables</a> in the <i>Amazon Keyspaces Developer
37+
* <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/getting-started.tables.html">Create a table</a> in the <i>Amazon Keyspaces Developer
3838
* Guide</i>.</p>
3939
* @example
4040
* Use a bare-bones client and the command you need to make an API call.
@@ -171,7 +171,8 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
171171
* <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
172172
*
173173
* @throws {@link ResourceNotFoundException} (client fault)
174-
* <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>
174+
* <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly,
175+
* or its status might not be <code>ACTIVE</code>.</p>
175176
*
176177
* @throws {@link ServiceQuotaExceededException} (client fault)
177178
* <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

0 commit comments

Comments
 (0)