API网关 APIG-更新VPC通道:请求消息
请求消息
参数 |
是否必选 |
类型 |
说明 |
---|---|---|---|
name |
是 |
String |
VPC通道的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、“-”、“_”组成,且只能以英文或中文开头。
说明:
中文字符必须为UTF-8或者unicode编码。 |
type |
是 |
Integer |
VPC通道的类型。
|
member_type |
type = 2时必选 |
String |
VPC通道的成员类型。
仅VPC通道类型为2时有效,缺省为instance。 |
port |
type = 2时必选 |
Integer |
VPC通道中主机的端口号。 取值范围1 ~ 65535,仅VPC通道类型为2时有效。 |
balance_strategy |
type = 2时必选 |
Integer |
分发算法。
仅VPC通道类型为2时有效,缺省为1。 |
vpc_health_config |
type = 2时必选 |
字典数据类型 |
健康检查详情,仅VPC通道类型为2时有效。 |
vpc_instances |
是 |
字典数据类型 |
后端实例列表,VPC通道类型为1时,有且仅有1个后端实例。 |
参数 |
是否必选 |
类型 |
说明 |
---|---|---|---|
protocol |
是 |
String |
使用以下协议,对VPC中主机执行健康检查。
|
path |
protocol = http时必选 |
String |
健康检查时的目标路径。
说明:
需要服从URI规范。 |
port |
否 |
Integer |
健康检查的目标端口,缺省时为VPC中主机的端口号。 取值范围1 ~ 65535。 |
threshold_normal |
是 |
Integer |
正常阈值。 判定VPC通道中主机正常的依据为:连续检查x成功,x为您设置的正常阈值。 取值范围2 ~ 10 |
threshold_abnormal |
是 |
Integer |
异常阈值。 判定VPC通道中主机异常的依据为:连续检查x失败,x为您设置的异常阈值。 取值范围2 ~ 10。 |
time_out |
是 |
Integer |
超时时间:检查期间,无响应的时间,单位为秒。必须小于time_interval字段取值。 取值范围2 ~ 30。 |
time_interval |
是 |
Integer |
间隔时间:连续两次检查的间隔时间,单位为秒。必须大于time_out字段取值。 取值范围5 ~ 300。 |
http_code |
protocol = http时必选 |
String |
检查目标HTTP响应时,判断成功使用的HTTP响应码。 取值范围为100到599之前的任意整数值,支持如下三种格式:
|
参数 |
是否必选 |
类型 |
说明 |
---|---|---|---|
instance_name |
是 |
String |
后端实例的名称。 支持汉字,英文,数字,“-”,“_”,“.”,1 ~ 64字符。
说明:
中文字符必须为UTF-8或者unicode编码。 |
instance_id |
是 |
String |
后端实例的编号。 支持英文,数字,“-”,“_”,1 ~ 64字符。 |
weight |
type = 2时必选 |
Integer |
权重值。 权重值越大,转发到该后端实例的请求数量越多。 取值范围1 ~ 100,仅VPC通道类型为2时有效。 |
请求消息样例:
{ "balance_strategy": 1, "name": "vpc_001", "port": 15565, "type": 2, "member_type": "instance", "vpc_health_config": { "http_code": "205", "path": "/hc", "port": 15563, "protocol": "http", "threshold_abnormal": 5, "threshold_normal": 5, "time_interval": 200, "time_out": 30 }, "vpc_instances": [ { "instance_id": "instance01", "instance_name": "instance_name01", "weight": 10 } ]}
- API网关跨VPC开放后端服务_API开放后端服务_API网关APIG-华为云
- 什么是API网关_API网关有什么作用_API网关APIG-华为云
- API网关基本概念_云原生API网关_API网关APIG-华为云
- API网关有哪些使用场景_API网关作用_API网关APIG-华为云
- API网关双重认证_双重认证方式_API网关APIG-华为云
- API网关流量控制策略_流量管控_API网关APIG-华为云
- 调用API_API调用流程_API网关APIG-华为云
- 使用API网关开放云容器引擎CCE工作负载_开放API_API网关APIG-华为云
- API网关支持http到https自动重定向_开放API_API网关APIG-华为云
- 使用API网关开放本地数据中心服务能力_开放API_API网关APIG-华为云