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
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.
client = boto3.client("keyspaces")
try:
do_something(client)
except (
client.AccessDeniedException,
client.ClientError,
client.ConflictException,
client.InternalServerException,
client.ResourceNotFoundException,
client.ServiceQuotaExceededException,
client.ValidationException,
) as e:
print(e)
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
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("keyspaces").close
method.
boto3 documentation
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
def create_keyspace(
self,
*,
keyspaceName: str,
tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreateKeyspaceResponseTypeDef: # (2)
...
kwargs: CreateKeyspaceRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
}
parent.create_keyspace(**kwargs)
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
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)
) -> CreateTableResponseTypeDef: # (8)
...
- See SchemaDefinitionTypeDef
- See CommentTypeDef
- See CapacitySpecificationTypeDef
- See EncryptionSpecificationTypeDef
- See PointInTimeRecoveryTypeDef
- See TimeToLiveTypeDef
- See TagTypeDef
- See CreateTableResponseTypeDef
kwargs: CreateTableRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
"tableName": ...,
"schemaDefinition": ...,
}
parent.create_table(**kwargs)
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
kwargs: DeleteKeyspaceRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
}
parent.delete_keyspace(**kwargs)
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
def delete_table(
self,
*,
keyspaceName: str,
tableName: str,
) -> Dict[str, Any]:
...
kwargs: DeleteTableRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
"tableName": ...,
}
parent.delete_table(**kwargs)
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
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
def get_keyspace(
self,
*,
keyspaceName: str,
) -> GetKeyspaceResponseTypeDef: # (1)
...
kwargs: GetKeyspaceRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
}
parent.get_keyspace(**kwargs)
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
def get_table(
self,
*,
keyspaceName: str,
tableName: str,
) -> GetTableResponseTypeDef: # (1)
...
kwargs: GetTableRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
"tableName": ...,
}
parent.get_table(**kwargs)
list_keyspaces
Returns a list of keyspaces.
Type annotations and code completion for boto3.client("keyspaces").list_keyspaces
method.
boto3 documentation
def list_keyspaces(
self,
*,
nextToken: str = ...,
maxResults: int = ...,
) -> ListKeyspacesResponseTypeDef: # (1)
...
kwargs: ListKeyspacesRequestRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.list_keyspaces(**kwargs)
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
def list_tables(
self,
*,
keyspaceName: str,
nextToken: str = ...,
maxResults: int = ...,
) -> ListTablesResponseTypeDef: # (1)
...
kwargs: ListTablesRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
}
parent.list_tables(**kwargs)
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
def list_tags_for_resource(
self,
*,
resourceArn: str,
nextToken: str = ...,
maxResults: int = ...,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
restore_table
Restores the specified 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
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)
) -> RestoreTableResponseTypeDef: # (5)
...
- See CapacitySpecificationTypeDef
- See EncryptionSpecificationTypeDef
- See PointInTimeRecoveryTypeDef
- See TagTypeDef
- See RestoreTableResponseTypeDef
kwargs: RestoreTableRequestRequestTypeDef = { # (1)
"sourceKeyspaceName": ...,
"sourceTableName": ...,
"targetKeyspaceName": ...,
"targetTableName": ...,
}
parent.restore_table(**kwargs)
tag_resource
Associates a set of tags with a Amazon Keyspaces resource.
Type annotations and code completion for boto3.client("keyspaces").tag_resource
method.
boto3 documentation
def tag_resource(
self,
*,
resourceArn: str,
tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource
Removes the association of tags from a Amazon Keyspaces resource.
Type annotations and code completion for boto3.client("keyspaces").untag_resource
method.
boto3 documentation
def untag_resource(
self,
*,
resourceArn: str,
tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"tags": ...,
}
parent.untag_resource(**kwargs)
update_table
Adds new columns to the table or updates one of the table's settings, for example capacity mode, encryption, point-in-time recovery, or ttl settings.
Type annotations and code completion for boto3.client("keyspaces").update_table
method.
boto3 documentation
def update_table(
self,
*,
keyspaceName: str,
tableName: str,
addColumns: Sequence[ColumnDefinitionTypeDef] = ..., # (1)
capacitySpecification: CapacitySpecificationTypeDef = ..., # (2)
encryptionSpecification: EncryptionSpecificationTypeDef = ..., # (3)
pointInTimeRecovery: PointInTimeRecoveryTypeDef = ..., # (4)
ttl: TimeToLiveTypeDef = ..., # (5)
defaultTimeToLive: int = ...,
) -> UpdateTableResponseTypeDef: # (6)
...
- See ColumnDefinitionTypeDef
- See CapacitySpecificationTypeDef
- See EncryptionSpecificationTypeDef
- See PointInTimeRecoveryTypeDef
- See TimeToLiveTypeDef
- See UpdateTableResponseTypeDef
kwargs: UpdateTableRequestRequestTypeDef = { # (1)
"keyspaceName": ...,
"tableName": ...,
}
parent.update_table(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("keyspaces").get_paginator
method with overloads.
client.get_paginator("list_keyspaces")
-> ListKeyspacesPaginatorclient.get_paginator("list_tables")
-> ListTablesPaginatorclient.get_paginator("list_tags_for_resource")
-> ListTagsForResourcePaginator