CREATE INGRESS POLICY

statementnot supportedIntegrations, network & secretspreview

docs.snowflake.com ↗

Object: INGRESS POLICY

Creates a new ingress policy in the current or specified schema, or replaces an existing ingress policy. An ingress policy is a schema-level object. Creating it does not enforce the policy. To activate enforcement, attach it to the account or to a user with ALTER ACCOUNT SET INGRESS POLICY or ALTER USER SET INGRESS POLICY.

Syntax

supportedpartialnot supportednot scored

CREATE [ OR REPLACE ] INGRESS POLICY [ IF NOT EXISTS ] <name>
  [ COMMENT = '<string_literal>' ]
  AS $$
    <yaml_body>
  $$

Parameters

NameRequiredDescription
namerequiredIdentifier for the ingress policy. The name must be unique in the schema. In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example, "My object"). Identifiers enclosed in double quotes are also case-sensitive. For more information, see Identifier requirements.
AS $$ yaml_body $$requiredYAML body that defines the policy conditions and actions. The body is stored as POLICY_DEFINITION. Snowflake compiles the body when you create the policy. References in the body, such as a network rule or a security integration, must resolve at that time. For the body structure, conditions, and actions, see Ingress policies.
COMMENT = 'string_literal'optionalSpecifies a comment for the ingress policy. Default: No value

Usage notes

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes CREATE INGRESS POLICY | Schema | Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

See also

Referenced by