Skip to content

TimestreamWriteClient#

Index > TimestreamWrite > TimestreamWriteClient

Auto-generated documentation for TimestreamWrite type annotations stubs module types-aiobotocore-timestream-write.

TimestreamWriteClient#

Type annotations and code completion for session.create_client("timestream-write") boto3 documentation

TimestreamWriteClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_timestream_write.client import TimestreamWriteClient

session = get_session()
async with session.create_client("timestream-write") as client:
    client: TimestreamWriteClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("timestream-write").exceptions structure.

TimestreamWriteClient.exceptions usage example

async with session.create_client("timestream-write") as client:
    try:
        do_something(client)
    except (
            client.AccessDeniedException,
        client.ClientError,
        client.ConflictException,
        client.InternalServerException,
        client.InvalidEndpointException,
        client.RejectedRecordsException,
        client.ResourceNotFoundException,
        client.ServiceQuotaExceededException,
        client.ThrottlingException,
        client.ValidationException,
    ) as e:
        print(e)
TimestreamWriteClient usage type checking example

from types_aiobotocore_timestream_write.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 session.create_client("timestream-write").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 session.create_client("timestream-write").close method. boto3 documentation

# close method definition

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

create_batch_load_task#

Creates a new Timestream batch load task.

Type annotations and code completion for session.create_client("timestream-write").create_batch_load_task method. boto3 documentation

# create_batch_load_task method definition

await def create_batch_load_task(
    self,
    *,
    DataSourceConfiguration: DataSourceConfigurationTypeDef,  # (1)
    ReportConfiguration: ReportConfigurationTypeDef,  # (2)
    TargetDatabaseName: str,
    TargetTableName: str,
    ClientToken: str = ...,
    DataModelConfiguration: DataModelConfigurationTypeDef = ...,  # (3)
    RecordVersion: int = ...,
) -> CreateBatchLoadTaskResponseTypeDef:  # (4)
    ...
  1. See DataSourceConfigurationTypeDef
  2. See ReportConfigurationTypeDef
  3. See DataModelConfigurationTypeDef
  4. See CreateBatchLoadTaskResponseTypeDef
# create_batch_load_task method usage example with argument unpacking

kwargs: CreateBatchLoadTaskRequestRequestTypeDef = {  # (1)
    "DataSourceConfiguration": ...,
    "ReportConfiguration": ...,
    "TargetDatabaseName": ...,
    "TargetTableName": ...,
}

parent.create_batch_load_task(**kwargs)
  1. See CreateBatchLoadTaskRequestRequestTypeDef

create_database#

Creates a new Timestream database.

Type annotations and code completion for session.create_client("timestream-write").create_database method. boto3 documentation

# create_database method definition

await def create_database(
    self,
    *,
    DatabaseName: str,
    KmsKeyId: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateDatabaseResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateDatabaseResponseTypeDef
# create_database method usage example with argument unpacking

kwargs: CreateDatabaseRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
}

parent.create_database(**kwargs)
  1. See CreateDatabaseRequestRequestTypeDef

create_table#

Adds a new table to an existing database in your account.

Type annotations and code completion for session.create_client("timestream-write").create_table method. boto3 documentation

# create_table method definition

await def create_table(
    self,
    *,
    DatabaseName: str,
    TableName: str,
    RetentionProperties: RetentionPropertiesTypeDef = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
    MagneticStoreWriteProperties: MagneticStoreWritePropertiesTypeDef = ...,  # (3)
    Schema: SchemaTypeDef = ...,  # (4)
) -> CreateTableResponseTypeDef:  # (5)
    ...
  1. See RetentionPropertiesTypeDef
  2. See TagTypeDef
  3. See MagneticStoreWritePropertiesTypeDef
  4. See SchemaTypeDef
  5. See CreateTableResponseTypeDef
# create_table method usage example with argument unpacking

kwargs: CreateTableRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
    "TableName": ...,
}

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

delete_database#

Deletes a given Timestream database.

Type annotations and code completion for session.create_client("timestream-write").delete_database method. boto3 documentation

# delete_database method definition

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

kwargs: DeleteDatabaseRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
}

