Skip to main content

tables

Creates, updates, deletes or gets a table resource or lists tables in a region

Overview

Nametables
TypeResource
DescriptionThe AWS::Timestream::Table resource creates a Timestream Table.
Idawscc.timestream.tables

Fields

NameDatatypeDescription
arnstring
namestringThe table name exposed as a read-only attribute.
database_namestringThe name for the database which the table to be created belongs to.
table_namestringThe name for the table. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the table name.
retention_propertiesobjectThe retention duration of the memory store and the magnetic store.
schemaobjectA Schema specifies the expected data model of the table.
magnetic_store_write_propertiesobjectThe properties that determine whether magnetic store writes are enabled.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::Timestream::Table.

Methods

NameResourceAccessible byRequired Params
create_resourcetablesINSERTDatabaseName, region
delete_resourcetablesDELETEIdentifier, region
update_resourcetablesUPDATEIdentifier, PatchDocument, region
list_resourcestables_list_onlySELECTregion
get_resourcetablesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual table.

SELECT
region,
arn,
name,
database_name,
table_name,
retention_properties,
schema,
magnetic_store_write_properties,
tags
FROM awscc.timestream.tables
WHERE
region = 'us-east-1' AND
Identifier = '{{ database_name }}|{{ table_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new table resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.timestream.tables (
DatabaseName,
region
)
SELECT
'{{ database_name }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a table resource, using stack-deploy.

/*+ update */
UPDATE awscc.timestream.tables
SET PatchDocument = string('{{ {
"RetentionProperties": retention_properties,
"Schema": schema,
"MagneticStoreWriteProperties": magnetic_store_write_properties,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ database_name }}|{{ table_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.timestream.tables
WHERE
Identifier = '{{ database_name }}|{{ table_name }}' AND
region = 'us-east-1';

Permissions

To operate on the tables resource, the following permissions are required:

timestream:CreateTable,
timestream:DescribeEndpoints,
timestream:TagResource,
s3:PutObject,
s3:GetObject,
s3:GetBucketAcl,
kms:GenerateDataKey,
kms:GenerateDataKeyWithoutPlaintext,
kms:DescribeKey,
kms:Encrypt