新建泳道。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
POST /pop/v5/trafficmgnt/swimming_lanes
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
LogicalRegionId | string | 是 | 自定义命名空间的 RegionId。
格式为: | cn-beijing:test |
Name | string | 是 | 泳道名称。 | test1 |
Tag | string | 是 | 标签。 | tag |
GroupId | long | 是 | 泳道组 ID。 | 95 |
EntryRules | string | 是 | 流控条件。 | [{"priority":1,"path":"/traffic","condition":"AND","restItems":[{"type":"header","name":"testheader","value":"testvalue","cond":"==","operator":"rawvalue"}]}] |
EnableRules | boolean | 否 | 是否启用流控规则。 | true |
AppInfos | string | 否 | 泳道涉及应用信息。 | [{"appId":"f72deaac-26ba-429a-948d-5fa47c4a****"},{"appId":"5049d2c8-f997-4fc9-92a2-153506a6****"}] |
返回参数
示例
正常返回示例
JSON
格式
{
"Code": 200,
"Message": "success",
"RequestId": "75972A87-5682-5277-ADA7-DA2A01BE****",
"Data": {
"NamespaceId": "cn-beijing:test",
"GroupId": 95,
"EntryRule": "[{\\\"condition\\\":\\\"AND\\\",\\\"enable\\\":false,\\\"path\\\":\\\"/traffic\\\",\\\"priority\\\":1,\\\"restItems\\\":[{\\\"cond\\\":\\\"==\\\",\\\"datum\\\":\\\"testvalue\\\",\\\"name\\\":\\\"testheader\\\",\\\"operator\\\":\\\"rawvalue\\\",\\\"type\\\":\\\"header\\\",\\\"value\\\":\\\"testvalue\\\"}]}]",
"AppInfos": "[{\"appId\":\"9dcba109-ee9f-4e67-8916-41\n*******\"}]",
"Tag": "8202e09",
"Name": "test1",
"Id": 88,
"SwimmingLaneAppRelationShipList": [
{
"AppName": "test-app",
"Rules": "dubbo",
"LaneId": 88,
"AppId": "bd170895-096c-4944-9007-d4582c77****"
}
]
}
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
605 | Edas.errorcode.ParameterInvalid.PointedParameter.message | The value of parameter {0} is invalid. | 无效输入参数:{0} |
访问错误中心查看更多错误码。