diff --git a/clients/client-keyspaces/README.md b/clients/client-keyspaces/README.md index 9044166eef4d..97fc1292217e 100644 --- a/clients/client-keyspaces/README.md +++ b/clients/client-keyspaces/README.md @@ -23,7 +23,7 @@ Guide.

## 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` @@ -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/) + +
+ +CreateType + + +[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/) +
@@ -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/) +
+
+ +DeleteType + + +[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/) +
@@ -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/) +
+
+ +GetType + + +[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/) +
@@ -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/) +
+
+ +ListTypes + + +[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/) +
diff --git a/clients/client-keyspaces/src/Keyspaces.ts b/clients/client-keyspaces/src/Keyspaces.ts index b8632ab4c64a..de9795a937d5 100644 --- a/clients/client-keyspaces/src/Keyspaces.ts +++ b/clients/client-keyspaces/src/Keyspaces.ts @@ -8,12 +8,14 @@ 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, @@ -21,6 +23,7 @@ import { GetTableAutoScalingSettingsCommandOutput, } from "./commands/GetTableAutoScalingSettingsCommand"; import { GetTableCommand, GetTableCommandInput, GetTableCommandOutput } from "./commands/GetTableCommand"; +import { GetTypeCommand, GetTypeCommandInput, GetTypeCommandOutput } from "./commands/GetTypeCommand"; import { ListKeyspacesCommand, ListKeyspacesCommandInput, @@ -32,6 +35,7 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; +import { ListTypesCommand, ListTypesCommandInput, ListTypesCommandOutput } from "./commands/ListTypesCommand"; import { RestoreTableCommand, RestoreTableCommandInput, @@ -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, @@ -89,6 +97,17 @@ export interface Keyspaces { cb: (err: any, data?: CreateTableCommandOutput) => void ): void; + /** + * @see {@link CreateTypeCommand} + */ + createType(args: CreateTypeCommandInput, options?: __HttpHandlerOptions): Promise; + 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} */ @@ -114,6 +133,17 @@ export interface Keyspaces { cb: (err: any, data?: DeleteTableCommandOutput) => void ): void; + /** + * @see {@link DeleteTypeCommand} + */ + deleteType(args: DeleteTypeCommandInput, options?: __HttpHandlerOptions): Promise; + 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} */ @@ -153,6 +183,17 @@ export interface Keyspaces { cb: (err: any, data?: GetTableAutoScalingSettingsCommandOutput) => void ): void; + /** + * @see {@link GetTypeCommand} + */ + getType(args: GetTypeCommandInput, options?: __HttpHandlerOptions): Promise; + 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} */ @@ -193,6 +234,17 @@ export interface Keyspaces { cb: (err: any, data?: ListTagsForResourceCommandOutput) => void ): void; + /** + * @see {@link ListTypesCommand} + */ + listTypes(args: ListTypesCommandInput, options?: __HttpHandlerOptions): Promise; + 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} */ diff --git a/clients/client-keyspaces/src/KeyspacesClient.ts b/clients/client-keyspaces/src/KeyspacesClient.ts index be9e37ab8041..050139150d41 100644 --- a/clients/client-keyspaces/src/KeyspacesClient.ts +++ b/clients/client-keyspaces/src/KeyspacesClient.ts @@ -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"; @@ -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 @@ -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 diff --git a/clients/client-keyspaces/src/commands/CreateKeyspaceCommand.ts b/clients/client-keyspaces/src/commands/CreateKeyspaceCommand.ts index 13782f6f8f6f..58659741ff12 100644 --- a/clients/client-keyspaces/src/commands/CreateKeyspaceCommand.ts +++ b/clients/client-keyspaces/src/commands/CreateKeyspaceCommand.ts @@ -33,7 +33,7 @@ export interface CreateKeyspaceCommandOutput extends CreateKeyspaceResponse, __M *

* CreateKeyspace is an asynchronous operation. You can monitor the creation status of the new keyspace * by using the GetKeyspace operation.

- *

For more information, see Creating keyspaces in the Amazon Keyspaces Developer + *

For more information, see Create a keyspace in the Amazon Keyspaces Developer * Guide.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-keyspaces/src/commands/CreateTableCommand.ts b/clients/client-keyspaces/src/commands/CreateTableCommand.ts index 63e561e64789..2a42a94b94d8 100644 --- a/clients/client-keyspaces/src/commands/CreateTableCommand.ts +++ b/clients/client-keyspaces/src/commands/CreateTableCommand.ts @@ -34,7 +34,7 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat * CreateTable is an asynchronous operation. When the request is received, the status of the table is set to CREATING. * You can monitor the creation status of the new table by using the GetTable * operation, which returns the current status of the table. You can start using a table when the status is ACTIVE.

- *

For more information, see Creating tables in the Amazon Keyspaces Developer + *

For more information, see Create a table in the Amazon Keyspaces Developer * Guide.

