DynamoDBClient#
Auto-generated documentation for DynamoDB type annotations stubs module mypy-boto3-dynamodb.
DynamoDBClient#
Type annotations and code completion for boto3.client("dynamodb")
.
boto3 documentation
# DynamoDBClient usage example
from boto3.session import Session
from mypy_boto3_dynamodb.client import DynamoDBClient
def get_dynamodb_client() -> DynamoDBClient:
return Session().client("dynamodb")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("dynamodb").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("dynamodb")
try:
do_something(client)
except (
client.exceptions.BackupInUseException,
client.exceptions.BackupNotFoundException,
client.exceptions.ClientError,
client.exceptions.ConditionalCheckFailedException,
client.exceptions.ContinuousBackupsUnavailableException,
client.exceptions.DuplicateItemException,
client.exceptions.ExportConflictException,
client.exceptions.ExportNotFoundException,
client.exceptions.GlobalTableAlreadyExistsException,
client.exceptions.GlobalTableNotFoundException,
client.exceptions.IdempotentParameterMismatchException,
client.exceptions.ImportConflictException,
client.exceptions.ImportNotFoundException,
client.exceptions.IndexNotFoundException,
client.exceptions.InternalServerError,
client.exceptions.InvalidExportTimeException,
client.exceptions.InvalidRestoreTimeException,
client.exceptions.ItemCollectionSizeLimitExceededException,
client.exceptions.LimitExceededException,
client.exceptions.PointInTimeRecoveryUnavailableException,
client.exceptions.PolicyNotFoundException,
client.exceptions.ProvisionedThroughputExceededException,
client.exceptions.ReplicaAlreadyExistsException,
client.exceptions.ReplicaNotFoundException,
client.exceptions.RequestLimitExceeded,
client.exceptions.ResourceInUseException,
client.exceptions.ResourceNotFoundException,
client.exceptions.TableAlreadyExistsException,
client.exceptions.TableInUseException,
client.exceptions.TableNotFoundException,
client.exceptions.TransactionCanceledException,
client.exceptions.TransactionConflictException,
client.exceptions.TransactionInProgressException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_dynamodb.client import Exceptions
def handle_error(exc: Exceptions.BackupInUseException) -> None:
...
Methods#
batch_execute_statement#
This operation allows you to perform batch reads or writes on data stored in DynamoDB, using PartiQL.
Type annotations and code completion for boto3.client("dynamodb").batch_execute_statement
method.
boto3 documentation
# batch_execute_statement method definition
def batch_execute_statement(
self,
*,
Statements: Sequence[BatchStatementRequestTypeDef], # (1)
ReturnConsumedCapacity: ReturnConsumedCapacityType = ..., # (2)
) -> BatchExecuteStatementOutputTypeDef: # (3)
...
- See BatchStatementRequestTypeDef
- See ReturnConsumedCapacityType
- See BatchExecuteStatementOutputTypeDef
# batch_execute_statement method usage example with argument unpacking
kwargs: BatchExecuteStatementInputRequestTypeDef = { # (1)
"Statements": ...,
}
parent.batch_execute_statement(**kwargs)
batch_get_item#
The BatchGetItem
operation returns the attributes of one or more items from
one or more
tables.
Type annotations and code completion for boto3.client("dynamodb").batch_get_item
method.
boto3 documentation
# batch_get_item method definition
def batch_get_item(
self,
*,
RequestItems: Mapping[str, Union[KeysAndAttributesTypeDef, KeysAndAttributesOutputTypeDef]], # (1)
ReturnConsumedCapacity: ReturnConsumedCapacityType = ..., # (2)
) -> BatchGetItemOutputTypeDef: # (3)
...
- See KeysAndAttributesTypeDef KeysAndAttributesOutputTypeDef
- See ReturnConsumedCapacityType
- See BatchGetItemOutputTypeDef
# batch_get_item method usage example with argument unpacking
kwargs: BatchGetItemInputRequestTypeDef = { # (1)
"RequestItems": ...,
}
parent.batch_get_item(**kwargs)
batch_write_item#
The BatchWriteItem
operation puts or deletes multiple items in one or more
tables.
Type annotations and code completion for boto3.client("dynamodb").batch_write_item
method.
boto3 documentation
# batch_write_item method definition
def batch_write_item(
self,
*,
RequestItems: Mapping[str, Sequence[Union[WriteRequestTypeDef, WriteRequestOutputTypeDef]]], # (1)
ReturnConsumedCapacity: ReturnConsumedCapacityType = ..., # (2)
ReturnItemCollectionMetrics: ReturnItemCollectionMetricsType = ..., # (3)
) -> BatchWriteItemOutputTypeDef: # (4)
...
- See WriteRequestTypeDef WriteRequestOutputTypeDef
- See ReturnConsumedCapacityType
- See ReturnItemCollectionMetricsType
- See BatchWriteItemOutputTypeDef
# batch_write_item method usage example with argument unpacking
kwargs: BatchWriteItemInputRequestTypeDef = { # (1)
"RequestItems": ...,
}
parent.batch_write_item(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("dynamodb").can_paginate
method.
boto3 documentation