创建或者更新泳道。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
sae:CreateOrUpdateSwimmingLane |
create |
*全部资源
|
无 | 无 |
请求语法
POST /pop/v1/cas/gray/createOrUpdateSwimmingLane HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| LaneId |
integer |
否 |
泳道 ID。 |
13857 |
| LaneName |
string |
否 |
泳道名称。 |
test |
| LaneTag |
string |
否 |
泳道标签。 |
g1 |
| GroupId |
integer |
否 |
所属泳道组 ID。 |
b2a8a925-477a-eswa-b823-d5e22500**** |
| NamespaceId |
string |
否 |
命名空间 ID。 |
cn-beijing:test |
| CanaryModel |
integer |
否 |
全链路灰度模式:
|
0 |
| Enable |
boolean |
否 |
泳道状态:
|
true |
| AppEntryRule |
object |
否 |
网关路由配置。 说明
泳道组网关入口为 Java 时,此字段为必填项。 |
|
| Paths |
array |
否 |
匹配的请求路径。 |
|
|
string |
否 |
请求路径。 |
/A |
|
| Percentage |
integer |
否 |
流量比例,按比例路由使用,取值 0-100。 |
50 |
| ConditionJoiner |
string |
否 |
条件之间的逻辑连接符:
|
AND |
| Conditions |
array<object> |
否 |
匹配条件。 |
|
|
object |
否 |
条件项。 |
||
| Type |
string |
否 |
参数类型:
|
Header |
| Name |
string |
否 |
参数名称。 |
t |
| Condition |
string |
否 |
匹配规则:
|
== |
| Value |
string |
否 |
条件的匹配值。 |
g1 |
| IndependentPercentageEnable |
boolean |
否 |
是否启用按比例灰度。
|
true |
| PercentageByPath |
object |
否 |
流量配置。 |
|
|
integer |
否 |
为所配置的路径配置流量比例,范围为 1~100。 |
50 |
|
| MseGatewayEntryRule |
object |
否 |
MSE 网关路由配置。 说明
当 EntryAppType 配置为 apig 或mse-gw时,为必填字段。 |
|
| RouteIds |
array |
否 |
路由 ID。 |
|
|
integer |
否 |
网关路由 ID。调用 ListGatewayRoute 获取。 |
78830 |
|
| Percentage |
integer |
否 |
流量复制比例(%),取值 0-100。 |
100 |
| ConditionJoiner |
string |
否 |
条件之间的逻辑连接符:
|
AND |
| Conditions |
array<object> |
否 |
路由条件。 |
|
|
object |
否 |
配置路由条件。 |
||
| Type |
string |
否 |
参数类型:
|
header |
| Name |
string |
否 |
条件参数名称。 |
test |
| Condition |
string |
否 |
匹配规则。
|
== |
| Value |
string |
否 |
条件的匹配值。 |
g1 |
| IndependentPercentageEnable |
boolean |
否 |
是否启用按比例灰度。
|
true |
| PercentageByRoute |
object |
否 |
流量配置。 |
|
|
integer |
否 |
配置流量比例,范围为 1~100。 |
100 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
创建或更新的泳道结果。 |
||
| RequestId |
string |
请求 ID。 |
91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** |
| Message |
string |
附加信息。取值说明如下:
|
success |
| TraceId |
string |
调用链 ID,用于精确查询调用信息。 |
0a98a02315955564772843261e**** |
| Data |
object |
返回信息。 |
|
| LaneId |
integer |
泳道 ID。 |
22318 |
| ErrorCode |
string |
错误码。取值说明如下:
|
|
| Code |
string |
接口状态或 POP 错误码。取值说明如下:
|
200 |
| Success |
boolean |
是否成功创建或更新。取值说明如下:
|
true |
示例
正常返回示例
JSON格式
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"LaneId": 22318
},
"ErrorCode": "",
"Code": "200",
"Success": true
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | 不合法的参数:%s不能为空。 |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | 不合法的参数{%s}。 |
| 400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | 不合法的参数{%s}:%s。 |
| 400 | MseGatewayRule.CreateFailed | Create MSE Gateway rule failed. | 创建MSE微服务网关路由失败。 |
| 400 | InternalApiError | An exception occurred when calling mse:%s, error message: %s. | 调用 mse:%s 接口异常,%s |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。