Skip to content

Commit d2c9f5d

Browse files
author
awstools
committed
feat(client-dynamodb): Generate account endpoints for DynamoDB requests using ARN-sourced account ID when available
1 parent 60c47be commit d2c9f5d

File tree

53 files changed

+8404
-992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8404
-992
lines changed

clients/client-dynamodb/src/commands/BatchGetItemCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,10 @@ export class BatchGetItemCommand extends $Command
346346
ServiceInputTypes,
347347
ServiceOutputTypes
348348
>()
349-
.ep(commonParams)
349+
.ep({
350+
...commonParams,
351+
ResourceArnList: { type: "operationContextParams", get: (input?: any) => Object.keys(input?.RequestItems ?? {}) },
352+
})
350353
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
351354
return [
352355
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,10 @@ export class BatchWriteItemCommand extends $Command
392392
ServiceInputTypes,
393393
ServiceOutputTypes
394394
>()
395-
.ep(commonParams)
395+
.ep({
396+
...commonParams,
397+
ResourceArnList: { type: "operationContextParams", get: (input?: any) => Object.keys(input?.RequestItems ?? {}) },
398+
})
396399
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
397400
return [
398401
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/CreateBackupCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ export class CreateBackupCommand extends $Command
139139
ServiceInputTypes,
140140
ServiceOutputTypes
141141
>()
142-
.ep(commonParams)
142+
.ep({
143+
...commonParams,
144+
ResourceArn: { type: "contextParams", name: "TableName" },
145+
})
143146
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
144147
return [
145148
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/CreateGlobalTableCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ export class CreateGlobalTableCommand extends $Command
198198
ServiceInputTypes,
199199
ServiceOutputTypes
200200
>()
201-
.ep(commonParams)
201+
.ep({
202+
...commonParams,
203+
ResourceArn: { type: "contextParams", name: "GlobalTableName" },
204+
})
202205
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
203206
return [
204207
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/CreateTableCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,10 @@ export class CreateTableCommand extends $Command
441441
ServiceInputTypes,
442442
ServiceOutputTypes
443443
>()
444-
.ep(commonParams)
444+
.ep({
445+
...commonParams,
446+
ResourceArn: { type: "contextParams", name: "TableName" },
447+
})
445448
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
446449
return [
447450
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DeleteBackupCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ export class DeleteBackupCommand extends $Command
186186
ServiceInputTypes,
187187
ServiceOutputTypes
188188
>()
189-
.ep(commonParams)
189+
.ep({
190+
...commonParams,
191+
ResourceArn: { type: "contextParams", name: "BackupArn" },
192+
})
190193
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
191194
return [
192195
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DeleteItemCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ export class DeleteItemCommand extends $Command
280280
ServiceInputTypes,
281281
ServiceOutputTypes
282282
>()
283-
.ep(commonParams)
283+
.ep({
284+
...commonParams,
285+
ResourceArn: { type: "contextParams", name: "TableName" },
286+
})
284287
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
285288
return [
286289
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DeleteResourcePolicyCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ export class DeleteResourcePolicyCommand extends $Command
131131
ServiceInputTypes,
132132
ServiceOutputTypes
133133
>()
134-
.ep(commonParams)
134+
.ep({
135+
...commonParams,
136+
ResourceArn: { type: "contextParams", name: "ResourceArn" },
137+
})
135138
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
136139
return [
137140
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DeleteTableCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,10 @@ export class DeleteTableCommand extends $Command
322322
ServiceInputTypes,
323323
ServiceOutputTypes
324324
>()
325-
.ep(commonParams)
325+
.ep({
326+
...commonParams,
327+
ResourceArn: { type: "contextParams", name: "TableName" },
328+
})
326329
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
327330
return [
328331
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeBackupCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ export class DescribeBackupCommand extends $Command
166166
ServiceInputTypes,
167167
ServiceOutputTypes
168168
>()
169-
.ep(commonParams)
169+
.ep({
170+
...commonParams,
171+
ResourceArn: { type: "contextParams", name: "BackupArn" },
172+
})
170173
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
171174
return [
172175
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeContinuousBackupsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ export class DescribeContinuousBackupsCommand extends $Command
9393
ServiceInputTypes,
9494
ServiceOutputTypes
9595
>()
96-
.ep(commonParams)
96+
.ep({
97+
...commonParams,
98+
ResourceArn: { type: "contextParams", name: "TableName" },
99+
})
97100
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
98101
return [
99102
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeContributorInsightsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ export class DescribeContributorInsightsCommand extends $Command
8484
ServiceInputTypes,
8585
ServiceOutputTypes
8686
>()
87-
.ep(commonParams)
87+
.ep({
88+
...commonParams,
89+
ResourceArn: { type: "contextParams", name: "TableName" },
90+
})
8891
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
8992
return [
9093
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeExportCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ export class DescribeExportCommand extends $Command
113113
ServiceInputTypes,
114114
ServiceOutputTypes
115115
>()
116-
.ep(commonParams)
116+
.ep({
117+
...commonParams,
118+
ResourceArn: { type: "contextParams", name: "ExportArn" },
119+
})
117120
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
118121
return [
119122
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeGlobalTableCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ export class DescribeGlobalTableCommand extends $Command
123123
ServiceInputTypes,
124124
ServiceOutputTypes
125125
>()
126-
.ep(commonParams)
126+
.ep({
127+
...commonParams,
128+
ResourceArn: { type: "contextParams", name: "GlobalTableName" },
129+
})
127130
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
128131
return [
129132
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeGlobalTableSettingsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ export class DescribeGlobalTableSettingsCommand extends $Command
169169
ServiceInputTypes,
170170
ServiceOutputTypes
171171
>()
172-
.ep(commonParams)
172+
.ep({
173+
...commonParams,
174+
ResourceArn: { type: "contextParams", name: "GlobalTableName" },
175+
})
173176
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
174177
return [
175178
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeImportCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ export class DescribeImportCommand extends $Command
158158
ServiceInputTypes,
159159
ServiceOutputTypes
160160
>()
161-
.ep(commonParams)
161+
.ep({
162+
...commonParams,
163+
ResourceArn: { type: "contextParams", name: "ImportArn" },
164+
})
162165
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
163166
return [
164167
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ export class DescribeKinesisStreamingDestinationCommand extends $Command
9090
ServiceInputTypes,
9191
ServiceOutputTypes
9292
>()
93-
.ep(commonParams)
93+
.ep({
94+
...commonParams,
95+
ResourceArn: { type: "contextParams", name: "TableName" },
96+
})
9497
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
9598
return [
9699
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeTableCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ export class DescribeTableCommand extends $Command
303303
ServiceInputTypes,
304304
ServiceOutputTypes
305305
>()
306-
.ep(commonParams)
306+
.ep({
307+
...commonParams,
308+
ResourceArn: { type: "contextParams", name: "TableName" },
309+
})
307310
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
308311
return [
309312
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeTableReplicaAutoScalingCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ export class DescribeTableReplicaAutoScalingCommand extends $Command
164164
ServiceInputTypes,
165165
ServiceOutputTypes
166166
>()
167-
.ep(commonParams)
167+
.ep({
168+
...commonParams,
169+
ResourceArn: { type: "contextParams", name: "TableName" },
170+
})
168171
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
169172
return [
170173
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DescribeTimeToLiveCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export class DescribeTimeToLiveCommand extends $Command
7777
ServiceInputTypes,
7878
ServiceOutputTypes
7979
>()
80-
.ep(commonParams)
80+
.ep({
81+
...commonParams,
82+
ResourceArn: { type: "contextParams", name: "TableName" },
83+
})
8184
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
8285
return [
8386
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ export class DisableKinesisStreamingDestinationCommand extends $Command
120120
ServiceInputTypes,
121121
ServiceOutputTypes
122122
>()
123-
.ep(commonParams)
123+
.ep({
124+
...commonParams,
125+
ResourceArn: { type: "contextParams", name: "TableName" },
126+
})
124127
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
125128
return [
126129
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ export class EnableKinesisStreamingDestinationCommand extends $Command
122122
ServiceInputTypes,
123123
ServiceOutputTypes
124124
>()
125-
.ep(commonParams)
125+
.ep({
126+
...commonParams,
127+
ResourceArn: { type: "contextParams", name: "TableName" },
128+
})
126129
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
127130
return [
128131
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/ExportTableToPointInTimeCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ export class ExportTableToPointInTimeCommand extends $Command
140140
ServiceInputTypes,
141141
ServiceOutputTypes
142142
>()
143-
.ep(commonParams)
143+
.ep({
144+
...commonParams,
145+
ResourceArn: { type: "contextParams", name: "TableArn" },
146+
})
144147
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
145148
return [
146149
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/GetItemCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ export class GetItemCommand extends $Command
249249
ServiceInputTypes,
250250
ServiceOutputTypes
251251
>()
252-
.ep(commonParams)
252+
.ep({
253+
...commonParams,
254+
ResourceArn: { type: "contextParams", name: "TableName" },
255+
})
253256
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
254257
return [
255258
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/GetResourcePolicyCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ export class GetResourcePolicyCommand extends $Command
114114
ServiceInputTypes,
115115
ServiceOutputTypes
116116
>()
117-
.ep(commonParams)
117+
.ep({
118+
...commonParams,
119+
ResourceArn: { type: "contextParams", name: "ResourceArn" },
120+
})
118121
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
119122
return [
120123
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/ImportTableCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ export class ImportTableCommand extends $Command
264264
ServiceInputTypes,
265265
ServiceOutputTypes
266266
>()
267-
.ep(commonParams)
267+
.ep({
268+
...commonParams,
269+
ResourceArn: { type: "operationContextParams", get: (input?: any) => input?.TableCreationParameters?.TableName },
270+
})
268271
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
269272
return [
270273
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/ListBackupsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ export class ListBackupsCommand extends $Command
100100
ServiceInputTypes,
101101
ServiceOutputTypes
102102
>()
103-
.ep(commonParams)
103+
.ep({
104+
...commonParams,
105+
ResourceArn: { type: "contextParams", name: "TableName" },
106+
})
104107
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
105108
return [
106109
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/ListContributorInsightsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ export class ListContributorInsightsCommand extends $Command
8282
ServiceInputTypes,
8383
ServiceOutputTypes
8484
>()
85-
.ep(commonParams)
85+
.ep({
86+
...commonParams,
87+
ResourceArn: { type: "contextParams", name: "TableName" },
88+
})
8689
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
8790
return [
8891
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/ListExportsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ export class ListExportsCommand extends $Command
9393
ServiceInputTypes,
9494
ServiceOutputTypes
9595
>()
96-
.ep(commonParams)
96+
.ep({
97+
...commonParams,
98+
ResourceArn: { type: "contextParams", name: "TableArn" },
99+
})
97100
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
98101
return [
99102
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/ListImportsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ export class ListImportsCommand extends $Command
9999
ServiceInputTypes,
100100
ServiceOutputTypes
101101
>()
102-
.ep(commonParams)
102+
.ep({
103+
...commonParams,
104+
ResourceArn: { type: "contextParams", name: "TableArn" },
105+
})
103106
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
104107
return [
105108
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/ListTagsOfResourceCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ export class ListTagsOfResourceCommand extends $Command
8484
ServiceInputTypes,
8585
ServiceOutputTypes
8686
>()
87-
.ep(commonParams)
87+
.ep({
88+
...commonParams,
89+
ResourceArn: { type: "contextParams", name: "ResourceArn" },
90+
})
8891
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
8992
return [
9093
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/PutItemCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@ export class PutItemCommand extends $Command
294294
ServiceInputTypes,
295295
ServiceOutputTypes
296296
>()
297-
.ep(commonParams)
297+
.ep({
298+
...commonParams,
299+
ResourceArn: { type: "contextParams", name: "TableName" },
300+
})
298301
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
299302
return [
300303
getSerdePlugin(config, this.serialize, this.deserialize),

clients/client-dynamodb/src/commands/PutResourcePolicyCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ export class PutResourcePolicyCommand extends $Command
133133
ServiceInputTypes,
134134
ServiceOutputTypes
135135
>()
136-
.ep(commonParams)
136+
.ep({
137+
...commonParams,
138+
ResourceArn: { type: "contextParams", name: "ResourceArn" },
139+
})
137140
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
138141
return [
139142
getSerdePlugin(config, this.serialize, this.deserialize),

0 commit comments

Comments
 (0)