* @example * 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 *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/CreateTypeCommand.ts b/clients/client-keyspaces/src/commands/CreateTypeCommand.ts new file mode 100644 index 000000000000..61239d505988 --- /dev/null +++ b/clients/client-keyspaces/src/commands/CreateTypeCommand.ts @@ -0,0 +1,126 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { KeyspacesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KeyspacesClient"; +import { CreateTypeRequest, CreateTypeResponse } from "../models/models_0"; +import { de_CreateTypeCommand, se_CreateTypeCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateTypeCommand}. + */ +export interface CreateTypeCommandInput extends CreateTypeRequest {} +/** + * @public + * + * The output of {@link CreateTypeCommand}. + */ +export interface CreateTypeCommandOutput extends CreateTypeResponse, __MetadataBearer {} + +/** + *

+ * The CreateType operation creates a new user-defined type in the specified keyspace. + *

+ *

For more information, see User-defined types (UDTs) in the Amazon Keyspaces Developer + * Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { KeyspacesClient, CreateTypeCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import + * // const { KeyspacesClient, CreateTypeCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import + * const client = new KeyspacesClient(config); + * const input = { // CreateTypeRequest + * keyspaceName: "STRING_VALUE", // required + * typeName: "STRING_VALUE", // required + * fieldDefinitions: [ // FieldList // required + * { // FieldDefinition + * name: "STRING_VALUE", // required + * type: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new CreateTypeCommand(input); + * const response = await client.send(command); + * // { // CreateTypeResponse + * // keyspaceArn: "STRING_VALUE", // required + * // typeName: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param CreateTypeCommandInput - {@link CreateTypeCommandInput} + * @returns {@link CreateTypeCommandOutput} + * @see {@link CreateTypeCommandInput} for command's `input` shape. + * @see {@link CreateTypeCommandOutput} for command's `response` shape. + * @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have sufficient access permissions to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to + * perform an action and the same or a different action is already + * in progress, or if you try to create a resource that already exists.

+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 ACTIVE.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer + * Guide.

+ * + * @throws {@link ValidationException} (client fault) + *

The operation failed due to an invalid or malformed request.

+ * + * @throws {@link KeyspacesServiceException} + *

Base exception class for all service exceptions from Keyspaces service.

+ * + * @public + */ +export class CreateTypeCommand extends $Command + .classBuilder< + CreateTypeCommandInput, + CreateTypeCommandOutput, + KeyspacesClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: KeyspacesClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("KeyspacesService", "CreateType", {}) + .n("KeyspacesClient", "CreateTypeCommand") + .f(void 0, void 0) + .ser(se_CreateTypeCommand) + .de(de_CreateTypeCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateTypeRequest; + output: CreateTypeResponse; + }; + sdk: { + input: CreateTypeCommandInput; + output: CreateTypeCommandOutput; + }; + }; +} diff --git a/clients/client-keyspaces/src/commands/DeleteKeyspaceCommand.ts b/clients/client-keyspaces/src/commands/DeleteKeyspaceCommand.ts index ec8d774f555a..ad495d78f8f6 100644 --- a/clients/client-keyspaces/src/commands/DeleteKeyspaceCommand.ts +++ b/clients/client-keyspaces/src/commands/DeleteKeyspaceCommand.ts @@ -62,7 +62,8 @@ export interface DeleteKeyspaceCommandOutput extends DeleteKeyspaceResponse, __M *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/DeleteTableCommand.ts b/clients/client-keyspaces/src/commands/DeleteTableCommand.ts index cb0ee8899c1f..a84e7ab5f926 100644 --- a/clients/client-keyspaces/src/commands/DeleteTableCommand.ts +++ b/clients/client-keyspaces/src/commands/DeleteTableCommand.ts @@ -67,7 +67,8 @@ export interface DeleteTableCommandOutput extends DeleteTableResponse, __Metadat *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/DeleteTypeCommand.ts b/clients/client-keyspaces/src/commands/DeleteTypeCommand.ts new file mode 100644 index 000000000000..2b766b3ee54a --- /dev/null +++ b/clients/client-keyspaces/src/commands/DeleteTypeCommand.ts @@ -0,0 +1,119 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { KeyspacesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KeyspacesClient"; +import { DeleteTypeRequest, DeleteTypeResponse } from "../models/models_0"; +import { de_DeleteTypeCommand, se_DeleteTypeCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteTypeCommand}. + */ +export interface DeleteTypeCommandInput extends DeleteTypeRequest {} +/** + * @public + * + * The output of {@link DeleteTypeCommand}. + */ +export interface DeleteTypeCommandOutput extends DeleteTypeResponse, __MetadataBearer {} + +/** + *

+ * The DeleteType operation deletes a user-defined type (UDT). You can only delete a type that is not used in a table + * or another UDT. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { KeyspacesClient, DeleteTypeCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import + * // const { KeyspacesClient, DeleteTypeCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import + * const client = new KeyspacesClient(config); + * const input = { // DeleteTypeRequest + * keyspaceName: "STRING_VALUE", // required + * typeName: "STRING_VALUE", // required + * }; + * const command = new DeleteTypeCommand(input); + * const response = await client.send(command); + * // { // DeleteTypeResponse + * // keyspaceArn: "STRING_VALUE", // required + * // typeName: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param DeleteTypeCommandInput - {@link DeleteTypeCommandInput} + * @returns {@link DeleteTypeCommandOutput} + * @see {@link DeleteTypeCommandInput} for command's `input` shape. + * @see {@link DeleteTypeCommandOutput} for command's `response` shape. + * @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have sufficient access permissions to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to + * perform an action and the same or a different action is already + * in progress, or if you try to create a resource that already exists.

+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 ACTIVE.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer + * Guide.

+ * + * @throws {@link ValidationException} (client fault) + *

The operation failed due to an invalid or malformed request.

+ * + * @throws {@link KeyspacesServiceException} + *

Base exception class for all service exceptions from Keyspaces service.

+ * + * @public + */ +export class DeleteTypeCommand extends $Command + .classBuilder< + DeleteTypeCommandInput, + DeleteTypeCommandOutput, + KeyspacesClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: KeyspacesClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("KeyspacesService", "DeleteType", {}) + .n("KeyspacesClient", "DeleteTypeCommand") + .f(void 0, void 0) + .ser(se_DeleteTypeCommand) + .de(de_DeleteTypeCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteTypeRequest; + output: DeleteTypeResponse; + }; + sdk: { + input: DeleteTypeCommandInput; + output: DeleteTypeCommandOutput; + }; + }; +} diff --git a/clients/client-keyspaces/src/commands/GetKeyspaceCommand.ts b/clients/client-keyspaces/src/commands/GetKeyspaceCommand.ts index 56667acd6ae8..9a24677c336c 100644 --- a/clients/client-keyspaces/src/commands/GetKeyspaceCommand.ts +++ b/clients/client-keyspaces/src/commands/GetKeyspaceCommand.ts @@ -64,7 +64,8 @@ export interface GetKeyspaceCommandOutput extends GetKeyspaceResponse, __Metadat *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/GetTableAutoScalingSettingsCommand.ts b/clients/client-keyspaces/src/commands/GetTableAutoScalingSettingsCommand.ts index 12c750470cbf..ea56bc944638 100644 --- a/clients/client-keyspaces/src/commands/GetTableAutoScalingSettingsCommand.ts +++ b/clients/client-keyspaces/src/commands/GetTableAutoScalingSettingsCommand.ts @@ -147,7 +147,8 @@ export interface GetTableAutoScalingSettingsCommandOutput *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/GetTableCommand.ts b/clients/client-keyspaces/src/commands/GetTableCommand.ts index 990020aeab52..22bd35027490 100644 --- a/clients/client-keyspaces/src/commands/GetTableCommand.ts +++ b/clients/client-keyspaces/src/commands/GetTableCommand.ts @@ -30,8 +30,9 @@ export interface GetTableCommandOutput extends GetTableResponse, __MetadataBeare /** *

Returns information about the table, including the table's name and current status, the keyspace name, * configuration settings, and metadata.

- *

To read table metadata using GetTable, Select action - * permissions for the table and system tables are required to complete the operation.

+ *

To read table metadata using GetTable, the + * IAM principal needs Select action + * permissions for the table and the system keyspace.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -127,7 +128,8 @@ export interface GetTableCommandOutput extends GetTableResponse, __MetadataBeare *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/GetTypeCommand.ts b/clients/client-keyspaces/src/commands/GetTypeCommand.ts new file mode 100644 index 000000000000..6367ee9667d4 --- /dev/null +++ b/clients/client-keyspaces/src/commands/GetTypeCommand.ts @@ -0,0 +1,133 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { KeyspacesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KeyspacesClient"; +import { GetTypeRequest, GetTypeResponse } from "../models/models_0"; +import { de_GetTypeCommand, se_GetTypeCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetTypeCommand}. + */ +export interface GetTypeCommandInput extends GetTypeRequest {} +/** + * @public + * + * The output of {@link GetTypeCommand}. + */ +export interface GetTypeCommandOutput extends GetTypeResponse, __MetadataBearer {} + +/** + *

+ * The GetType operation returns information about the type, for example the field definitions, the timestamp when the type + * was last modified, the level of nesting, the status, and details about if the type is used in other types and tables. + *

+ *

To read keyspace metadata using GetType, the + * IAM principal needs Select action + * permissions for the system keyspace.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { KeyspacesClient, GetTypeCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import + * // const { KeyspacesClient, GetTypeCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import + * const client = new KeyspacesClient(config); + * const input = { // GetTypeRequest + * keyspaceName: "STRING_VALUE", // required + * typeName: "STRING_VALUE", // required + * }; + * const command = new GetTypeCommand(input); + * const response = await client.send(command); + * // { // GetTypeResponse + * // keyspaceName: "STRING_VALUE", // required + * // typeName: "STRING_VALUE", // required + * // fieldDefinitions: [ // FieldList + * // { // FieldDefinition + * // name: "STRING_VALUE", // required + * // type: "STRING_VALUE", // required + * // }, + * // ], + * // lastModifiedTimestamp: new Date("TIMESTAMP"), + * // status: "STRING_VALUE", + * // directReferringTables: [ // TableNameList + * // "STRING_VALUE", + * // ], + * // directParentTypes: [ // TypeNameList + * // "STRING_VALUE", + * // ], + * // maxNestingDepth: Number("int"), + * // keyspaceArn: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param GetTypeCommandInput - {@link GetTypeCommandInput} + * @returns {@link GetTypeCommandOutput} + * @see {@link GetTypeCommandInput} for command's `input` shape. + * @see {@link GetTypeCommandOutput} for command's `response` shape. + * @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have sufficient access permissions to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 ACTIVE.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer + * Guide.

+ * + * @throws {@link ValidationException} (client fault) + *

The operation failed due to an invalid or malformed request.

+ * + * @throws {@link KeyspacesServiceException} + *

Base exception class for all service exceptions from Keyspaces service.

+ * + * @public + */ +export class GetTypeCommand extends $Command + .classBuilder< + GetTypeCommandInput, + GetTypeCommandOutput, + KeyspacesClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: KeyspacesClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("KeyspacesService", "GetType", {}) + .n("KeyspacesClient", "GetTypeCommand") + .f(void 0, void 0) + .ser(se_GetTypeCommand) + .de(de_GetTypeCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetTypeRequest; + output: GetTypeResponse; + }; + sdk: { + input: GetTypeCommandInput; + output: GetTypeCommandOutput; + }; + }; +} diff --git a/clients/client-keyspaces/src/commands/ListKeyspacesCommand.ts b/clients/client-keyspaces/src/commands/ListKeyspacesCommand.ts index 0bb905452ceb..8be92eca13de 100644 --- a/clients/client-keyspaces/src/commands/ListKeyspacesCommand.ts +++ b/clients/client-keyspaces/src/commands/ListKeyspacesCommand.ts @@ -28,7 +28,7 @@ export interface ListKeyspacesCommandInput extends ListKeyspacesRequest {} export interface ListKeyspacesCommandOutput extends ListKeyspacesResponse, __MetadataBearer {} /** - *

Returns a list of keyspaces.

+ *

The ListKeyspaces operation returns a list of keyspaces.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -70,7 +70,8 @@ export interface ListKeyspacesCommandOutput extends ListKeyspacesResponse, __Met *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/ListTablesCommand.ts b/clients/client-keyspaces/src/commands/ListTablesCommand.ts index 71647ad90fc8..4c8fd065f338 100644 --- a/clients/client-keyspaces/src/commands/ListTablesCommand.ts +++ b/clients/client-keyspaces/src/commands/ListTablesCommand.ts @@ -28,7 +28,10 @@ export interface ListTablesCommandInput extends ListTablesRequest {} export interface ListTablesCommandOutput extends ListTablesResponse, __MetadataBearer {} /** - *

Returns a list of tables for a specified keyspace.

+ *

The ListTables operation returns a list of tables for a specified keyspace.

+ *

To read keyspace metadata using ListTables, the + * IAM principal needs Select action + * permissions for the system keyspace.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -68,7 +71,8 @@ export interface ListTablesCommandOutput extends ListTablesResponse, __MetadataB *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/ListTagsForResourceCommand.ts b/clients/client-keyspaces/src/commands/ListTagsForResourceCommand.ts index 10ebebfc6980..2a0c4528c018 100644 --- a/clients/client-keyspaces/src/commands/ListTagsForResourceCommand.ts +++ b/clients/client-keyspaces/src/commands/ListTagsForResourceCommand.ts @@ -29,6 +29,9 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceRes /** *

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

+ *

To read keyspace metadata using ListTagsForResource, the + * IAM principal needs Select action + * permissions for the specified resource and the system keyspace.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -67,7 +70,8 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceRes *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/ListTypesCommand.ts b/clients/client-keyspaces/src/commands/ListTypesCommand.ts new file mode 100644 index 000000000000..7605c0b5b877 --- /dev/null +++ b/clients/client-keyspaces/src/commands/ListTypesCommand.ts @@ -0,0 +1,119 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { KeyspacesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KeyspacesClient"; +import { ListTypesRequest, ListTypesResponse } from "../models/models_0"; +import { de_ListTypesCommand, se_ListTypesCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListTypesCommand}. + */ +export interface ListTypesCommandInput extends ListTypesRequest {} +/** + * @public + * + * The output of {@link ListTypesCommand}. + */ +export interface ListTypesCommandOutput extends ListTypesResponse, __MetadataBearer {} + +/** + *

+ * The ListTypes operation returns a list of types for a specified keyspace. + *

+ *

To read keyspace metadata using ListTypes, the + * IAM principal needs Select action + * permissions for the system keyspace.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { KeyspacesClient, ListTypesCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import + * // const { KeyspacesClient, ListTypesCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import + * const client = new KeyspacesClient(config); + * const input = { // ListTypesRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * keyspaceName: "STRING_VALUE", // required + * }; + * const command = new ListTypesCommand(input); + * const response = await client.send(command); + * // { // ListTypesResponse + * // nextToken: "STRING_VALUE", + * // types: [ // TypeNameList // required + * // "STRING_VALUE", + * // ], + * // }; + * + * ``` + * + * @param ListTypesCommandInput - {@link ListTypesCommandInput} + * @returns {@link ListTypesCommandOutput} + * @see {@link ListTypesCommandInput} for command's `input` shape. + * @see {@link ListTypesCommandOutput} for command's `response` shape. + * @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have sufficient access permissions to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

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 ACTIVE.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer + * Guide.

+ * + * @throws {@link ValidationException} (client fault) + *

The operation failed due to an invalid or malformed request.

+ * + * @throws {@link KeyspacesServiceException} + *

Base exception class for all service exceptions from Keyspaces service.

+ * + * @public + */ +export class ListTypesCommand extends $Command + .classBuilder< + ListTypesCommandInput, + ListTypesCommandOutput, + KeyspacesClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: KeyspacesClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("KeyspacesService", "ListTypes", {}) + .n("KeyspacesClient", "ListTypesCommand") + .f(void 0, void 0) + .ser(se_ListTypesCommand) + .de(de_ListTypesCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListTypesRequest; + output: ListTypesResponse; + }; + sdk: { + input: ListTypesCommandInput; + output: ListTypesCommandOutput; + }; + }; +} diff --git a/clients/client-keyspaces/src/commands/RestoreTableCommand.ts b/clients/client-keyspaces/src/commands/RestoreTableCommand.ts index e8421863c23a..f93812a2060a 100644 --- a/clients/client-keyspaces/src/commands/RestoreTableCommand.ts +++ b/clients/client-keyspaces/src/commands/RestoreTableCommand.ts @@ -178,7 +178,8 @@ export interface RestoreTableCommandOutput extends RestoreTableResponse, __Metad *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/TagResourceCommand.ts b/clients/client-keyspaces/src/commands/TagResourceCommand.ts index dbfe8342e99f..f67885f8a9b1 100644 --- a/clients/client-keyspaces/src/commands/TagResourceCommand.ts +++ b/clients/client-keyspaces/src/commands/TagResourceCommand.ts @@ -65,11 +65,17 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat * @throws {@link AccessDeniedException} (client fault) *

