aws_dbesdk_dynamodb.encrypted.paginator
High-level helper class to provide an encrypting wrapper for boto3 DynamoDB paginators.
Classes
|
Wrapping class for boto3 Paginators that decrypts returned items before returning them. |
- class aws_dbesdk_dynamodb.encrypted.paginator.EncryptedPaginator(*, paginator: Paginator, encryption_config: DynamoDbTablesEncryptionConfig, expect_standard_dictionaries: bool | None = False)
Bases:
EncryptedBotoInterfaceWrapping class for boto3 Paginators that decrypts returned items before returning them.
Create an EncryptedPaginator.
- Parameters:
paginator (Paginator) – A boto3 Paginator object for DynamoDB operations. This can be either a “query” or “scan” Paginator.
encryption_config (DynamoDbTablesEncryptionConfig) – Encryption configuration object.
expect_standard_dictionaries (Optional[bool]) – Does the underlying boto3 client expect items to be standard Python dictionaries? This should only be set to True if you are using a client obtained from a service resource or table resource (ex:
table.meta.client). If this is True, EncryptedClient will expect item-like shapes to be standard Python dictionaries (default: False).
- __init__(*, paginator: Paginator, encryption_config: DynamoDbTablesEncryptionConfig, expect_standard_dictionaries: bool | None = False)
Create an EncryptedPaginator.
- Parameters:
paginator (Paginator) – A boto3 Paginator object for DynamoDB operations. This can be either a “query” or “scan” Paginator.
encryption_config (DynamoDbTablesEncryptionConfig) – Encryption configuration object.
expect_standard_dictionaries (Optional[bool]) – Does the underlying boto3 client expect items to be standard Python dictionaries? This should only be set to True if you are using a client obtained from a service resource or table resource (ex:
table.meta.client). If this is True, EncryptedClient will expect item-like shapes to be standard Python dictionaries (default: False).
- paginate(**kwargs) Generator[dict, None, None]
Yield a generator that paginates through responses from DynamoDB, decrypting items.
Note
Calling
botocore.paginate.Paginator’spaginatemethod for Query or Scan returns aPageIteratorobject, but this implementation returns a Python generator. However, you can use this generator to iterate exactly as described in the boto3 documentation:https://botocore.amazonaws.com/v1/documentation/api/latest/topics/paginators.html
Any other operations on this class will defer to the underlying boto3 Paginator’s implementation.
- Parameters:
**kwargs –
Keyword arguments passed directly to the underlying DynamoDB paginator.
For a Scan operation, structure these arguments according to:
For a Query operation, structure these arguments according to:
- Returns:
A generator yielding pages as dictionaries. For “scan” or “query” operations, the items in the pages will be decrypted locally after being read from DynamoDB.
- Return type:
Generator[dict, None, None]