All Products
Search
Document Center

Serverless App Engine:CreateGreyTagRoute

Last Updated:Apr 22, 2026

Create a canary release rule for a Spring Cloud or Dubbo application.

Operation description

Note

You can currently configure only one canary rule per application.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:CreateGreyTagRoute

create

*All Resource

*

None None

Request syntax

POST /pop/v1/sam/tagroute/greyTagRoute HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID.

7802c49a-67bc-4167-8369-9a9c003c****

Name

string

Yes

The name of the canary rule. The name can be up to 64 characters long and can contain only lowercase letters, digits, hyphens (-), and Chinese characters. It must start with a lowercase letter and end with a lowercase letter or a digit.

dubbo-echo

Description

string

No

The description of the canary rule. The description can be up to 64 characters long.

Canary Release - Regions

ScRules

string

No

The canary rules for a Spring Cloud application. This parameter is required for Spring Cloud applications and cannot be used with the DubboRules parameter.

[{"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

string

No

The canary rules for a Dubbo application. This parameter is required for Dubbo applications and cannot be used with the ScRules parameter.

[{"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"}]

AlbRules

string

No

The canary rules for an application that uses an ALB gateway route.

[{"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"}]

  • ScRules parameters

ParameterTypeExampleDescription
conditionStringORThe condition mode for the canary rule. Valid values:
- AND: All conditions in the condition list must be met.
- OR: At least one of the conditions in the condition list must be met.




pathString/pathThe request path for the Spring Cloud canary rule.
itemsArray of itemsThe list of conditions.

items parameters

ParameterTypeExampleDescription
nameStringtestParameter name.
condString==The comparison operator. Valid values include: >, <, >=, <=, ==, and !=.
typeStringcookieComparison type. Valid values:
- param: Parameter.
- cookie: Cookie.
- header: Header.







valueStringtestThe value to compare with the actual value retrieved based on the specified type and name.
operatorStringrawvalueThe operator used for the comparison. Valid values:
- rawvalue: Direct comparison.
- list: Allowlist match.
- mod: Modulo 100.
- deterministic_proportional_steaming_division: Percentage.










  • DubboRules parameters

ParameterTypeExampleDescription
conditionStringORThe condition mode for the canary rule. Valid values:
- AND: All conditions in the condition list must be met.
- OR: At least one of the conditions in the condition list must be met.




methodNameStringechoThe method name of the Dubbo service.
serviceNameStringcom.alibaba.edas.boot.EchoServiceThe Dubbo service name.
versionString1.0.0The Dubbo service version.
itemsArray of itemsThe list of conditions.
groupStringDUBBOThe Dubbo service group that the canary rule applies to.

items parameters

ParameterTypeExampleDescription
indexInteger0The parameter index. 0 indicates the first parameter.
exprString.nameThe parameter value expression. Valid values:
- If left blank, retrieves the value of the current parameter.
- .name: Retrieves the name property of the parameter, equivalent to args0.getName().
- .isEnabled(): Retrieves the enabled property of the parameter, equivalent to args0.isEnabled().
- [0]: If the parameter is an array, this expression retrieves the first element of the array, equivalent to args0[0]. Note that this expression does not start with a period (.).
- .get(0): If the parameter is a List, this expression retrieves the first element of the list, equivalent to args0.get(0).
- .get("key"): If the parameter is a Map, this expression retrieves the value for the specified key, equivalent to args0.get("key").
















condString==The comparison operator. Valid values include: >, <, >=, <=, ==, and !=.
valueStringtestThe value to compare with the actual value retrieved based on the specified expr and index.
operatorStringrawvalueThe operator used for the comparison. Valid values:
- rawvalue: Direct comparison.
- list: Allowlist match.
- mod: Modulo 100.
- deterministic_proportional_steaming_division: Percentage.










Response elements

Element

Type

Description

Example

object

The data returned.

RequestId

string

The request ID.

9D29CBD0-45D3-410B-9826-52F86F90****

Message

string

The response message.

success

TraceId

string

The trace ID. You can use this ID to query the call details.

0a98a02315955564772843261e****

Data

object

The details of the canary release rule.

GreyTagRouteId

integer

The globally unique ID of the canary release rule.

16

ErrorCode

string

The error code.

  • This parameter is not returned if the request is successful.

  • If the request fails, see the Error codes list in this topic for more information.

Code

string

The HTTP status code. Valid values:

  • 2xx: The request was successful.

  • 3xx: The request was redirected.

  • 4xx: A client error occurred.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "RequestId": "9D29CBD0-45D3-410B-9826-52F86F90****",
  "Message": "success",
  "TraceId": "0a98a02315955564772843261e****",
  "Data": {
    "GreyTagRouteId": 16
  },
  "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 Application.ChangerOrderRunning An application change process is in progress. Please try again later. An application change process is in progress. Please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.