SimpleDBClient
Auto-generated documentation for SimpleDB type annotations stubs module mypy-boto3-sdb.
SimpleDBClient
Type annotations and code completion for boto3.client("sdb")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_sdb.client import SimpleDBClient
def get_sdb_client() -> SimpleDBClient:
return Session().client("sdb")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("sdb").exceptions
structure.
client = boto3.client("sdb")
try:
do_something(client)
except (
client.AttributeDoesNotExist,
client.ClientError,
client.DuplicateItemName,
client.InvalidNextToken,
client.InvalidNumberPredicates,
client.InvalidNumberValueTests,
client.InvalidParameterValue,
client.InvalidQueryExpression,
client.MissingParameter,
client.NoSuchDomain,
client.NumberDomainAttributesExceeded,
client.NumberDomainBytesExceeded,
client.NumberDomainsExceeded,
client.NumberItemAttributesExceeded,
client.NumberSubmittedAttributesExceeded,
client.NumberSubmittedItemsExceeded,
client.RequestTimeout,
client.TooManyRequestedAttributes,
) as e:
print(e)
from mypy_boto3_sdb.client import Exceptions
def handle_error(exc: Exceptions.AttributeDoesNotExist) -> None:
...
Methods
batch_delete_attributes
Performs multiple DeleteAttributes operations in a single call, which reduces round trips and latencies.
Type annotations and code completion for boto3.client("sdb").batch_delete_attributes
method.
boto3 documentation
def batch_delete_attributes(
self,
*,
DomainName: str,
Items: Sequence[DeletableItemTypeDef], # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
kwargs: BatchDeleteAttributesRequestRequestTypeDef = { # (1)
"DomainName": ...,
"Items": ...,
}
parent.batch_delete_attributes(**kwargs)
batch_put_attributes
The BatchPutAttributes
operation creates or replaces attributes within one or
more items.
Type annotations and code completion for boto3.client("sdb").batch_put_attributes
method.
boto3 documentation
def batch_put_attributes(
self,
*,
DomainName: str,
Items: Sequence[ReplaceableItemTypeDef], # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
kwargs: BatchPutAttributesRequestRequestTypeDef = { # (1)
"DomainName": ...,
"Items": ...,
}
parent.batch_put_attributes(**kwargs)
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("sdb").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("sdb").close
method.
boto3 documentation
create_domain
The CreateDomain
operation creates a new domain.
Type annotations and code completion for boto3.client("sdb").create_domain
method.
boto3 documentation
def create_domain(
self,
*,
DomainName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: CreateDomainRequestRequestTypeDef = { # (1)
"DomainName": ...,
}
parent.create_domain(**kwargs)
delete_attributes
Deletes one or more attributes associated with an item.
Type annotations and code completion for boto3.client("sdb").delete_attributes
method.
boto3 documentation
def delete_attributes(
self,
*,
DomainName: str,
ItemName: str,
Attributes: Sequence[AttributeTypeDef] = ..., # (1)
Expected: UpdateConditionTypeDef = ..., # (2)
) -> EmptyResponseMetadataTypeDef: # (3)
...
kwargs: DeleteAttributesRequestRequestTypeDef = { # (1)
"DomainName": ...,
"ItemName": ...,
}
parent.delete_attributes(**kwargs)
delete_domain
The DeleteDomain
operation deletes a domain.
Type annotations and code completion for boto3.client("sdb").delete_domain
method.
boto3 documentation
def delete_domain(
self,
*,
DomainName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteDomainRequestRequestTypeDef = { # (1)
"DomainName": ...,
}
parent.delete_domain(**kwargs)
domain_metadata
Returns information about the domain, including when the domain was created, the number of items and attributes in the domain, and the size of the attribute names and values.
Type annotations and code completion for boto3.client("sdb").domain_metadata
method.
boto3 documentation
def domain_metadata(
self,
*,
DomainName: str,
) -> DomainMetadataResultTypeDef: # (1)
...
kwargs: DomainMetadataRequestRequestTypeDef = { # (1)
"DomainName": ...,
}
parent.domain_metadata(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("sdb").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_attributes
Returns all of the attributes associated with the specified item.
Type annotations and code completion for boto3.client("sdb").get_attributes
method.
boto3 documentation
def get_attributes(
self,
*,
DomainName: str,
ItemName: str,
AttributeNames: Sequence[str] = ...,
ConsistentRead: bool = ...,
) -> GetAttributesResultTypeDef: # (1)
...
kwargs: GetAttributesRequestRequestTypeDef = { # (1)
"DomainName": ...,
"ItemName": ...,
}
parent.get_attributes(**kwargs)
list_domains
The ListDomains
operation lists all domains associated with the Access Key ID.
Type annotations and code completion for boto3.client("sdb").list_domains
method.
boto3 documentation
def list_domains(
self,
*,
MaxNumberOfDomains: int = ...,
NextToken: str = ...,
) -> ListDomainsResultTypeDef: # (1)
...
kwargs: ListDomainsRequestRequestTypeDef = { # (1)
"MaxNumberOfDomains": ...,
}
parent.list_domains(**kwargs)
put_attributes
The PutAttributes operation creates or replaces attributes in an item.
Type annotations and code completion for boto3.client("sdb").put_attributes
method.
boto3 documentation
def put_attributes(
self,
*,
DomainName: str,
ItemName: str,
Attributes: Sequence[ReplaceableAttributeTypeDef], # (1)
Expected: UpdateConditionTypeDef = ..., # (2)
) -> EmptyResponseMetadataTypeDef: # (3)
...
kwargs: PutAttributesRequestRequestTypeDef = { # (1)
"DomainName": ...,
"ItemName": ...,
"Attributes": ...,
}
parent.put_attributes(**kwargs)
select
The Select
operation returns a set of attributes for ItemNames
that match
the select expression.
Type annotations and code completion for boto3.client("sdb").select
method.
boto3 documentation
def select(
self,
*,
SelectExpression: str,
NextToken: str = ...,
ConsistentRead: bool = ...,
) -> SelectResultTypeDef: # (1)
...
kwargs: SelectRequestRequestTypeDef = { # (1)
"SelectExpression": ...,
}
parent.select(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("sdb").get_paginator
method with overloads.
client.get_paginator("list_domains")
-> ListDomainsPaginatorclient.get_paginator("select")
-> SelectPaginator