Skip to main content

table_policies

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

Overview

Nametable_policies
TypeResource
Idaws.s3tables.table_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
resource_policystringThe JSON that defines the policy.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_table_policyselecttable_bucket_arn, namespace, name, regionGets details about a table policy. For more information, see Viewing a table policy in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:GetTablePolicy permission to use this operation.
put_table_policyreplacetable_bucket_arn, namespace, name, region, resourcePolicyCreates a new table policy or replaces an existing table policy for a table. For more information, see Adding a table policy in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:PutTablePolicy permission to use this operation.
delete_table_policydeletetable_bucket_arn, namespace, name, regionDeletes a table policy. For more information, see Deleting a table policy in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteTablePolicy 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
namestringThe table name.
namespacestringThe namespace associated with the table.
regionstringAWS region (default: us-east-1)
table_bucket_arnstringThe Amazon Resource Name (ARN) of the table bucket that contains the table.

SELECT examples

Gets details about a table policy. For more information, see Viewing a table policy in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:GetTablePolicy permission to use this operation.

SELECT
resource_policy
FROM aws.s3tables.table_policies
WHERE table_bucket_arn = '{{ table_bucket_arn }}' -- required
AND namespace = '{{ namespace }}' -- required
AND name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Creates a new table policy or replaces an existing table policy for a table. For more information, see Adding a table policy in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:PutTablePolicy permission to use this operation.

REPLACE aws.s3tables.table_policies
SET
resourcePolicy = '{{ resourcePolicy }}'
WHERE
table_bucket_arn = '{{ table_bucket_arn }}' --required
AND namespace = '{{ namespace }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND resourcePolicy = '{{ resourcePolicy }}' --required;

DELETE examples

Deletes a table policy. For more information, see Deleting a table policy in the Amazon Simple Storage Service User Guide. Permissions You must have the s3tables:DeleteTablePolicy permission to use this operation.

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