Categories:

System functions (System Control)

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT_TSS

在 Snowflake VPC 或 VNet 中恢复私有连接端点,以通过私有连接让 Snowflake 连接到外部密钥管理服务 (KMS) 资源。该端点可以是服务端点或资源端点,具体取决于托管您 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_TSS system function.

语法

AWS:

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT_TSS(
  '<provider_service_name>'
  )

Azure:

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT_TSS(
  '<provider_resource_id>'
  )

Google Cloud:

SYSTEM$RESTORE_PRIVATELINK_ENDPOINT_TSS(
  '<target_service_id>'
  )

实参

AWS:

provider_service_name

指定要恢复的外部 KMS 资源端点。

Azure:

provider_resource_id

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

Google Cloud:

target_service_id

Specifies the service attachment ID (to a custom service), or regional Google API endpoint to connect to.

返回

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

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:

恢复对 AWS 密钥库具有外部访问权限的私有端点。

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

Azure:

Restore a private endpoint to allow Snowflake on Microsoft Azure to connect to the Azure key vault in your Azure VNet:

SELECT SYSTEM$RESTORE_PRIVATELINK_ENDPOINT_TSS(
  '/subscriptions/12345678-90ab-cdef-1234-567890abcdef/resourceGroups/myvault/providers/Microsoft.KeyVault/vaults/TriSecretVault'
);
"Resource Endpoint with id "/subscriptions/12345678-90ab-cdef-1234-567890abcdef/resourceGroups/myvault/privatelink-test/providers/Microsoft.KeyVault/vaults/TriSecretVault/privateEndpoints/" restored successfully.

Google Cloud:

SELECT SYSTEM$RESTORE_PRIVATELINK_ENDPOINT_TSS(
  'cloudkms.us-west2.rep.googleapis.com'
);
Private endpoint with id 'abcd0000000000001234' restored successfully.