From 2be6625e23dcdb91c018fdd5ef48a29d3de16ca6 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 19 Jan 2024 19:22:18 +0000 Subject: [PATCH] feat(client-dynamodb): This release adds support for including ApproximateCreationDateTimePrecision configurations in EnableKinesisStreamingDestination API, adds the same as an optional field in the response of DescribeKinesisStreamingDestination, and adds support for a new UpdateKinesisStreamingDestination API. --- clients/client-dynamodb/README.md | 8 + clients/client-dynamodb/src/DynamoDB.ts | 23 +++ clients/client-dynamodb/src/DynamoDBClient.ts | 6 + ...cribeKinesisStreamingDestinationCommand.ts | 3 +- ...sableKinesisStreamingDestinationCommand.ts | 8 +- ...nableKinesisStreamingDestinationCommand.ts | 8 +- ...pdateKinesisStreamingDestinationCommand.ts | 125 +++++++++++++ clients/client-dynamodb/src/commands/index.ts | 1 + .../client-dynamodb/src/models/models_0.ts | 118 +++++++++++- .../src/protocols/Aws_json1_0.ts | 90 ++++++++++ codegen/sdk-codegen/aws-models/dynamodb.json | 170 +++++++++++++++++- 11 files changed, 550 insertions(+), 10 deletions(-) create mode 100644 clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts diff --git a/clients/client-dynamodb/README.md b/clients/client-dynamodb/README.md index 7097282815040..5829abfaf39a6 100644 --- a/clients/client-dynamodb/README.md +++ b/clients/client-dynamodb/README.md @@ -619,6 +619,14 @@ UpdateItem [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/UpdateItemCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/UpdateItemCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/UpdateItemCommandOutput/) + +
+ +UpdateKinesisStreamingDestination + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/UpdateKinesisStreamingDestinationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/UpdateKinesisStreamingDestinationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/UpdateKinesisStreamingDestinationCommandOutput/) +
diff --git a/clients/client-dynamodb/src/DynamoDB.ts b/clients/client-dynamodb/src/DynamoDB.ts index dd9749c0009ee..e01fa099ec851 100644 --- a/clients/client-dynamodb/src/DynamoDB.ts +++ b/clients/client-dynamodb/src/DynamoDB.ts @@ -196,6 +196,11 @@ import { UpdateGlobalTableSettingsCommandOutput, } from "./commands/UpdateGlobalTableSettingsCommand"; import { UpdateItemCommand, UpdateItemCommandInput, UpdateItemCommandOutput } from "./commands/UpdateItemCommand"; +import { + UpdateKinesisStreamingDestinationCommand, + UpdateKinesisStreamingDestinationCommandInput, + UpdateKinesisStreamingDestinationCommandOutput, +} from "./commands/UpdateKinesisStreamingDestinationCommand"; import { UpdateTableCommand, UpdateTableCommandInput, UpdateTableCommandOutput } from "./commands/UpdateTableCommand"; import { UpdateTableReplicaAutoScalingCommand, @@ -260,6 +265,7 @@ const commands = { UpdateGlobalTableCommand, UpdateGlobalTableSettingsCommand, UpdateItemCommand, + UpdateKinesisStreamingDestinationCommand, UpdateTableCommand, UpdateTableReplicaAutoScalingCommand, UpdateTimeToLiveCommand, @@ -983,6 +989,23 @@ export interface DynamoDB { cb: (err: any, data?: UpdateItemCommandOutput) => void ): void; + /** + * @see {@link UpdateKinesisStreamingDestinationCommand} + */ + updateKinesisStreamingDestination( + args: UpdateKinesisStreamingDestinationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateKinesisStreamingDestination( + args: UpdateKinesisStreamingDestinationCommandInput, + cb: (err: any, data?: UpdateKinesisStreamingDestinationCommandOutput) => void + ): void; + updateKinesisStreamingDestination( + args: UpdateKinesisStreamingDestinationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateKinesisStreamingDestinationCommandOutput) => void + ): void; + /** * @see {@link UpdateTableCommand} */ diff --git a/clients/client-dynamodb/src/DynamoDBClient.ts b/clients/client-dynamodb/src/DynamoDBClient.ts index 36bddcdba013d..af2e4cd1f5fd8 100644 --- a/clients/client-dynamodb/src/DynamoDBClient.ts +++ b/clients/client-dynamodb/src/DynamoDBClient.ts @@ -160,6 +160,10 @@ import { UpdateGlobalTableSettingsCommandOutput, } from "./commands/UpdateGlobalTableSettingsCommand"; import { UpdateItemCommandInput, UpdateItemCommandOutput } from "./commands/UpdateItemCommand"; +import { + UpdateKinesisStreamingDestinationCommandInput, + UpdateKinesisStreamingDestinationCommandOutput, +} from "./commands/UpdateKinesisStreamingDestinationCommand"; import { UpdateTableCommandInput, UpdateTableCommandOutput } from "./commands/UpdateTableCommand"; import { UpdateTableReplicaAutoScalingCommandInput, @@ -231,6 +235,7 @@ export type ServiceInputTypes = | UpdateGlobalTableCommandInput | UpdateGlobalTableSettingsCommandInput | UpdateItemCommandInput + | UpdateKinesisStreamingDestinationCommandInput | UpdateTableCommandInput | UpdateTableReplicaAutoScalingCommandInput | UpdateTimeToLiveCommandInput; @@ -289,6 +294,7 @@ export type ServiceOutputTypes = | UpdateGlobalTableCommandOutput | UpdateGlobalTableSettingsCommandOutput | UpdateItemCommandOutput + | UpdateKinesisStreamingDestinationCommandOutput | UpdateTableCommandOutput | UpdateTableReplicaAutoScalingCommandOutput | UpdateTimeToLiveCommandOutput; diff --git a/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts index bdaf23a3678a4..cdc9724d3e16f 100644 --- a/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts @@ -53,8 +53,9 @@ export interface DescribeKinesisStreamingDestinationCommandOutput * // KinesisDataStreamDestinations: [ // KinesisDataStreamDestinations * // { // KinesisDataStreamDestination * // StreamArn: "STRING_VALUE", - * // DestinationStatus: "ENABLING" || "ACTIVE" || "DISABLING" || "DISABLED" || "ENABLE_FAILED", + * // DestinationStatus: "ENABLING" || "ACTIVE" || "DISABLING" || "DISABLED" || "ENABLE_FAILED" || "UPDATING", * // DestinationStatusDescription: "STRING_VALUE", + * // ApproximateCreationDateTimePrecision: "MILLISECOND" || "MICROSECOND", * // }, * // ], * // }; diff --git a/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts index b40eeeed40153..20cd845dd8712 100644 --- a/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts +++ b/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts @@ -44,13 +44,19 @@ export interface DisableKinesisStreamingDestinationCommandOutput * const input = { // KinesisStreamingDestinationInput * TableName: "STRING_VALUE", // required * StreamArn: "STRING_VALUE", // required + * EnableKinesisStreamingConfiguration: { // EnableKinesisStreamingConfiguration + * ApproximateCreationDateTimePrecision: "MILLISECOND" || "MICROSECOND", + * }, * }; * const command = new DisableKinesisStreamingDestinationCommand(input); * const response = await client.send(command); * // { // KinesisStreamingDestinationOutput * // TableName: "STRING_VALUE", * // StreamArn: "STRING_VALUE", - * // DestinationStatus: "ENABLING" || "ACTIVE" || "DISABLING" || "DISABLED" || "ENABLE_FAILED", + * // DestinationStatus: "ENABLING" || "ACTIVE" || "DISABLING" || "DISABLED" || "ENABLE_FAILED" || "UPDATING", + * // EnableKinesisStreamingConfiguration: { // EnableKinesisStreamingConfiguration + * // ApproximateCreationDateTimePrecision: "MILLISECOND" || "MICROSECOND", + * // }, * // }; * * ``` diff --git a/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts index 98ffe89e6e80e..39a8c5262c7bf 100644 --- a/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts +++ b/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts @@ -46,13 +46,19 @@ export interface EnableKinesisStreamingDestinationCommandOutput * const input = { // KinesisStreamingDestinationInput * TableName: "STRING_VALUE", // required * StreamArn: "STRING_VALUE", // required + * EnableKinesisStreamingConfiguration: { // EnableKinesisStreamingConfiguration + * ApproximateCreationDateTimePrecision: "MILLISECOND" || "MICROSECOND", + * }, * }; * const command = new EnableKinesisStreamingDestinationCommand(input); * const response = await client.send(command); * // { // KinesisStreamingDestinationOutput * // TableName: "STRING_VALUE", * // StreamArn: "STRING_VALUE", - * // DestinationStatus: "ENABLING" || "ACTIVE" || "DISABLING" || "DISABLED" || "ENABLE_FAILED", + * // DestinationStatus: "ENABLING" || "ACTIVE" || "DISABLING" || "DISABLED" || "ENABLE_FAILED" || "UPDATING", + * // EnableKinesisStreamingConfiguration: { // EnableKinesisStreamingConfiguration + * // ApproximateCreationDateTimePrecision: "MILLISECOND" || "MICROSECOND", + * // }, * // }; * * ``` diff --git a/clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts new file mode 100644 index 0000000000000..e2eec96686a94 --- /dev/null +++ b/clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts @@ -0,0 +1,125 @@ +// 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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateKinesisStreamingDestinationInput, UpdateKinesisStreamingDestinationOutput } from "../models/models_0"; +import { + de_UpdateKinesisStreamingDestinationCommand, + se_UpdateKinesisStreamingDestinationCommand, +} from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateKinesisStreamingDestinationCommand}. + */ +export interface UpdateKinesisStreamingDestinationCommandInput extends UpdateKinesisStreamingDestinationInput {} +/** + * @public + * + * The output of {@link UpdateKinesisStreamingDestinationCommand}. + */ +export interface UpdateKinesisStreamingDestinationCommandOutput + extends UpdateKinesisStreamingDestinationOutput, + __MetadataBearer {} + +/** + * @public + *

The command to update the Kinesis stream destination.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DynamoDBClient, UpdateKinesisStreamingDestinationCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import + * // const { DynamoDBClient, UpdateKinesisStreamingDestinationCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import + * const client = new DynamoDBClient(config); + * const input = { // UpdateKinesisStreamingDestinationInput + * TableName: "STRING_VALUE", // required + * StreamArn: "STRING_VALUE", // required + * UpdateKinesisStreamingConfiguration: { // UpdateKinesisStreamingConfiguration + * ApproximateCreationDateTimePrecision: "MILLISECOND" || "MICROSECOND", + * }, + * }; + * const command = new UpdateKinesisStreamingDestinationCommand(input); + * const response = await client.send(command); + * // { // UpdateKinesisStreamingDestinationOutput + * // TableName: "STRING_VALUE", + * // StreamArn: "STRING_VALUE", + * // DestinationStatus: "ENABLING" || "ACTIVE" || "DISABLING" || "DISABLED" || "ENABLE_FAILED" || "UPDATING", + * // UpdateKinesisStreamingConfiguration: { // UpdateKinesisStreamingConfiguration + * // ApproximateCreationDateTimePrecision: "MILLISECOND" || "MICROSECOND", + * // }, + * // }; + * + * ``` + * + * @param UpdateKinesisStreamingDestinationCommandInput - {@link UpdateKinesisStreamingDestinationCommandInput} + * @returns {@link UpdateKinesisStreamingDestinationCommandOutput} + * @see {@link UpdateKinesisStreamingDestinationCommandInput} for command's `input` shape. + * @see {@link UpdateKinesisStreamingDestinationCommandOutput} for command's `response` shape. + * @see {@link DynamoDBClientResolvedConfig | config} for DynamoDBClient's `config` shape. + * + * @throws {@link InternalServerError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidEndpointException} (client fault) + * + * @throws {@link LimitExceededException} (client fault) + *

There is no limit to the number of daily on-demand backups that can be taken.

+ *

For most purposes, up to 500 simultaneous table operations are allowed per account. These operations + * include CreateTable, UpdateTable, + * DeleteTable,UpdateTimeToLive, + * RestoreTableFromBackup, and RestoreTableToPointInTime.

+ *

When you are creating a table with one or more secondary + * indexes, you can have up to 250 such requests running at a time. However, if the table or + * index specifications are complex, then DynamoDB might temporarily reduce the number + * of concurrent operations.

+ *

When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.

+ *

There is a soft account quota of 2,500 tables.

+ *

GetRecords was called with a value of more than 1000 for the limit request parameter.

+ *

More than 2 processes are reading from the same streams shard at the same time. Exceeding + * this limit may result in request throttling.

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

The operation conflicts with the resource's availability. For example, you + * attempted to recreate an existing table, or tried to delete a table currently in the + * CREATING state.

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

The operation tried to access a nonexistent table or index. The resource might not + * be specified correctly, or its status might not be ACTIVE.

+ * + * @throws {@link DynamoDBServiceException} + *

Base exception class for all service exceptions from DynamoDB service.

+ * + */ +export class UpdateKinesisStreamingDestinationCommand extends $Command + .classBuilder< + UpdateKinesisStreamingDestinationCommandInput, + UpdateKinesisStreamingDestinationCommandOutput, + DynamoDBClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("DynamoDB_20120810", "UpdateKinesisStreamingDestination", {}) + .n("DynamoDBClient", "UpdateKinesisStreamingDestinationCommand") + .f(void 0, void 0) + .ser(se_UpdateKinesisStreamingDestinationCommand) + .de(de_UpdateKinesisStreamingDestinationCommand) + .build() {} diff --git a/clients/client-dynamodb/src/commands/index.ts b/clients/client-dynamodb/src/commands/index.ts index 6f5a9d3ee345d..6a3796d128c8f 100644 --- a/clients/client-dynamodb/src/commands/index.ts +++ b/clients/client-dynamodb/src/commands/index.ts @@ -49,6 +49,7 @@ export * from "./UpdateContributorInsightsCommand"; export * from "./UpdateGlobalTableCommand"; export * from "./UpdateGlobalTableSettingsCommand"; export * from "./UpdateItemCommand"; +export * from "./UpdateKinesisStreamingDestinationCommand"; export * from "./UpdateTableCommand"; export * from "./UpdateTableReplicaAutoScalingCommand"; export * from "./UpdateTimeToLiveCommand"; diff --git a/clients/client-dynamodb/src/models/models_0.ts b/clients/client-dynamodb/src/models/models_0.ts index 090e2705da387..679c3d30f1c46 100644 --- a/clients/client-dynamodb/src/models/models_0.ts +++ b/clients/client-dynamodb/src/models/models_0.ts @@ -3,6 +3,21 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli import { DynamoDBServiceException as __BaseException } from "./DynamoDBServiceException"; +/** + * @public + * @enum + */ +export const ApproximateCreationDateTimePrecision = { + MICROSECOND: "MICROSECOND", + MILLISECOND: "MILLISECOND", +} as const; + +/** + * @public + */ +export type ApproximateCreationDateTimePrecision = + (typeof ApproximateCreationDateTimePrecision)[keyof typeof ApproximateCreationDateTimePrecision]; + /** * @public *

Contains details of a table archival operation.

@@ -4566,6 +4581,7 @@ export const DestinationStatus = { DISABLING: "DISABLING", ENABLE_FAILED: "ENABLE_FAILED", ENABLING: "ENABLING", + UPDATING: "UPDATING", } as const; /** @@ -4595,6 +4611,12 @@ export interface KinesisDataStreamDestination { *

The human-readable string that corresponds to the replica status.

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

The precision of the Kinesis data stream timestamp. The values are either MILLISECOND or MICROSECOND.

+ */ + ApproximateCreationDateTimePrecision?: ApproximateCreationDateTimePrecision; } /** @@ -4876,6 +4898,18 @@ export interface DescribeTimeToLiveOutput { TimeToLiveDescription?: TimeToLiveDescription; } +/** + * @public + *

Enables setting the configuration for Kinesis Streaming.

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

Toggle for the precision of Kinesis data stream timestamp. The values are either MILLISECOND or MICROSECOND.

+ */ + ApproximateCreationDateTimePrecision?: ApproximateCreationDateTimePrecision; +} + /** * @public */ @@ -4891,6 +4925,12 @@ export interface KinesisStreamingDestinationInput { *

The ARN for a Kinesis data stream.

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

The source for the Kinesis streaming information that is being enabled.

+ */ + EnableKinesisStreamingConfiguration?: EnableKinesisStreamingConfiguration; } /** @@ -4914,6 +4954,12 @@ export interface KinesisStreamingDestinationOutput { *

The current status of the replication.

*/ DestinationStatus?: DestinationStatus; + + /** + * @public + *

The destination for the Kinesis streaming information that is being enabled.

+ */ + EnableKinesisStreamingConfiguration?: EnableKinesisStreamingConfiguration; } /** @@ -6372,6 +6418,70 @@ export interface UpdateGlobalTableSettingsOutput { ReplicaSettings?: ReplicaSettingsDescription[]; } +/** + * @public + *

Enables updating the configuration for Kinesis Streaming.

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

Enables updating the precision of Kinesis data stream timestamp.

+ */ + ApproximateCreationDateTimePrecision?: ApproximateCreationDateTimePrecision; +} + +/** + * @public + */ +export interface UpdateKinesisStreamingDestinationInput { + /** + * @public + *

The table name for the Kinesis streaming destination input.

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

The ARN for the Kinesis stream input.

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

The command to update the Kinesis stream configuration.

+ */ + UpdateKinesisStreamingConfiguration?: UpdateKinesisStreamingConfiguration; +} + +/** + * @public + */ +export interface UpdateKinesisStreamingDestinationOutput { + /** + * @public + *

The table name for the Kinesis streaming destination output.

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

The ARN for the Kinesis stream input.

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

The status of the attempt to update the Kinesis streaming destination output.

+ */ + DestinationStatus?: DestinationStatus; + + /** + * @public + *

The command to update the Kinesis streaming destination configuration.

+ */ + UpdateKinesisStreamingConfiguration?: UpdateKinesisStreamingConfiguration; +} + /** * @public *

Represents the new provisioned throughput settings to be applied to a global secondary @@ -6626,8 +6736,8 @@ export interface UpdateTableInput { * @public *

Represents the DynamoDB Streams configuration for the table.

* - *

You receive a ValidationException if you try to enable a stream on a - * table that already has a stream, or if you try to disable a stream on a table that + *

You receive a ResourceInUseException if you try to enable a stream on + * a table that already has a stream, or if you try to disable a stream on a table that * doesn't have a stream.

*
*/ @@ -7924,12 +8034,12 @@ export interface ItemResponse { /** * @public - *

Represents a PartiQL statment that uses parameters.

+ *

Represents a PartiQL statement that uses parameters.

*/ export interface ParameterizedStatement { /** * @public - *

A PartiQL statment that uses parameters.

+ *

A PartiQL statement that uses parameters.

*/ Statement: string | undefined; diff --git a/clients/client-dynamodb/src/protocols/Aws_json1_0.ts b/clients/client-dynamodb/src/protocols/Aws_json1_0.ts index 833308f64ab8f..c6af5a7154849 100644 --- a/clients/client-dynamodb/src/protocols/Aws_json1_0.ts +++ b/clients/client-dynamodb/src/protocols/Aws_json1_0.ts @@ -123,6 +123,10 @@ import { UpdateGlobalTableSettingsCommandOutput, } from "../commands/UpdateGlobalTableSettingsCommand"; import { UpdateItemCommandInput, UpdateItemCommandOutput } from "../commands/UpdateItemCommand"; +import { + UpdateKinesisStreamingDestinationCommandInput, + UpdateKinesisStreamingDestinationCommandOutput, +} from "../commands/UpdateKinesisStreamingDestinationCommand"; import { UpdateTableCommandInput, UpdateTableCommandOutput } from "../commands/UpdateTableCommand"; import { UpdateTableReplicaAutoScalingCommandInput, @@ -208,6 +212,7 @@ import { DescribeTableReplicaAutoScalingOutput, DescribeTimeToLiveInput, DuplicateItemException, + EnableKinesisStreamingConfiguration, ExecuteStatementInput, ExecuteStatementOutput, ExecuteTransactionInput, @@ -337,6 +342,8 @@ import { UpdateGlobalTableSettingsOutput, UpdateItemInput, UpdateItemOutput, + UpdateKinesisStreamingConfiguration, + UpdateKinesisStreamingDestinationInput, UpdateReplicationGroupMemberAction, UpdateTableInput, UpdateTableOutput, @@ -990,6 +997,19 @@ export const se_UpdateItemCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0UpdateKinesisStreamingDestinationCommand + */ +export const se_UpdateKinesisStreamingDestinationCommand = async ( + input: UpdateKinesisStreamingDestinationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UpdateKinesisStreamingDestination"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0UpdateTableCommand */ @@ -3803,6 +3823,64 @@ const de_UpdateItemCommandError = async ( } }; +/** + * deserializeAws_json1_0UpdateKinesisStreamingDestinationCommand + */ +export const de_UpdateKinesisStreamingDestinationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_UpdateKinesisStreamingDestinationCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: UpdateKinesisStreamingDestinationCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0UpdateKinesisStreamingDestinationCommandError + */ +const de_UpdateKinesisStreamingDestinationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerError": + case "com.amazonaws.dynamodb#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidEndpointException": + case "com.amazonaws.dynamodb#InvalidEndpointException": + throw await de_InvalidEndpointExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.dynamodb#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "ResourceInUseException": + case "com.amazonaws.dynamodb#ResourceInUseException": + throw await de_ResourceInUseExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.dynamodb#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_0UpdateTableCommand */ @@ -4776,6 +4854,8 @@ const se_DeleteRequest = (input: DeleteRequest, context: __SerdeContext): any => // se_DescribeTimeToLiveInput omitted. +// se_EnableKinesisStreamingConfiguration omitted. + /** * serializeAws_json1_0ExecuteStatementInput */ @@ -5544,6 +5624,10 @@ const se_UpdateItemInput = (input: UpdateItemInput, context: __SerdeContext): an }); }; +// se_UpdateKinesisStreamingConfiguration omitted. + +// se_UpdateKinesisStreamingDestinationInput omitted. + // se_UpdateReplicationGroupMemberAction omitted. // se_UpdateTableInput omitted. @@ -6161,6 +6245,8 @@ const de_DescribeTableReplicaAutoScalingOutput = ( // de_DuplicateItemException omitted. +// de_EnableKinesisStreamingConfiguration omitted. + // de_Endpoint omitted. // de_Endpoints omitted. @@ -7128,6 +7214,10 @@ const de_UpdateItemOutput = (output: any, context: __SerdeContext): UpdateItemOu }) as any; }; +// de_UpdateKinesisStreamingConfiguration omitted. + +// de_UpdateKinesisStreamingDestinationOutput omitted. + /** * deserializeAws_json1_0UpdateTableOutput */ diff --git a/codegen/sdk-codegen/aws-models/dynamodb.json b/codegen/sdk-codegen/aws-models/dynamodb.json index f2bc87129408a..d1a4c4d88c5e2 100644 --- a/codegen/sdk-codegen/aws-models/dynamodb.json +++ b/codegen/sdk-codegen/aws-models/dynamodb.json @@ -29,6 +29,23 @@ ] }, "shapes": { + "com.amazonaws.dynamodb#ApproximateCreationDateTimePrecision": { + "type": "enum", + "members": { + "MILLISECOND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MILLISECOND" + } + }, + "MICROSECOND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MICROSECOND" + } + } + } + }, "com.amazonaws.dynamodb#ArchivalReason": { "type": "string" }, @@ -3475,6 +3492,12 @@ "traits": { "smithy.api#enumValue": "ENABLE_FAILED" } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } } } }, @@ -3679,6 +3702,9 @@ { "target": "com.amazonaws.dynamodb#UpdateItem" }, + { + "target": "com.amazonaws.dynamodb#UpdateKinesisStreamingDestination" + }, { "target": "com.amazonaws.dynamodb#UpdateTable" }, @@ -4791,6 +4817,20 @@ } } }, + "com.amazonaws.dynamodb#EnableKinesisStreamingConfiguration": { + "type": "structure", + "members": { + "ApproximateCreationDateTimePrecision": { + "target": "com.amazonaws.dynamodb#ApproximateCreationDateTimePrecision", + "traits": { + "smithy.api#documentation": "

Toggle for the precision of Kinesis data stream timestamp. The values are either MILLISECOND or MICROSECOND.

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

Enables setting the configuration for Kinesis Streaming.

" + } + }, "com.amazonaws.dynamodb#EnableKinesisStreamingDestination": { "type": "operation", "input": { @@ -6959,6 +6999,12 @@ "traits": { "smithy.api#documentation": "

The human-readable string that corresponds to the replica status.

" } + }, + "ApproximateCreationDateTimePrecision": { + "target": "com.amazonaws.dynamodb#ApproximateCreationDateTimePrecision", + "traits": { + "smithy.api#documentation": "

The precision of the Kinesis data stream timestamp. The values are either MILLISECOND or MICROSECOND.

" + } } }, "traits": { @@ -6987,6 +7033,12 @@ "smithy.api#documentation": "

The ARN for a Kinesis data stream.

", "smithy.api#required": {} } + }, + "EnableKinesisStreamingConfiguration": { + "target": "com.amazonaws.dynamodb#EnableKinesisStreamingConfiguration", + "traits": { + "smithy.api#documentation": "

The source for the Kinesis streaming information that is being enabled.

" + } } } }, @@ -7010,6 +7062,12 @@ "traits": { "smithy.api#documentation": "

The current status of the replication.

" } + }, + "EnableKinesisStreamingConfiguration": { + "target": "com.amazonaws.dynamodb#EnableKinesisStreamingConfiguration", + "traits": { + "smithy.api#documentation": "

The destination for the Kinesis streaming information that is being enabled.

" + } } } }, @@ -7772,7 +7830,7 @@ "Statement": { "target": "com.amazonaws.dynamodb#PartiQLStatement", "traits": { - "smithy.api#documentation": "

A PartiQL statment that uses parameters.

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

A PartiQL statement that uses parameters.

", "smithy.api#required": {} } }, @@ -7790,7 +7848,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a PartiQL statment that uses parameters.

" + "smithy.api#documentation": "

Represents a PartiQL statement that uses parameters.

" } }, "com.amazonaws.dynamodb#ParameterizedStatements": { @@ -11734,6 +11792,112 @@ "smithy.api#output": {} } }, + "com.amazonaws.dynamodb#UpdateKinesisStreamingConfiguration": { + "type": "structure", + "members": { + "ApproximateCreationDateTimePrecision": { + "target": "com.amazonaws.dynamodb#ApproximateCreationDateTimePrecision", + "traits": { + "smithy.api#documentation": "

Enables updating the precision of Kinesis data stream timestamp.

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

Enables updating the configuration for Kinesis Streaming.

" + } + }, + "com.amazonaws.dynamodb#UpdateKinesisStreamingDestination": { + "type": "operation", + "input": { + "target": "com.amazonaws.dynamodb#UpdateKinesisStreamingDestinationInput" + }, + "output": { + "target": "com.amazonaws.dynamodb#UpdateKinesisStreamingDestinationOutput" + }, + "errors": [ + { + "target": "com.amazonaws.dynamodb#InternalServerError" + }, + { + "target": "com.amazonaws.dynamodb#InvalidEndpointException" + }, + { + "target": "com.amazonaws.dynamodb#LimitExceededException" + }, + { + "target": "com.amazonaws.dynamodb#ResourceInUseException" + }, + { + "target": "com.amazonaws.dynamodb#ResourceNotFoundException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": false + }, + "smithy.api#documentation": "

The command to update the Kinesis stream destination.

" + } + }, + "com.amazonaws.dynamodb#UpdateKinesisStreamingDestinationInput": { + "type": "structure", + "members": { + "TableName": { + "target": "com.amazonaws.dynamodb#TableName", + "traits": { + "smithy.api#documentation": "

The table name for the Kinesis streaming destination input.

", + "smithy.api#required": {} + } + }, + "StreamArn": { + "target": "com.amazonaws.dynamodb#StreamArn", + "traits": { + "smithy.api#documentation": "

The ARN for the Kinesis stream input.

", + "smithy.api#required": {} + } + }, + "UpdateKinesisStreamingConfiguration": { + "target": "com.amazonaws.dynamodb#UpdateKinesisStreamingConfiguration", + "traits": { + "smithy.api#documentation": "

The command to update the Kinesis stream configuration.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.dynamodb#UpdateKinesisStreamingDestinationOutput": { + "type": "structure", + "members": { + "TableName": { + "target": "com.amazonaws.dynamodb#TableName", + "traits": { + "smithy.api#documentation": "

The table name for the Kinesis streaming destination output.

" + } + }, + "StreamArn": { + "target": "com.amazonaws.dynamodb#StreamArn", + "traits": { + "smithy.api#documentation": "

The ARN for the Kinesis stream input.

" + } + }, + "DestinationStatus": { + "target": "com.amazonaws.dynamodb#DestinationStatus", + "traits": { + "smithy.api#documentation": "

The status of the attempt to update the Kinesis streaming destination output.

" + } + }, + "UpdateKinesisStreamingConfiguration": { + "target": "com.amazonaws.dynamodb#UpdateKinesisStreamingConfiguration", + "traits": { + "smithy.api#documentation": "

The command to update the Kinesis streaming destination configuration.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.dynamodb#UpdateReplicationGroupMemberAction": { "type": "structure", "members": { @@ -11842,7 +12006,7 @@ "StreamSpecification": { "target": "com.amazonaws.dynamodb#StreamSpecification", "traits": { - "smithy.api#documentation": "

Represents the DynamoDB Streams configuration for the table.

\n \n

You receive a ValidationException if you try to enable a stream on a\n table that already has a stream, or if you try to disable a stream on a table that\n doesn't have a stream.

\n
" + "smithy.api#documentation": "

Represents the DynamoDB Streams configuration for the table.

\n \n

You receive a ResourceInUseException if you try to enable a stream on\n a table that already has a stream, or if you try to disable a stream on a table that\n doesn't have a stream.

\n
" } }, "SSESpecification": {