tables
Creates, updates, deletes or gets a table resource or lists tables in a region
Overview
| Name | tables |
| Type | Resource |
| Description | Resource Type definition for AWS::S3Tables::Table |
| Id | awscc.s3tables.tables |
Fields
| Name | Datatype | Description |
|---|---|---|
without_metadata | string | Indicates 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'. |
compaction | object | Settings governing the Compaction maintenance action. Contains details about the compaction settings for an Iceberg table. |
namespace | string | The namespace that the table belongs to. |
table_name | string | The name for the table. |
table_bucket_arn | string | The Amazon Resource Name (ARN) of the specified table bucket. |
version_token | string | The version token of the table |
table_arn | string | The Amazon Resource Name (ARN) of the specified table. |
open_table_format | string | Format of the table. |
iceberg_metadata | object | Contains details about the metadata for an Iceberg table. |
warehouse_location | string | The warehouse location of the table. |
snapshot_management | object | Contains details about the snapshot management settings for an Iceberg table. A snapshot is expired when it exceeds MinSnapshotsToKeep and MaxSnapshotAgeHours. |
region | string | AWS region. |
For more information, see AWS::S3Tables::Table.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | TableBucketARN, Namespace, TableName, OpenTableFormat, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, 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 = 'us-east-1' AND data__Identifier = '<TableARN>';
INSERT example
Use the following StackQL query and manifest file to create a new table resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.s3tables.tables (
Namespace,
TableName,
TableBucketARN,
OpenTableFormat,
region
)
SELECT
'{{ Namespace }}',
'{{ TableName }}',
'{{ TableBucketARN }}',
'{{ OpenTableFormat }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.s3tables.tables (
WithoutMetadata,
Compaction,
Namespace,
TableName,
TableBucketARN,
OpenTableFormat,
IcebergMetadata,
SnapshotManagement,
region
)
SELECT
'{{ WithoutMetadata }}',
'{{ Compaction }}',
'{{ Namespace }}',
'{{ TableName }}',
'{{ TableBucketARN }}',
'{{ OpenTableFormat }}',
'{{ IcebergMetadata }}',
'{{ SnapshotManagement }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: table
props:
- name: WithoutMetadata
value: '{{ WithoutMetadata }}'
- name: Compaction
value:
Status: '{{ Status }}'
TargetFileSizeMB: '{{ TargetFileSizeMB }}'
- name: Namespace
value: '{{ Namespace }}'
- name: TableName
value: '{{ TableName }}'
- name: TableBucketARN
value: '{{ TableBucketARN }}'
- name: OpenTableFormat
value: '{{ OpenTableFormat }}'
- name: IcebergMetadata
value:
IcebergSchema:
SchemaFieldList:
- Type: '{{ Type }}'
Required: '{{ Required }}'
Name: '{{ Name }}'
- name: SnapshotManagement
value:
Status: '{{ Status }}'
MinSnapshotsToKeep: '{{ MinSnapshotsToKeep }}'
MaxSnapshotAgeHours: '{{ MaxSnapshotAgeHours }}'
DELETE example
/*+ delete */
DELETE FROM awscc.s3tables.tables
WHERE data__Identifier = '<TableARN>'
AND region = 'us-east-1';
Permissions
To operate on the tables resource, the following permissions are required:
Read
s3tables:GetTable,
s3tables:GetTableMaintenanceConfiguration
Create
s3tables:CreateTable,
s3tables:PutTableData,
s3tables:GetTable,
s3tables:PutTableMaintenanceConfiguration
Update
s3tables:GetTable,
s3tables:RenameTable,
s3tables:PutTableMaintenanceConfiguration
List
s3tables:ListTables,
s3tables:ListTableBuckets,
s3tables:ListNamespaces
Delete
s3tables:GetTable,
s3tables:DeleteTable