Skip to main content

namespaces

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

Overview

Namenamespaces
TypeResource
Idaws.s3tables.namespaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time the namespace was created at.
created_bystringThe ID of the account that created the namespace. (pattern: <code>[0-9].*</code>)
namespacearrayThe name of the namespace.
namespace_idstringThe unique identifier of the namespace.
owner_account_idstringThe ID of the account that owns the namespcace. (pattern: <code>[0-9].*</code>)
table_bucket_idstringThe unique identifier of the table bucket containing this namespace.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_namespaceselecttable_bucket_arn, namespace, regionGets details about a namespace. For more information, see Table namespaces in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:GetNamespace permission to use this operation.
list_namespacesselecttable_bucket_arn, regionprefix, continuationToken, maxNamespacesLists the namespaces within a table bucket. For more information, see Table namespaces in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:ListNamespaces permission to use this operation.
create_namespaceinserttable_bucket_arn, region, namespaceCreates a namespace. A namespace is a logical grouping of tables within your table bucket, which you can use to organize tables. For more information, see Create a namespace in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:CreateNamespace permission to use this operation.
delete_namespacedeletetable_bucket_arn, namespace, regionDeletes a namespace. For more information, see Delete a namespace in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteNamespace 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
namespacestringThe name of the namespace.
regionstringAWS region (default: us-east-1)
table_bucket_arnstringThe Amazon Resource Name (ARN) of the table bucket associated with the namespace.
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.
maxNamespacesintegerThe maximum number of namespaces to return in the list.
prefixstringThe prefix of the namespaces.

SELECT examples

Gets details about a namespace. For more information, see Table namespaces in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:GetNamespace permission to use this operation.

SELECT
created_at,
created_by,
namespace,
namespace_id,
owner_account_id,
table_bucket_id
FROM aws.s3tables.namespaces
WHERE table_bucket_arn = '{{ table_bucket_arn }}' -- required
AND namespace = '{{ namespace }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a namespace. A namespace is a logical grouping of tables within your table bucket, which you can use to organize tables. For more information, see Create a namespace in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:CreateNamespace permission to use this operation.

INSERT INTO aws.s3tables.namespaces (
namespace,
table_bucket_arn,
region
)
SELECT
'{{ namespace }}' /* required */,
'{{ table_bucket_arn }}',
'{{ region }}'
RETURNING
namespace,
table_bucket_arn
;

DELETE examples

Deletes a namespace. For more information, see Delete a namespace in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteNamespace permission to use this operation.

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