Skip to content

KeyspacesClient#

Index > Keyspaces > KeyspacesClient

Auto-generated documentation for Keyspaces type annotations stubs module mypy-boto3-keyspaces.

KeyspacesClient#

Type annotations and code completion for boto3.client("keyspaces"). boto3 documentation

# KeyspacesClient usage example

from boto3.session import Session
from mypy_boto3_keyspaces.client import KeyspacesClient

def get_keyspaces_client() -> KeyspacesClient:
    return Session().client("keyspaces")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("keyspaces").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("keyspaces")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_keyspaces.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("keyspaces").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("keyspaces").close method. boto3 documentation

# close method definition

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

create_keyspace#

The CreateKeyspace operation adds a new keyspace to your account.

Type annotations and code completion for boto3.client("keyspaces").create_keyspace method. boto3 documentation

# create_keyspace method definition

def create_keyspace(
    self,
    *,
    keyspaceName: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    replicationSpecification: ReplicationSpecificationTypeDef = ...,  # (2)
) -> CreateKeyspaceResponseTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See ReplicationSpecificationTypeDef
  3. See CreateKeyspaceResponseTypeDef
# create_keyspace method usage example with argument unpacking

kwargs: CreateKeyspaceRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
}

parent.create_keyspace(**kwargs)
  1. See CreateKeyspaceRequestRequestTypeDef

create_table#

The CreateTable operation adds a new table to the specified keyspace.

Type annotations and code completion for boto3.client("keyspaces").create_table method. boto3 documentation

# create_table method definition

def create_table(
    self,
    *,
    keyspaceName: str,
    tableName: str,
    schemaDefinition: SchemaDefinitionTypeDef,  # (1)
    comment: CommentTypeDef = ...,  # (2)
    capacitySpecification: CapacitySpecificationTypeDef = ...,  # (3)
    encryptionSpecification: EncryptionSpecificationTypeDef = ...,  # (4)
    pointInTimeRecovery: PointInTimeRecoveryTypeDef = ...,  # (5)
    ttl: TimeToLiveTypeDef = ...,  # (6)
    defaultTimeToLive: int = ...,
    tags: Sequence[TagTypeDef] = ...,  # (7)
    clientSideTimestamps: ClientSideTimestampsTypeDef = ...,  # (8)
    autoScalingSpecification: AutoScalingSpecificationTypeDef = ...,  # (9)
    replicaSpecifications: Sequence[ReplicaSpecificationTypeDef] = ...,  # (10)
) -> CreateTableResponseTypeDef:  # (11)
    ...
  1. See SchemaDefinitionTypeDef
  2. See CommentTypeDef
  3. See CapacitySpecificationTypeDef
  4. See EncryptionSpecificationTypeDef
  5. See PointInTimeRecoveryTypeDef
  6. See TimeToLiveTypeDef
  7. See TagTypeDef
  8. See ClientSideTimestampsTypeDef
  9. See AutoScalingSpecificationTypeDef
  10. See ReplicaSpecificationTypeDef
  11. See CreateTableResponseTypeDef
# create_table method usage example with argument unpacking

kwargs: CreateTableRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
    "tableName": ...,
    "schemaDefinition": ...,
}

parent.create_table(**kwargs)
  1. See CreateTableRequestRequestTypeDef

delete_keyspace#

The DeleteKeyspace operation deletes a keyspace and all of its tables.

Type annotations and code completion for boto3.client("keyspaces").delete_keyspace method. boto3 documentation

# delete_keyspace method definition

def delete_keyspace(
    self,
    *,
    keyspaceName: str,
) -> Dict[str, Any]:
    ...
# delete_keyspace method usage example with argument unpacking

kwargs: DeleteKeyspaceRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
}

parent.delete_keyspace(**kwargs)
  1. See DeleteKeyspaceRequestRequestTypeDef

delete_table#

The DeleteTable operation deletes a table and all of its data.

Type annotations and code completion for boto3.client("keyspaces").delete_table method. boto3 documentation

# delete_table method definition

def delete_table(
    self,
    *,
    keyspaceName: str,
    tableName: str,
) -> Dict[str, Any]:
    ...
# delete_table method usage example with argument unpacking

kwargs: DeleteTableRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
    "tableName": ...,
}

parent.delete_table(**kwargs)
  1. See DeleteTableRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("keyspaces").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_keyspace#

Returns the name and the Amazon Resource Name (ARN) of the specified table.

