Skip to content

Commit f38e0ac

Browse files
authoredDec 1, 2021
fix(dynamodb): add missing DynamoDB operations to enum (#17738)
While trying to modernize some of my application's hand-rolled alarms, I discovered that the Operations enum doesn't include all of the operation names listed under "Dimensions for DynamoDB Metrics" in https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html This PR adds this missing operation names to the enum. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0ae435d commit f38e0ac

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
 

‎packages/@aws-cdk/aws-dynamodb/lib/table.ts

+15
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,21 @@ export enum Operation {
7272
/** BatchWriteItem */
7373
BATCH_WRITE_ITEM = 'BatchWriteItem',
7474

75+
/** TransactWriteItems */
76+
TRANSACT_WRITE_ITEMS = 'TransactWriteItems',
77+
78+
/** TransactGetItems */
79+
TRANSACT_GET_ITEMS = 'TransactGetItems',
80+
81+
/** ExecuteTransaction */
82+
EXECUTE_TRANSACTION = 'ExecuteTransaction',
83+
84+
/** BatchExecuteStatement */
85+
BATCH_EXECUTE_STATEMENT = 'BatchExecuteStatement',
86+
87+
/** ExecuteStatement */
88+
EXECUTE_STATEMENT = 'ExecuteStatement',
89+
7590
}
7691

7792
/**

‎packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,11 @@ describe('metrics', () => {
16001600
'deleteitem',
16011601
'updateitem',
16021602
'batchwriteitem',
1603+
'transactwriteitems',
1604+
'transactgetitems',
1605+
'executetransaction',
1606+
'batchexecutestatement',
1607+
'executestatement',
16031608
]);
16041609

16051610
});

0 commit comments

Comments
 (0)
Please sign in to comment.