Skip to content

TimestreamWriteClient#

Index > TimestreamWrite > TimestreamWriteClient

Auto-generated documentation for TimestreamWrite type annotations stubs module mypy-boto3-timestream-write.

TimestreamWriteClient#

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

# TimestreamWriteClient usage example

from boto3.session import Session
from mypy_boto3_timestream_write.client import TimestreamWriteClient

def get_timestream-write_client() -> TimestreamWriteClient:
    return Session().client("timestream-write")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("timestream-write")

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

from mypy_boto3_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 boto3.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 boto3.client("timestream-write").close method. boto3 documentation

# close method definition

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

create_batch_load_task#

Creates a new Timestream batch load task.

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

# create_batch_load_task method definition

def create_batch_load_task(
    self,
    *,
    DataSourceConfiguration: DataSourceConfigurationTypeDef,  # (1)
    ReportConfiguration: ReportConfigurationTypeDef,  # (2)
    TargetDatabaseName: str,
    TargetTableName: str,
    ClientToken: str = ...,
    DataModelConfiguration: Union[DataModelConfigurationTypeDef, DataModelConfigurationOutputTypeDef] = ...,  # (3)
    RecordVersion: int = ...,
) -> CreateBatchLoadTaskResponseTypeDef:  # (4)
    ...
  1. See DataSourceConfigurationTypeDef
  2. See ReportConfigurationTypeDef
  3. See DataModelConfigurationTypeDef DataModelConfigurationOutputTypeDef
  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 boto3.client("timestream-write").create_database method. boto3 documentation

# create_database method definition

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 boto3.client("timestream-write").create_table method. boto3 documentation

# create_table method definition

def create_table(
    self,
    *,
    DatabaseName: str,
    TableName: str,
    RetentionProperties: RetentionPropertiesTypeDef = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
    MagneticStoreWriteProperties: MagneticStoreWritePropertiesTypeDef = ...,  # (3)
    Schema: Union[SchemaTypeDef, SchemaOutputTypeDef] = ...,  # (4)
) -> CreateTableResponseTypeDef:  # (5)
    ...
  1. See RetentionPropertiesTypeDef
  2. See TagTypeDef
  3. See MagneticStoreWritePropertiesTypeDef
  4. See SchemaTypeDef SchemaOutputTypeDef
  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 boto3.client("timestream-write").delete_database method. boto3 documentation

# delete_database method definition

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 boto3.client("timestream-write").delete_table method. boto3 documentation

# delete_table method definition

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 boto3.client("timestream-write").describe_batch_load_task method.