Skip to content

Commit

Permalink
feat(client-keyspaces): Adds support for interacting with user-define…
Browse files Browse the repository at this point in the history
…d types (UDTs) through the following new operations: Create-Type, Delete-Type, List-Types, Get-Type.
  • Loading branch information
awstools committed Oct 30, 2024
1 parent 189b398 commit e96f70e
Show file tree
Hide file tree
Showing 27 changed files with 1,614 additions and 30 deletions.
34 changes: 33 additions & 1 deletion clients/client-keyspaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Guide</i>.</p>

## Installing

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

- `npm install @aws-sdk/client-keyspaces`
Expand Down Expand Up @@ -231,6 +231,14 @@ CreateTable

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

</details>
<details>
<summary>
CreateType
</summary>

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

</details>
<details>
<summary>
Expand All @@ -247,6 +255,14 @@ DeleteTable

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

</details>
<details>
<summary>
DeleteType
</summary>

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

</details>
<details>
<summary>
Expand All @@ -271,6 +287,14 @@ GetTableAutoScalingSettings

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

</details>
<details>
<summary>
GetType
</summary>

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

</details>
<details>
<summary>
Expand All @@ -295,6 +319,14 @@ ListTagsForResource

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

</details>
<details>
<summary>
ListTypes
</summary>

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

