Skip to content

Commit 00cf4ee

Browse files
committed
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.
1 parent 5b6db7d commit 00cf4ee

File tree

3 files changed

+26
-40
lines changed

3 files changed

+26
-40
lines changed

services/dynamodb/src/main/resources/codegen-resources/dynamodb/service-2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3763,7 +3763,7 @@
37633763
"documentation":"<p>The resource which is being requested does not exist.</p>"
37643764
}
37653765
},
3766-
"documentation":"<p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>",
3766+
"documentation":"<p>The operation tried to access a nonexistent table, index or stream. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>",
37673767
"exception":true
37683768
},
37693769
"RestoreInProgress":{"type":"boolean"},

services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/customization.config

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
11
{
22
"calculateCrc32FromCompressedData": true,
3-
"sdkModeledExceptionBaseClassName": "DynamoDbException",
4-
5-
// exclude these shapes that are already present in the dynamodb client
63
"shapeModifiers": {
7-
"AttributeValue" : {
8-
"excludeShape": true
9-
},
10-
"KeySchemaElement" : {
11-
"excludeShape": true
12-
},
13-
"KeyType" : {
14-
"excludeShape": true
15-
},
16-
"StreamViewType" : {
17-
"excludeShape": true
18-
},
19-
"InternalServerError" : {
20-
"excludeShape": true
21-
},
22-
"LimitExceededException" : {
23-
"excludeShape": true
24-
},
25-
"ResourceNotFoundException" : {
26-
"excludeShape": true
27-
}
4+
"AttributeValue": {
5+
"modify": [
6+
{
7+
"NULL": {
8+
"emitPropertyName": "NUL"
9+
}
10+
}
11+
]
12+
}
2813
},
14+
"sdkModeledExceptionBaseClassName": "DynamoDbException",
2915
"shareModelConfig" : {
3016
"shareModelWith" : "dynamodb",
3117
"packageName" : "streams"

services/dynamodb/src/main/resources/codegen-resources/dynamodbstreams/service-2.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,46 +89,46 @@
8989
"members":{
9090
"S":{
9191
"shape":"StringAttributeValue",
92-
"documentation":"<p>A String data type.</p>"
92+
"documentation":"<p>An attribute of type String. For example:</p> <p> <code>\"S\": \"Hello\"</code> </p>"
9393
},
9494
"N":{
9595
"shape":"NumberAttributeValue",
96-
"documentation":"<p>A Number data type.</p>"
96+
"documentation":"<p>An attribute of type Number. For example:</p> <p> <code>\"N\": \"123.45\"</code> </p> <p>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.</p>"
9797
},
9898
"B":{
9999
"shape":"BinaryAttributeValue",
100-
"documentation":"<p>A Binary data type.</p>"
100+
"documentation":"<p>An attribute of type Binary. For example:</p> <p> <code>\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"</code> </p>"
101101
},
102102
"SS":{
103103
"shape":"StringSetAttributeValue",
104-
"documentation":"<p>A String Set data type.</p>"
104+
"documentation":"<p>An attribute of type String Set. For example:</p> <p> <code>\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]</code> </p>"
105105
},
106106
"NS":{
107107
"shape":"NumberSetAttributeValue",
108-
"documentation":"<p>A Number Set data type.</p>"
108+
"documentation":"<p>An attribute of type Number Set. For example:</p> <p> <code>\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]</code> </p> <p>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.</p>"
109109
},
110110
"BS":{
111111
"shape":"BinarySetAttributeValue",
112-
"documentation":"<p>A Binary Set data type.</p>"
112+
"documentation":"<p>An attribute of type Binary Set. For example:</p> <p> <code>\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]</code> </p>"
113113
},
114114
"M":{
115115
"shape":"MapAttributeValue",
116-
"documentation":"<p>A Map data type.</p>"
116+
"documentation":"<p>An attribute of type Map. For example:</p> <p> <code>\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}</code> </p>"
117117
},
118118
"L":{
119119
"shape":"ListAttributeValue",
120-
"documentation":"<p>A List data type.</p>"
120+
"documentation":"<p>An attribute of type List. For example:</p> <p> <code>\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]</code> </p>"
121121
},
122122
"NULL":{
123123
"shape":"NullAttributeValue",
124-
"documentation":"<p>A Null data type.</p>"
124+
"documentation":"<p>An attribute of type Null. For example:</p> <p> <code>\"NULL\": true</code> </p>"
125125
},
126126
"BOOL":{
127127
"shape":"BooleanAttributeValue",
128-
"documentation":"<p>A Boolean data type.</p>"
128+
"documentation":"<p>An attribute of type Boolean. For example:</p> <p> <code>\"BOOL\": true</code> </p>"
129129
}
130130
},
131-
"documentation":"<p>Represents the data for an attribute. You can set one, and only one, of the elements.</p> <p>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.</p>"
131+
"documentation":"<p>Represents the data for an attribute.</p> <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes\">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>"
132132
},
133133
"BinaryAttributeValue":{"type":"blob"},
134134
"BinarySetAttributeValue":{
@@ -294,10 +294,10 @@
294294
},
295295
"KeyType":{
296296
"shape":"KeyType",
297-
"documentation":"<p>The attribute data, consisting of the data type and the attribute value itself.</p>"
297+
"documentation":"<p>The role that this key attribute will assume:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. 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.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. 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.</p> </note>"
298298
}
299299
},
300-
"documentation":"<p>Represents <i>a single element</i> 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.</p> <p>A <code>KeySchemaElement</code> represents exactly one attribute of the primary key. For example, a simple primary key (partition key) would be represented by one <code>KeySchemaElement</code>. A composite primary key (partition key and sort key) would require one <code>KeySchemaElement</code> for the partition key, and another <code>KeySchemaElement</code> for the sort key.</p> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. 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.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. 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.</p> </note>"
300+
"documentation":"<p>Represents <i>a single element</i> 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.</p> <p>A <code>KeySchemaElement</code> represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one <code>KeySchemaElement</code> (for the partition key). A composite primary key would require one <code>KeySchemaElement</code> for the partition key, and another <code>KeySchemaElement</code> for the sort key.</p> <p>A <code>KeySchemaElement</code> 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.</p>"
301301
},
302302
"KeyType":{
303303
"type":"string",
@@ -314,7 +314,7 @@
314314
"documentation":"<p>Too many operations for a given subscriber.</p>"
315315
}
316316
},
317-
"documentation":"<p>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 <a href=\"http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#APIRetries\">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>",
317+
"documentation":"<p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>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.</p> <p>There is a soft account limit of 256 tables.</p>",
318318
"exception":true
319319
},
320320
"ListAttributeValue":{
@@ -426,7 +426,7 @@
426426
"documentation":"<p>The resource which is being requested does not exist.</p>"
427427
}
428428
},
429-
"documentation":"<p>The operation tried to access a nonexistent stream.</p>",
429+
"documentation":"<p>The operation tried to access a nonexistent table, index or stream. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>",
430430
"exception":true
431431
},
432432
"SequenceNumber":{

0 commit comments

Comments
 (0)