namespaces
Creates, updates, deletes, gets or lists a namespaces resource.
Overview
| Name | namespaces |
| Type | Resource |
| Id | aws.s3tables.namespaces |
Fields
The following fields are returned by SELECT queries:
- get_namespace
- list_namespaces
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time the namespace was created at. |
created_by | string | The ID of the account that created the namespace. (pattern: <code>[0-9].*</code>) |
namespace | array | The name of the namespace. |
namespace_id | string | The unique identifier of the namespace. |
owner_account_id | string | The ID of the account that owns the namespcace. (pattern: <code>[0-9].*</code>) |
table_bucket_id | string | The unique identifier of the table bucket containing this namespace. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time the namespace was created at. |
created_by | string | The ID of the account that created the namespace. (pattern: <code>[0-9].*</code>) |
namespace | array | The name of the namespace. |
namespace_id | string | The system-assigned unique identifier for the namespace. |
owner_account_id | string | The ID of the account that owns the namespace. (pattern: <code>[0-9].*</code>) |
table_bucket_id | string | The system-assigned unique identifier for the table bucket that contains this namespace. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_namespace | select | table_bucket_arn, namespace, region | 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. | |
list_namespaces | select | table_bucket_arn, region | prefix, continuationToken, maxNamespaces | Lists 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_namespace | insert | table_bucket_arn, region, namespace | 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. | |
delete_namespace | delete | table_bucket_arn, namespace, region | 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. |
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 |
|---|---|---|
namespace | string | The name of the namespace. |
region | string | AWS region (default: us-east-1) |
table_bucket_arn | string | The Amazon Resource Name (ARN) of the table bucket associated with the namespace. |
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. |
maxNamespaces | integer | The maximum number of namespaces to return in the list. |
prefix | string | The prefix of the namespaces. |
SELECT examples
- get_namespace
- list_namespaces
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
;
Lists 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.
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 region = '{{ region }}' -- required
AND prefix = '{{ prefix }}'
AND continuationToken = '{{ continuationToken }}'
AND maxNamespaces = '{{ maxNamespaces }}'
;
INSERT examples
- create_namespace
- Manifest
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
;
# Description fields are for documentation purposes
- name: namespaces
props:
- name: table_bucket_arn
value: "{{ table_bucket_arn }}"
description: Required parameter for the namespaces resource.
- name: region
value: "{{ region }}"
description: Required parameter for the namespaces resource.
- name: namespace
value:
- "{{ namespace }}"
DELETE examples
- delete_namespace
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
;