Interface TimestreamWriteClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
Amazon Timestream is a fast, scalable, fully managed time-series database service that makes it easy to store and analyze trillions of time-series data points per day. With Timestream, you can easily store and analyze IoT sensor data to derive insights from your IoT applications. You can analyze industrial telemetry to streamline equipment management and maintenance. You can also store and analyze log data and metrics to improve the performance and availability of your applications.
Timestream is built from the ground up to effectively ingest, process, and store time-series data. It organizes data to optimize query processing. It automatically scales based on the volume of data ingested and on the query volume to ensure you receive optimal performance while inserting and querying data. As your data grows over time, Timestream’s adaptive query processing engine spans across storage tiers to provide fast analysis while reducing costs.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimestreamWriteClientBuilder
builder()
Create a builder that can be used to configure and create aTimestreamWriteClient
.static TimestreamWriteClient
create()
Create aTimestreamWriteClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CreateBatchLoadTaskResponse
createBatchLoadTask
(Consumer<CreateBatchLoadTaskRequest.Builder> createBatchLoadTaskRequest) Creates a new Timestream batch load task.default CreateBatchLoadTaskResponse
createBatchLoadTask
(CreateBatchLoadTaskRequest createBatchLoadTaskRequest) Creates a new Timestream batch load task.default CreateDatabaseResponse
createDatabase
(Consumer<CreateDatabaseRequest.Builder> createDatabaseRequest) Creates a new Timestream database.default CreateDatabaseResponse
createDatabase
(CreateDatabaseRequest createDatabaseRequest) Creates a new Timestream database.default CreateTableResponse
createTable
(Consumer<CreateTableRequest.Builder> createTableRequest) Adds a new table to an existing database in your account.default CreateTableResponse
createTable
(CreateTableRequest createTableRequest) Adds a new table to an existing database in your account.default DeleteDatabaseResponse
deleteDatabase
(Consumer<DeleteDatabaseRequest.Builder> deleteDatabaseRequest) Deletes a given Timestream database.default DeleteDatabaseResponse
deleteDatabase
(DeleteDatabaseRequest deleteDatabaseRequest) Deletes a given Timestream database.default DeleteTableResponse
deleteTable
(Consumer<DeleteTableRequest.Builder> deleteTableRequest) Deletes a given Timestream table.default DeleteTableResponse
deleteTable
(DeleteTableRequest deleteTableRequest) Deletes a given Timestream table.default DescribeBatchLoadTaskResponse
describeBatchLoadTask
(Consumer<DescribeBatchLoadTaskRequest.Builder> describeBatchLoadTaskRequest) Returns information about the batch load task, including configurations, mappings, progress, and other details.default DescribeBatchLoadTaskResponse
describeBatchLoadTask
(DescribeBatchLoadTaskRequest describeBatchLoadTaskRequest) Returns information about the batch load task, including configurations, mappings, progress, and other details.default DescribeDatabaseResponse
describeDatabase
(Consumer<DescribeDatabaseRequest.Builder> describeDatabaseRequest) 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.default DescribeDatabaseResponse
describeDatabase
(DescribeDatabaseRequest describeDatabaseRequest) 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.default DescribeEndpointsResponse
describeEndpoints
(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest) Returns a list of available endpoints to make Timestream API calls against.default DescribeEndpointsResponse
describeEndpoints
(DescribeEndpointsRequest describeEndpointsRequest) Returns a list of available endpoints to make Timestream API calls against.default DescribeTableResponse
describeTable
(Consumer<DescribeTableRequest.Builder> describeTableRequest) Returns information about the table, including the table name, database name, retention duration of the memory store and the magnetic store.default DescribeTableResponse
describeTable
(DescribeTableRequest describeTableRequest) Returns information about the table, including the table name, database name, retention duration of the memory store and the magnetic store.default ListBatchLoadTasksResponse
listBatchLoadTasks
(Consumer<ListBatchLoadTasksRequest.Builder> listBatchLoadTasksRequest) Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details.default ListBatchLoadTasksResponse
listBatchLoadTasks
(ListBatchLoadTasksRequest listBatchLoadTasksRequest) Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details.default ListBatchLoadTasksIterable
listBatchLoadTasksPaginator
(Consumer<ListBatchLoadTasksRequest.Builder> listBatchLoadTasksRequest) This is a variant oflistBatchLoadTasks(software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksRequest)
operation.default ListBatchLoadTasksIterable
listBatchLoadTasksPaginator
(ListBatchLoadTasksRequest listBatchLoadTasksRequest) This is a variant oflistBatchLoadTasks(software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksRequest)
operation.default ListDatabasesResponse
listDatabases
(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest) Returns a list of your Timestream databases.default ListDatabasesResponse
listDatabases
(ListDatabasesRequest listDatabasesRequest) Returns a list of your Timestream databases.default ListDatabasesIterable
listDatabasesPaginator
(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest) This is a variant oflistDatabases(software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesRequest)
operation.default ListDatabasesIterable
listDatabasesPaginator
(ListDatabasesRequest listDatabasesRequest) This is a variant oflistDatabases(software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesRequest)
operation.default ListTablesResponse
listTables
(Consumer<ListTablesRequest.Builder> listTablesRequest) Provides a list of tables, along with the name, status, and retention properties of each table.default ListTablesResponse
listTables
(ListTablesRequest listTablesRequest) Provides a list of tables, along with the name, status, and retention properties of each table.default ListTablesIterable
listTablesPaginator
(Consumer<ListTablesRequest.Builder> listTablesRequest) This is a variant oflistTables(software.amazon.awssdk.services.timestreamwrite.model.ListTablesRequest)
operation.default ListTablesIterable
listTablesPaginator
(ListTablesRequest listTablesRequest) This is a variant oflistTables(software.amazon.awssdk.services.timestreamwrite.model.ListTablesRequest)
operation.default ListTagsForResourceResponse
listTagsForResource
(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists all tags on a Timestream resource.default ListTagsForResourceResponse
listTagsForResource
(ListTagsForResourceRequest listTagsForResourceRequest) Lists all tags on a Timestream resource.default ResumeBatchLoadTaskResponse
resumeBatchLoadTask
(Consumer<ResumeBatchLoadTaskRequest.Builder> resumeBatchLoadTaskRequest) default ResumeBatchLoadTaskResponse
resumeBatchLoadTask
(ResumeBatchLoadTaskRequest resumeBatchLoadTaskRequest) The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
default TagResourceResponse
tagResource
(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associates a set of tags with a Timestream resource.default TagResourceResponse
tagResource
(TagResourceRequest tagResourceRequest) Associates a set of tags with a Timestream resource.default UntagResourceResponse
untagResource
(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes the association of tags from a Timestream resource.default UntagResourceResponse
untagResource
(UntagResourceRequest untagResourceRequest) Removes the association of tags from a Timestream resource.default UpdateDatabaseResponse
updateDatabase
(Consumer<UpdateDatabaseRequest.Builder> updateDatabaseRequest) Modifies the KMS key for an existing database.default UpdateDatabaseResponse
updateDatabase
(UpdateDatabaseRequest updateDatabaseRequest) Modifies the KMS key for an existing database.default UpdateTableResponse
updateTable
(Consumer<UpdateTableRequest.Builder> updateTableRequest) Modifies the retention duration of the memory store and magnetic store for your Timestream table.default UpdateTableResponse
updateTable
(UpdateTableRequest updateTableRequest) Modifies the retention duration of the memory store and magnetic store for your Timestream table.default WriteRecordsResponse
writeRecords
(Consumer<WriteRecordsRequest.Builder> writeRecordsRequest) Enables you to write your time-series data into Timestream.default WriteRecordsResponse
writeRecords
(WriteRecordsRequest writeRecordsRequest) Enables you to write your time-series data into Timestream.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
createBatchLoadTask
default CreateBatchLoadTaskResponse createBatchLoadTask(CreateBatchLoadTaskRequest createBatchLoadTaskRequest) throws InternalServerException, ThrottlingException, AccessDeniedException, ValidationException, ConflictException, ResourceNotFoundException, ServiceQuotaExceededException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Creates a new Timestream batch load task. A batch load task processes data from a CSV source in an S3 location and writes to a Timestream table. A mapping from source to target is defined in a batch load task. Errors and events are written to a report at an S3 location. For the report, if the KMS key is not specified, the report will be encrypted with an S3 managed key when
SSE_S3
is the option. Otherwise an error is thrown. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.- Parameters:
createBatchLoadTaskRequest
-- Returns:
- Result of the CreateBatchLoadTask operation returned by the service.
- See Also:
-
createBatchLoadTask
default CreateBatchLoadTaskResponse createBatchLoadTask(Consumer<CreateBatchLoadTaskRequest.Builder> createBatchLoadTaskRequest) throws InternalServerException, ThrottlingException, AccessDeniedException, ValidationException, ConflictException, ResourceNotFoundException, ServiceQuotaExceededException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Creates a new Timestream batch load task. A batch load task processes data from a CSV source in an S3 location and writes to a Timestream table. A mapping from source to target is defined in a batch load task. Errors and events are written to a report at an S3 location. For the report, if the KMS key is not specified, the report will be encrypted with an S3 managed key when
SSE_S3
is the option. Otherwise an error is thrown. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.
This is a convenience which creates an instance of the
CreateBatchLoadTaskRequest.Builder
avoiding the need to create one manually viaCreateBatchLoadTaskRequest.builder()
- Parameters:
createBatchLoadTaskRequest
- AConsumer
that will call methods onCreateBatchLoadTaskRequest.Builder
to create a request.- Returns:
- Result of the CreateBatchLoadTask operation returned by the service.
- See Also:
-
createDatabase
default CreateDatabaseResponse createDatabase(CreateDatabaseRequest createDatabaseRequest) throws ConflictException, ValidationException, AccessDeniedException, ServiceQuotaExceededException, ThrottlingException, InvalidEndpointException, InternalServerException, AwsServiceException, SdkClientException, TimestreamWriteException Creates a new Timestream database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.
- Parameters:
createDatabaseRequest
-- Returns:
- Result of the CreateDatabase operation returned by the service.
- See Also:
-
createDatabase
default CreateDatabaseResponse createDatabase(Consumer<CreateDatabaseRequest.Builder> createDatabaseRequest) throws ConflictException, ValidationException, AccessDeniedException, ServiceQuotaExceededException, ThrottlingException, InvalidEndpointException, InternalServerException, AwsServiceException, SdkClientException, TimestreamWriteException Creates a new Timestream database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.
This is a convenience which creates an instance of the
CreateDatabaseRequest.Builder
avoiding the need to create one manually viaCreateDatabaseRequest.builder()
- Parameters:
createDatabaseRequest
- AConsumer
that will call methods onCreateDatabaseRequest.Builder
to create a request.- Returns:
- Result of the CreateDatabase operation returned by the service.
- See Also:
-
createTable
default CreateTableResponse createTable(CreateTableRequest createTableRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, InvalidEndpointException, InternalServerException, AwsServiceException, SdkClientException, TimestreamWriteException Adds a new table to an existing database in your account. In an Amazon Web Services account, table names must be at least unique within each Region if they are in the same database. You might have identical table names in the same Region if the tables are in separate databases. While creating the table, you must specify the table name, database name, and the retention properties. Service quotas apply. See code sample for details.
- Parameters:
createTableRequest
-- Returns:
- Result of the CreateTable operation returned by the service.
- See Also:
-
createTable
default CreateTableResponse createTable(Consumer<CreateTableRequest.Builder> createTableRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, InvalidEndpointException, InternalServerException, AwsServiceException, SdkClientException, TimestreamWriteException Adds a new table to an existing database in your account. In an Amazon Web Services account, table names must be at least unique within each Region if they are in the same database. You might have identical table names in the same Region if the tables are in separate databases. While creating the table, you must specify the table name, database name, and the retention properties. Service quotas apply. See code sample for details.
This is a convenience which creates an instance of the
CreateTableRequest.Builder
avoiding the need to create one manually viaCreateTableRequest.builder()
- Parameters:
createTableRequest
- AConsumer
that will call methods onCreateTableRequest.Builder
to create a request.- Returns:
- Result of the CreateTable operation returned by the service.
- See Also:
-
deleteDatabase
default DeleteDatabaseResponse deleteDatabase(DeleteDatabaseRequest deleteDatabaseRequest) throws InternalServerException, ThrottlingException, ResourceNotFoundException, ValidationException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Deletes a given Timestream database. This is an irreversible operation. After a database is deleted, the time-series data from its tables cannot be recovered.
All tables in the database must be deleted first, or a ValidationException error will be thrown.
Due to the nature of distributed retries, the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
See code sample for details.
- Parameters:
deleteDatabaseRequest
-- Returns:
- Result of the DeleteDatabase operation returned by the service.
- See Also:
-
deleteDatabase
default DeleteDatabaseResponse deleteDatabase(Consumer<DeleteDatabaseRequest.Builder> deleteDatabaseRequest) throws InternalServerException, ThrottlingException, ResourceNotFoundException, ValidationException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Deletes a given Timestream database. This is an irreversible operation. After a database is deleted, the time-series data from its tables cannot be recovered.
All tables in the database must be deleted first, or a ValidationException error will be thrown.
Due to the nature of distributed retries, the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
See code sample for details.
This is a convenience which creates an instance of the
DeleteDatabaseRequest.Builder
avoiding the need to create one manually viaDeleteDatabaseRequest.builder()
- Parameters:
deleteDatabaseRequest
- AConsumer
that will call methods onDeleteDatabaseRequest.Builder
to create a request.- Returns:
- Result of the DeleteDatabase operation returned by the service.
- See Also:
-
deleteTable
default DeleteTableResponse deleteTable(DeleteTableRequest deleteTableRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Deletes a given Timestream table. This is an irreversible operation. After a Timestream database table is deleted, the time-series data stored in the table cannot be recovered.
Due to the nature of distributed retries, the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
See code sample for details.
- Parameters:
deleteTableRequest
-- Returns:
- Result of the DeleteTable operation returned by the service.
- See Also:
-
deleteTable
default DeleteTableResponse deleteTable(Consumer<DeleteTableRequest.Builder> deleteTableRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Deletes a given Timestream table. This is an irreversible operation. After a Timestream database table is deleted, the time-series data stored in the table cannot be recovered.
Due to the nature of distributed retries, the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
See code sample for details.
This is a convenience which creates an instance of the
DeleteTableRequest.Builder
avoiding the need to create one manually viaDeleteTableRequest.builder()
- Parameters:
deleteTableRequest
- AConsumer
that will call methods onDeleteTableRequest.Builder
to create a request.- Returns:
- Result of the DeleteTable operation returned by the service.
- See Also:
-
describeBatchLoadTask
default DescribeBatchLoadTaskResponse describeBatchLoadTask(DescribeBatchLoadTaskRequest describeBatchLoadTaskRequest) throws InternalServerException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Returns information about the batch load task, including configurations, mappings, progress, and other details. Service quotas apply. See code sample for details.
- Parameters:
describeBatchLoadTaskRequest
-- Returns:
- Result of the DescribeBatchLoadTask operation returned by the service.
- See Also:
-
describeBatchLoadTask
default DescribeBatchLoadTaskResponse describeBatchLoadTask(Consumer<DescribeBatchLoadTaskRequest.Builder> describeBatchLoadTaskRequest) throws InternalServerException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Returns information about the batch load task, including configurations, mappings, progress, and other details. Service quotas apply. See code sample for details.
This is a convenience which creates an instance of the
DescribeBatchLoadTaskRequest.Builder
avoiding the need to create one manually viaDescribeBatchLoadTaskRequest.builder()
- Parameters:
describeBatchLoadTaskRequest
- AConsumer
that will call methods onDescribeBatchLoadTaskRequest.Builder
to create a request.- Returns:
- Result of the DescribeBatchLoadTask operation returned by the service.
- See Also:
-
describeDatabase
default DescribeDatabaseResponse describeDatabase(DescribeDatabaseRequest describeDatabaseRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, ThrottlingException, InternalServerException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException 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. Service quotas apply. See code sample for details.
- Parameters:
describeDatabaseRequest
-- Returns:
- Result of the DescribeDatabase operation returned by the service.
- See Also:
-
describeDatabase
default DescribeDatabaseResponse describeDatabase(Consumer<DescribeDatabaseRequest.Builder> describeDatabaseRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, ThrottlingException, InternalServerException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException 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. Service quotas apply. See code sample for details.
This is a convenience which creates an instance of the
DescribeDatabaseRequest.Builder
avoiding the need to create one manually viaDescribeDatabaseRequest.builder()
- Parameters:
describeDatabaseRequest
- AConsumer
that will call methods onDescribeDatabaseRequest.Builder
to create a request.- Returns:
- Result of the DescribeDatabase operation returned by the service.
- See Also:
-
describeEndpoints
default DescribeEndpointsResponse describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) throws InternalServerException, ValidationException, ThrottlingException, AwsServiceException, SdkClientException, TimestreamWriteException Returns a list of available endpoints to make Timestream API calls against. This API operation is available through both the Write and Query APIs.
Because the Timestream SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, we don't recommend that you use this API operation unless:
-
You are using VPC endpoints (Amazon Web Services PrivateLink) with Timestream
-
Your application uses a programming language that does not yet have SDK support
-
You require better control over the client-side implementation
For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern.
- Parameters:
describeEndpointsRequest
-- Returns:
- Result of the DescribeEndpoints operation returned by the service.
- See Also:
-
-
describeEndpoints
default DescribeEndpointsResponse describeEndpoints(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest) throws InternalServerException, ValidationException, ThrottlingException, AwsServiceException, SdkClientException, TimestreamWriteException Returns a list of available endpoints to make Timestream API calls against. This API operation is available through both the Write and Query APIs.
Because the Timestream SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, we don't recommend that you use this API operation unless:
-
You are using VPC endpoints (Amazon Web Services PrivateLink) with Timestream
-
Your application uses a programming language that does not yet have SDK support
-
You require better control over the client-side implementation
For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern.
This is a convenience which creates an instance of the
DescribeEndpointsRequest.Builder
avoiding the need to create one manually viaDescribeEndpointsRequest.builder()
- Parameters:
describeEndpointsRequest
- AConsumer
that will call methods onDescribeEndpointsRequest.Builder
to create a request.- Returns:
- Result of the DescribeEndpoints operation returned by the service.
- See Also:
-
-
describeTable
default DescribeTableResponse describeTable(DescribeTableRequest describeTableRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, ThrottlingException, InternalServerException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Returns information about the table, including the table name, database name, retention duration of the memory store and the magnetic store. Service quotas apply. See code sample for details.
- Parameters:
describeTableRequest
-- Returns:
- Result of the DescribeTable operation returned by the service.
- See Also:
-
describeTable
default DescribeTableResponse describeTable(Consumer<DescribeTableRequest.Builder> describeTableRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, ThrottlingException, InternalServerException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Returns information about the table, including the table name, database name, retention duration of the memory store and the magnetic store. Service quotas apply. See code sample for details.
This is a convenience which creates an instance of the
DescribeTableRequest.Builder
avoiding the need to create one manually viaDescribeTableRequest.builder()
- Parameters:
describeTableRequest
- AConsumer
that will call methods onDescribeTableRequest.Builder
to create a request.- Returns:
- Result of the DescribeTable operation returned by the service.
- See Also:
-
listBatchLoadTasks
default ListBatchLoadTasksResponse listBatchLoadTasks(ListBatchLoadTasksRequest listBatchLoadTasksRequest) throws InternalServerException, AccessDeniedException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details. See code sample for details.
- Parameters:
listBatchLoadTasksRequest
-- Returns:
- Result of the ListBatchLoadTasks operation returned by the service.
- See Also:
-
listBatchLoadTasks
default ListBatchLoadTasksResponse listBatchLoadTasks(Consumer<ListBatchLoadTasksRequest.Builder> listBatchLoadTasksRequest) throws InternalServerException, AccessDeniedException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details. See code sample for details.
This is a convenience which creates an instance of the
ListBatchLoadTasksRequest.Builder
avoiding the need to create one manually viaListBatchLoadTasksRequest.builder()
- Parameters:
listBatchLoadTasksRequest
- AConsumer
that will call methods onListBatchLoadTasksRequest.Builder
to create a request.- Returns:
- Result of the ListBatchLoadTasks operation returned by the service.
- See Also:
-
listBatchLoadTasksPaginator
default ListBatchLoadTasksIterable listBatchLoadTasksPaginator(ListBatchLoadTasksRequest listBatchLoadTasksRequest) throws InternalServerException, AccessDeniedException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException This is a variant of
listBatchLoadTasks(software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.timestreamwrite.paginators.ListBatchLoadTasksIterable responses = client.listBatchLoadTasksPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.timestreamwrite.paginators.ListBatchLoadTasksIterable responses = client .listBatchLoadTasksPaginator(request); for (software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.timestreamwrite.paginators.ListBatchLoadTasksIterable responses = client.listBatchLoadTasksPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listBatchLoadTasks(software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksRequest)
operation.- Parameters:
listBatchLoadTasksRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listBatchLoadTasksPaginator
default ListBatchLoadTasksIterable listBatchLoadTasksPaginator(Consumer<ListBatchLoadTasksRequest.Builder> listBatchLoadTasksRequest) throws InternalServerException, AccessDeniedException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException This is a variant of
listBatchLoadTasks(software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.timestreamwrite.paginators.ListBatchLoadTasksIterable responses = client.listBatchLoadTasksPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.timestreamwrite.paginators.ListBatchLoadTasksIterable responses = client .listBatchLoadTasksPaginator(request); for (software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.timestreamwrite.paginators.ListBatchLoadTasksIterable responses = client.listBatchLoadTasksPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listBatchLoadTasks(software.amazon.awssdk.services.timestreamwrite.model.ListBatchLoadTasksRequest)
operation.
This is a convenience which creates an instance of the
ListBatchLoadTasksRequest.Builder
avoiding the need to create one manually viaListBatchLoadTasksRequest.builder()
- Parameters:
listBatchLoadTasksRequest
- AConsumer
that will call methods onListBatchLoadTasksRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listDatabases
default ListDatabasesResponse listDatabases(ListDatabasesRequest listDatabasesRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Returns a list of your Timestream databases. Service quotas apply. See code sample for details.
- Parameters:
listDatabasesRequest
-- Returns:
- Result of the ListDatabases operation returned by the service.
- See Also:
-
listDatabases
default ListDatabasesResponse listDatabases(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Returns a list of your Timestream databases. Service quotas apply. See code sample for details.
This is a convenience which creates an instance of the
ListDatabasesRequest.Builder
avoiding the need to create one manually viaListDatabasesRequest.builder()
- Parameters:
listDatabasesRequest
- AConsumer
that will call methods onListDatabasesRequest.Builder
to create a request.- Returns:
- Result of the ListDatabases operation returned by the service.
- See Also:
-
listDatabasesPaginator
default ListDatabasesIterable listDatabasesPaginator(ListDatabasesRequest listDatabasesRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException This is a variant of
listDatabases(software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.timestreamwrite.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.timestreamwrite.paginators.ListDatabasesIterable responses = client .listDatabasesPaginator(request); for (software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.timestreamwrite.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listDatabases(software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesRequest)
operation.- Parameters:
listDatabasesRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listDatabasesPaginator
default ListDatabasesIterable listDatabasesPaginator(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException This is a variant of
listDatabases(software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.timestreamwrite.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.timestreamwrite.paginators.ListDatabasesIterable responses = client .listDatabasesPaginator(request); for (software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.timestreamwrite.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listDatabases(software.amazon.awssdk.services.timestreamwrite.model.ListDatabasesRequest)
operation.
This is a convenience which creates an instance of the
ListDatabasesRequest.Builder
avoiding the need to create one manually viaListDatabasesRequest.builder()
- Parameters:
listDatabasesRequest
- AConsumer
that will call methods onListDatabasesRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTables
default ListTablesResponse listTables(ListTablesRequest listTablesRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Provides a list of tables, along with the name, status, and retention properties of each table. See code sample for details.
- Parameters:
listTablesRequest
-- Returns:
- Result of the ListTables operation returned by the service.
- See Also:
-
listTables
default ListTablesResponse listTables(Consumer<ListTablesRequest.Builder> listTablesRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Provides a list of tables, along with the name, status, and retention properties of each table. See code sample for details.
This is a convenience which creates an instance of the
ListTablesRequest.Builder
avoiding the need to create one manually viaListTablesRequest.builder()
- Parameters:
listTablesRequest
- AConsumer
that will call methods onListTablesRequest.Builder
to create a request.- Returns:
- Result of the ListTables operation returned by the service.
- See Also:
-
listTablesPaginator
default ListTablesIterable listTablesPaginator(ListTablesRequest listTablesRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException This is a variant of
listTables(software.amazon.awssdk.services.timestreamwrite.model.ListTablesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.timestreamwrite.paginators.ListTablesIterable responses = client.listTablesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.timestreamwrite.paginators.ListTablesIterable responses = client.listTablesPaginator(request); for (software.amazon.awssdk.services.timestreamwrite.model.ListTablesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.timestreamwrite.paginators.ListTablesIterable responses = client.listTablesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTables(software.amazon.awssdk.services.timestreamwrite.model.ListTablesRequest)
operation.- Parameters:
listTablesRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTablesPaginator
default ListTablesIterable listTablesPaginator(Consumer<ListTablesRequest.Builder> listTablesRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException This is a variant of
listTables(software.amazon.awssdk.services.timestreamwrite.model.ListTablesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.timestreamwrite.paginators.ListTablesIterable responses = client.listTablesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.timestreamwrite.paginators.ListTablesIterable responses = client.listTablesPaginator(request); for (software.amazon.awssdk.services.timestreamwrite.model.ListTablesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.timestreamwrite.paginators.ListTablesIterable responses = client.listTablesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTables(software.amazon.awssdk.services.timestreamwrite.model.ListTablesRequest)
operation.
This is a convenience which creates an instance of the
ListTablesRequest.Builder
avoiding the need to create one manually viaListTablesRequest.builder()
- Parameters:
listTablesRequest
- AConsumer
that will call methods onListTablesRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Lists all tags on a Timestream resource.
- Parameters:
listTagsForResourceRequest
-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Lists all tags on a Timestream resource.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
resumeBatchLoadTask
default ResumeBatchLoadTaskResponse resumeBatchLoadTask(ResumeBatchLoadTaskRequest resumeBatchLoadTaskRequest) throws InternalServerException, ThrottlingException, AccessDeniedException, ValidationException, ResourceNotFoundException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException - Parameters:
resumeBatchLoadTaskRequest
-- Returns:
- Result of the ResumeBatchLoadTask operation returned by the service.
- See Also:
-
resumeBatchLoadTask
default ResumeBatchLoadTaskResponse resumeBatchLoadTask(Consumer<ResumeBatchLoadTaskRequest.Builder> resumeBatchLoadTaskRequest) throws InternalServerException, ThrottlingException, AccessDeniedException, ValidationException, ResourceNotFoundException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException
This is a convenience which creates an instance of the
ResumeBatchLoadTaskRequest.Builder
avoiding the need to create one manually viaResumeBatchLoadTaskRequest.builder()
- Parameters:
resumeBatchLoadTaskRequest
- AConsumer
that will call methods onResumeBatchLoadTaskRequest.Builder
to create a request.- Returns:
- Result of the ResumeBatchLoadTask operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Associates a set of tags with a Timestream resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.
- Parameters:
tagResourceRequest
-- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Associates a set of tags with a Timestream resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.
This is a convenience which creates an instance of the
TagResourceRequest.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to create a request.- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ValidationException, ServiceQuotaExceededException, ThrottlingException, ResourceNotFoundException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Removes the association of tags from a Timestream resource.
- Parameters:
untagResourceRequest
-- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ValidationException, ServiceQuotaExceededException, ThrottlingException, ResourceNotFoundException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Removes the association of tags from a Timestream resource.
This is a convenience which creates an instance of the
UntagResourceRequest.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
updateDatabase
default UpdateDatabaseResponse updateDatabase(UpdateDatabaseRequest updateDatabaseRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, InternalServerException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Modifies the KMS key for an existing database. While updating the database, you must specify the database name and the identifier of the new KMS key to be used (
KmsKeyId
). If there are any concurrentUpdateDatabase
requests, first writer wins.See code sample for details.
- Parameters:
updateDatabaseRequest
-- Returns:
- Result of the UpdateDatabase operation returned by the service.
- See Also:
-
updateDatabase
default UpdateDatabaseResponse updateDatabase(Consumer<UpdateDatabaseRequest.Builder> updateDatabaseRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, InternalServerException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Modifies the KMS key for an existing database. While updating the database, you must specify the database name and the identifier of the new KMS key to be used (
KmsKeyId
). If there are any concurrentUpdateDatabase
requests, first writer wins.See code sample for details.
This is a convenience which creates an instance of the
UpdateDatabaseRequest.Builder
avoiding the need to create one manually viaUpdateDatabaseRequest.builder()
- Parameters:
updateDatabaseRequest
- AConsumer
that will call methods onUpdateDatabaseRequest.Builder
to create a request.- Returns:
- Result of the UpdateDatabase operation returned by the service.
- See Also:
-
updateTable
default UpdateTableResponse updateTable(UpdateTableRequest updateTableRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Modifies the retention duration of the memory store and magnetic store for your Timestream table. Note that the change in retention duration takes effect immediately. For example, if the retention period of the memory store was initially set to 2 hours and then changed to 24 hours, the memory store will be capable of holding 24 hours of data, but will be populated with 24 hours of data 22 hours after this change was made. Timestream does not retrieve data from the magnetic store to populate the memory store.
See code sample for details.
- Parameters:
updateTableRequest
-- Returns:
- Result of the UpdateTable operation returned by the service.
- See Also:
-
updateTable
default UpdateTableResponse updateTable(Consumer<UpdateTableRequest.Builder> updateTableRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Modifies the retention duration of the memory store and magnetic store for your Timestream table. Note that the change in retention duration takes effect immediately. For example, if the retention period of the memory store was initially set to 2 hours and then changed to 24 hours, the memory store will be capable of holding 24 hours of data, but will be populated with 24 hours of data 22 hours after this change was made. Timestream does not retrieve data from the magnetic store to populate the memory store.
See code sample for details.
This is a convenience which creates an instance of the
UpdateTableRequest.Builder
avoiding the need to create one manually viaUpdateTableRequest.builder()
- Parameters:
updateTableRequest
- AConsumer
that will call methods onUpdateTableRequest.Builder
to create a request.- Returns:
- Result of the UpdateTable operation returned by the service.
- See Also:
-
writeRecords
default WriteRecordsResponse writeRecords(WriteRecordsRequest writeRecordsRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, RejectedRecordsException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Enables you to write your time-series data into Timestream. You can specify a single data point or a batch of data points to be inserted into the system. Timestream offers you a flexible schema that auto detects the column names and data types for your Timestream tables based on the dimension names and data types of the data points you specify when invoking writes into the database.
Timestream supports eventual consistency read semantics. This means that when you query data immediately after writing a batch of data into Timestream, the query results might not reflect the results of a recently completed write operation. The results may also include some stale data. If you repeat the query request after a short time, the results should return the latest data. Service quotas apply.
See code sample for details.
Upserts
You can use the
Version
parameter in aWriteRecords
request to update data points. Timestream tracks a version number with each record.Version
defaults to1
when it's not specified for the record in the request. Timestream updates an existing record’s measure value along with itsVersion
when it receives a write request with a higherVersion
number for that record. When it receives an update request where the measure value is the same as that of the existing record, Timestream still updatesVersion
, if it is greater than the existing value ofVersion
. You can update a data point as many times as desired, as long as the value ofVersion
continuously increases.For example, suppose you write a new record without indicating
Version
in the request. Timestream stores this record, and setVersion
to1
. Now, suppose you try to update this record with aWriteRecords
request of the same record with a different measure value but, like before, do not provideVersion
. In this case, Timestream will reject this update with aRejectedRecordsException
since the updated record’s version is not greater than the existing value of Version.However, if you were to resend the update request with
Version
set to2
, Timestream would then succeed in updating the record’s value, and theVersion
would be set to2
. Next, suppose you sent aWriteRecords
request with this same record and an identical measure value, but withVersion
set to3
. In this case, Timestream would only updateVersion
to3
. Any further updates would need to send a version number greater than3
, or the update requests would receive aRejectedRecordsException
.- Parameters:
writeRecordsRequest
-- Returns:
- Result of the WriteRecords operation returned by the service.
- See Also:
-
writeRecords
default WriteRecordsResponse writeRecords(Consumer<WriteRecordsRequest.Builder> writeRecordsRequest) throws InternalServerException, ThrottlingException, ValidationException, ResourceNotFoundException, AccessDeniedException, RejectedRecordsException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamWriteException Enables you to write your time-series data into Timestream. You can specify a single data point or a batch of data points to be inserted into the system. Timestream offers you a flexible schema that auto detects the column names and data types for your Timestream tables based on the dimension names and data types of the data points you specify when invoking writes into the database.
Timestream supports eventual consistency read semantics. This means that when you query data immediately after writing a batch of data into Timestream, the query results might not reflect the results of a recently completed write operation. The results may also include some stale data. If you repeat the query request after a short time, the results should return the latest data. Service quotas apply.
See code sample for details.
Upserts
You can use the
Version
parameter in aWriteRecords
request to update data points. Timestream tracks a version number with each record.Version
defaults to1
when it's not specified for the record in the request. Timestream updates an existing record’s measure value along with itsVersion
when it receives a write request with a higherVersion
number for that record. When it receives an update request where the measure value is the same as that of the existing record, Timestream still updatesVersion
, if it is greater than the existing value ofVersion
. You can update a data point as many times as desired, as long as the value ofVersion
continuously increases.For example, suppose you write a new record without indicating
Version
in the request. Timestream stores this record, and setVersion
to1
. Now, suppose you try to update this record with aWriteRecords
request of the same record with a different measure value but, like before, do not provideVersion
. In this case, Timestream will reject this update with aRejectedRecordsException
since the updated record’s version is not greater than the existing value of Version.However, if you were to resend the update request with
Version
set to2
, Timestream would then succeed in updating the record’s value, and theVersion
would be set to2
. Next, suppose you sent aWriteRecords
request with this same record and an identical measure value, but withVersion
set to3
. In this case, Timestream would only updateVersion
to3
. Any further updates would need to send a version number greater than3
, or the update requests would receive aRejectedRecordsException
.
This is a convenience which creates an instance of the
WriteRecordsRequest.Builder
avoiding the need to create one manually viaWriteRecordsRequest.builder()
- Parameters:
writeRecordsRequest
- AConsumer
that will call methods onWriteRecordsRequest.Builder
to create a request.- Returns:
- Result of the WriteRecords operation returned by the service.
- See Also:
-
create
Create aTimestreamWriteClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aTimestreamWriteClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-