You don't have sufficient access permissions to perform this action.

* + * @throws {@link ConflictException} (client fault) + *

Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to + * perform an action and the same or a different action is already + * in progress, or if you try to create a resource that already exists.

+ * * @throws {@link InternalServerException} (server fault) *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/UntagResourceCommand.ts b/clients/client-keyspaces/src/commands/UntagResourceCommand.ts index fece435da7b9..52c25b4b5112 100644 --- a/clients/client-keyspaces/src/commands/UntagResourceCommand.ts +++ b/clients/client-keyspaces/src/commands/UntagResourceCommand.ts @@ -68,7 +68,8 @@ export interface UntagResourceCommandOutput extends UntagResourceResponse, __Met *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/UpdateTableCommand.ts b/clients/client-keyspaces/src/commands/UpdateTableCommand.ts index 252e1c606764..bcf3f558a1e2 100644 --- a/clients/client-keyspaces/src/commands/UpdateTableCommand.ts +++ b/clients/client-keyspaces/src/commands/UpdateTableCommand.ts @@ -139,7 +139,8 @@ export interface UpdateTableCommandOutput extends UpdateTableResponse, __Metadat *

Amazon Keyspaces was unable to fully process this request because of an internal server error.

* * @throws {@link ResourceNotFoundException} (client fault) - *

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 ACTIVE.

