Skip to content

Commit 16e6f8b

Browse files
author
Lucas McDonald
committed
m
1 parent f47d953 commit 16e6f8b

File tree

1 file changed

+33
-32
lines changed
  • DynamoDbEncryption/runtimes/python/src/aws_dbesdk_dynamodb/encrypted

1 file changed

+33
-32
lines changed

DynamoDbEncryption/runtimes/python/src/aws_dbesdk_dynamodb/encrypted/client.py

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ def put_item(self, **kwargs) -> dict[str, Any]:
101101
"""
102102
Put a single item to a table. Encrypts the item before writing to DynamoDB.
103103
104-
The input and output dicts' keys match the input and output dicts' keys for the boto3 DynamoDB `put_item` API:
104+
The input and output syntaxes match those for the boto3 DynamoDB ``put_item`` API:
105105
106106
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/put_item.html
107107
108108
Args:
109-
**kwargs: Keyword arguments to pass to the operation. These match the boto3 `put_item` API parameters' argument names.
110-
The "Item" argument will be encrypted locally before being written to DynamoDB.
109+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 ``put_item`` request syntax.
110+
The value in ``"Item"`` will be encrypted locally before being written to DynamoDB.
111111
112112
Returns:
113-
dict: The response from DynamoDB. This matches the boto3 `put_item` API response shape.
113+
dict: The response from DynamoDB. This matches the boto3 ``put_item`` response syntax.
114114
115115
"""
116116
return self._client_operation_logic(
@@ -130,16 +130,16 @@ def get_item(self, **kwargs) -> dict[str, Any]:
130130
"""
131131
Get a single item from a table. Decrypts the item after reading from DynamoDB.
132132
133-
The parameters and return value match the boto3 DynamoDB get_item API:
133+
The input and output syntaxes match those for the boto3 DynamoDB ``get_item`` API:
134134
135135
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/get_item.html
136136
137137
Args:
138-
**kwargs: Keyword arguments to pass to the operation. These match the boto3 get_item API parameters.
138+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 ``get_item`` request syntax.
139139
140140
Returns:
141-
dict: The response from DynamoDB. This matches the boto3 get_item API response.
142-
The "Item" field will be decrypted locally after being read from DynamoDB.
141+
dict: The response from DynamoDB. This matches the boto3 ``get_item`` response syntax.
142+
The value in ``"Item"`` field be decrypted locally after being read from DynamoDB.
143143
144144
"""
145145
return self._client_operation_logic(
@@ -188,16 +188,16 @@ def scan(self, **kwargs) -> dict[str, Any]:
188188
"""
189189
Scan an entire table or index. Decrypts any returned items.
190190
191-
The parameters and return value match the boto3 DynamoDB scan API:
191+
The input and output syntaxes match those for the boto3 DynamoDB ``scan`` API:
192192
193193
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/scan.html
194194
195195
Args:
196-
**kwargs: Keyword arguments to pass to the operation. These match the boto3 scan API parameters.
196+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 ``scan`` request syntax.
197197
198198
Returns:
199-
dict: The response from DynamoDB. This matches the boto3 scan API response.
200-
The "Items" field will be decrypted locally after being read from DynamoDB.
199+
dict: The response from DynamoDB. This matches the boto3 ``scan`` response syntax.
200+
The values in ``"Items"`` will be decrypted locally after being read from DynamoDB.
201201
202202
"""
203203
return self._client_operation_logic(
@@ -219,17 +219,17 @@ def batch_write_item(self, **kwargs) -> dict[str, Any]:
219219
220220
For put operations, encrypts items before writing.
221221
222-
The parameters and return value match the boto3 DynamoDB batch_write_item API:
222+
The input and output syntaxes match those for the boto3 DynamoDB ``batch_write_item`` API:
223223
224224
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/batch_write_item.html
225225
226226
Args:
227-
**kwargs: Keyword arguments to pass to the operation. These match the boto3 batch_write_item API parameters.
228-
Any put operations in the "RequestItems" argument will be encrypted locally
229-
before being written to DynamoDB.
227+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 ``batch_write_item``
228+
request syntax. Any ``"PutRequest"`` values in the ``"RequestItems"`` argument will be encrypted
229+
locally before being written to DynamoDB.
230230
231231
Returns:
232-
dict: The response from DynamoDB. This matches the boto3 batch_write_item API response.
232+
dict: The response from DynamoDB. This matches the boto3 ``batch_write_item`` response syntax.
233233
234234
"""
235235
return self._client_operation_logic(
@@ -249,16 +249,17 @@ def batch_get_item(self, **kwargs) -> dict[str, Any]:
249249
"""
250250
Get multiple items from one or more tables. Decrypts any returned items.
251251
252-
The parameters and return value match the boto3 DynamoDB batch_get_item API:
252+
The input and output syntaxes match those for the boto3 DynamoDB ``batch_get_item`` API:
253253
254254
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/batch_get_item.html
255255
256256
Args:
257-
**kwargs: Keyword arguments to pass to the operation. These match the boto3 batch_get_item API parameters.
257+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 ``batch_get_item``
258+
request syntax.
258259
259260
Returns:
260-
dict: The response from DynamoDB. This matches the boto3 batch_get_item API response.
261-
The "Responses" field will be decrypted locally after being read from DynamoDB.
261+
dict: The response from DynamoDB. This matches the boto3 ``batch_get_item`` response syntax.
262+
The values in ``"Responses"`` will be decrypted locally after being read from DynamoDB.
262263
263264
"""
264265
return self._client_operation_logic(
@@ -278,16 +279,16 @@ def transact_get_items(self, **kwargs) -> dict[str, Any]:
278279
"""
279280
Get multiple items in a single transaction. Decrypts any returned items.
280281
281-
The parameters and return value match the boto3 DynamoDB transact_get_items API:
282+
The input and output syntaxes match those for the boto3 DynamoDB ``transact_get_items`` API:
282283
283284
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/transact_get_items.html
284285
285286
Args:
286-
**kwargs: Keyword arguments to pass to the operation. These match the boto3 transact_get_items API
287-
parameters.
287+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 ``transact_get_items``
288+
request syntax.
288289
289290
Returns:
290-
dict: The response from DynamoDB. This matches the boto3 transact_get_items API response.
291+
dict: The response from DynamoDB. This matches the boto3 ``transact_get_items`` response syntax.
291292
292293
"""
293294
return self._client_operation_logic(
@@ -309,17 +310,17 @@ def transact_write_items(self, **kwargs) -> dict[str, Any]:
309310
310311
For put operations, encrypts items before writing.
311312
312-
The parameters and return value match the boto3 DynamoDB transact_write_items API:
313+
The input and output syntaxes match those for the boto3 DynamoDB ``transact_write_items`` API:
313314
314315
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/transact_write_items.html
315316
316317
Args:
317-
**kwargs: Keyword arguments to pass to the operation. These match the boto3 transact_write_items API
318-
parameters. Any put operations in the "TransactItems" argument will be encrypted locally
319-
before being written to DynamoDB.
318+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 ``transact_write_items``
319+
request syntax. Any ``"PutRequest"`` values in the ``"TransactItems"`` argument will be encrypted
320+
locally before being written to DynamoDB.
320321
321322
Returns:
322-
dict: The response from DynamoDB. This matches the boto3 transact_write_items API response.
323+
dict: The response from DynamoDB. This matches the boto3 ``transact_write_items`` response syntax.
323324
324325
"""
325326
return self._client_operation_logic(
@@ -361,8 +362,8 @@ def get_paginator(self, operation_name: str) -> EncryptedPaginator | botocore.cl
361362
operation_name (str): Name of operation for which to get paginator
362363
363364
Returns:
364-
EncryptedPaginator | botocore.client.Paginator: A paginator that will transparently decrypt items
365-
for scan/query operations, or the standard paginator for other operations.
365+
EncryptedPaginator | botocore.client.Paginator: An EncryptedPaginator that will transparently decrypt items
366+
for ``scan``/``query`` operations; for other operations, the standard paginator.
366367
367368
"""
368369
paginator = self._client.get_paginator(operation_name)

0 commit comments

Comments
 (0)