- 类别:
:doc:`/sql-reference/functions-system`(系统控制)
SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAME¶
Modifies only the host name of an existing private connectivity endpoint.
备注
如果 Snowflake 账户位于 Azure 政府区域中,则提供商资源 ID 必须是政府订阅中资源的 ID。有关 Snowflake 客户的政府区域的更多信息,请参阅 美国 SnowGov 区域。
语法¶
AWS:
SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAME( '<provider_service_name>' , '<host_name>' )
Azure:
SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAME( '<provider_resource_id>' , '<host_name>' , [ , '<subresource>' ] )
Google Cloud:
SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAME( '<target_service_id>' , '<host_name>' )
实参¶
AWS:
'provider_service_name'指定要连接的外部服务或资源。例如,
com.amazonaws.us-west-2.execute-apifor the Amazon API Gateway 或com.amazonaws.us-west-2.s3for Amazon S3。有关从 AWS 中检索此值的信息,请参阅 提供专用连接端点。
'host_name'Specifies the new fully-qualified host name that should be used to access the resource in your VPC or VNet.
This value doesn't contain any port numbers and must match what you specified in the Snowflake object that you use to connect to the external service.
示例包括
bedrock-runtime.us-west-2.amazonaws.com和*.s3.us-west-2.amazonaws.com:When you use private connectivity for external stages and external volumes, the
host_namemust use a wildcard instead of specifying an AWS S3 bucket.有关从 AWS 中检索此值的信息,请参阅 提供专用连接端点。
Azure:
'provider_resource_id'指定 VPC 或 VNet 中资源的完全限定标识符。
'host_name'Specifies new the fully qualified host name to access the resource in your VPC or VNet.
For examples of the host name for outbound private connectivity for external functions, see the following topics:
'subresource'指定 Azure 资源的子资源的名称。
Azure 专用链接服务 (https://learn.microsoft.com/en-us/azure/private-link/private-link-service-overview) 和 Azure API 管理服务不需要此实参。
有关所有支持的值,请参阅 子资源表 (https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview#private-link-resource)。
Google Cloud:
'target_service_id'指定服务附件 ID(自定义服务)或要连接到的区域性 Google API 端点。
'host_name'Specifies the new fully qualified host name to access the resource.
返回¶
Returns a status message that the host name for the private connectivity endpoint was updated successfully.
访问控制要求¶
只有账户管理员(具有 ACCOUNTADMIN 角色的用户)才能调用此函数。
使用说明¶
You can only modify the host name of an existing private connectivity endpoint.
示例¶
- AWS:
Update the hostname of a private endpoint to allow Snowflake on Amazon Web Services to connect to the VPCE service in your Amazon Web Services VPC:
SELECT SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAME( 'com.amazonaws.vpce.us-west-2.vpce-svc-01234567890abcdef', 'my-new-service-name.com' );
Successfully set the host name of the privatelink endpoint ``com.amazonaws.vpce.us-west-2.vpce-svc-01234567890abcdef`` to ``my-new-service-name.com``- Azure:
Update the host name of a private endpoint to allow Snowflake on Microsoft Azure to connect to the Microsoft Azure API Management service in your Microsoft Azure VNet:
SELECT SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAME( '/subscriptions/f4b00c5f-f6bf-41d6-806b-e1cac4f1f36f/resourceGroups/aztest1-external-function-rg/providers/Microsoft.ApiManagement/service/aztest1-external-function-api', 'my-new-custom-api-endpoint.net', 'Gateway' );
Successfully set the host name of the privatelink endpoint ``/subscriptions/f4b00c5f-f6bf-41d6-806b-e1cac4f1f36f/resourceGroups/aztest1-external-function-rg/providers/Microsoft.ApiManagement/service/aztest1-external-function-api`` to ``my-new-custom-api-endpoint.net``- Google Cloud:
Update the host name of a private endpoint to allow Snowflake on Google Cloud Platform to connect to the service attachment in your Google Cloud Platform VPC network:
SELECT SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAME( 'projects/my-project/regions/us-west2/serviceAttachments/my-http-server', 'my-new-custom-api-endpoint.com' );
Successfully set the host name of the privatelink endpoint ``projects/my-project/regions/us-west2/serviceAttachments/my-http-server`` to ``my-new-custom-api-endpoint.com``