table_buckets
Creates, updates, deletes, gets or lists a table_buckets resource.
Overview
| Name | table_buckets |
| Type | Resource |
| Id | aws.s3tables.table_buckets |
Fields
The following fields are returned by SELECT queries:
- get_table_bucket
- list_table_buckets
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the table bucket (pattern: <code>[0-9a-z-]*</code>) |
arn | string | The Amazon Resource Name (ARN) of the table bucket. (pattern: <code>(arn:aws[-a-z0-9]:[a-z0-9]+:[-a-z0-9]:[0-9]{12}:bucket/[a-z0-9_-]{3,63})</code>) |
created_at | string (date-time) | The date and time the table bucket was created. |
owner_account_id | string | The ID of the account that owns the table bucket. (pattern: <code>[0-9].*</code>) |
table_bucket_id | string | The unique identifier of the table bucket. |
type_ | string | The type of the table bucket. (customer, aws) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the table bucket. (pattern: <code>[0-9a-z-]*</code>) |
arn | string | The Amazon Resource Name (ARN) of the table bucket. (pattern: <code>(arn:aws[-a-z0-9]:[a-z0-9]+:[-a-z0-9]:[0-9]{12}:bucket/[a-z0-9_-]{3,63})</code>) |
created_at | string (date-time) | The date and time the table bucket was created at. |
owner_account_id | string | The ID of the account that owns the table bucket. (pattern: <code>[0-9].*</code>) |
table_bucket_id | string | The system-assigned unique identifier for the table bucket. |
type_ | string | The type of the table bucket. (customer, aws) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_table_bucket | select | table_bucket_arn, region | Gets details on a table bucket. For more information, see Viewing details about an Amazon S3 table bucket in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:GetTableBucket permission to use this operation. | |
list_table_buckets | select | region | prefix, continuationToken, maxBuckets, type | Lists table buckets for your account. For more information, see S3 Table buckets in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:ListTableBuckets permission to use this operation. |
create_table_bucket | insert | region, name | Creates a table bucket. For more information, see Creating a table bucket in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:CreateTableBucket permission to use this operation. If you use this operation with the optional encryptionConfiguration parameter you must have the s3tables:PutTableBucketEncryption permission. If you use this operation with the storageClassConfiguration request parameter, you must have the s3tables:PutTableBucketStorageClass permission. To create a table bucket with tags, you must have the s3tables:TagResource permission in addition to s3tables:CreateTableBucket permission. | |
delete_table_bucket | delete | table_bucket_arn, region | Deletes a table bucket. For more information, see Deleting a table bucket in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteTableBucket permission to use this operation. | |
rename_table | exec | table_bucket_arn, namespace, name, region | Renames a table or a namespace. For more information, see S3 Tables in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:RenameTable 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.
| Name | Datatype | Description |
|---|---|---|
name | string | The current name of the table. |
namespace | string | The namespace associated with the table. |
region | string | AWS region (default: us-east-1) |
table_bucket_arn | string | The Amazon Resource Name (ARN) of the table bucket. |
continuationToken | string | ContinuationToken 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. |
maxBuckets | integer | The maximum number of table buckets to return in the list. |
prefix | string | The prefix of the table buckets. |
type | string | The type of table buckets to filter by in the list. |
SELECT examples
- get_table_bucket
- list_table_buckets
Gets details on a table bucket. For more information, see Viewing details about an Amazon S3 table bucket in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:GetTableBucket permission to use this operation.
SELECT
name,
arn,
created_at,
owner_account_id,
table_bucket_id,
type_
FROM aws.s3tables.table_buckets
WHERE table_bucket_arn = '{{ table_bucket_arn }}' -- required
AND region = '{{ region }}' -- required
;
Lists table buckets for your account. For more information, see S3 Table buckets in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:ListTableBuckets permission to use this operation.
SELECT
name,
arn,
created_at,
owner_account_id,
table_bucket_id,
type_
FROM aws.s3tables.table_buckets
WHERE region = '{{ region }}' -- required
AND prefix = '{{ prefix }}'
AND continuationToken = '{{ continuationToken }}'
AND maxBuckets = '{{ maxBuckets }}'
AND type = '{{ type }}'
;
INSERT examples
- create_table_bucket
- Manifest
Creates a table bucket. For more information, see Creating a table bucket in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:CreateTableBucket permission to use this operation. If you use this operation with the optional encryptionConfiguration parameter you must have the s3tables:PutTableBucketEncryption permission. If you use this operation with the storageClassConfiguration request parameter, you must have the s3tables:PutTableBucketStorageClass permission. To create a table bucket with tags, you must have the s3tables:TagResource permission in addition to s3tables:CreateTableBucket permission.
INSERT INTO aws.s3tables.table_buckets (
name,
encryptionConfiguration,
storageClassConfiguration,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ encryptionConfiguration }}',
'{{ storageClassConfiguration }}',
'{{ tags }}',
'{{ region }}'
RETURNING
arn
;
# Description fields are for documentation purposes
- name: table_buckets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the table_buckets resource.
- name: name
value: "{{ name }}"
- name: encryptionConfiguration
description: |
Configuration specifying how data should be encrypted. This structure defines the encryption algorithm and optional KMS key to be used for server-side encryption.
value:
sseAlgorithm: "{{ sseAlgorithm }}"
kmsKeyArn: "{{ kmsKeyArn }}"
- name: storageClassConfiguration
description: |
The configuration details for the storage class of tables or table buckets. This allows you to optimize storage costs by selecting the appropriate storage class based on your access patterns and performance requirements.
value:
storageClass: "{{ storageClass }}"
- name: tags
value: "{{ tags }}"
DELETE examples
- delete_table_bucket
Deletes a table bucket. For more information, see Deleting a table bucket in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteTableBucket permission to use this operation.
DELETE FROM aws.s3tables.table_buckets
WHERE table_bucket_arn = '{{ table_bucket_arn }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- rename_table
Renames a table or a namespace. For more information, see S3 Tables in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:RenameTable permission to use this operation.
EXEC aws.s3tables.table_buckets.rename_table
@table_bucket_arn='{{ table_bucket_arn }}' --required,
@namespace='{{ namespace }}' --required,
@name='{{ name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"newNamespaceName": "{{ newNamespaceName }}",
"newName": "{{ newName }}",
"versionToken": "{{ versionToken }}"
}'
;