Type annotations and code completion for boto3.client("keyspaces").get_keyspace method. boto3 documentation

# get_keyspace method definition

def get_keyspace(
    self,
    *,
    keyspaceName: str,
) -> GetKeyspaceResponseTypeDef:  # (1)
    ...
  1. See GetKeyspaceResponseTypeDef
# get_keyspace method usage example with argument unpacking

kwargs: GetKeyspaceRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
}

parent.get_keyspace(**kwargs)
  1. See GetKeyspaceRequestRequestTypeDef

get_table#

Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.

Type annotations and code completion for boto3.client("keyspaces").get_table method. boto3 documentation

# get_table method definition

def get_table(
    self,
    *,
    keyspaceName: str,
    tableName: str,
) -> GetTableResponseTypeDef:  # (1)
    ...
  1. See GetTableResponseTypeDef
# get_table method usage example with argument unpacking

kwargs: GetTableRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
    "tableName": ...,
}

parent.get_table(**kwargs)
  1. See GetTableRequestRequestTypeDef

get_table_auto_scaling_settings#

Returns auto scaling related settings of the specified table in JSON format.

Type annotations and code completion for boto3.client("keyspaces").get_table_auto_scaling_settings method. boto3 documentation

# get_table_auto_scaling_settings method definition

def get_table_auto_scaling_settings(
    self,
    *,
    keyspaceName: str,
    tableName: str,
) -> GetTableAutoScalingSettingsResponseTypeDef:  # (1)
    ...
  1. See GetTableAutoScalingSettingsResponseTypeDef
# get_table_auto_scaling_settings method usage example with argument unpacking

kwargs: GetTableAutoScalingSettingsRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
    "tableName": ...,
}

parent.get_table_auto_scaling_settings(**kwargs)
  1. See GetTableAutoScalingSettingsRequestRequestTypeDef

list_keyspaces#

Returns a list of keyspaces.

Type annotations and code completion for boto3.client("keyspaces").list_keyspaces method. boto3 documentation

# list_keyspaces method definition

def list_keyspaces(
    self,
    *,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListKeyspacesResponseTypeDef:  # (1)
    ...
  1. See ListKeyspacesResponseTypeDef
# list_keyspaces method usage example with argument unpacking

kwargs: ListKeyspacesRequestRequestTypeDef = {  # (1)
    "nextToken": ...,
}

parent.list_keyspaces(**kwargs)
  1. See ListKeyspacesRequestRequestTypeDef

list_tables#

Returns a list of tables for a specified keyspace.

Type annotations and code completion for boto3.client("keyspaces").list_tables method. boto3 documentation

# list_tables method definition

def list_tables(
    self,
    *,
    keyspaceName: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListTablesResponseTypeDef:  # (1)
    ...
  1. See ListTablesResponseTypeDef
# list_tables method usage example with argument unpacking

kwargs: ListTablesRequestRequestTypeDef = {  # (1)
    "keyspaceName": ...,
}

parent.list_tables(**kwargs)
  1. See ListTablesRequestRequestTypeDef

list_tags_for_resource#

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

Type annotations and code completion for boto3.client("keyspaces").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

restore_table#

Restores the table to the specified point in time within the earliest_restorable_timestamp and the current time.

Type annotations and code completion for boto3.client("keyspaces").restore_table method. boto3 documentation

# restore_table method definition

def restore_table(
    self,
    *,
    sourceKeyspaceName: str,
    sourceTableName: str,
    targetKeyspaceName: str,
    targetTableName: str,
    restoreTimestamp: Union[datetime, str] = ...,
    capacitySpecificationOverride: CapacitySpecificationTypeDef = ...,  # (1)
    encryptionSpecificationOverride: EncryptionSpecificationTypeDef = ...,  # (2)
    pointInTimeRecoveryOverride: PointInTimeRecoveryTypeDef = ...,  # (3)
    tagsOverride: Sequence[TagTypeDef] = ...,  # (4)
    autoScalingSpecification: AutoScalingSpecificationTypeDef = ...,  # (5)
    replicaSpecifications: Sequence[ReplicaSpecificationTypeDef] = ...,  # (6)
) -> RestoreTableResponseTypeDef:  # (7)
    ...
  1. See CapacitySpecificationTypeDef
  2. See EncryptionSpecificationTypeDef
  3. See PointInTimeRecoveryTypeDef
  4. See TagTypeDef
  5. See