All Products
Search
Document Center

Serverless App Engine:CreateGreyTagRoute

Last Updated:Oct 21, 2026

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

Operation description

Note

Currently, you can configure only one canary release rule for an 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 rule name. It must start with a lowercase letter, end with a digit or a lowercase letter, and can contain only lowercase letters, Chinese characters, digits, and hyphens (-). It can be up to 64 characters in length.

dubbo-echo

Description

string

No

The rule description. It can be up to 64 characters in length.

Canary Release - Regions

ScRules

string

No

The canary release rules created for a Spring Cloud application. This parameter is required when your application uses the Spring Cloud framework. You do not need to specify 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 release rules created for a Dubbo application. This parameter is required when your application uses the Dubbo framework. You do not need to specify 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 release rules created for an application that has ALB gateway routing configured.

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

ParameterTypeExampleDescription
conditionStringORThe condition mode of the canary release rule. Valid values:
- AND: indicates the AND operator, which means all conditions in the condition list must be met.
- OR: indicates the OR operator, which means any condition in the condition list must be met.




pathString/pathThe path that corresponds to the canary release rule for the Spring Cloud application.
itemsArray of itemsThe condition list.

items parameter description

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







valueStringtestThe parameter value. The value obtained based on type and name is compared with this value.
operatorStringrawvalueThe operator. Valid values:
- rawvalue: direct comparison.
- list: whitelist.
- mod: modulo 100.
- deterministic_proportional_steaming_division: percentage.










  • DubboRules parameter description

ParameterTypeExampleDescription
conditionStringORThe condition mode of the canary release rule. Valid values:
- AND: indicates the AND operator, which means all conditions in the condition list must be met.
- OR: indicates the OR operator, which means any condition 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 version of the Dubbo service.
itemsArray of itemsThe condition list.
groupStringDUBBOThe group of the Dubbo service that corresponds to the canary release rule.

items parameter description

ParameterTypeExampleDescription
indexInteger0The parameter index. 0 indicates the first parameter.
exprString.nameThe expression used to obtain the parameter value. Valid values:
- Empty: directly uses the value of the current parameter.
- .name: obtains the name property of the parameter, which is equivalent to args0.getName().
- .isEnabled(): obtains the enabled property of the parameter, which is equivalent to args0.isEnabled().
- [0]: specifies that the current parameter is an array and obtains the first value of the array, which is equivalent to args0[0]. Note that there is no period (.) at the beginning.
- .get(0): specifies that the current parameter is a list and obtains the first value of the list, which is equivalent to args0.get(0).
- .get("key"): specifies that the current parameter is a map and obtains the value corresponding to the key, which is equivalent to args0.get("key").
















condString==The comparison operator. Valid values: >, <, >=, <=, ==, and !=.
valueStringtestThe parameter value. The value obtained based on expr and index is compared with this value.
operatorStringrawvalueThe operator. Valid values:
- rawvalue: direct comparison.
- list: whitelist.
- mod: modulo 100.
- deterministic_proportional_steaming_division: percentage.










Response elements

Element

Type

Description

Example

object

The returned data.

RequestId

string

The request ID.

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

Message

string

The additional information about the call result.

success

TraceId

string

The trace ID, which is used to accurately query call information.

0a98a02315955564772843261e****

Data

object

The canary release rule information.

GreyTagRouteId

integer

The canary release rule ID, which is globally unique.

16

ErrorCode

string

The error code. Valid values:

  • Successful request: The ErrorCode parameter is not returned.

  • Failed request: The ErrorCode parameter is returned. For more information, see the Error codes section in this topic.

InvalidParameter.NotEmpty

Code

string

The API status code or POP error code. Valid values:

  • 2xx: Success.

  • 3xx: Redirection.

  • 4xx: Client error.

  • 5xx: Server error.

200

Success

boolean

Indicates whether the change order information was queried successfully. Valid values:

  • true: The query was successful.

  • false: The query failed.

true

Examples

Success response

JSON format

{
  "RequestId": "9D29CBD0-45D3-410B-9826-52F86F90****",
  "Message": "success",
  "TraceId": "0a98a02315955564772843261e****",
  "Data": {
    "GreyTagRouteId": 16
  },
  "ErrorCode": "InvalidParameter.NotEmpty",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter.NotEmpty You must specify the parameter %s. Invalid parameter: %s cannot be empty.
400 InvalidParameter.Obviously The specified parameter is invalid {%s}. Invalid parameter {%s}.
400 InvalidParameter.WithMessage The parameter is invalid {%s}: %s Invalid parameter {%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.