The ALIYUN::ESA::HttpIncomingRequestHeaderModificationRule resource creates a rule to modify incoming HTTP request headers.
Syntax
{
"Type": "ALIYUN::ESA::HttpIncomingRequestHeaderModificationRule",
"Properties": {
"RequestHeaderModification": List,
"SiteId": Integer,
"RuleEnable": String,
"Rule": String,
"RuleName": String,
"Sequence": Integer,
"SiteVersion": Integer
}
}Properties
Parameter | Type | Required | Editable | Description | Constraints |
RequestHeaderModification | List | Yes | Yes | The configurations to add, delete, or modify request headers. | For more information, see Request HeaderModification properties. |
SiteId | Integer | Yes | No | The site ID. | None |
Rule | String | No | Yes | The conditional expression used to match a user request. | This parameter is not required for a global configuration. This parameter can be used in the following two ways: - To match all incoming requests, set the value to - To match a specific request, set the value to a custom expression, such as |
RuleEnable | String | No | Yes | The rule switch. | This parameter is not required for a global configuration. Valid values: - - |
RuleName | String | No | Yes | The rule name. | This parameter is not required for a global configuration. |
Sequence | Integer | No | Yes | The rule execution order. | A smaller value indicates a higher execution priority. |
SiteVersion | Integer | No | No | The version of the site configuration. | If configuration version management is enabled for the site, this parameter specifies the effective version. Default value: 0. |
RequestHeaderModification syntax
"RequestHeaderModification": [
{
"Type": String,
"Value": String,
"Operation": String,
"Name": String
}
]RequestHeaderModification properties
Parameter | Type | Required | Updatable | Description | Constraints |
Name | String | Yes | Yes | The request header name. | None |
Operation | String | Yes | Yes | The operation. | Valid values:
|
Type | String | No | Yes | The value type. | Valid values:
|
Value | String | No | Yes | The request header value. | None |
Return values
Fn::GetAtt
RuleEnable: The rule switch. This attribute is not returned for a global configuration.
Sequence: The rule execution order. A smaller value indicates a higher execution priority.
Rule: The conditional expression used to match a user request. This attribute is not returned for a global configuration.
ConfigId: The configuration ID.
SiteVersion: The effective version of the site configuration if configuration version management is enabled. The default value is 0.
ConfigType: The configuration type, which indicates whether it is a global configuration or a rule-based configuration.
RequestHeaderModification: The configurations to add, delete, or modify request headers.
RuleName: The rule name. This attribute is not returned for a global configuration.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SiteId:
Type: Number
Description:
en: The site ID.
Required: true
RuleEnable:
Type: String
Description:
en: |-
The rule switch. This parameter is not required for a global configuration. Valid values:
- on: Enabled.
- off: Disabled.
AllowedValues:
- 'on'
- 'off'
Required: false
Sequence:
Type: Number
Description:
en: The rule execution order. A smaller value indicates a higher execution priority.
Required: false
Rule:
Type: String
Description:
en: |-
The conditional expression used to match a user request. This parameter is not required for a global configuration. You can use this parameter in the following two ways:
- To match all incoming requests, set the value to `true`.
- To match a specific request, set the value to a custom expression, for example, `(http.host eq "video.example.com")`.
Required: false
SiteVersion:
Type: Number
Description:
en: If configuration version management is enabled for the site, this parameter specifies the effective version. Default value: 0.
Required: false
RequestHeaderModification:
AssociationPropertyMetadata:
Parameters:
Type:
Type: String
Description:
en: |-
The value type. Valid values:
- `static`: Static mode.
- `dynamic`: Dynamic mode.
AllowedValues:
- static
- dynamic
Required: false
Value:
Type: String
Description:
en: The request header value.
Required: false
Operation:
Type: String
Description:
en: |-
The operation. Valid values:
- `add`: Adds a header.
- `del`: Deletes a header.
- `modify`: Modifies a header.
AllowedValues:
- add
- del
- modify
Required: true
Name:
Type: String
Description:
en: The request header name.
Required: true
Type: Json
AssociationProperty: List[Parameters]
Description:
en: The configurations to add, delete, or modify request headers.
Required: true
RuleName:
Type: String
Description:
en: The rule name. This parameter is not required for a global configuration.
Required: false
Resources:
ExtensionResource:
Type: ALIYUN::ESA::HttpIncomingRequestHeaderModificationRule
Properties:
SiteId:
Ref: SiteId
RuleEnable:
Ref: RuleEnable
Sequence:
Ref: Sequence
Rule:
Ref: Rule
SiteVersion:
Ref: SiteVersion
RequestHeaderModification:
Ref: RequestHeaderModification
RuleName:
Ref: RuleName
Outputs:
RuleEnable:
Description: The rule switch. This attribute is not returned for a global configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- RuleEnable
Sequence:
Description: The rule execution order. A smaller value indicates a higher execution priority.
Value:
Fn::GetAtt:
- ExtensionResource
- Sequence
Rule:
Description: The conditional expression used to match a user request. This attribute is not returned for a global configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- Rule
ConfigId:
Description: The configuration ID.
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigId
SiteVersion:
Description: The effective version of the site configuration if configuration version management is enabled. The default value is 0.
Value:
Fn::GetAtt:
- ExtensionResource
- SiteVersion
ConfigType:
Description: The configuration type, which indicates whether it is a global configuration or a rule-based configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigType
RequestHeaderModification:
Description: The configurations to add, delete, or modify request headers.
Value:
Fn::GetAtt:
- ExtensionResource
- RequestHeaderModification
RuleName:
Description: The rule name. This attribute is not returned for a global configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- RuleName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SiteId": {
"Type": "Number",
"Description": {
"en": "The site ID."
},
"Required": true
},
"RuleEnable": {
"Type": "String",
"Description": {
"en": "The rule switch. This parameter is not required for a global configuration. Valid values:\n- on: Enabled.\n- off: Disabled."
},
"AllowedValues": [
"on",
"off"
],
"Required": false
},
"Sequence": {
"Type": "Number",
"Description": {
"en": "The rule execution order. A smaller value indicates a higher execution priority."
},
"Required": false
},
"Rule": {
"Type": "String",
"Description": {
"en": "The conditional expression used to match a user request. This parameter is not required for a global configuration. You can use this parameter in the following two ways:\n- To match all incoming requests, set the value to `true`.\n- To match a specific request, set the value to a custom expression, for example, `(http.host eq \\\"video.example.com\\\")`."
},
"Required": false
},
"SiteVersion": {
"Type": "Number",
"Description": {
"en": "If configuration version management is enabled for the site, this parameter specifies the effective version. Default value: 0."
},
"Required": false
},
"RequestHeaderModification": {
"AssociationPropertyMetadata": {
"Parameters": {
"Type": {
"Type": "String",
"Description": {
"en": "The value type. Valid values:\n- `static`: Static mode.\n- `dynamic`: Dynamic mode."
},
"AllowedValues": [
"static",
"dynamic"
],
"Required": false
},
"Value": {
"Type": "String",
"Description": {
"en": "The request header value."
},
"Required": false
},
"Operation": {
"Type": "String",
"Description": {
"en": "The operation. Valid values:\n- `add`: Adds a header.\n- `del`: Deletes a header.\n- `modify`: Modifies a header."
},
"AllowedValues": [
"add",
"del",
"modify"
],
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "The request header name."
},
"Required": true
}
}
},
"Type": "Json",
"AssociationProperty": "List[Parameters]",
"Description": {
"en": "The configurations to add, delete, or modify request headers."
},
"Required": true
},
"RuleName": {
"Type": "String",
"Description": {
"en": "The rule name. This parameter is not required for a global configuration."
},
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ESA::HttpIncomingRequestHeaderModificationRule",
"Properties": {
"SiteId": {
"Ref": "SiteId"
},
"RuleEnable": {
"Ref": "RuleEnable"
},
"Sequence": {
"Ref": "Sequence"
},
"Rule": {
"Ref": "Rule"
},
"SiteVersion": {
"Ref": "SiteVersion"
},
"RequestHeaderModification": {
"Ref": "RequestHeaderModification"
},
"RuleName": {
"Ref": "RuleName"
}
}
}
},
"Outputs": {
"RuleEnable": {
"Description": "The rule switch. This attribute is not returned for a global configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RuleEnable"
]
}
},
"Sequence": {
"Description": "The rule execution order. A smaller value indicates a higher execution priority.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Sequence"
]
}
},
"Rule": {
"Description": "The conditional expression used to match a user request. This attribute is not returned for a global configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Rule"
]
}
},
"ConfigId": {
"Description": "The configuration ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigId"
]
}
},
"SiteVersion": {
"Description": "The effective version of the site configuration if configuration version management is enabled. The default value is 0.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SiteVersion"
]
}
},
"ConfigType": {
"Description": "The configuration type, which indicates whether it is a global configuration or a rule-based configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigType"
]
}
},
"RequestHeaderModification": {
"Description": "The configurations to add, delete, or modify request headers.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RequestHeaderModification"
]
}
},
"RuleName": {
"Description": "The rule name. This attribute is not returned for a global configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RuleName"
]
}
}
}
}