update_table

TimestreamWrite.Client.update_table(**kwargs)

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

response = 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'
            }
        }
    }
)
Parameters
  • DatabaseName (string) --

    [REQUIRED]

    The name of the Timestream database.

  • TableName (string) --

    [REQUIRED]

    The name of the Timestream table.

  • RetentionProperties (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.

  • MagneticStoreWriteProperties (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) --

          The bucket name of the customer S3 bucket.

        • ObjectKeyPrefix (string) --

          The object key preview for the customer S3 location.

        • EncryptionOption (string) --

          The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

        • KmsKeyId (string) --

          The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

Return type

dict

Returns

Response Syntax

{
    'Table': {
        'Arn': 'string',
        'TableName': 'string',
        'DatabaseName': 'string',
        'TableStatus': 'ACTIVE'|'DELETING'|'RESTORING',
        '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) --

              The bucket name of the customer S3 bucket.

            • ObjectKeyPrefix (string) --

              The object key preview for the customer S3 location.

            • EncryptionOption (string) --

              The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

            • KmsKeyId (string) --

              The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

Exceptions

  • TimestreamWrite.Client.exceptions.InternalServerException
  • TimestreamWrite.Client.exceptions.ThrottlingException
  • TimestreamWrite.Client.exceptions.ValidationException
  • TimestreamWrite.Client.exceptions.ResourceNotFoundException
  • TimestreamWrite.Client.exceptions.AccessDeniedException
  • TimestreamWrite.Client.exceptions.InvalidEndpointException