parent.delete_database(**kwargs)
  1. See DeleteDatabaseRequestRequestTypeDef

delete_table#

Deletes a given Timestream table.

Type annotations and code completion for session.create_client("timestream-write").delete_table method. boto3 documentation

# delete_table method definition

await def delete_table(
    self,
    *,
    DatabaseName: str,
    TableName: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_table method usage example with argument unpacking

kwargs: DeleteTableRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
    "TableName": ...,
}

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

describe_batch_load_task#

Returns information about the batch load task, including configurations, mappings, progress, and other details.

Type annotations and code completion for session.create_client("timestream-write").describe_batch_load_task method. boto3 documentation

# describe_batch_load_task method definition

await def describe_batch_load_task(
    self,
    *,
    TaskId: str,
) -> DescribeBatchLoadTaskResponseTypeDef:  # (1)
    ...
  1. See DescribeBatchLoadTaskResponseTypeDef
# describe_batch_load_task method usage example with argument unpacking

kwargs: DescribeBatchLoadTaskRequestRequestTypeDef = {  # (1)
    "TaskId": ...,
}

parent.describe_batch_load_task(**kwargs)
  1. See DescribeBatchLoadTaskRequestRequestTypeDef

describe_database#

Returns information about the database, including the database name, time that the database was created, and the total number of tables found within the database.

Type annotations and code completion for session.create_client("timestream-write").describe_database method. boto3 documentation

# describe_database method definition

await def describe_database(
    self,
    *,
    DatabaseName: str,
) -> DescribeDatabaseResponseTypeDef:  # (1)
    ...
  1. See DescribeDatabaseResponseTypeDef
# describe_database method usage example with argument unpacking

kwargs: DescribeDatabaseRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
}

parent.describe_database(**kwargs)
  1. See DescribeDatabaseRequestRequestTypeDef

describe_endpoints#

Returns a list of available endpoints to make Timestream API calls against.

Type annotations and code completion for session.create_client("timestream-write").describe_endpoints method. boto3 documentation

# describe_endpoints method definition

await def describe_endpoints(
    self,
) -> DescribeEndpointsResponseTypeDef:  # (1)
    ...
  1. See DescribeEndpointsResponseTypeDef

describe_table#

Returns information about the table, including the table name, database name, retention duration of the memory store and the magnetic store.

Type annotations and code completion for session.create_client("timestream-write").describe_table method. boto3 documentation

# describe_table method definition

await def describe_table(
    self,
    *,
    DatabaseName: str,
    TableName: str,
) -> DescribeTableResponseTypeDef:  # (1)
    ...
  1. See DescribeTableResponseTypeDef
# describe_table method usage example with argument unpacking

kwargs: DescribeTableRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
    "TableName": ...,
}

parent.describe_table(**kwargs)
  1. See DescribeTableRequestRequestTypeDef

generate_presigned_url#

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

Type annotations and code completion for session.create_client("timestream-write").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

list_batch_load_tasks#

Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details.

Type annotations and code completion for session.create_client("timestream-write").list_batch_load_tasks method. boto3 documentation

# list_batch_load_tasks method definition

await def list_batch_load_tasks(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
    TaskStatus: BatchLoadStatusType = ...,  # (1)
) -> ListBatchLoadTasksResponseTypeDef:  # (2)
    ...
  1. See BatchLoadStatusType
  2. See ListBatchLoadTasksResponseTypeDef
# list_batch_load_tasks method usage example with argument unpacking

kwargs: ListBatchLoadTasksRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_batch_load_tasks(**kwargs)
  1. See ListBatchLoadTasksRequestRequestTypeDef

list_databases#

Returns a list of your Timestream databases.

Type annotations and code completion for session.create_client("timestream-write").list_databases method. boto3 documentation

# list_databases method definition

