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),

0 commit comments

Comments
 (0)