CREATE EXTERNAL ACCESS INTEGRATION

statementpartialIntegrations, network & secrets

docs.snowflake.com ↗

Object: EXTERNAL ACCESS INTEGRATION

Creates an external access integration for access to external network locations from a UDF or procedure handler. This command supports the following variants: - CREATE OR ALTER EXTERNAL ACCESS INTEGRATION: Creates an external access integration if it doesn’t exist or alters an existing external access integration. (Public Preview) - DEFINE EXTERNAL ACCESS INTEGRATION: Declarative definition of an external access integration’s target state inside a DCM project. (Public Preview)

Syntax

supportedpartialnot supportednot scored

CREATE [ OR REPLACE ] EXTERNAL ACCESS INTEGRATION <name>
  [ ALLOWED_NETWORK_RULES = ( <rule_name_1> [, <rule_name_2>, ... ] ) ]
  [ ALLOWED_HTTP_RULES = ( <http_rule_name_1> [, <http_rule_name_2>, ... ] ) ]
  [ ALLOWED_API_AUTHENTICATION_INTEGRATIONS = { ( <integration_name_1> [, <integration_name_2>, ... ] ) | none } ]
  [ ALLOWED_AUTHENTICATION_SECRETS = { ( <secret_name_1> [, <secret_name_2>, ... ] ) | all | none } ]
  ENABLED = { TRUE | FALSE }
  [ COMMENT = '<string_literal>' ]

Parameters

NameRequiredDescription
namerequiredIdentifier for the external access integration. The identifier value must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g. "My object"). Identifiers enclosed in double quotes are case-sensitive. For more details, see Identifier requirements.
ALLOWED_NETWORK_RULES = (rule_name [ , rule_name ... ])requiredSpecifies the allowed network rules. Only egress rules may be specified. Required unless you specify ALLOWED_HTTP_RULES. You can specify both.
ENABLED = { TRUE | FALSE }requiredSpecifies whether this integration is enabled or disabled. If the integration is disabled, any handler code that relies on it will be unable to reach the external network location. The value is case-insensitive. The default is TRUE.
ALLOWED_HTTP_RULES = ( http_rule_name [ , http_rule_name ... ] )optionalSpecifies the allowed HTTP rules, which allow requests by destination, method, and path. HTTP rules are in preview and apply only in Cortex Code cloud sandboxes; UDFs, procedures, and other features that use the integration ignore them. Required unless you specify ALLOWED_NETWORK_RULES. You can specify at most 32 HTTP rules.
ALLOWED_API_AUTHENTICATION_INTEGRATIONS = ( integration_name_1 [, integration_name_2, ... ] ) | noneoptionalSpecifies the security integrations whose OAuth authorization server issued the secret used by the UDF or procedure. The security integration must be the type used for external API integration. This parameter’s value must be one of the following: One or more Snowflake security integration names to allow any of the listed integrations. none to allow no integrations. Security integrations specified by this parameter – as well as secrets specified by the ALLOWED_AUTHENTICATION_SECRETS parameter – are ways to allow secrets for use in a UDF or procedure that uses this external access integration. For more information, see Usage notes. For reference information about security integrations, refer to CREATE SECURITY INTEGRATION (External API Authentication).
ALLOWED_AUTHENTICATION_SECRETS = ( secret_name [, secret_name ... ] ) | all | noneoptionalSpecifies the secrets that UDF or procedure handler code can use when accessing the external network locations referenced in allowed network rules. This parameter’s value must be one of the following: One or more Snowflake secret names to allow any of the listed secrets. all to allow any secret. none to allow no secrets. The ALLOWED_API_AUTHENTICATION_INTEGRATIONS parameter can also specify allowed secrets. For more information, see Usage notes. For reference information about secrets, refer to CREATE SECRET.
COMMENT = 'string_literal'optionalSpecifies a comment for the external access integration. 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 INTEGRATION | Account | Only the ACCOUNTADMIN role has this privilege by default. The privilege can be granted to additional roles as needed. USAGE | Secret | Required for all secrets referenced by the integration. USAGE | HTTP rule | Required for all HTTP rules referenced by the integration. USAGE | Schema | Required for all schemas containing any secrets referenced by the integration. CREATE EXTERNAL ACCESS INTEGRATION | Account | Grants the ability to create external access integrations. This privilege does not grant the ability to create other types of integrations. OWNERSHIP | External access integration | Required only when executing a CREATE OR ALTER EXTERNAL ACCESS INTEGRATION statement for an existing external access integration. 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.

CREATE OR ALTER EXTERNAL ACCESS INTEGRATION usage notes

- All limitations of the ALTER EXTERNAL ACCESS INTEGRATION command apply.

Known gaps

Parts not fully supported, and recorded divergences from Snowflake.

See also

Referenced by