create_snowflake_access_policy
Define and enforce access rules for Snowflake databases, specifying which roles can read or write to specific schemas and tables, with optional scheduling.
Instructions
Create an access management policy for a Snowflake datasource.
Defines which roles can access which databases, schemas, or tables with read or write permissions. Policies are enforced by ALTR and checked on a schedule.
Each rule in the list must contain:
actors: list of dicts with 'type' ("role"), 'condition' ("equals"|"starts_with"|"ends_with"), and 'identifiers' (list of str).
objects: list of dicts with 'type' ("database"|"schema"|"table"), 'condition' ("equals"|"starts_with"|"ends_with"| "fully_qualified"), and 'identifiers' (list of str) or 'fully_qualified_identifiers' (list of dicts with database/schema/table/view keys).
access: list of dicts with 'name' ("read"|"write").
Optionally, rules may include 'tagged_objects' for tag-based targeting:
tagged_objects: list of dicts with 'check_against' (list of "databases"|"schemas"|"tables"|"views"), 'tagged_with' (list of dicts with database/schema/name/value keys), and 'tag_condition' ("or"|"and").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy_name | Yes | Name for the policy (1-255 chars). | |
| description | Yes | Description of the policy (1-255 chars). | |
| connection_id | Yes | ALTR connection ID for the Snowflake database. | |
| rules | Yes | List of access rule objects, or a JSON string encoding such a list. | |
| policy_maintenance | No | Optional schedule dict with 'rate' ("day"|"cron") and 'value' (number or cron string). | |
| access_request_id | No | Optional access request ID this policy fulfills. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||