2021/11/24 - Amazon Timestream Write - 5 updated api methods
Changes This release adds support for multi-measure records and magnetic store writes. Multi-measure records allow customers to store multiple measures in a single table row. Magnetic store writes enable customers to write late arrival data (data with timestamp in the past) directly into the magnetic store.
{'MagneticStoreWriteProperties': {'EnableMagneticStoreWrites': 'boolean', 'MagneticStoreRejectedDataLocation': {'S3Configuration': {'BucketName': 'string', 'EncryptionOption': 'SSE_S3 ' '| ' 'SSE_KMS', 'KmsKeyId': 'string', 'ObjectKeyPrefix': 'string'}}}}Response
{'Table': {'MagneticStoreWriteProperties': {'EnableMagneticStoreWrites': 'boolean', 'MagneticStoreRejectedDataLocation': {'S3Configuration': {'BucketName': 'string', 'EncryptionOption': 'SSE_S3 ' '| ' 'SSE_KMS', 'KmsKeyId': 'string', 'ObjectKeyPrefix': 'string'}}}}}
The CreateTable operation 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 may 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.
See also: AWS API Documentation
Request Syntax
client.create_table( DatabaseName='string', TableName='string', RetentionProperties={ 'MemoryStoreRetentionPeriodInHours': 123, 'MagneticStoreRetentionPeriodInDays': 123 }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ], MagneticStoreWriteProperties={ 'EnableMagneticStoreWrites': True|False, 'MagneticStoreRejectedDataLocation': { 'S3Configuration': { 'BucketName': 'string', 'ObjectKeyPrefix': 'string', 'EncryptionOption': 'SSE_S3'|'SSE_KMS', 'KmsKeyId': 'string' } } } )
string
[REQUIRED]
The name of the Timestream database.
string
[REQUIRED]
The name of the Timestream table.
dict
The duration for which your time series data must be stored in the memory store and the magnetic store.
MemoryStoreRetentionPeriodInHours (integer) -- [REQUIRED]
The duration for which data must be stored in the memory store.
MagneticStoreRetentionPeriodInDays (integer) -- [REQUIRED]
The duration for which data must be stored in the magnetic store.
list
A list of key-value pairs to label the table.
(dict) --
A tag is a label that you assign to a Timestream database and/or table. Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize databases and/or tables, for example, by purpose, owner, or environment.
Key (string) -- [REQUIRED]
The key of the tag. Tag keys are case sensitive.
Value (string) -- [REQUIRED]
The value of the tag. Tag values are case-sensitive and can be null.
dict
Contains properties to set on the table when enabling magnetic store writes.
EnableMagneticStoreWrites (boolean) -- [REQUIRED]
A flag to enable magnetic store writes.
MagneticStoreRejectedDataLocation (dict) --
The location to write error reports for records rejected asynchronously during magnetic store writes.
S3Configuration (dict) --
Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.
BucketName (string) --
>Bucket name of the customer S3 bucket.
ObjectKeyPrefix (string) --
Object key preview for the customer S3 location.
EncryptionOption (string) --
Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key.
KmsKeyId (string) --
KMS key id for the customer s3 location when encrypting with a KMS managed key.
dict
Response Syntax
{ 'Table': { 'Arn': 'string', 'TableName': 'string', 'DatabaseName': 'string', 'TableStatus': 'ACTIVE'|'DELETING', 'RetentionProperties': { 'MemoryStoreRetentionPeriodInHours': 123, 'MagneticStoreRetentionPeriodInDays': 123 }, 'CreationTime': datetime(2015, 1, 1), 'LastUpdatedTime': datetime(2015, 1, 1), 'MagneticStoreWriteProperties': { 'EnableMagneticStoreWrites': True|False, 'MagneticStoreRejectedDataLocation': { 'S3Configuration': { 'BucketName': 'string', 'ObjectKeyPrefix': 'string', 'EncryptionOption': 'SSE_S3'|'SSE_KMS', 'KmsKeyId': 'string' } } } } }
Response Structure
(dict) --
Table (dict) --
The newly created Timestream table.
Arn (string) --
The Amazon Resource Name that uniquely identifies this table.
TableName (string) --
The name of the Timestream table.
DatabaseName (string) --
The name of the Timestream database that contains this table.
TableStatus (string) --
The current state of the table:
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
RetentionProperties (dict) --
The retention duration for the memory store and magnetic store.
MemoryStoreRetentionPeriodInHours (integer) --
The duration for which data must be stored in the memory store.
MagneticStoreRetentionPeriodInDays (integer) --
The duration for which data must be stored in the magnetic store.
CreationTime (datetime) --
The time when the Timestream table was created.
LastUpdatedTime (datetime) --
The time when the Timestream table was last updated.
MagneticStoreWriteProperties (dict) --
Contains properties to set on the table when enabling magnetic store writes.
EnableMagneticStoreWrites (boolean) --
A flag to enable magnetic store writes.
MagneticStoreRejectedDataLocation (dict) --
The location to write error reports for records rejected asynchronously during magnetic store writes.
S3Configuration (dict) --
Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.
BucketName (string) --
>Bucket name of the customer S3 bucket.
ObjectKeyPrefix (string) --
Object key preview for the customer S3 location.
EncryptionOption (string) --
Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key.
KmsKeyId (string) --
KMS key id for the customer s3 location when encrypting with a KMS managed key.
{'Table': {'MagneticStoreWriteProperties': {'EnableMagneticStoreWrites': 'boolean', 'MagneticStoreRejectedDataLocation': {'S3Configuration': {'BucketName': 'string', 'EncryptionOption': 'SSE_S3 ' '| ' 'SSE_KMS', 'KmsKeyId': 'string', 'ObjectKeyPrefix': 'string'}}}}}
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.
See also: AWS API Documentation
Request Syntax
client.describe_table( DatabaseName='string', TableName='string' )
string
[REQUIRED]
The name of the Timestream database.
string
[REQUIRED]
The name of the Timestream table.
dict
Response Syntax
{ 'Table': { 'Arn': 'string', 'TableName': 'string', 'DatabaseName': 'string', 'TableStatus': 'ACTIVE'|'DELETING', 'RetentionProperties': { 'MemoryStoreRetentionPeriodInHours': 123, 'MagneticStoreRetentionPeriodInDays': 123 }, 'CreationTime': datetime(2015, 1, 1), 'LastUpdatedTime': datetime(2015, 1, 1), 'MagneticStoreWriteProperties': { 'EnableMagneticStoreWrites': True|False, 'MagneticStoreRejectedDataLocation': { 'S3Configuration': { 'BucketName': 'string', 'ObjectKeyPrefix': 'string', 'EncryptionOption': 'SSE_S3'|'SSE_KMS', 'KmsKeyId': 'string' } } } } }
Response Structure
(dict) --
Table (dict) --
The Timestream table.
Arn (string) --
The Amazon Resource Name that uniquely identifies this table.
TableName (string) --
The name of the Timestream table.
DatabaseName (string) --
The name of the Timestream database that contains this table.
TableStatus (string) --
The current state of the table:
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
RetentionProperties (dict) --
The retention duration for the memory store and magnetic store.
MemoryStoreRetentionPeriodInHours (integer) --
The duration for which data must be stored in the memory store.
MagneticStoreRetentionPeriodInDays (integer) --
The duration for which data must be stored in the magnetic store.
CreationTime (datetime) --
The time when the Timestream table was created.
LastUpdatedTime (datetime) --
The time when the Timestream table was last updated.
MagneticStoreWriteProperties (dict) --
Contains properties to set on the table when enabling magnetic store writes.
EnableMagneticStoreWrites (boolean) --
A flag to enable magnetic store writes.
MagneticStoreRejectedDataLocation (dict) --
The location to write error reports for records rejected asynchronously during magnetic store writes.
S3Configuration (dict) --
Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.
BucketName (string) --
>Bucket name of the customer S3 bucket.
ObjectKeyPrefix (string) --
Object key preview for the customer S3 location.
EncryptionOption (string) --
Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key.
KmsKeyId (string) --
KMS key id for the customer s3 location when encrypting with a KMS managed key.
{'Tables': {'MagneticStoreWriteProperties': {'EnableMagneticStoreWrites': 'boolean', 'MagneticStoreRejectedDataLocation': {'S3Configuration': {'BucketName': 'string', 'EncryptionOption': 'SSE_S3 ' '| ' 'SSE_KMS', 'KmsKeyId': 'string', 'ObjectKeyPrefix': 'string'}}}}}
A list of tables, along with the name, status and retention properties of each table. See code sample for details.
See also: AWS API Documentation
Request Syntax
client.list_tables( DatabaseName='string', NextToken='string', MaxResults=123 )
string
The name of the Timestream database.
string
The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
integer
The total number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
dict
Response Syntax
{ 'Tables': [ { 'Arn': 'string', 'TableName': 'string', 'DatabaseName': 'string', 'TableStatus': 'ACTIVE'|'DELETING', 'RetentionProperties': { 'MemoryStoreRetentionPeriodInHours': 123, 'MagneticStoreRetentionPeriodInDays': 123 }, 'CreationTime': datetime(2015, 1, 1), 'LastUpdatedTime': datetime(2015, 1, 1), 'MagneticStoreWriteProperties': { 'EnableMagneticStoreWrites': True|False, 'MagneticStoreRejectedDataLocation': { 'S3Configuration': { 'BucketName': 'string', 'ObjectKeyPrefix': 'string', 'EncryptionOption': 'SSE_S3'|'SSE_KMS', 'KmsKeyId': 'string' } } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Tables (list) --
A list of tables.
(dict) --
Table represents a database table in Timestream. Tables contain one or more related time series. You can modify the retention duration of the memory store and the magnetic store for a table.
Arn (string) --
The Amazon Resource Name that uniquely identifies this table.
TableName (string) --
The name of the Timestream table.
DatabaseName (string) --
The name of the Timestream database that contains this table.
TableStatus (string) --
The current state of the table:
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
RetentionProperties (dict) --
The retention duration for the memory store and magnetic store.
MemoryStoreRetentionPeriodInHours (integer) --
The duration for which data must be stored in the memory store.
MagneticStoreRetentionPeriodInDays (integer) --
The duration for which data must be stored in the magnetic store.
CreationTime (datetime) --
The time when the Timestream table was created.
LastUpdatedTime (datetime) --
The time when the Timestream table was last updated.
MagneticStoreWriteProperties (dict) --
Contains properties to set on the table when enabling magnetic store writes.
EnableMagneticStoreWrites (boolean) --
A flag to enable magnetic store writes.
MagneticStoreRejectedDataLocation (dict) --
The location to write error reports for records rejected asynchronously during magnetic store writes.
S3Configuration (dict) --
Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.
BucketName (string) --
>Bucket name of the customer S3 bucket.
ObjectKeyPrefix (string) --
Object key preview for the customer S3 location.
EncryptionOption (string) --
Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key.
KmsKeyId (string) --
KMS key id for the customer s3 location when encrypting with a KMS managed key.
NextToken (string) --
A token to specify where to start paginating. This is the NextToken from a previously truncated response.
{'MagneticStoreWriteProperties': {'EnableMagneticStoreWrites': 'boolean', 'MagneticStoreRejectedDataLocation': {'S3Configuration': {'BucketName': 'string', 'EncryptionOption': 'SSE_S3 ' '| ' 'SSE_KMS', 'KmsKeyId': 'string', 'ObjectKeyPrefix': 'string'}}}}Response
{'Table': {'MagneticStoreWriteProperties': {'EnableMagneticStoreWrites': 'boolean', 'MagneticStoreRejectedDataLocation': {'S3Configuration': {'BucketName': 'string', 'EncryptionOption': 'SSE_S3 ' '| ' 'SSE_KMS', 'KmsKeyId': 'string', 'ObjectKeyPrefix': 'string'}}}}}
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.
See also: AWS API Documentation
Request Syntax
client.update_table( DatabaseName='string', TableName='string', RetentionProperties={ 'MemoryStoreRetentionPeriodInHours': 123, 'MagneticStoreRetentionPeriodInDays': 123 }, MagneticStoreWriteProperties={ 'EnableMagneticStoreWrites': True|False, 'MagneticStoreRejectedDataLocation': { 'S3Configuration': { 'BucketName': 'string', 'ObjectKeyPrefix': 'string', 'EncryptionOption': 'SSE_S3'|'SSE_KMS', 'KmsKeyId': 'string' } } } )
string
[REQUIRED]
The name of the Timestream database.
string
[REQUIRED]
The name of the Timestream table.
dict
The retention duration of the memory store and the magnetic store.
MemoryStoreRetentionPeriodInHours (integer) -- [REQUIRED]
The duration for which data must be stored in the memory store.
MagneticStoreRetentionPeriodInDays (integer) -- [REQUIRED]
The duration for which data must be stored in the magnetic store.
dict
Contains properties to set on the table when enabling magnetic store writes.
EnableMagneticStoreWrites (boolean) -- [REQUIRED]
A flag to enable magnetic store writes.
MagneticStoreRejectedDataLocation (dict) --
The location to write error reports for records rejected asynchronously during magnetic store writes.
S3Configuration (dict) --
Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.
BucketName (string) --
>Bucket name of the customer S3 bucket.
ObjectKeyPrefix (string) --
Object key preview for the customer S3 location.
EncryptionOption (string) --
Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key.
KmsKeyId (string) --
KMS key id for the customer s3 location when encrypting with a KMS managed key.
dict
Response Syntax
{ 'Table': { 'Arn': 'string', 'TableName': 'string', 'DatabaseName': 'string', 'TableStatus': 'ACTIVE'|'DELETING', 'RetentionProperties': { 'MemoryStoreRetentionPeriodInHours': 123, 'MagneticStoreRetentionPeriodInDays': 123 }, 'CreationTime': datetime(2015, 1, 1), 'LastUpdatedTime': datetime(2015, 1, 1), 'MagneticStoreWriteProperties': { 'EnableMagneticStoreWrites': True|False, 'MagneticStoreRejectedDataLocation': { 'S3Configuration': { 'BucketName': 'string', 'ObjectKeyPrefix': 'string', 'EncryptionOption': 'SSE_S3'|'SSE_KMS', 'KmsKeyId': 'string' } } } } }
Response Structure
(dict) --
Table (dict) --
The updated Timestream table.
Arn (string) --
The Amazon Resource Name that uniquely identifies this table.
TableName (string) --
The name of the Timestream table.
DatabaseName (string) --
The name of the Timestream database that contains this table.
TableStatus (string) --
The current state of the table:
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
RetentionProperties (dict) --
The retention duration for the memory store and magnetic store.
MemoryStoreRetentionPeriodInHours (integer) --
The duration for which data must be stored in the memory store.
MagneticStoreRetentionPeriodInDays (integer) --
The duration for which data must be stored in the magnetic store.
CreationTime (datetime) --
The time when the Timestream table was created.
LastUpdatedTime (datetime) --
The time when the Timestream table was last updated.
MagneticStoreWriteProperties (dict) --
Contains properties to set on the table when enabling magnetic store writes.
EnableMagneticStoreWrites (boolean) --
A flag to enable magnetic store writes.
MagneticStoreRejectedDataLocation (dict) --
The location to write error reports for records rejected asynchronously during magnetic store writes.
S3Configuration (dict) --
Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.
BucketName (string) --
>Bucket name of the customer S3 bucket.
ObjectKeyPrefix (string) --
Object key preview for the customer S3 location.
EncryptionOption (string) --
Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key.
KmsKeyId (string) --
KMS key id for the customer s3 location when encrypting with a KMS managed key.
{'CommonAttributes': {'MeasureValueType': {'TIMESTAMP', 'MULTI'}, 'MeasureValues': [{'Name': 'string', 'Type': 'DOUBLE | BIGINT | VARCHAR | ' 'BOOLEAN | TIMESTAMP | MULTI', 'Value': 'string'}]}, 'Records': {'MeasureValueType': {'TIMESTAMP', 'MULTI'}, 'MeasureValues': [{'Name': 'string', 'Type': 'DOUBLE | BIGINT | VARCHAR | BOOLEAN | ' 'TIMESTAMP | MULTI', 'Value': 'string'}]}}
The WriteRecords operation 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 with 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 support 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 a WriteRecords request to update data points. Timestream tracks a version number with each record. Version defaults to 1 when not specified for the record in the request. Timestream will update an existing record’s measure value along with its Version upon receiving a write request with a higher Version number for that record. Upon receiving an update request where the measure value is the same as that of the existing record, Timestream still updates Version , if it is greater than the existing value of Version . You can update a data point as many times as desired, as long as the value of Version continuously increases.
For example, suppose you write a new record without indicating Version in the request. Timestream will store this record, and set Version to 1 . Now, suppose you try to update this record with a WriteRecords request of the same record with a different measure value but, like before, do not provide Version . In this case, Timestream will reject this update with a RejectedRecordsException 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 to 2 , Timestream would then succeed in updating the record’s value, and the Version would be set to 2 . Next, suppose you sent a WriteRecords request with this same record and an identical measure value, but with Version set to 3 . In this case, Timestream would only update Version to 3 . Any further updates would need to send a version number greater than 3 , or the update requests would receive a RejectedRecordsException .
See also: AWS API Documentation
Request Syntax
client.write_records( DatabaseName='string', TableName='string', CommonAttributes={ 'Dimensions': [ { 'Name': 'string', 'Value': 'string', 'DimensionValueType': 'VARCHAR' }, ], 'MeasureName': 'string', 'MeasureValue': 'string', 'MeasureValueType': 'DOUBLE'|'BIGINT'|'VARCHAR'|'BOOLEAN'|'TIMESTAMP'|'MULTI', 'Time': 'string', 'TimeUnit': 'MILLISECONDS'|'SECONDS'|'MICROSECONDS'|'NANOSECONDS', 'Version': 123, 'MeasureValues': [ { 'Name': 'string', 'Value': 'string', 'Type': 'DOUBLE'|'BIGINT'|'VARCHAR'|'BOOLEAN'|'TIMESTAMP'|'MULTI' }, ] }, Records=[ { 'Dimensions': [ { 'Name': 'string', 'Value': 'string', 'DimensionValueType': 'VARCHAR' }, ], 'MeasureName': 'string', 'MeasureValue': 'string', 'MeasureValueType': 'DOUBLE'|'BIGINT'|'VARCHAR'|'BOOLEAN'|'TIMESTAMP'|'MULTI', 'Time': 'string', 'TimeUnit': 'MILLISECONDS'|'SECONDS'|'MICROSECONDS'|'NANOSECONDS', 'Version': 123, 'MeasureValues': [ { 'Name': 'string', 'Value': 'string', 'Type': 'DOUBLE'|'BIGINT'|'VARCHAR'|'BOOLEAN'|'TIMESTAMP'|'MULTI' }, ] }, ] )
string
[REQUIRED]
The name of the Timestream database.
string
[REQUIRED]
The name of the Timestream table.
dict
A record containing the common measure, dimension, time, and version attributes shared across all the records in the request. The measure and dimension attributes specified will be merged with the measure and dimension attributes in the records object when the data is written into Timestream. Dimensions may not overlap, or a ValidationException will be thrown. In other words, a record must contain dimensions with unique names.
Dimensions (list) --
Contains the list of dimensions for time series data points.
(dict) --
Dimension represents the meta data attributes of the time series. For example, the name and availability zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions.
Name (string) -- [REQUIRED]
Dimension represents the meta data attributes of the time series. For example, the name and availability zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions.
For constraints on Dimension names, see Naming Constraints .
Value (string) -- [REQUIRED]
The value of the dimension.
DimensionValueType (string) --
The data type of the dimension for the time series data point.
MeasureName (string) --
Measure represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures.
MeasureValue (string) --
Contains the measure value for the time series data point.
MeasureValueType (string) --
Contains the data type of the measure value for the time series data point. Default type is DOUBLE .
Time (string) --
Contains the time at which the measure value for the data point was collected. The time value plus the unit provides the time elapsed since the epoch. For example, if the time value is 12345 and the unit is ms , then 12345 ms have elapsed since the epoch.
TimeUnit (string) --
The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds or other supported values. Default is MILLISECONDS .
Version (integer) --
64-bit attribute used for record updates. Write requests for duplicate data with a higher version number will update the existing measure value and version. In cases where the measure value is the same, Version will still be updated . Default value is 1 .
Note
Version must be 1 or greater, or you will receive a ValidationException error.
MeasureValues (list) --
Contains the list of MeasureValue for time series data points.
This is only allowed for type MULTI . For scalar values, use MeasureValue attribute of the Record directly.
(dict) --
MeasureValue represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. MeasureValue has both name and value.
MeasureValue is only allowed for type MULTI . Using MULTI type, you can pass multiple data attributes associated with the same time series in a single record
Name (string) -- [REQUIRED]
Name of the MeasureValue.
For constraints on MeasureValue names, refer to Naming Constraints in the Timestream developer guide.
Value (string) -- [REQUIRED]
Value for the MeasureValue.
Type (string) -- [REQUIRED]
Contains the data type of the MeasureValue for the time series data point.
list
[REQUIRED]
An array of records containing the unique measure, dimension, time, and version attributes for each time series data point.
(dict) --
Record represents a time series data point being written into Timestream. Each record contains an array of dimensions. Dimensions represent the meta data attributes of a time series data point such as the instance name or availability zone of an EC2 instance. A record also contains the measure name which is the name of the measure being collected for example the CPU utilization of an EC2 instance. A record also contains the measure value and the value type which is the data type of the measure value. In addition, the record contains the timestamp when the measure was collected that the timestamp unit which represents the granularity of the timestamp.
Records have a Version field, which is a 64-bit long that you can use for updating data points. Writes of a duplicate record with the same dimension, timestamp, and measure name but different measure value will only succeed if the Version attribute of the record in the write request is higher than that of the existing record. Timestream defaults to a Version of 1 for records without the Version field.
Dimensions (list) --
Contains the list of dimensions for time series data points.
(dict) --
Dimension represents the meta data attributes of the time series. For example, the name and availability zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions.
Name (string) -- [REQUIRED]
Dimension represents the meta data attributes of the time series. For example, the name and availability zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions.
For constraints on Dimension names, see Naming Constraints .
Value (string) -- [REQUIRED]
The value of the dimension.
DimensionValueType (string) --
The data type of the dimension for the time series data point.
MeasureName (string) --
Measure represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures.
MeasureValue (string) --
Contains the measure value for the time series data point.
MeasureValueType (string) --
Contains the data type of the measure value for the time series data point. Default type is DOUBLE .
Time (string) --
Contains the time at which the measure value for the data point was collected. The time value plus the unit provides the time elapsed since the epoch. For example, if the time value is 12345 and the unit is ms , then 12345 ms have elapsed since the epoch.
TimeUnit (string) --
The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds or other supported values. Default is MILLISECONDS .
Version (integer) --
64-bit attribute used for record updates. Write requests for duplicate data with a higher version number will update the existing measure value and version. In cases where the measure value is the same, Version will still be updated . Default value is 1 .
Note
Version must be 1 or greater, or you will receive a ValidationException error.
MeasureValues (list) --
Contains the list of MeasureValue for time series data points.
This is only allowed for type MULTI . For scalar values, use MeasureValue attribute of the Record directly.
(dict) --
MeasureValue represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. MeasureValue has both name and value.
MeasureValue is only allowed for type MULTI . Using MULTI type, you can pass multiple data attributes associated with the same time series in a single record
Name (string) -- [REQUIRED]
Name of the MeasureValue.
For constraints on MeasureValue names, refer to Naming Constraints in the Timestream developer guide.
Value (string) -- [REQUIRED]
Value for the MeasureValue.
Type (string) -- [REQUIRED]
Contains the data type of the MeasureValue for the time series data point.
dict
Response Syntax
{ 'RecordsIngested': { 'Total': 123, 'MemoryStore': 123, 'MagneticStore': 123 } }
Response Structure
(dict) --
RecordsIngested (dict) --
Information on the records ingested by this request.
Total (integer) --
Total count of successfully ingested records.
MemoryStore (integer) --
Count of records ingested into the memory store.
MagneticStore (integer) --
Count of records ingested into the magnetic store.