Skip to content

SimpleDBClient#

Index > SimpleDB > 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

# SimpleDBClient usage example

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.

# Exceptions.exceptions usage example

client = boto3.client("sdb")

try:
    do_something(client)
except (
    client.exceptions.AttributeDoesNotExist,
    client.exceptions.ClientError,
    client.exceptions.DuplicateItemName,
    client.exceptions.InvalidNextToken,
    client.exceptions.InvalidNumberPredicates,
    client.exceptions.InvalidNumberValueTests,
    client.exceptions.InvalidParameterValue,
    client.exceptions.InvalidQueryExpression,
    client.exceptions.MissingParameter,
    client.exceptions.NoSuchDomain,
    client.exceptions.NumberDomainAttributesExceeded,
    client.exceptions.NumberDomainBytesExceeded,
    client.exceptions.NumberDomainsExceeded,
    client.exceptions.NumberItemAttributesExceeded,
    client.exceptions.NumberSubmittedAttributesExceeded,
    client.exceptions.NumberSubmittedItemsExceeded,
    client.exceptions.RequestTimeout,
    client.exceptions.TooManyRequestedAttributes,
) as e:
    print(e)
# Exceptions.exceptions type checking example

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

# batch_delete_attributes method definition

def batch_delete_attributes(
    self,
    *,
    DomainName: str,
    Items: Sequence[DeletableItemTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See DeletableItemTypeDef
  2. See EmptyResponseMetadataTypeDef
# batch_delete_attributes method usage example with argument unpacking

kwargs: BatchDeleteAttributesRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
    "Items": ...,
}

parent.batch_delete_attributes(**kwargs)
  1. See BatchDeleteAttributesRequestRequestTypeDef

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

# batch_put_attributes method definition

def batch_put_attributes(
    self,
    *,
    DomainName: str,
    Items: Sequence[ReplaceableItemTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See ReplaceableItemTypeDef
  2. See EmptyResponseMetadataTypeDef
# batch_put_attributes method usage example with argument unpacking

kwargs: BatchPutAttributesRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
    "Items": ...,
}

parent.batch_put_attributes(**kwargs)
  1. See BatchPutAttributesRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("sdb").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("sdb").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_domain#

The CreateDomain operation creates a new domain.

Type annotations and code completion for boto3.client("sdb").create_domain method. boto3 documentation

# create_domain method definition

def create_domain(
    self,
    *,
    DomainName: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# create_domain method usage example with argument unpacking

kwargs: CreateDomainRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
}

parent.create_domain(**kwargs)
  1. See CreateDomainRequestRequestTypeDef

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

# delete_attributes method definition

def delete_attributes(
    self,
    *,
    DomainName: str,
    ItemName: str,
    Attributes: Sequence[AttributeTypeDef] = ...,  # (1)
    Expected: UpdateConditionTypeDef = ...,  # (2)
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See AttributeTypeDef
  2. See UpdateConditionTypeDef
  3. See EmptyResponseMetadataTypeDef
# delete_attributes method usage example with argument unpacking

kwargs: DeleteAttributesRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
    "ItemName": ...,
}

parent.delete_attributes(**kwargs)
  1. See DeleteAttributesRequestRequestTypeDef

delete_domain#

The DeleteDomain operation deletes a domain.

Type annotations and code completion for boto3.client("sdb").delete_domain method. boto3 documentation

# delete_domain method definition

def delete_domain(
    self,
    *,
    DomainName: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_domain method usage example with argument unpacking

kwargs: DeleteDomainRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
}

parent.delete_domain(**kwargs)
  1. See DeleteDomainRequestRequestTypeDef

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

# domain_metadata method definition

def domain_metadata(
    self,
    *,
    DomainName: str,
) -> DomainMetadataResultTypeDef:  # (1)
    ...
  1. See DomainMetadataResultTypeDef
# domain_metadata method usage example with argument unpacking

kwargs: DomainMetadataRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
}

parent.domain_metadata(**kwargs)
  1. See DomainMetadataRequestRequestTypeDef

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

# generate_presigned_url method definition

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

# get_attributes method definition

def get_attributes(
    self,
    *,
    DomainName: str,
    ItemName: str,
    AttributeNames: Sequence[str] = ...,
    ConsistentRead: bool = ...,
) -> GetAttributesResultTypeDef:  # (1)
    ...
  1. See GetAttributesResultTypeDef
# get_attributes method usage example with argument unpacking

kwargs: GetAttributesRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
    "ItemName": ...,
}

parent.get_attributes(**kwargs)
  1. See GetAttributesRequestRequestTypeDef

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

# list_domains method definition

def list_domains(
    self,
    *,
    MaxNumberOfDomains: int = ...,
    NextToken: str = ...,
) -> ListDomainsResultTypeDef:  # (1)
    ...
  1. See ListDomainsResultTypeDef
# list_domains method usage example with argument unpacking

kwargs: ListDomainsRequestRequestTypeDef = {  # (1)
    "MaxNumberOfDomains": ...,
}

parent.list_domains(**kwargs)
  1. See ListDomainsRequestRequestTypeDef

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

# put_attributes method definition

def put_attributes(
    self,
    *,
    DomainName: str,
    ItemName: str,
    Attributes: Sequence[ReplaceableAttributeTypeDef],  # (1)
    Expected: UpdateConditionTypeDef = ...,  # (2)
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...
  1. See ReplaceableAttributeTypeDef
  2. See UpdateConditionTypeDef
  3. See EmptyResponseMetadataTypeDef
# put_attributes method usage example with argument unpacking

kwargs: PutAttributesRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
    "ItemName": ...,
    "Attributes": ...,
}

parent.put_attributes(**kwargs)
  1. See PutAttributesRequestRequestTypeDef

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

# select method definition

def select(
    self,
    *,
    SelectExpression: str,
    NextToken: str = ...,
    ConsistentRead: bool = ...,
) -> SelectResultTypeDef:  # (1)
    ...
  1. See SelectResultTypeDef
# select method usage example with argument unpacking

kwargs: SelectRequestRequestTypeDef = {  # (1)
    "SelectExpression": ...,
}

parent.select(**kwargs)
  1. See SelectRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("sdb").get_paginator method with overloads.