From 9d071e688e281289e12dcac3db3af37ba029c3bb Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Thu, 20 Aug 2020 16:25:27 -0700 Subject: [PATCH] Verify that DynamoDB and DynamoDB stream's shared shapes are kept in sync. Update the shapes that currently do not match to be in sync. --- .../dynamodbstreams/customization.config | 34 +++++------------ .../dynamodbstreams/service-2.json | 38 +++++++++---------- 2 files changed, 29 insertions(+), 43 deletions(-) diff --git a/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/customization.config b/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/customization.config index cde0b3afc695..41847465bbc3 100644 --- a/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/customization.config +++ b/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/customization.config @@ -1,31 +1,17 @@ { "calculateCrc32FromCompressedData": true, - "sdkModeledExceptionBaseClassName": "DynamoDbException", - - // exclude these shapes that are already present in the dynamodb client "shapeModifiers": { - "AttributeValue" : { - "excludeShape": true - }, - "KeySchemaElement" : { - "excludeShape": true - }, - "KeyType" : { - "excludeShape": true - }, - "StreamViewType" : { - "excludeShape": true - }, - "InternalServerError" : { - "excludeShape": true - }, - "LimitExceededException" : { - "excludeShape": true - }, - "ResourceNotFoundException" : { - "excludeShape": true - } + "AttributeValue": { + "modify": [ + { + "NULL": { + "emitPropertyName": "NUL" + } + } + ] + } }, + "sdkModeledExceptionBaseClassName": "DynamoDbException", "shareModelConfig" : { "shareModelWith" : "dynamodb", "packageName" : "streams" diff --git a/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/service-2.json b/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/service-2.json index c8112d651e34..3fb678321ac6 100644 --- a/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/service-2.json +++ b/services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/service-2.json @@ -89,46 +89,46 @@ "members":{ "S":{ "shape":"StringAttributeValue", - "documentation":"

A String data type.

" + "documentation":"

An attribute of type String. For example:

\"S\": \"Hello\"

" }, "N":{ "shape":"NumberAttributeValue", - "documentation":"

A Number data type.

" + "documentation":"

An attribute of type Number. For example:

\"N\": \"123.45\"

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.

" }, "B":{ "shape":"BinaryAttributeValue", - "documentation":"

A Binary data type.

" + "documentation":"

An attribute of type Binary. For example:

\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"

" }, "SS":{ "shape":"StringSetAttributeValue", - "documentation":"

A String Set data type.

" + "documentation":"

An attribute of type String Set. For example:

\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]

" }, "NS":{ "shape":"NumberSetAttributeValue", - "documentation":"

A Number Set data type.

" + "documentation":"

An attribute of type Number Set. For example:

\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.

" }, "BS":{ "shape":"BinarySetAttributeValue", - "documentation":"

A Binary Set data type.

" + "documentation":"

An attribute of type Binary Set. For example:

\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]

" }, "M":{ "shape":"MapAttributeValue", - "documentation":"

A Map data type.

" + "documentation":"

An attribute of type Map. For example:

\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}

" }, "L":{ "shape":"ListAttributeValue", - "documentation":"

A List data type.

" + "documentation":"

An attribute of type List. For example:

\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]

" }, "NULL":{ "shape":"NullAttributeValue", - "documentation":"

A Null data type.

" + "documentation":"

An attribute of type Null. For example:

\"NULL\": true

" }, "BOOL":{ "shape":"BooleanAttributeValue", - "documentation":"

A Boolean data type.

" + "documentation":"

An attribute of type Boolean. For example:

\"BOOL\": true

" } }, - "documentation":"

Represents the data for an attribute. You can set one, and only one, of the elements.

Each attribute in an item is a name-value pair. An attribute can be single-valued or multi-valued set. For example, a book item can have title and authors attributes. Each book has one title but can have many authors. The multi-valued attribute is a set; duplicate values are not allowed.

" + "documentation":"

Represents the data for an attribute.

Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.

For more information, see Data Types in the Amazon DynamoDB Developer Guide.

" }, "BinaryAttributeValue":{"type":"blob"}, "BinarySetAttributeValue":{ @@ -294,10 +294,10 @@ }, "KeyType":{ "shape":"KeyType", - "documentation":"

The attribute data, consisting of the data type and the attribute value itself.

" + "documentation":"

The role that this key attribute will assume:

The partition key of an item is also known as its hash attribute. The term \"hash attribute\" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

The sort key of an item is also known as its range attribute. The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

" } }, - "documentation":"

Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key (partition key) would be represented by one KeySchemaElement. A composite primary key (partition key and sort key) would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

The partition key of an item is also known as its hash attribute. The term \"hash attribute\" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

The sort key of an item is also known as its range attribute. The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

" + "documentation":"

Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

" }, "KeyType":{ "type":"string", @@ -314,7 +314,7 @@ "documentation":"

Too many operations for a given subscriber.

" } }, - "documentation":"

Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to Error Retries and Exponential Backoff in the Amazon DynamoDB Developer Guide.

", + "documentation":"

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

Up to 50 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime.

The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.

There is a soft account limit of 256 tables.

", "exception":true }, "ListAttributeValue":{ @@ -426,7 +426,7 @@ "documentation":"

The resource which is being requested does not exist.

" } }, - "documentation":"

The operation tried to access a nonexistent stream.

", + "documentation":"

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

", "exception":true }, "SequenceNumber":{ @@ -439,11 +439,11 @@ "members":{ "StartingSequenceNumber":{ "shape":"SequenceNumber", - "documentation":"

The first sequence number.

" + "documentation":"

The first sequence number for the stream records contained within a shard. String contains numeric characters only.

" }, "EndingSequenceNumber":{ "shape":"SequenceNumber", - "documentation":"

The last sequence number.

" + "documentation":"

The last sequence number for the stream records contained within a shard. String contains numeric characters only.

" } }, "documentation":"

The beginning and ending sequence numbers for the stream records contained within a shard.

" @@ -630,9 +630,9 @@ "documentation":"

\"The data you are trying to access has been trimmed.

" } }, - "documentation":"

The operation attempted to read past the oldest stream record in a shard.

In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records whose age exceeds this limit are subject to removal (trimming) from the stream. You might receive a TrimmedDataAccessException if:

", + "documentation":"

The operation attempted to read past the oldest stream record in a shard.

In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records whose age exceeds this limit are subject to removal (trimming) from the stream. You might receive a TrimmedDataAccessException if:

", "exception":true } }, - "documentation":"Amazon DynamoDB

Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see Capturing Table Activity with DynamoDB Streams in the Amazon DynamoDB Developer Guide.

" + "documentation":"Amazon DynamoDB

Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see Capturing Table Activity with DynamoDB Streams in the Amazon DynamoDB Developer Guide.

" }