</details>
<details>
<summary>
Expand Down
52 changes: 52 additions & 0 deletions clients/client-keyspaces/src/Keyspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,22 @@ import {
CreateKeyspaceCommandOutput,
} from "./commands/CreateKeyspaceCommand";
import { CreateTableCommand, CreateTableCommandInput, CreateTableCommandOutput } from "./commands/CreateTableCommand";
import { CreateTypeCommand, CreateTypeCommandInput, CreateTypeCommandOutput } from "./commands/CreateTypeCommand";
import {
DeleteKeyspaceCommand,
DeleteKeyspaceCommandInput,
DeleteKeyspaceCommandOutput,
} from "./commands/DeleteKeyspaceCommand";
import { DeleteTableCommand, DeleteTableCommandInput, DeleteTableCommandOutput } from "./commands/DeleteTableCommand";
import { DeleteTypeCommand, DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
import { GetKeyspaceCommand, GetKeyspaceCommandInput, GetKeyspaceCommandOutput } from "./commands/GetKeyspaceCommand";
import {
GetTableAutoScalingSettingsCommand,
GetTableAutoScalingSettingsCommandInput,
GetTableAutoScalingSettingsCommandOutput,
} from "./commands/GetTableAutoScalingSettingsCommand";
import { GetTableCommand, GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand";
import { GetTypeCommand, GetTypeCommandInput, GetTypeCommandOutput } from "./commands/GetTypeCommand";
import {
ListKeyspacesCommand,
ListKeyspacesCommandInput,
Expand All @@ -32,6 +35,7 @@ import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import { ListTypesCommand, ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand";
import {
RestoreTableCommand,
RestoreTableCommandInput,
Expand All @@ -49,14 +53,18 @@ import { KeyspacesClient, KeyspacesClientConfig } from "./KeyspacesClient";
const commands = {
CreateKeyspaceCommand,
CreateTableCommand,
CreateTypeCommand,
DeleteKeyspaceCommand,
DeleteTableCommand,
DeleteTypeCommand,
GetKeyspaceCommand,
GetTableCommand,
GetTableAutoScalingSettingsCommand,
GetTypeCommand,
ListKeyspacesCommand,
ListTablesCommand,
ListTagsForResourceCommand,
ListTypesCommand,
RestoreTableCommand,
TagResourceCommand,
UntagResourceCommand,
Expand Down Expand Up @@ -89,6 +97,17 @@ export interface Keyspaces {
cb: (err: any, data?: CreateTableCommandOutput) => void
): void;

/**
* @see {@link CreateTypeCommand}
*/
createType(args: CreateTypeCommandInput, options?: __HttpHandlerOptions): Promise<CreateTypeCommandOutput>;
createType(args: CreateTypeCommandInput, cb: (err: any, data?: CreateTypeCommandOutput) => void): void;
createType(
args: CreateTypeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateTypeCommandOutput) => void
): void;

/**
* @see {@link DeleteKeyspaceCommand}
*/
Expand All @@ -114,6 +133,17 @@ export interface Keyspaces {
cb: (err: any, data?: DeleteTableCommandOutput) => void
): void;

/**
* @see {@link DeleteTypeCommand}
*/
deleteType(args: DeleteTypeCommandInput, options?: __HttpHandlerOptions): Promise<DeleteTypeCommandOutput>;
deleteType(args: DeleteTypeCommandInput, cb: (err: any, data?: DeleteTypeCommandOutput) => void): void;
deleteType(
args: DeleteTypeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteTypeCommandOutput) => void
): void;

/**
* @see {@link GetKeyspaceCommand}
*/
Expand Down Expand Up @@ -153,6 +183,17 @@ export interface Keyspaces {
cb: (err: any, data?: GetTableAutoScalingSettingsCommandOutput) => void
): void;

/**
* @see {@link GetTypeCommand}
*/
getType(args: GetTypeCommandInput, options?: __HttpHandlerOptions): Promise<GetTypeCommandOutput>;
getType(args: GetTypeCommandInput, cb: (err: any, data?: GetTypeCommandOutput) => void): void;
getType(
args: GetTypeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetTypeCommandOutput) => void
): void;

/**
* @see {@link ListKeyspacesCommand}
*/
Expand Down Expand Up @@ -193,6 +234,17 @@ export interface Keyspaces {
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
): void;

/**
* @see {@link ListTypesCommand}
*/
listTypes(args: ListTypesCommandInput, options?: __HttpHandlerOptions): Promise<ListTypesCommandOutput>;
listTypes(args: ListTypesCommandInput, cb: (err: any, data?: ListTypesCommandOutput) => void): void;
listTypes(
args: ListTypesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListTypesCommandOutput) => void
): void;

/**
* @see {@link RestoreTableCommand}
*/
Expand Down
12 changes: 12 additions & 0 deletions clients/client-keyspaces/src/KeyspacesClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,24 @@ import {
} from "./auth/httpAuthSchemeProvider";
import { CreateKeyspaceCommandInput, CreateKeyspaceCommandOutput } from "./commands/CreateKeyspaceCommand";
import { CreateTableCommandInput, CreateTableCommandOutput } from "./commands/CreateTableCommand";
import { CreateTypeCommandInput, CreateTypeCommandOutput } from "./commands/CreateTypeCommand";
import { DeleteKeyspaceCommandInput, DeleteKeyspaceCommandOutput } from "./commands/DeleteKeyspaceCommand";
import { DeleteTableCommandInput, DeleteTableCommandOutput } from "./commands/DeleteTableCommand";
import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
import { GetKeyspaceCommandInput, GetKeyspaceCommandOutput } from "./commands/GetKeyspaceCommand";
import {
GetTableAutoScalingSettingsCommandInput,
GetTableAutoScalingSettingsCommandOutput,
} from "./commands/GetTableAutoScalingSettingsCommand";
import { GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand";
import { GetTypeCommandInput, GetTypeCommandOutput } from "./commands/GetTypeCommand";
import { ListKeyspacesCommandInput, ListKeyspacesCommandOutput } from "./commands/ListKeyspacesCommand";
import { ListTablesCommandInput, ListTablesCommandOutput } from "./commands/ListTablesCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import { ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand";
import { RestoreTableCommandInput, RestoreTableCommandOutput } from "./commands/RestoreTableCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
Expand All @@ -90,14 +94,18 @@ export { __Client };
export type ServiceInputTypes =
| CreateKeyspaceCommandInput
| CreateTableCommandInput
| CreateTypeCommandInput
| DeleteKeyspaceCommandInput
| DeleteTableCommandInput
| DeleteTypeCommandInput
| GetKeyspaceCommandInput
| GetTableAutoScalingSettingsCommandInput
| GetTableCommandInput
| GetTypeCommandInput
| ListKeyspacesCommandInput
| ListTablesCommandInput
| ListTagsForResourceCommandInput
| ListTypesCommandInput
| RestoreTableCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
Expand All @@ -109,14 +117,18 @@ export type ServiceInputTypes =
export type ServiceOutputTypes =
| CreateKeyspaceCommandOutput
| CreateTableCommandOutput
| CreateTypeCommandOutput
| DeleteKeyspaceCommandOutput
| DeleteTableCommandOutput
| DeleteTypeCommandOutput
| GetKeyspaceCommandOutput
| GetTableAutoScalingSettingsCommandOutput
| GetTableCommandOutput
| GetTypeCommandOutput
| ListKeyspacesCommandOutput
| ListTablesCommandOutput
| ListTagsForResourceCommandOutput
| ListTypesCommandOutput
| RestoreTableCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface CreateKeyspaceCommandOutput extends CreateKeyspaceResponse, __M
* <p>
* <code>CreateKeyspace</code> is an asynchronous operation. You can monitor the creation status of the new keyspace
* by using the <code>GetKeyspace</code> operation.</p>
* <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
* <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
* Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
5 changes: 3 additions & 2 deletions clients/client-keyspaces/src/commands/CreateTableCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
* <code>CreateTable</code> is an asynchronous operation. When the request is received, the status of the table is set to <code>CREATING</code>.
* You can monitor the creation status of the new table by using the <code>GetTable</code>
* 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>
* <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
* <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
* Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down Expand Up @@ -171,7 +171,8 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
* <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <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>
* <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly,
* or its status might not be <code>ACTIVE</code>.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <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
Expand Down
Loading

0 comments on commit e96f70e

Please sign in to comment.