All Products
Search
Document Center

Edge Security Acceleration:GetOriginRule

Last Updated:Nov 15, 2025
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.

Query a Single Origin Rule Configuration

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

Site ID, which can be obtained by calling the ListSites interface.

3400350********
ConfigIdlongYes

ConfigId of the configuration, which can be obtained by calling the ListOriginRules interface.

33793140540****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Request ID.

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

Configuration ID.

352816096987136
ConfigTypestring

Configuration type, which can be used to query global or rule configurations. Value range:

  • global: Query global configuration.
  • rule: Query rule configuration.
rule
SiteVersioninteger

Version number of the site configuration. For sites with version management enabled, you can use this parameter to specify the effective version of the site configuration, defaulting to version 0.

1
Sequenceinteger

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

1
RuleEnablestring

Rule switch. This parameter does not need to be set when adding a global configuration. Value range:

  • on: Enable.
  • off: Disable.
on
Rulestring

Rule content, using conditional expressions to match user requests. This parameter does not need to be set when adding a global configuration. There are two usage scenarios:

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

Rule name. This parameter does not need to be set when adding a global configuration.

rule_example
OriginHoststring

HOST carried in the origin request.

origin.example.com
OriginSchemestring

Protocol used for the origin request. Value range:

  • http: Use HTTP protocol for origin.
  • https: Use HTTPS protocol for origin.
  • follow: Follow the client's protocol for origin.
http
OriginSnistring

SNI carried in the origin request.

origin.example.com
DnsRecordstring

Rewrite the DNS resolution record for the origin request.

test.example.com
OriginHttpPortstring

Port of the origin server accessed when using the HTTP protocol for origin.

8080
OriginHttpsPortstring

Port of the origin server accessed when using the HTTPS protocol for origin.

4433
Rangestring

Use the range chunk method for origin file download. Value range:

  • on: Enable.
  • off: Disable.
  • force: Force.
on
OriginMtlsstring

mTLS switch. Value range:

  • on: Enable.
  • off: Disable.
on
OriginVerifystring

Origin certificate verification switch. Value range:

  • on: Enable.
  • off: Disable.
on

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"
}

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-02-27The Error code has changed. The response structure of the API has changedView Change Details