Skip to main content

tables

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

Overview

Nametables
TypeResource
DescriptionResource Type definition for AWS::S3Tables::Table
Idawscc.s3tables.tables

Fields

NameDatatypeDescription
without_metadatastringIndicates that you don't want to specify a schema for the table. This property is mutually exclusive to 'IcebergMetadata', and its only possible value is 'Yes'.
compactionobjectSettings governing the Compaction maintenance action. Contains details about the compaction settings for an Iceberg table.
namespacestringThe namespace that the table belongs to.
table_namestringThe name for the table.
table_bucket_arnstringThe Amazon Resource Name (ARN) of the specified table bucket.
version_tokenstringThe version token of the table
table_arnstringThe Amazon Resource Name (ARN) of the specified table.
open_table_formatstringFormat of the table.
iceberg_metadataobjectContains details about the metadata for an Iceberg table.
warehouse_locationstringThe warehouse location of the table.
snapshot_managementobjectContains details about the snapshot management settings for an Iceberg table. A snapshot is expired when it exceeds MinSnapshotsToKeep and MaxSnapshotAgeHours.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcetablesINSERTTableBucketARN, Namespace, TableName, OpenTableFormat, 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,
without_metadata,
compaction,
namespace,
table_name,
table_bucket_arn,
version_token,
table_arn,
open_table_format,
iceberg_metadata,
warehouse_location,
snapshot_management
FROM awscc.s3tables.tables
WHERE
region = '{{ region }}' AND
Identifier = '{{ table_arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.s3tables.tables (
Namespace,
TableName,
TableBucketARN,
OpenTableFormat,
region
)
SELECT
'{{ namespace }}',
'{{ table_name }}',
'{{ table_bucket_arn }}',
'{{ open_table_format }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.s3tables.tables
SET PatchDocument = string('{{ {
"Compaction": compaction,
"Namespace": namespace,
"TableName": table_name,
"SnapshotManagement": snapshot_management
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ table_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.s3tables.tables
WHERE
Identifier = '{{ table_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

s3tables:GetTable,
s3tables:GetTableMaintenanceConfiguration