Mengkueri detail konfigurasi aturan modifikasi header respons HTTP masuk untuk website.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:GetHttpIncomingResponseHeaderModificationRule |
get |
*Site
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
ID website, yang dapat diperoleh dengan memanggil operasi ListSites. |
347168101647504 |
| ConfigId |
integer |
Yes |
ID konfigurasi. Anda dapat memanggil operasi ListHttpIncomingResponseHeaderModificationRules untuk mengkueri ID tersebut. |
430509230649344 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395 |
| ConfigId |
integer |
The configuration ID. |
432637955352576 |
| ConfigType |
string |
The configuration type. Valid values:
|
rule |
| SiteVersion |
integer |
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. |
0 |
| Sequence |
integer |
The order in which the rule is executed. A smaller value gives priority to the rule. |
1 |
| RuleEnable |
string |
Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configuration. Specifies whether to check the image used by the instance supports hot migration. Valid values:
|
on |
| Rule |
string |
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:
|
(http.host eq "video.example.com") |
| RuleName |
string |
The rule name. You do not need to set this parameter when you add global configuration. |
rule_example |
| ResponseHeaderModification |
array<object> |
The configurations of modifying response headers. You can add, delete, or modify a response header. |
|
|
object |
The configuration of modifying a response header. |
||
| Name |
string |
The name of the response header. |
headerName |
| Operation |
string |
The action. Valid values:
|
add |
| Value |
string |
The value of the response header. |
headerValue |
| Type |
string |
The value type. Valid values:
|
static |
Contoh
Respons sukses
JSONformat
{
"RequestId": "EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395",
"ConfigId": 432637955352576,
"ConfigType": "rule",
"SiteVersion": 0,
"Sequence": 1,
"RuleEnable": "on",
"Rule": "(http.host eq \"video.example.com\")\n",
"RuleName": "rule_example",
"ResponseHeaderModification": [
{
"Name": "headerName",
"Operation": "add",
"Value": "headerValue",
"Type": "static"
}
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.