+ *

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 ACTIVE.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer diff --git a/clients/client-keyspaces/src/commands/index.ts b/clients/client-keyspaces/src/commands/index.ts index 5921a9cacdb4..7b9f35d5a4ec 100644 --- a/clients/client-keyspaces/src/commands/index.ts +++ b/clients/client-keyspaces/src/commands/index.ts @@ -1,14 +1,18 @@ // smithy-typescript generated code export * from "./CreateKeyspaceCommand"; export * from "./CreateTableCommand"; +export * from "./CreateTypeCommand"; export * from "./DeleteKeyspaceCommand"; export * from "./DeleteTableCommand"; +export * from "./DeleteTypeCommand"; export * from "./GetKeyspaceCommand"; export * from "./GetTableAutoScalingSettingsCommand"; export * from "./GetTableCommand"; +export * from "./GetTypeCommand"; export * from "./ListKeyspacesCommand"; export * from "./ListTablesCommand"; export * from "./ListTagsForResourceCommand"; +export * from "./ListTypesCommand"; export * from "./RestoreTableCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; diff --git a/clients/client-keyspaces/src/models/models_0.ts b/clients/client-keyspaces/src/models/models_0.ts index f6b8d8805f18..3719a5e559a7 100644 --- a/clients/client-keyspaces/src/models/models_0.ts +++ b/clients/client-keyspaces/src/models/models_0.ts @@ -1088,14 +1088,15 @@ export interface CreateTableResponse { } /** - *

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 ACTIVE.

+ *

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 ACTIVE.

