Skip to main content

tables

Creates, updates, deletes, gets or lists a tables resource.

Overview

Nametables
TypeResource
Idaws.s3tables.tables

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the table. (pattern: <code>[0-9a-z_]*</code>)
created_atstring (date-time)The date and time the table was created at.
managed_by_servicestringThe Amazon Web Services service managing this table, if applicable. For example, a replicated table is managed by the S3 Tables replication service.
modified_atstring (date-time)The date and time the table was last modified at.
namespacearrayThe name of the namespace.
namespace_idstringThe unique identifier for the namespace that contains this table.
table_arnstringThe Amazon Resource Name (ARN) of the table. (pattern: <code>(arn:aws[-a-z0-9]:[a-z0-9]+:[-a-z0-9]:[0-9]{12}:bucket/[a-z0-9_-]{3,63}/table/[a-zA-Z0-9-_]{1,255})</code>)
table_bucket_idstringThe unique identifier for the table bucket that contains this table.
type_stringThe type of the table. (customer, aws)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tablesselecttable_bucket_arn, regionnamespace, prefix, continuationToken, maxTablesList tables in the given table bucket. For more information, see S3 Tables in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:ListTables permission to use this operation.
get_tableselectregiontableBucketARN, namespace, name, tableArnGets details about a table. For more information, see S3 Tables in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:GetTable permission to use this operation.
create_tableinserttable_bucket_arn, namespace, region, name, formatCreates a new table associated with the given namespace in a table bucket. For more information, see Creating an Amazon S3 table in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:CreateTable permission to use this operation. If you use this operation with the optional metadata request parameter you must have the s3tables:PutTableData permission. If you use this operation with the optional encryptionConfiguration request parameter you must have the s3tables:PutTableEncryption permission. If you use this operation with the storageClassConfiguration request parameter, you must have the s3tables:PutTableStorageClass permission. To create a table with tags, you must have the s3tables:TagResource permission in addition to s3tables:CreateTable permission. Additionally, If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see Permissions requirements for S3 Tables SSE-KMS encryption.
delete_tabledeletetable_bucket_arn, namespace, name, regionversionTokenDeletes a table. For more information, see Deleting an Amazon S3 table in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteTable permission to use this operation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of the table.
namespacestringThe namespace associated with the table.
regionstringAWS region (default: us-east-1)
table_bucket_arnstringThe Amazon Resource Name (ARN) of the table bucket that contains the table.
continuationTokenstringContinuationToken indicates to Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key. You can use this ContinuationToken for pagination of the list results.
maxTablesintegerThe maximum number of tables to return.
namestringThe name of the table.
namespacestringThe name of the namespace the table is associated with.
prefixstringThe prefix of the tables.
tableArnstringThe Amazon Resource Name (ARN) of the table.
tableBucketARNstringThe Amazon Resource Name (ARN) of the table bucket associated with the table.
versionTokenstringThe version token of the table.

SELECT examples

List tables in the given table bucket. For more information, see S3 Tables in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:ListTables permission to use this operation.

SELECT
name,
created_at,
managed_by_service,
modified_at,
namespace,
namespace_id,
table_arn,
table_bucket_id,
type_
FROM aws.s3tables.tables
WHERE table_bucket_arn = '{{ table_bucket_arn }}' -- required
AND region = '{{ region }}' -- required
AND namespace = '{{ namespace }}'
AND prefix = '{{ prefix }}'
AND continuationToken = '{{ continuationToken }}'
AND maxTables = '{{ maxTables }}'
;

INSERT examples

Creates a new table associated with the given namespace in a table bucket. For more information, see Creating an Amazon S3 table in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:CreateTable permission to use this operation. If you use this operation with the optional metadata request parameter you must have the s3tables:PutTableData permission. If you use this operation with the optional encryptionConfiguration request parameter you must have the s3tables:PutTableEncryption permission. If you use this operation with the storageClassConfiguration request parameter, you must have the s3tables:PutTableStorageClass permission. To create a table with tags, you must have the s3tables:TagResource permission in addition to s3tables:CreateTable permission. Additionally, If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see Permissions requirements for S3 Tables SSE-KMS encryption.

INSERT INTO aws.s3tables.tables (
name,
format,
metadata,
encryptionConfiguration,
storageClassConfiguration,
tags,
table_bucket_arn,
namespace,
region
)
SELECT
'{{ name }}' /* required */,
'{{ format }}' /* required */,
'{{ metadata }}',
'{{ encryptionConfiguration }}',
'{{ storageClassConfiguration }}',
'{{ tags }}',
'{{ table_bucket_arn }}',
'{{ namespace }}',
'{{ region }}'
RETURNING
table_arn,
version_token
;

DELETE examples

Deletes a table. For more information, see Deleting an Amazon S3 table in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteTable permission to use this operation.

DELETE FROM aws.s3tables.tables
WHERE table_bucket_arn = '{{ table_bucket_arn }}' --required
AND namespace = '{{ namespace }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND versionToken = '{{ versionToken }}'
;