Updates a canary release rule.
Debugging
Request headers
This operation uses only common request headers and does not have operation-specific request headers. For more information, see Common request and response headers.
Request syntax
PUT /pop/v1/sam/tagroute/greyTagRoute HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
Description | String | Query | No | Canary Release - Regions | The description of the canary release rule. |
ScRules | String | Query | No | [{"condition":"OR","items":[{"cond":"==","name":"grey","operator":"rawvalue","type":"param","value":"true"},{"cond":"==","name":"grey","operator":"rawvalue","type":"cookie","value":"true"},{"cond":"==","name":"grey","operator":"rawvalue","type":"header","value":"true"}],"path":"/post-echo/hi"}] | The canary release rule of the Spring Cloud application. |
DubboRules | String | Query | No | [{"condition":"OR","group":"DUBBO","items":[{"cond":"==","expr":".key1","index":0,"operator":"rawvalue","value":"value1"},{"cond":"==","expr":".key2","index":0,"operator":"rawvalue","value":"value2"}],"methodName":"echo","serviceName":"com.alibaba.edas.boot.EchoService","version":"1.0.0"}] | The canary release rule of the Dubbo application. |
GreyTagRouteId | Long | Query | Yes | 1 | The ID of the canary release rule. |
AlbRules | String | Query | No | [{"condition":"AND","items":[{"cond":"==","name":"grey","operator":"rawvalue","type":"sourceIp","value":"127.0.0.1"},{"cond":"==","name":"grey","operator":"rawvalue","type":"cookie","value":"true"},{"cond":"==","name":"grey","operator":"rawvalue","type":"header","value":"true"}],"path":"/post-echo/hi"}] | The canary release rule of the application for which ALB gateway routing is configured. |
- Parameters in the ScRules parameter
Parameter |
Type |
Example |
Description |
condition |
String |
OR |
The relationship between the conditions in the canary release rule. Valid values:
|
path |
String |
/path |
The path of the canary release rule of the Spring Cloud application. |
items |
Array of items |
The conditions. |
Parameter |
Type |
Example |
Description |
name |
String |
test |
The name of the parameter. |
cond |
String |
== |
The comparison operator. Valid values: >, <, >=, <=, ==, and !=. |
type |
String |
cookie |
The type of the comparison. Valid values:
|
value |
String |
test |
The value of the parameter. This value is compared with the value that is obtained based on the type and name parameters. |
operator |
String |
rawvalue |
The operator. Valid values:
|
- Parameters in the DubboRules parameter
Parameter |
Type |
Example |
Description |
condition |
String |
OR |
The relationship between the conditions in the canary release rule. Valid values:
|
methodName |
String |
echo |
The method name of the Dubbo service. |
serviceName |
String |
com.alibaba.edas.boot.EchoService |
The name of the Dubbo service. |
version |
String |
1.0.0 |
The version of the Dubbo service. |
items |
Array of items |
The conditions. |
|
group |
String |
DUBBO |
The group of the Dubbo service that corresponds to the canary release rule. |
Parameter |
Type |
Example |
Description |
index |
Integer |
0 |
The index of the parameter. The value 0 indicates the first parameter. |
expr |
String |
.name |
The expression that is used to obtain the value of the parameter. Valid values:
|
cond |
String |
== |
The comparison operator. Valid values: >, <, >=, <=, ==, and !=. |
value |
String |
test |
The value of the parameter. This value is compared with the value that is obtained based on the expr and index parameters. |
operator |
String |
rawvalue |
The operator. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
RequestId | String | 9D29CBD0-45D3-410B-9826-52F86F90**** | The request ID. |
Message | String | success | The returned message. |
TraceId | String | 0a98a02315955564772843261e**** | The trace ID that is used to query the details of the request. |
Data | Object | The information about the canary release rule. |
|
GreyTagRouteId | Long | 1 | The ID of the canary release rule. The ID is globally unique. |
ErrorCode | String | Null | The error code. Valid values:
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the information of the change order was queried. Valid values:
|
Examples
Sample requests
PUT /pop/v1/sam/tagroute/greyTagRoute?Description=Canary Release - Regions&ScRules=[{"condition":"OR","items":[{"cond":"==","name":"grey","operator":"rawvalue","type":"param","value":"true"},{"cond":"==","name":"grey","operator":"rawvalue","type":"cookie","value":"true"},{"cond":"==","name":"grey","operator":"rawvalue","type":"header","value":"true"}],"path":"/post-echo/hi"}]&DubboRules=[{"condition":"OR","group":"DUBBO","items":[{"cond":"==","expr":".key1","index":0,"operator":"rawvalue","value":"value1"},{"cond":"==","expr":".key2","index":0,"operator":"rawvalue","value":"value2"}],"methodName":"echo","serviceName":"com.alibaba.edas.boot.EchoService","version":"1.0.0"}]&GreyTagRouteId=1 HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateGreyTagRouteResponse>
<RequestId>9D29CBD0-45D3-410B-9826-52F86F90****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<GreyTagRouteId>1</GreyTagRouteId>
</Data>
<Code>200</Code>
<Success>true</Success>
</UpdateGreyTagRouteResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "9D29CBD0-45D3-410B-9826-52F86F90****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : {
"GreyTagRouteId" : 1
},
"Code" : "200",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | The value of the %s parameter is invalid. This parameter cannot be left empty. |
400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | The value of the {%s} parameter is invalid. |
400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | The value %s of the {%s} parameter is invalid. |
400 | Application.ChangerOrderRunning | An application change process is in progress. Please try again later. | An application change is in progress. Try again later. |
For a list of error codes, see Service error codes.