Categories:

System functions (System Control)

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT

恢复 Snowflake VPC 或 VNet 中的专用连接端点,以支持 Snowflake 使用专用连接连接到外部服务。端点可以是服务端点或资源端点,具体取决于托管 Snowflake 账户的云平台。

You can restore a private endpoint within 7 days of deprovisioning it. After 7 days, the endpoint cannot be restored and you need to recreate the endpoint with the SYSTEM$PROVISION_PRIVATELINK_ENDPOINT system function.

语法

AWS:

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT(
  '<provider_service_name>' )

Azure:

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT(
  '<provider_resource_id>'
  [, '<subresource>' ]
  )

Google Cloud:

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT(
   '<service_attachment_id>'
);

实参

AWS

provider_service_name

Specifies the external service or resource endpoint to restore. For example, com.amazonaws.us-west-2.execute-api for the Amazon API Gateway or com.amazonaws.us-west-2.s3 for Amazon S3.

Azure

'provider_resource_id'

Specifies the fully-qualified identifier for the resource in your VPC or VNet.

'subresource'

Specifies the name of the subresource of the Azure resource.

This argument is not required for Azure Private Link Service (https://learn.microsoft.com/en-us/azure/private-link/private-link-service-overview) and Azure API Management Service.

For all supported values, see the Sub-resource table (https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview#private-link-resource).

Google Cloud

'target_service_id'

Specifies the ID of the service attachment in your VPC network or the regional Google API.

返回

返回一条状态消息,表明端点及其标识符已成功恢复。

If unsuccessful, returns an error. For example, if the provided argument is not a valid existing endpoint. If you do not know the endpoint name, you can use the SYSTEM$GET_PRIVATELINK_ENDPOINTS_INFO system function to list all endpoints in your Snowflake account.

使用说明

  • 只有账户管理员(具有 ACCOUNTADMIN 角色的用户)才能调用此函数。
  • 如果专用连接端点未与指定实参关联,则会出现错误消息。

示例

AWS:

恢复对 Amazon S3 具有外部访问权限的专用端点:

SELECT SYSTEM$RESTORE_PRIVATELINK_ENDPOINT('com.amazonaws.us-west-2.s3');

Azure:

Restore a private endpoint to allow Snowflake on Microsoft Azure to connect to the Azure API Management service in your Azure VNet:

SELECT SYSTEM$RESTORE_PRIVATELINK_ENDPOINT(
  '/subscriptions/11111111-2222-3333-4444-5555555555/resourceGroups/my_rg/providers/Microsoft.Sql/servers/my_db_server',
  'sqlServer'
);
Private endpoint with id ''/subscriptions/66666666-7777-8888-9999-0000000000/resourcegroups/rg/providers/microsoft.network/privateendpoints/00000000-1111-2222-3333-4444444444'' restored successfully.

Google Cloud:

Restore a private endpoint to allow Snowflake on Google Cloud to connect to the Google API Management service in your Google Cloud VPC Network:

SELECT SYSTEM$RESTORE_PRIVATELINK_ENDPOINT(
  'projects/my-project/regions/us-east4/serviceAttachments/my-service-attachment'
);
Private endpoint with id ''abcd0000000000000001'' restored successfully.