Creates or updates a lane.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| sae:CreateOrUpdateSwimmingLane | create | *All Resources * |
| none |
Request syntax
POST /pop/v1/cas/gray/createOrUpdateSwimmingLane HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| LaneId | long | No | The ID of the lane. | 13857 |
| LaneName | string | No | The name of the lane. | test |
| LaneTag | string | No | The tag of the lane. | {"alicloud.service.tag":"g1"} |
| GroupId | long | No | The ID of the lane group to which the lane belongs. | b2a8a925-477a-eswa-b823-d5e22500**** |
| NamespaceId | string | No | The namespace ID. | cn-beijing:test |
| CanaryModel | integer | No | Full-link Grayscale Mode:
| 0 |
| Enable | boolean | No | Lane Status
| true |
| AppEntryRule | object | No | The route configuration of the gateway. Note
This parameter is required if the gateway entry of the lane group is Java.
| |
| Paths | array | No | The matched request path. | |
| string | No | The request path. | /A | |
| Percentage | integer | No | The traffic ratio. Valid values: 0 to 100. | 50 |
| ConditionJoiner | string | No | Logical connectors between conditions:
| AND |
| Conditions | array<object> | No | The conditions that trigger circuit breaking. | |
| object | No | Item | ||
| Type | string | No | The parameter type. Valid values:
| Header |
| Name | string | No | The parameter name. | t |
| Condition | string | No | Matching Rule:
| == |
| Value | string | No | The match value of the condition. | g1 |
| IndependentPercentageEnable | boolean | No | Whether to enable proportional grayscale.
| true |
| PercentageByPath | object | No | The traffic configuration. | |
| integer | No | Configure the traffic ratio for the configured path, ranging from 1 to 100. | 50 | |
| MseGatewayEntryRule | object | No | The route configuration of the MSE gateway. Note
If the EntryAppType is set to apig or mse-gw, it is required.
| |
| RouteIds | array | No | The ID of the route. | |
| long | No | The ID of the gateway route. Call the ListGatewayRoute to obtain. | 78830 | |
| Percentage | integer | No | The percentage of traffic replication. Valid values: 0 to 100. | 100 |
| ConditionJoiner | string | No | Logical connectors between conditions:
| AND |
| Conditions | array<object> | No | Routing Condition | |
| object | No | Configure routing conditions. | ||
| Type | string | No | The parameter type. Valid values:
| header |
| Name | string | No | The parameter name. | test |
| Condition | string | No | The matching rule.
| == |
| Value | string | No | The match value of the condition. | g1 |
| IndependentPercentageEnable | boolean | No | Whether to enable proportional grayscale.
| true |
| PercentageByRoute | object | No | The traffic configuration. | |
| integer | No | Valid values: 1 to 100 | 100 |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"LaneId": 22318
},
"ErrorCode": "",
"Code": 200,
"Success": true
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | - |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | - |
| 400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | - |
| 400 | MseGatewayRule.CreateFailed | Create MSE Gateway rule failed. | Failed to create an MSE microservices gateway route. |
| 400 | InternalApiError | An exception occurred when calling mse:%s, error message: %s. | - |
For a list of error codes, visit the Service error codes.
