The ALIYUN::ESA::HttpIncomingResponseHeaderModificationRule type creates a configuration that modifies the headers of an incoming HTTP response.
Syntax
{
"Type": "ALIYUN::ESA::HttpIncomingResponseHeaderModificationRule",
"Properties": {
"ResponseHeaderModification": List,
"SiteId": Integer,
"RuleEnable": String,
"Rule": String,
"RuleName": String,
"Sequence": Integer,
"SiteVersion": Integer
}
}
Properties
|
Parameter |
Type |
Required |
Update Allowed |
Description |
Constraints |
|
ResponseHeaderModification |
List |
Yes |
Yes |
The response header modifications. |
Supported operations are |
|
SiteId |
Integer |
Yes |
No |
The site ID. |
None |
|
Rule |
String |
No |
Yes |
The conditional expression that matches an incoming request. |
This parameter is not required for a global configuration. You can use it in the following scenarios: - 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 |
Enables or disables the rule. |
This parameter is not required for a global configuration. Valid values:
|
|
RuleName |
String |
No |
Yes |
The name of the rule. |
This parameter is not required for a global configuration. |
|
Sequence |
Integer |
No |
Yes |
The execution priority of the rule. |
A smaller value indicates a higher priority. |
|
SiteVersion |
Integer |
No |
No |
The version number of the site configuration. |
For a site with configuration version management enabled, this parameter specifies the effective version of the site configuration. The default value is 0. |
ResponseHeaderModification syntax
"ResponseHeaderModification": [
{
"Type": String,
"Value": String,
"Operation": String,
"Name": String
}
]
ResponseHeaderModification properties
|
Parameter |
Type |
Required |
Update Allowed |
Description |
Constraints |
|
Name |
String |
Yes |
Yes |
The name of the response header. |
None |
|
Operation |
String |
Yes |
Yes |
The operation to perform on the header. |
Valid values:
|
|
Type |
String |
No |
Yes |
The type of the header value. |
Valid values:
|
|
Value |
String |
No |
Yes |
The value of the response header. |
None |
Outputs
Fn::GetAtt
-
RuleEnable: Indicates whether the rule is enabled.
-
ResponseHeaderModification: The response header modifications.
-
Sequence: The rule's execution priority. A smaller value indicates a higher priority.
-
Rule: The conditional expression for the rule.
-
ConfigId: The configuration ID.
-
SiteVersion: The site configuration's version number.
-
ConfigType: The configuration type.
-
RuleName: The rule name.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SiteId:
Type: Number
Description:
en: The site ID.
Required: true
RuleEnable:
Type: String
Description:
en: |-
Specifies whether to enable the rule. This parameter is not required for a global configuration. Valid values:
- `on`: Enables the rule.
- `off`: Disables the rule.
AllowedValues:
- 'on'
- 'off'
Required: false
ResponseHeaderModification:
AssociationPropertyMetadata:
Parameters:
Type:
Type: String
Description:
en: |-
The type of the header value. Valid values:
- `static`: The value is a static string.
- `dynamic`: The value is dynamically generated.
AllowedValues:
- static
- dynamic
Required: false
Value:
Type: String
Description:
en: The value of the response header.
Required: false
Operation:
Type: String
Description:
en: |-
The operation to perform. 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 name of the response header.
Required: true
Type: Json
AssociationProperty: List[Parameters]
Description:
en: The response header modifications. Supported operations include add, del, and modify.
Required: true
Sequence:
Type: Number
Description:
en: The rule's execution priority. A smaller value indicates a higher priority.
Required: false
Rule:
Type: String
Description:
en: |-
The conditional expression that matches an incoming request. This parameter is not required for a global configuration. You can use it in the following scenarios:
- To match all incoming requests, set the value to `true`.
- To match a specific request, set the value to a custom expression, such as `(http.host eq "video.example.com")`.
Required: false
SiteVersion:
Type: Number
Description:
en: The version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the effective version of the site configuration. The default value is 0.
Required: false
RuleName:
Type: String
Description:
en: The name of the rule. This parameter is not required for a global configuration.
Required: false
Resources:
ExtensionResource:
Type: ALIYUN::ESA::HttpIncomingResponseHeaderModificationRule
Properties:
SiteId:
Ref: SiteId
RuleEnable:
Ref: RuleEnable
ResponseHeaderModification:
Ref: ResponseHeaderModification
Sequence:
Ref: Sequence
Rule:
Ref: Rule
SiteVersion:
Ref: SiteVersion
RuleName:
Ref: RuleName
Outputs:
RuleEnable:
Description: Specifies whether the rule is enabled. This parameter is not required for a global configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- RuleEnable
ResponseHeaderModification:
Description: The modifications to apply to the response headers.
Value:
Fn::GetAtt:
- ExtensionResource
- ResponseHeaderModification
Sequence:
Description: The execution order of the rule. A smaller value indicates a higher priority.
Value:
Fn::GetAtt:
- ExtensionResource
- Sequence
Rule:
Description: The conditional expression for the rule. This parameter is not required for a global configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- Rule
ConfigId:
Description: The configuration ID.
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigId
SiteVersion:
Description: The version number of the site configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- SiteVersion
ConfigType:
Description: The configuration type.
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigType
RuleName:
Description: The name of the rule. This parameter is not required 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": "Specifies whether to enable the rule. This parameter is not required for a global configuration. Valid values:\n- `on`: Enables the rule.\n- `off`: Disables the rule."
},
"AllowedValues": [
"on",
"off"
],
"Required": false
},
"ResponseHeaderModification": {
"AssociationPropertyMetadata": {
"Parameters": {
"Type": {
"Type": "String",
"Description": {
"en": "The type of the header value. Valid values:\n- `static`: The value is a static string.\n- `dynamic`: The value is dynamically generated."
},
"AllowedValues": [
"static",
"dynamic"
],
"Required": false
},
"Value": {
"Type": "String",
"Description": {
"en": "The value of the response header."
},
"Required": false
},
"Operation": {
"Type": "String",
"Description": {
"en": "The operation to perform. 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 name of the response header."
},
"Required": true
}
}
},
"Type": "Json",
"AssociationProperty": "List[Parameters]",
"Description": {
"en": "The response header modifications. Supported operations include add, del, and modify."
},
"Required": true
},
"Sequence": {
"Type": "Number",
"Description": {
"en": "The rule's execution priority. A smaller value indicates a higher priority."
},
"Required": false
},
"Rule": {
"Type": "String",
"Description": {
"en": "The conditional expression that matches an incoming request. This parameter is not required for a global configuration. You can use it in the following scenarios:\n- To match all incoming requests, set the value to `true`.\n- To match a specific request, set the value to a custom expression, such as `(http.host eq \\\"video.example.com\\\")`."
},
"Required": false
},
"SiteVersion": {
"Type": "Number",
"Description": {
"en": "The version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the effective version of the site configuration. The default value is 0."
},
"Required": false
},
"RuleName": {
"Type": "String",
"Description": {
"en": "The name of the rule. This parameter is not required for a global configuration."
},
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ESA::HttpIncomingResponseHeaderModificationRule",
"Properties": {
"SiteId": {
"Ref": "SiteId"
},
"RuleEnable": {
"Ref": "RuleEnable"
},
"ResponseHeaderModification": {
"Ref": "ResponseHeaderModification"
},
"Sequence": {
"Ref": "Sequence"
},
"Rule": {
"Ref": "Rule"
},
"SiteVersion": {
"Ref": "SiteVersion"
},
"RuleName": {
"Ref": "RuleName"
}
}
}
},
"Outputs": {
"RuleEnable": {
"Description": "Specifies whether the rule is enabled. This parameter is not required for a global configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RuleEnable"
]
}
},
"ResponseHeaderModification": {
"Description": "The modifications to apply to the response headers.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ResponseHeaderModification"
]
}
},
"Sequence": {
"Description": "The execution order of the rule. A smaller value indicates a higher priority.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Sequence"
]
}
},
"Rule": {
"Description": "The conditional expression for the rule. This parameter is not required for a global configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Rule"
]
}
},
"ConfigId": {
"Description": "The configuration ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigId"
]
}
},
"SiteVersion": {
"Description": "The version number of the site configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SiteVersion"
]
}
},
"ConfigType": {
"Description": "The configuration type.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigType"
]
}
},
"RuleName": {
"Description": "The name of the rule. This parameter is not required for a global configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RuleName"
]
}
}
}
}