await def list_databases(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListDatabasesResponseTypeDef:  # (1)
    ...
  1. See ListDatabasesResponseTypeDef
# list_databases method usage example with argument unpacking

kwargs: ListDatabasesRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_databases(**kwargs)
  1. See ListDatabasesRequestRequestTypeDef

list_tables#

Provides a list of tables, along with the name, status, and retention properties of each table.

Type annotations and code completion for session.create_client("timestream-write").list_tables method. boto3 documentation

# list_tables method definition

await def list_tables(
    self,
    *,
    DatabaseName: str = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListTablesResponseTypeDef:  # (1)
    ...
  1. See ListTablesResponseTypeDef
# list_tables method usage example with argument unpacking

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

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

list_tags_for_resource#

Lists all tags on a Timestream resource.

Type annotations and code completion for session.create_client("timestream-write").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

await def list_tags_for_resource(
    self,
    *,
    ResourceARN: str,
) -> 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

resume_batch_load_task#

See also: AWS API Documentation.

Type annotations and code completion for session.create_client("timestream-write").resume_batch_load_task method. boto3 documentation

# resume_batch_load_task method definition

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

kwargs: ResumeBatchLoadTaskRequestRequestTypeDef = {  # (1)
    "TaskId": ...,
}

parent.resume_batch_load_task(**kwargs)
  1. See ResumeBatchLoadTaskRequestRequestTypeDef

tag_resource#

Associates a set of tags with a Timestream resource.

Type annotations and code completion for session.create_client("timestream-write").tag_resource method. boto3 documentation

# tag_resource method definition

await def tag_resource(
    self,
    *,
    ResourceARN: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceARN": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes the association of tags from a Timestream resource.

Type annotations and code completion for session.create_client("timestream-write").untag_resource method. boto3 documentation

# untag_resource method definition

await def untag_resource(
    self,
    *,
    ResourceARN: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceARN": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_database#

Modifies the KMS key for an existing database.

Type annotations and code completion for session.create_client("timestream-write").update_database method. boto3 documentation

# update_database method definition

await def update_database(
    self,
    *,
    DatabaseName: str,
    KmsKeyId: str,
) -> UpdateDatabaseResponseTypeDef:  # (1)
    ...
  1. See UpdateDatabaseResponseTypeDef
# update_database method usage example with argument unpacking

kwargs: UpdateDatabaseRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
    "KmsKeyId": ...,
}

parent.update_database(**kwargs)
  1. See UpdateDatabaseRequestRequestTypeDef

update_table#

Modifies the retention duration of the memory store and magnetic store for your Timestream table.

Type annotations and code completion for session.create_client("timestream-write").update_table method. boto3 documentation

# update_table method definition

await def update_table(
    self,
    *,
    DatabaseName: str,
    TableName: str,
    RetentionProperties: RetentionPropertiesTypeDef = ...,  # (1)
    MagneticStoreWriteProperties: MagneticStoreWritePropertiesTypeDef = ...,  # (2)
    Schema: SchemaTypeDef = ...,  # (3)
) -> UpdateTableResponseTypeDef:  # (4)
    ...
  1. See RetentionPropertiesTypeDef
  2. See MagneticStoreWritePropertiesTypeDef
  3. See SchemaTypeDef
  4. See UpdateTableResponseTypeDef
# update_table method usage example with argument unpacking

kwargs: UpdateTableRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
    "TableName": ...,
}

parent.update_table(**kwargs)
  1. See UpdateTableRequestRequestTypeDef

write_records#

Enables you to write your time-series data into Timestream.

Type annotations and code completion for session.create_client("timestream-write").write_records method. boto3 documentation

# write_records method definition

await def write_records(
    self,
    *,
    DatabaseName: str,
    TableName: str,
    Records: Sequence[RecordTypeDef],  # (1)
    CommonAttributes: RecordTypeDef = ...,  # (2)
) -> WriteRecordsResponseTypeDef:  # (3)
    ...
  1. See RecordTypeDef
  2. See RecordTypeDef
  3. See WriteRecordsResponseTypeDef
# write_records method usage example with argument unpacking

kwargs: WriteRecordsRequestRequestTypeDef = {  # (1)
    "DatabaseName": ...,
    "TableName": ...,
    "Records": ...,
}

parent.write_records(**kwargs)
  1. See WriteRecordsRequestRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("timestream-write").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> TimestreamWriteClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("timestream-write").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...