* @public */ export class ResourceNotFoundException extends __BaseException { readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; readonly $fault: "client" = "client"; /** - *

The unique identifier in the format of Amazon Resource Name (ARN), for the resource not found.

+ *

The unique identifier in the format of Amazon Resource Name (ARN) for the resource could't be found.

* @public */ resourceArn?: string; @@ -1114,6 +1115,92 @@ export class ResourceNotFoundException extends __BaseException { } } +/** + *

+ * A field definition consists out of a name and a type. + *

+ * @public + */ +export interface FieldDefinition { + /** + *

+ * The identifier. + *

+ * @public + */ + name: string | undefined; + + /** + *

+ * Any supported Cassandra data type, including collections and other user-defined types that are + * contained in the same keyspace. + *

+ *

For more information, see Cassandra data type support in the Amazon Keyspaces Developer + * Guide.

+ * @public + */ + type: string | undefined; +} + +/** + * @public + */ +export interface CreateTypeRequest { + /** + *

+ * The name of the keyspace. + *

+ * @public + */ + keyspaceName: string | undefined; + + /** + *

+ * The name of the user-defined type. + *

+ *

UDT names must contain 48 characters or less, must begin with an alphabetic character, and + * can only contain alpha-numeric characters and underscores. Amazon Keyspaces converts upper case characters automatically + * into lower case characters.

+ *

Alternatively, you can declare a UDT name in double quotes. When declaring a UDT name inside double quotes, + * Amazon Keyspaces preserves upper casing and allows special characters.

+ *

You can also use double quotes as part of the + * name when you create the UDT, but you must escape each double quote character with an additional + * double quote character.

+ * @public + */ + typeName: string | undefined; + + /** + *

+ * The field definitions, consisting of names and types, that define this type. + *

+ * @public + */ + fieldDefinitions: FieldDefinition[] | undefined; +} + +/** + * @public + */ +export interface CreateTypeResponse { + /** + *

+ * The unique identifier of the keyspace that contains the new type in the format of an Amazon Resource Name (ARN). + *

+ * @public + */ + keyspaceArn: string | undefined; + + /** + *

+ * The formatted name of the user-defined type that was created. Note that Amazon Keyspaces requires the formatted name of the type for + * other operations, for example GetType. + *

+ * @public + */ + typeName: string | undefined; +} + /** * @public */ @@ -1152,6 +1239,48 @@ export interface DeleteTableRequest { */ export interface DeleteTableResponse {} +/** + * @public + */ +export interface DeleteTypeRequest { + /** + *

+ * The name of the keyspace of the to be deleted type. + *

+ * @public + */ + keyspaceName: string | undefined; + + /** + *

+ * The name of the type to be deleted. + *

+ * @public + */ + typeName: string | undefined; +} + +/** + * @public + */ +export interface DeleteTypeResponse { + /** + *

+ * The unique identifier of the keyspace from which the type was deleted in the format of an Amazon Resource Name (ARN). + *

+ * @public + */ + keyspaceArn: string | undefined; + + /** + *

+ * The name of the type that was deleted. + *

+ * @public + */ + typeName: string | undefined; +} + /** * @public */ @@ -1462,6 +1591,120 @@ export interface GetTableAutoScalingSettingsResponse { replicaSpecifications?: ReplicaAutoScalingSpecification[]; } +/** + * @public + */ +export interface GetTypeRequest { + /** + *

+ * The name of the keyspace that contains this type. + *

+ * @public + */ + keyspaceName: string | undefined; + + /** + *

The formatted name of the type. For example, if the name of the type was created + * without double quotes, Amazon Keyspaces saved the name in lower-case characters. If the name was + * created in double quotes, you must use double quotes to specify the type name.

+ * @public + */ + typeName: string | undefined; +} + +/** + * @public + * @enum + */ +export const TypeStatus = { + ACTIVE: "ACTIVE", + CREATING: "CREATING", + DELETING: "DELETING", + RESTORING: "RESTORING", +} as const; + +/** + * @public + */ +export type TypeStatus = (typeof TypeStatus)[keyof typeof TypeStatus]; + +/** + * @public + */ +export interface GetTypeResponse { + /** + *

+ * The name of the keyspace that contains this type. + *

+ * @public + */ + keyspaceName: string | undefined; + + /** + *

+ * The name of the type. + *

+ * @public + */ + typeName: string | undefined; + + /** + *

+ * The names and types that define this type. + *

+ * @public + */ + fieldDefinitions?: FieldDefinition[]; + + /** + *

+ * The timestamp that shows when this type was last modified. + *

+ * @public + */ + lastModifiedTimestamp?: Date; + + /** + *

+ * The status of this type. + *

+ * @public + */ + status?: TypeStatus; + + /** + *

+ * The tables that use this type. + *

+ * @public + */ + directReferringTables?: string[]; + + /** + *

+ * The types that use this type. + *

+ * @public + */ + directParentTypes?: string[]; + + /** + *

+ * The level of nesting implemented for this type. + *

+ * @public + */ + maxNestingDepth?: number; + + /** + *

+ * The unique identifier of the keyspace that contains this type in the format of an Amazon Resource Name (ARN). + *

+ * @public + */ + keyspaceArn: string | undefined; +} + /** * @public */ @@ -1641,6 +1884,58 @@ export interface ListTagsForResourceResponse { tags?: Tag[]; } +/** + * @public + */ +export interface ListTypesRequest { + /** + *

+ * The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation. + *

+ * @public + */ + nextToken?: string; + + /** + *

+ * The total number of types to return in the output. If the total number of types available is more than the value specified, + * a NextToken is provided in the output. To resume pagination, provide the NextToken value as an + * argument of a subsequent API invocation. + *

+ * @public + */ + maxResults?: number; + + /** + *

+ * The name of the keyspace that contains the listed types. + *

+ * @public + */ + keyspaceName: string | undefined; +} + +/** + * @public + */ +export interface ListTypesResponse { + /** + *

+ * The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation. + *

+ * @public + */ + nextToken?: string; + + /** + *

+ * The list of types contained in the specified keyspace. + *

+ * @public + */ + types: string[] | undefined; +} + /** * @public */ diff --git a/clients/client-keyspaces/src/pagination/ListTypesPaginator.ts b/clients/client-keyspaces/src/pagination/ListTypesPaginator.ts new file mode 100644 index 000000000000..0e25b3f3a4e1 --- /dev/null +++ b/clients/client-keyspaces/src/pagination/ListTypesPaginator.ts @@ -0,0 +1,20 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { ListTypesCommand, ListTypesCommandInput, ListTypesCommandOutput } from "../commands/ListTypesCommand"; +import { KeyspacesClient } from "../KeyspacesClient"; +import { KeyspacesPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListTypes: ( + config: KeyspacesPaginationConfiguration, + input: ListTypesCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + KeyspacesPaginationConfiguration, + ListTypesCommandInput, + ListTypesCommandOutput +>(KeyspacesClient, ListTypesCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-keyspaces/src/pagination/index.ts b/clients/client-keyspaces/src/pagination/index.ts index b5be6ffb13c0..7aa3e66d9856 100644 --- a/clients/client-keyspaces/src/pagination/index.ts +++ b/clients/client-keyspaces/src/pagination/index.ts @@ -3,3 +3,4 @@ export * from "./Interfaces"; export * from "./ListKeyspacesPaginator"; export * from "./ListTablesPaginator"; export * from "./ListTagsForResourcePaginator"; +export * from "./ListTypesPaginator"; diff --git a/clients/client-keyspaces/src/protocols/Aws_json1_0.ts b/clients/client-keyspaces/src/protocols/Aws_json1_0.ts index c6f596e635ea..e5343d9ee6ee 100644 --- a/clients/client-keyspaces/src/protocols/Aws_json1_0.ts +++ b/clients/client-keyspaces/src/protocols/Aws_json1_0.ts @@ -26,20 +26,24 @@ import { 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"; @@ -59,18 +63,24 @@ import { ConflictException, CreateKeyspaceRequest, CreateTableRequest, + CreateTypeRequest, DeleteKeyspaceRequest, DeleteTableRequest, + DeleteTypeRequest, EncryptionSpecification, + FieldDefinition, GetKeyspaceRequest, GetTableAutoScalingSettingsRequest, GetTableAutoScalingSettingsResponse, GetTableRequest, GetTableResponse, + GetTypeRequest, + GetTypeResponse, InternalServerException, ListKeyspacesRequest, ListTablesRequest, ListTagsForResourceRequest, + ListTypesRequest, PartitionKey, PointInTimeRecovery, PointInTimeRecoverySummary, @@ -118,6 +128,19 @@ export const se_CreateTableCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0CreateTypeCommand + */ +export const se_CreateTypeCommand = async ( + input: CreateTypeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateType"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0DeleteKeyspaceCommand */ @@ -144,6 +167,19 @@ export const se_DeleteTableCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0DeleteTypeCommand + */ +export const se_DeleteTypeCommand = async ( + input: DeleteTypeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteType"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0GetKeyspaceCommand */ @@ -183,6 +219,19 @@ export const se_GetTableAutoScalingSettingsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0GetTypeCommand + */ +export const se_GetTypeCommand = async ( + input: GetTypeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetType"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0ListKeyspacesCommand */ @@ -222,6 +271,19 @@ export const se_ListTagsForResourceCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0ListTypesCommand + */ +export const se_ListTypesCommand = async ( + input: ListTypesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListTypes"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0RestoreTableCommand */ @@ -314,6 +376,26 @@ export const de_CreateTableCommand = async ( return response; }; +/** + * deserializeAws_json1_0CreateTypeCommand + */ +export const de_CreateTypeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: CreateTypeCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_0DeleteKeyspaceCommand */ @@ -354,6 +436,26 @@ export const de_DeleteTableCommand = async ( return response; }; +/** + * deserializeAws_json1_0DeleteTypeCommand + */ +export const de_DeleteTypeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteTypeCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_0GetKeyspaceCommand */ @@ -414,6 +516,26 @@ export const de_GetTableAutoScalingSettingsCommand = async ( return response; }; +/** + * deserializeAws_json1_0GetTypeCommand + */ +export const de_GetTypeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetTypeResponse(data, context); + const response: GetTypeCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_0ListKeyspacesCommand */ @@ -474,6 +596,26 @@ export const de_ListTagsForResourceCommand = async ( return response; }; +/** + * deserializeAws_json1_0ListTypesCommand + */ +export const de_ListTypesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListTypesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_0RestoreTableCommand */ @@ -750,24 +892,36 @@ const se_CreateTableRequest = (input: CreateTableRequest, context: __SerdeContex }); }; +// se_CreateTypeRequest omitted. + // se_DeleteKeyspaceRequest omitted. // se_DeleteTableRequest omitted. +// se_DeleteTypeRequest omitted. + // se_EncryptionSpecification omitted. +// se_FieldDefinition omitted. + +// se_FieldList omitted. + // se_GetKeyspaceRequest omitted. // se_GetTableAutoScalingSettingsRequest omitted. // se_GetTableRequest omitted. +// se_GetTypeRequest omitted. + // se_ListKeyspacesRequest omitted. // se_ListTablesRequest omitted. // se_ListTagsForResourceRequest omitted. +// se_ListTypesRequest omitted. + // se_PartitionKey omitted. // se_PartitionKeyList omitted. @@ -932,12 +1086,20 @@ const de_CapacitySpecificationSummary = (output: any, context: __SerdeContext): // de_CreateTableResponse omitted. +// de_CreateTypeResponse omitted. + // de_DeleteKeyspaceResponse omitted. // de_DeleteTableResponse omitted. +// de_DeleteTypeResponse omitted. + // de_EncryptionSpecification omitted. +// de_FieldDefinition omitted. + +// de_FieldList omitted. + // de_GetKeyspaceResponse omitted. /** @@ -978,6 +1140,23 @@ const de_GetTableResponse = (output: any, context: __SerdeContext): GetTableResp }) as any; }; +/** + * deserializeAws_json1_0GetTypeResponse + */ +const de_GetTypeResponse = (output: any, context: __SerdeContext): GetTypeResponse => { + return take(output, { + directParentTypes: _json, + directReferringTables: _json, + fieldDefinitions: _json, + keyspaceArn: __expectString, + keyspaceName: __expectString, + lastModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + maxNestingDepth: __expectInt32, + status: __expectString, + typeName: __expectString, + }) as any; +}; + // de_InternalServerException omitted. // de_KeyspaceSummary omitted. @@ -990,6 +1169,8 @@ const de_GetTableResponse = (output: any, context: __SerdeContext): GetTableResp // de_ListTagsForResourceResponse omitted. +// de_ListTypesResponse omitted. + // de_PartitionKey omitted. // de_PartitionKeyList omitted. @@ -1066,6 +1247,8 @@ const de_ReplicaSpecificationSummaryList = (output: any, context: __SerdeContext // de_StaticColumnList omitted. +// de_TableNameList omitted. + // de_TableSummary omitted. // de_TableSummaryList omitted. @@ -1093,6 +1276,8 @@ const de_TargetTrackingScalingPolicyConfiguration = ( // de_TimeToLive omitted. +// de_TypeNameList omitted. + // de_UntagResourceResponse omitted. // de_UpdateTableResponse omitted. diff --git a/codegen/sdk-codegen/aws-models/keyspaces.json b/codegen/sdk-codegen/aws-models/keyspaces.json index a4966a998d94..7c064c245652 100644 --- a/codegen/sdk-codegen/aws-models/keyspaces.json +++ b/codegen/sdk-codegen/aws-models/keyspaces.json @@ -320,7 +320,7 @@ } ], "traits": { - "smithy.api#documentation": "

The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names\n must be unique within each Region.

\n

\n CreateKeyspace is an asynchronous operation. You can monitor the creation status of the new keyspace \n by using the GetKeyspace operation.

\n

For more information, see Creating keyspaces in the Amazon Keyspaces Developer\n Guide.

" + "smithy.api#documentation": "

The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names\n must be unique within each Region.

\n

\n CreateKeyspace is an asynchronous operation. You can monitor the creation status of the new keyspace \n by using the GetKeyspace operation.

\n

For more information, see Create a keyspace in the Amazon Keyspaces Developer\n Guide.

" } }, "com.amazonaws.keyspaces#CreateKeyspaceRequest": { @@ -388,7 +388,7 @@ } ], "traits": { - "smithy.api#documentation": "

The CreateTable operation adds a new table to the specified keyspace. Within a keyspace, table names\n must be unique.

\n

\n CreateTable is an asynchronous operation. When the request is received, the status of the table is set to CREATING.\n You can monitor the creation status of the new table by using the GetTable \n operation, which returns the current status of the table. You can start using a table when the status is ACTIVE.

\n

For more information, see Creating tables in the Amazon Keyspaces Developer\n Guide.

" + "smithy.api#documentation": "

The CreateTable operation adds a new table to the specified keyspace. Within a keyspace, table names\n must be unique.

\n

\n CreateTable is an asynchronous operation. When the request is received, the status of the table is set to CREATING.\n You can monitor the creation status of the new table by using the GetTable \n operation, which returns the current status of the table. You can start using a table when the status is ACTIVE.

\n

For more information, see Create a table in the Amazon Keyspaces Developer\n Guide.

" } }, "com.amazonaws.keyspaces#CreateTableRequest": { @@ -489,6 +489,89 @@ } } }, + "com.amazonaws.keyspaces#CreateType": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#CreateTypeRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#CreateTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#ConflictException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The CreateType operation creates a new user-defined type in the specified keyspace.\n

\n

For more information, see User-defined types (UDTs) in the Amazon Keyspaces Developer\n Guide.

" + } + }, + "com.amazonaws.keyspaces#CreateTypeRequest": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the user-defined type.\n

\n

UDT names must contain 48 characters or less, must begin with an alphabetic character, and \n can only contain alpha-numeric characters and underscores. Amazon Keyspaces converts upper case characters automatically\n into lower case characters.

\n

Alternatively, you can declare a UDT name in double quotes. When declaring a UDT name inside double quotes,\n Amazon Keyspaces preserves upper casing and allows special characters.

\n

You can also use double quotes as part of the \n name when you create the UDT, but you must escape each double quote character with an additional \n double quote character.

", + "smithy.api#required": {} + } + }, + "fieldDefinitions": { + "target": "com.amazonaws.keyspaces#FieldList", + "traits": { + "smithy.api#documentation": "

\n The field definitions, consisting of names and types, that define this type. \n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#CreateTypeResponse": { + "type": "structure", + "members": { + "keyspaceArn": { + "target": "com.amazonaws.keyspaces#ARN", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the keyspace that contains the new type in the format of an Amazon Resource Name (ARN). \n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The formatted name of the user-defined type that was created. Note that Amazon Keyspaces requires the formatted name of the type for\n other operations, for example GetType.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.keyspaces#DefaultTimeToLive": { "type": "integer", "traits": { @@ -601,6 +684,88 @@ "type": "structure", "members": {} }, + "com.amazonaws.keyspaces#DeleteType": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#DeleteTypeRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#DeleteTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#ConflictException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The DeleteType operation deletes a user-defined type (UDT). You can only delete a type that is not used in a table\n or another UDT.\n

" + } + }, + "com.amazonaws.keyspaces#DeleteTypeRequest": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace of the to be deleted type.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the type to be deleted.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#DeleteTypeResponse": { + "type": "structure", + "members": { + "keyspaceArn": { + "target": "com.amazonaws.keyspaces#ARN", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the keyspace from which the type was deleted in the format of an Amazon Resource Name (ARN).\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the type that was deleted.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.keyspaces#Depth": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, "com.amazonaws.keyspaces#DoubleObject": { "type": "double", "traits": { @@ -643,6 +808,43 @@ ] } }, + "com.amazonaws.keyspaces#FieldDefinition": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.keyspaces#GenericString", + "traits": { + "smithy.api#documentation": "

\n The identifier.\n

", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.keyspaces#GenericString", + "traits": { + "smithy.api#documentation": "

\n Any supported Cassandra data type, including collections and other user-defined types that are \n contained in the same keyspace.\n

\n

For more information, see Cassandra data type support in the Amazon Keyspaces Developer\n Guide.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n A field definition consists out of a name and a type.\n

" + } + }, + "com.amazonaws.keyspaces#FieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.keyspaces#FieldDefinition" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, "com.amazonaws.keyspaces#GenericString": { "type": "string" }, @@ -745,7 +947,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about the table, including the table's name and current status, the keyspace name, \n configuration settings, and metadata.

\n

To read table metadata using GetTable, Select action \n permissions for the table and system tables are required to complete the operation.

" + "smithy.api#documentation": "

Returns information about the table, including the table's name and current status, the keyspace name, \n configuration settings, and metadata.

\n

To read table metadata using GetTable, the \n IAM principal needs Select action \n permissions for the table and the system keyspace.

" } }, "com.amazonaws.keyspaces#GetTableAutoScalingSettings": { @@ -951,6 +1153,123 @@ } } }, + "com.amazonaws.keyspaces#GetType": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#GetTypeRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#GetTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The GetType operation returns information about the type, for example the field definitions, the timestamp when the type\n was last modified, the level of nesting, the status, and details about if the type is used in other types and tables.\n

\n

To read keyspace metadata using GetType, the \n IAM principal needs Select action \n permissions for the system keyspace.

" + } + }, + "com.amazonaws.keyspaces#GetTypeRequest": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace that contains this type.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

The formatted name of the type. For example, if the name of the type was created\n without double quotes, Amazon Keyspaces saved the name in lower-case characters. If the name was\n created in double quotes, you must use double quotes to specify the type name.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#GetTypeResponse": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace that contains this type.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the type.\n

", + "smithy.api#required": {} + } + }, + "fieldDefinitions": { + "target": "com.amazonaws.keyspaces#FieldList", + "traits": { + "smithy.api#documentation": "

\n The names and types that define this type.\n

" + } + }, + "lastModifiedTimestamp": { + "target": "com.amazonaws.keyspaces#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The timestamp that shows when this type was last modified.\n

" + } + }, + "status": { + "target": "com.amazonaws.keyspaces#TypeStatus", + "traits": { + "smithy.api#documentation": "

\n The status of this type.\n

" + } + }, + "directReferringTables": { + "target": "com.amazonaws.keyspaces#TableNameList", + "traits": { + "smithy.api#documentation": "

\n The tables that use this type.\n

" + } + }, + "directParentTypes": { + "target": "com.amazonaws.keyspaces#TypeNameList", + "traits": { + "smithy.api#documentation": "

\n The types that use this type.\n

" + } + }, + "maxNestingDepth": { + "target": "com.amazonaws.keyspaces#Depth", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

\n The level of nesting implemented for this type.\n

" + } + }, + "keyspaceArn": { + "target": "com.amazonaws.keyspaces#ARN", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the keyspace that contains this type in the format of an Amazon Resource Name (ARN).\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.keyspaces#IntegerObject": { "type": "integer", "traits": { @@ -1038,12 +1357,18 @@ { "target": "com.amazonaws.keyspaces#CreateTable" }, + { + "target": "com.amazonaws.keyspaces#CreateType" + }, { "target": "com.amazonaws.keyspaces#DeleteKeyspace" }, { "target": "com.amazonaws.keyspaces#DeleteTable" }, + { + "target": "com.amazonaws.keyspaces#DeleteType" + }, { "target": "com.amazonaws.keyspaces#GetKeyspace" }, @@ -1053,6 +1378,9 @@ { "target": "com.amazonaws.keyspaces#GetTableAutoScalingSettings" }, + { + "target": "com.amazonaws.keyspaces#GetType" + }, { "target": "com.amazonaws.keyspaces#ListKeyspaces" }, @@ -1062,6 +1390,9 @@ { "target": "com.amazonaws.keyspaces#ListTagsForResource" }, + { + "target": "com.amazonaws.keyspaces#ListTypes" + }, { "target": "com.amazonaws.keyspaces#RestoreTable" }, @@ -2030,7 +2361,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of keyspaces.

", + "smithy.api#documentation": "

The ListKeyspaces operation returns a list of keyspaces.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -2100,7 +2431,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of tables for a specified keyspace.

", + "smithy.api#documentation": "

The ListTables operation returns a list of tables for a specified keyspace.

\n

To read keyspace metadata using ListTables, the \n IAM principal needs Select action \n permissions for the system keyspace.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -2176,7 +2507,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

", + "smithy.api#documentation": "

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

\n

To read keyspace metadata using ListTagsForResource, the \n IAM principal needs Select action \n permissions for the specified resource and the system keyspace.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -2226,6 +2557,89 @@ } } }, + "com.amazonaws.keyspaces#ListTypes": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#ListTypesRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#ListTypesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The ListTypes operation returns a list of types for a specified keyspace.\n

\n

To read keyspace metadata using ListTypes, the \n IAM principal needs Select action \n permissions for the system keyspace.

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "types" + } + } + }, + "com.amazonaws.keyspaces#ListTypesRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.keyspaces#NextToken", + "traits": { + "smithy.api#documentation": "

\n The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.\n

" + } + }, + "maxResults": { + "target": "com.amazonaws.keyspaces#MaxResults", + "traits": { + "smithy.api#documentation": "

\n The total number of types to return in the output. If the total number of types available is more than the value specified,\n a NextToken is provided in the output. To resume pagination, provide the NextToken value as an \n argument of a subsequent API invocation.\n

" + } + }, + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace that contains the listed types.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#ListTypesResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.keyspaces#NextToken", + "traits": { + "smithy.api#documentation": "

\n The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.\n

" + } + }, + "types": { + "target": "com.amazonaws.keyspaces#TypeNameList", + "traits": { + "smithy.api#documentation": "

\n The list of types contained in the specified keyspace.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.keyspaces#MaxResults": { "type": "integer", "traits": { @@ -2469,7 +2883,7 @@ "resourceArn": { "target": "com.amazonaws.keyspaces#ARN", "traits": { - "smithy.api#documentation": "

The unique identifier in the format of Amazon Resource Name (ARN), for the resource not found.

" + "smithy.api#documentation": "

The unique identifier in the format of Amazon Resource Name (ARN) for the resource could't be found.

" } } }, @@ -2478,7 +2892,7 @@ "code": "ResourceNotFoundException", "httpResponseCode": 404 }, - "smithy.api#documentation": "

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 ACTIVE.

", + "smithy.api#documentation": "

The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, \n or its status might not be ACTIVE.

", "smithy.api#error": "client", "smithy.api#httpError": 404 } @@ -2702,6 +3116,12 @@ "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_]{0,47}$" } }, + "com.amazonaws.keyspaces#TableNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.keyspaces#TableName" + } + }, "com.amazonaws.keyspaces#TableStatus": { "type": "string", "traits": { @@ -2827,6 +3247,9 @@ { "target": "com.amazonaws.keyspaces#AccessDeniedException" }, + { + "target": "com.amazonaws.keyspaces#ConflictException" + }, { "target": "com.amazonaws.keyspaces#InternalServerException" }, @@ -2957,6 +3380,44 @@ "com.amazonaws.keyspaces#Timestamp": { "type": "timestamp" }, + "com.amazonaws.keyspaces#TypeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 48 + } + } + }, + "com.amazonaws.keyspaces#TypeNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.keyspaces#TypeName" + } + }, + "com.amazonaws.keyspaces#TypeStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "RESTORING", + "name": "RESTORING" + } + ] + } + }, "com.amazonaws.keyspaces#UntagResource": { "type": "operation", "input": {