Titan Core
  • Overview
  • Getting Started
  • Working With Resources
  • Blueprint
  • GitHub Action
  • Resources
    • APIAuthenticationSecurityIntegration
    • APIIntegration
    • AccountParameter
    • AggregationPolicy
    • Alert
    • AuthenticationPolicy
    • AzureStorageIntegration
    • ComputePool
    • Database
    • DatabaseRole
    • DynamicTable
    • EmailNotificationIntegration
    • EventTable
    • ExternalAccessIntegration
    • ExternalStage
    • FailoverGroup
    • FutureGrant
    • GCSStorageIntegration
    • GenericSecret
    • GlueCatalogIntegration
    • Grant
    • GrantOnAll
    • HybridTable
    • ImageRepository
    • InternalStage
    • JSONFileFormat
    • JavascriptUDF
    • MaterializedView
    • NetworkPolicy
    • NetworkRule
    • OAuthSecret
    • ObjectStoreCatalogIntegration
    • PackagesPolicy
    • ParquetFileFormat
    • PasswordPolicy
    • PasswordSecret
    • Pipe
    • PythonStoredProcedure
    • PythonUDF
    • ReplicationGroup
    • ResourceMonitor
    • Role
    • RoleGrant
    • S3StorageIntegration
    • Schema
    • Sequence
    • Service
    • SessionPolicy
    • Share
    • SnowflakePartnerOAuthSecurityIntegration
    • SnowservicesOAuthSecurityIntegration
    • StageStream
    • Table
    • TableStream
    • Tag
    • Task
    • User
    • View
    • ViewStream
    • Warehouse
Powered by GitBook
On this page
  • Examples
  • Python
  • YAML
  • Fields
  1. Resources

GrantOnAll

PreviousGrantNextHybridTable

Last updated 6 months ago

Represents a grant of privileges on all resources of a specified type to a role in Snowflake.

Examples

Python

    # Schema Privs:
    grant_on_all = GrantOnAll(
        priv="CREATE TABLE",
        on_all_schemas_in_database="somedb",
        to="somerole",
    )
    grant_on_all = GrantOnAll(
        priv="CREATE VIEW",
        on_all_schemas_in=Database(name="somedb"),
        to="somerole",
    )
    # Schema Object Privs:
    grant_on_all = GrantOnAll(
        priv="SELECT",
        on_all_tables_in_schema="someschema",
        to="somerole",
    )
    grant_on_all = GrantOnAll(
        priv="SELECT",
        on_all_views_in_database="somedb",
        to="somerole",
    )

YAML

grants_on_all:
    - priv: SELECT
        on_all_tables_in_schema: someschema
        to: somerole

Fields

  • priv (string, required) - The privilege to grant. Examples include 'SELECT', 'INSERT', 'CREATE TABLE'.

  • in_name (string, required) - The name of the container resource in which the privilege is granted.

  • grant_option (bool) - Specifies whether the grantee can grant the privileges to other roles. Defaults to False.

on_type (string or , required) - The type of resource on which the privileges are granted.

in_type (string or , required) - The type of container resource in which the privilege is granted.

to (string or , required) - The role to which the privileges are granted.

Snowflake Documentation
ResourceType
ResourceType
Role