ALTER GATEWAY¶
Modifies the configuration of an existing gateway. Use this command to update the traffic split configuration for a gateway.
- See also:
CREATE GATEWAY , DESCRIBE GATEWAY, DROP GATEWAY , SHOW GATEWAYS
语法
参数
name指定要更改的网关的标识符。
If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
For more information, see Identifier requirements.
FROM SPECIFICATION指定内联更新的网关规范。该规范定义了流量拆分配置。
该规范使用以下格式:
规范参数
typeFixed value. Must be set to
traffic_split.split_typeFixed value. Must be set to
custom.targets要将流量路由到的目标端点列表。每个目标必须指定:
typeFixed value. Must be set to
endpoint.valueThe fully qualified endpoint name in the format
db.schema.service!endpoint. Each target endpoint must exist.weight此端点的流量权重,指定为整数。所有权重之和必须为 100。
Note
- 默认情况下,每个网关的最大端点数为 5。
访问控制要求
A role used to execute this operation must have the following privileges at a minimum:
| 权限 | 对象 | 备注 |
|---|---|---|
| MODIFY 或 OWNERSHIP | 网关 | 更改网关配置时需要。 |
| BIND SERVICE ENDPOINT | 账户 | 将服务端点绑定到网关时需要。 |
| USAGE | 数据库 | 对于包含网关的数据库是必需的。 |
| USAGE | 架构 | 对于包含网关的架构是必需的。 |
| USAGE | 服务端点 | 对于目标服务端点是必需的。 |
要授予所需权限,请使用以下命令:
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.
使用说明
-
关于元数据:
Attention
Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.
示例
更改网关以更新流量拆分配置: