table_buckets
Creates, updates, deletes or gets a table_bucket
resource or lists table_buckets
in a region
Overview
Name | table_buckets |
Type | Resource |
Description | Creates an Amazon S3 Tables table bucket in the same AWS Region where you create the AWS CloudFormation stack. |
Id | aws.s3tables.table_buckets |
Fields
Name | Datatype | Description |
---|---|---|
table_bucket_arn | string | The Amazon Resource Name (ARN) of the table bucket to which the policy applies. |
table_bucket_name | string | A name for the table bucket. |
unreferenced_file_removal | object | Settings governing the Unreferenced File Removal maintenance action. Unreferenced file removal identifies and deletes all objects that are not referenced by any table snapshots. |
region | string | AWS region. |
For more information, see AWS::S3Tables::TableBucket
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | TableBucketName, 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 table_buckets
in a region.
SELECT
region,
table_bucket_arn,
table_bucket_name,
unreferenced_file_removal
FROM aws.s3tables.table_buckets
WHERE region = 'us-east-1';
Gets all properties from an individual table_bucket
.
SELECT
region,
table_bucket_arn,
table_bucket_name,
unreferenced_file_removal
FROM aws.s3tables.table_buckets
WHERE region = 'us-east-1' AND data__Identifier = '<TableBucketARN>';
INSERT
example
Use the following StackQL query and manifest file to create a new table_bucket
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.s3tables.table_buckets (
TableBucketName,
region
)
SELECT
'{{ TableBucketName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.s3tables.table_buckets (
TableBucketName,
UnreferencedFileRemoval,
region
)
SELECT
'{{ TableBucketName }}',
'{{ UnreferencedFileRemoval }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: table_bucket
props:
- name: TableBucketName
value: '{{ TableBucketName }}'
- name: UnreferencedFileRemoval
value:
Status: '{{ Status }}'
UnreferencedDays: '{{ UnreferencedDays }}'
NoncurrentDays: '{{ NoncurrentDays }}'
DELETE
example
/*+ delete */
DELETE FROM aws.s3tables.table_buckets
WHERE data__Identifier = '<TableBucketARN>'
AND region = 'us-east-1';
Permissions
To operate on the table_buckets
resource, the following permissions are required:
Create
s3tables:CreateTableBucket,
s3tables:PutTableBucketMaintenanceConfiguration,
s3tables:GetTableBucket,
s3tables:GetTableBucketMaintenanceConfiguration
Read
s3tables:GetTableBucket,
s3tables:GetTableBucketMaintenanceConfiguration
Update
s3tables:PutTableBucketMaintenanceConfiguration,
s3tables:GetTableBucket,
s3tables:GetTableBucketMaintenanceConfiguration
Delete
s3tables:DeleteTableBucket
List
s3tables:ListTableBuckets