All Products
Search
Document Center

Edge Security Acceleration:GetOriginRule

Last Updated:Jan 14, 2026
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Queries the configurations of a single origin rule.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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 Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
esa:GetOriginRuleget
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SiteIdlongYes

The website ID, which can be obtained by calling the ListSites operation.

3400350********
ConfigIdlongYes

The ID of the configuration. You can call the ListSiteRoutes operation to obtain the ID.

33793140540****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Request ID.

04F0F334-1335-436C-A1D7-6C044FE73368
ConfigIdlong

The configuration ID.

352816096987136
ConfigTypestring

The configuration type to query. Valid values:

  • global: global configurations.
  • rule: rule configurations.
rule
SiteVersioninteger

The version number of the configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.

1
Sequenceinteger

The rule execution order. The smaller the value, the higher the priority.

1
RuleEnablestring

Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configuration. Valid values:

  • on
  • off
on
Rulestring

The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configuration. Use cases:

  • true: Match all incoming requests.
  • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
(http.host eq \"video.example.com\")
RuleNamestring

The rule name. You do not need to set this parameter when you add global configurations.

rule_example
OriginHoststring

The Host header in origin requests.

origin.example.com
OriginSchemestring

The protocol used for origin requests. Valid values:

  • http: HTTP.
  • https: HTTPS.
  • follow: follows the protocol used by the client.
http
OriginSnistring

The SNI in origin requests.

origin.example.com
DnsRecordstring

The hostname that overrides the resolved hostname of an incoming request.

test.example.com
OriginHttpPortstring

The origin port that is accessed when the HTTP protocol is used to back to the origin.

8080
OriginHttpsPortstring

The origin port that is accessed when the HTTPS protocol is used to back to the origin.

4433
Rangestring

Use range requests to download an object from the source. Valid values:

  • on
  • off
  • force: enables range origin fetch by force.
on
OriginMtlsstring

The MTLS switch. Valid values:

  • on
  • off
on
OriginVerifystring

The origin certificate verification switch. Valid values:

  • on
  • off
on
RangeChunkSizestring

The size of the range part. Valid values:

  • 512KB
  • 1MB
  • 2MB
  • 4MB
1MB
OriginReadTimeoutstring

The read timeout period (in seconds) on the origin.

10
Follow302Enablestring

302 follow switch. Valid values:

  • on
  • off
on
Follow302MaxTriesstring

The maximum number of 302 follow times. Valid values: 1 to 5.

1
Follow302RetainArgsstring

Retains the original request parameters switch. Valid values:

  • on
  • off
on
Follow302RetainHeaderstring

Retain the original request header switch. Valid values:

  • on
  • off
on
Follow302TargetHoststring

Target Host

test.com

Examples

Sample success responses

JSONformat

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "ConfigId": 352816096987136,
  "ConfigType": "rule",
  "SiteVersion": 1,
  "Sequence": 1,
  "RuleEnable": "on",
  "Rule": "(http.host eq \\\"video.example.com\\\")\n",
  "RuleName": "rule_example",
  "OriginHost": "origin.example.com\n",
  "OriginScheme": "http",
  "OriginSni": "origin.example.com\n",
  "DnsRecord": "test.example.com\n",
  "OriginHttpPort": 8080,
  "OriginHttpsPort": 4433,
  "Range": "on",
  "OriginMtls": "on",
  "OriginVerify": "on",
  "RangeChunkSize": "1MB",
  "OriginReadTimeout": 10,
  "Follow302Enable": "on",
  "Follow302MaxTries": 1,
  "Follow302RetainArgs": "on",
  "Follow302RetainHeader": "on",
  "Follow302TargetHost": "test.com"
}

Error codes

HTTP status codeError codeError messageDescription
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-12-11API Description Update. The Error code has changedView Change Details
2025-02-27The Error code has changed. The response structure of the API has changedView Change Details