- Categories:
System Functions (System Information)
SYSTEM$GET_PRIVATELINK_CONFIG¶
Returns a JSON representation of the Snowflake account information necessary to facilitate the self-service configuration of private connectivity to the Snowflake service or Snowflake internal stages.
Syntax¶
SYSTEM$GET_PRIVATELINK_CONFIG()
Arguments¶
None.
Usage Notes¶
Only account administrators (i.e. users with the ACCOUNTADMIN role) can execute this function.
Output¶
The function returns a JSON object containing the following name/value pairs based on the cloud platform where your Snowflake account is located:
AWS
{ "regionless-snowsight-privatelink-url": "<privatelink_org_snowsight_url>", "privatelink-account-name": "<account_identifier>", "snowsight-privatelink-url": "<privatelink_region_snowsight_url>", "privatelink-internal-stage": "<privatelink_stage_endpoint>", "privatelink-account-url": "<privatelink_account_url>", "privatelink-connection-urls": "<privatelink_connection_url_list>", "privatelink-ocsp-url": "<privatelink_ocsp_url>", "privatelink-vpce-id": "<aws_vpce_id>" }
Microsoft Azure
{ "regionless-snowsight-privatelink-url": "<privatelink_org_snowsight_url>", "privatelink-account-name": "<account_identifier>", "snowsight-privatelink-url": "<privatelink_region_snowsight_url>", "privatelink-internal-stage": "<privatelink_stage_endpoint>", "privatelink-account-url":"<privatelink_account_url>", "privatelink-connection-urls": "<privatelink_connection_url_list>", "privatelink-ocsp-url": "<privatelink_ocsp_url>", "privatelink-pls-id": "<azure_privatelink_service_id>" }
Google Cloud Platform
{ "regionless-snowsight-privatelink-url": "<privatelink_org_snowsight_url>", "privatelink-account-name": "<account_identifier>", "snowsight-privatelink-url": "<privatelink_region_snowsight_url>", "privatelink-account-url": "<privatelink_account_url>", "privatelink-connection-urls": "<privatelink_connection_url_list>", "privatelink-ocsp-url": "<privatelink_ocsp_url>", "privatelink-gcp-service-attachment": "<snowflake_service_endpoint>" }
Where:
regionless-snowsight-privatelink-url
The URL for your organization to access Snowsight using private connectivity to the Snowflake service.
Use this URL to create a canonical name (i.e. CNAME) for DNS resolution. This URL should match the output for the
SNOWSIGHT_DEPLOYMENT_REGIONLESS
(i.e.TYPE
) from the SYSTEM$ALLOWLIST_PRIVATELINK function.For more information, see Account Identifiers and Snowsight: The Snowflake Web Interface.
privatelink-account-name
The identifier for your Snowflake account.
Use this value with clients for Connecting to Snowflake.
For more information, see Account Identifiers.
snowsight-privatelink-url
The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using private connectivity to the Snowflake service.
Use this URL to create a canonical name (i.e. CNAME) for DNS resolution. This URL should match the output for the
SNOWSIGHT_DEPLOYMENT
(i.e.TYPE
) from the SYSTEM$ALLOWLIST_PRIVATELINK function.For more information, see Account Identifiers and Snowsight: The Snowflake Web Interface.
privatelink-internal-stage
The endpoint to connect to your Snowflake internal stage using AWS PrivateLink or Azure Private Link.
Use this value with private connectivity to Snowflake internal stages.
The visibility of this key and the corresponding value in the query result depends on the ENABLE_INTERNAL_STAGES_PRIVATELINK parameter setting. The default setting for this parameter is
FALSE
. You must set this parameter toTRUE
prior to executing this system function to obtain the internal stage endpoint in the query result.privatelink-account-url
The URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.
Use this value to create a canonical name (i.e. CNAME) for DNS resolution. This URL should match the output from SYSTEM$ALLOWLIST_PRIVATELINK.
For more information on URL formats, see Account Identifiers.
privatelink-connection-urls
The list of connection URLs for Client Redirect.
Use these URLs to create a canonical name (i.e. CNAME) for DNS resolution. These URL should match the output for
CLIENT_FAILOVER
(i.e.TYPE
) from the SYSTEM$ALLOWLIST_PRIVATELINK function.privatelink-ocsp-url
The OCSP URL corresponding to your Snowflake account identifier that uses AWS PrivateLink, Microsoft Azure Private Link, or Google Cloud Private Service Connect.
Use this value to create a canonical name (i.e. CNAME) for DNS resolution.
privatelink-vpce-id
The AWS VPCE ID for your account identifier.
Use this value to create an AWS VPC endpoint (i.e. VPCE).
privatelink-pls-id
The Microsoft Azure Private Link Service ID for your account identifier.
Use this value to create an Azure Private Link private endpoint.
privatelink-gcp-service-attachment
The endpoint for the Snowflake service when using Google Cloud Private Service Connect.
Use this value when creating a forwarding rule to route the Private Service Connect endpoint in your VPC to the Snowflake service.
Examples¶
Retrieve the JSON information for your Snowflake account on AWS:
SELECT SYSTEM$GET_PRIVATELINK_CONFIG();
You can optionally run the following command to flatten the JSON output. The following output is an example for a Snowflake account on Microsoft Azure:
select key, value from table(flatten(input=>parse_json(SYSTEM$GET_PRIVATELINK_CONFIG()))); +-----------------------------------------------------------------------------+ | KEY | VALUE | +-----------------------------------------------------------------------------+ | regionless-snowsight-privatelink-url | "<privatelink_org_snowsight_url>" | |--------------------------------------|--------------------------------------| | privatelink-account-name | "<account_identifier>" | |--------------------------------------|--------------------------------------| | snowsight-privatelink-url | "<privatelink_region_snowsight_url>" | |--------------------------------------|--------------------------------------| | privatelink-internal-stage | "<privatelink_stage_endpoint>" | |--------------------------------------|--------------------------------------| | privatelink-account-url | "<privatelink_account_url>" | |--------------------------------------|--------------------------------------| | privatelink-connection-urls | "<privatelink_connection_url_list>" | |--------------------------------------|--------------------------------------| | privatelink-pls-id | "<azure_private_link_service_id>" | |--------------------------------------|--------------------------------------| | privatelink-ocsp-url | "<privatelink_ocsp_url>" | +--------------------------------------|--------------------------------------+