table_policies
Creates, updates, deletes, gets or lists a table_policies resource.
Overview
| Name | table_policies |
| Type | Resource |
| Id | aws.s3tables.table_policies |
Fields
The following fields are returned by SELECT queries:
- get_table_policy
| Name | Datatype | Description |
|---|---|---|
resource_policy | string | The JSON that defines the policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_table_policy | select | table_bucket_arn, namespace, name, region | 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. | |
put_table_policy | replace | table_bucket_arn, namespace, name, region, resourcePolicy | 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. | |
delete_table_policy | delete | table_bucket_arn, namespace, name, region | 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. |
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 table name. |
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 that contains the table. |
SELECT examples
- get_table_policy
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
- put_table_policy
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
- delete_table_policy
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
;