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.
Idaws.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.

Methods

NameAccessible byRequired Params
create_resourceINSERTDatabaseName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all tables in a region.

SELECT
region,
arn,
name,
database_name,
table_name,
retention_properties,
schema,
magnetic_store_write_properties,
tags
FROM aws.timestream.tables
WHERE region = 'us-east-1';

Gets all properties from an individual table.

SELECT
region,
arn,
name,
database_name,
table_name,
retention_properties,
schema,
magnetic_store_write_properties,
tags
FROM aws.timestream.tables
WHERE region = 'us-east-1' AND data__Identifier = '<DatabaseName>|<TableName>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.timestream.tables
WHERE data__Identifier = '<DatabaseName|TableName>'
AND region = 'us-east-1';

Permissions

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

Create

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

Read

timestream:DescribeTable,
timestream:DescribeEndpoints,
timestream:ListTagsForResource

Update

timestream:UpdateTable,
timestream:DescribeEndpoints,
timestream:TagResource,
timestream:UntagResource,
s3:PutObject,
s3:GetObject,
s3:GetBucketAcl,
kms:GenerateDataKey*,
kms:DescribeKey,
kms:Encrypt

Delete

timestream:DeleteTable,
timestream:DescribeEndpoints,
timestream:DescribeTable

List

timestream:ListTables,
timestream:DescribeEndpoints