ALIYUN::DDoSPro::WebRule is used to create a forwarding rule for a website.
Syntax
{
"Type": "ALIYUN::DDoSPro::WebRule",
"Properties": {
"RsType": Integer,
"ResourceGroupId": String,
"DefenseId": String,
"Domain": String,
"InstanceIds": List,
"Rules": String,
"HttpsExt": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Domain | String | Yes | No | The domain name of the website that you want to add to Anti-DDoS Proxy. | None. |
RsType | Integer | Yes | No | The address type of the origin server. | Valid values:
|
Rules | String | Yes | No | The details of the forwarding rule. | The value of this property must be a string that consists of JSON arrays. Each element in a JSON array is a JSON struct that contains the following fields:
|
DefenseId | String | No | No | The defense ID that you want to associate with the forwarding rule. | None. |
HttpsExt | String | No | No | The advanced HTTPS settings. This property takes effect only when the value of ProxyType includes https. | The value of this property must be a string that consists of a JSON struct. The JSON struct contains the following fields:
|
InstanceIds | List | No | No | The IDs of the Anti-DDoS Proxy instances that you want to associate with the forwarding rule. | None. |
ResourceGroupId | String | No | No | The ID of the resource group to which the Anti-DDoS Proxy instance belongs in Resource Management. | None. |
Return values
Fn::GetAtt
Domain: the domain name of the website that is added to Anti-DDoS Proxy.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RsType:
Type: Number
Description:
en: |-
The address type of the origin server. Valid values:
0: IP address
1: domain name The domain name of the origin server is returned if you deploy proxies, such as Web Application Firewall (WAF), between the origin server and the instance. In this case, the address of the proxy, such as the CNAME provided by WAF, is returned.
Required: true
Domain:
Type: String
Description:
en: The domain name of the website that you want to add to the instance.
Required: true
Rules:
Type: String
Description:
en: |-
The details of the forwarding rule. The value is a string that consists of JSON arrays. Each element in a JSON array is a JSON struct that contains the following fields:
ProxyRules: the information about the origin server. The information includes the port number and IP address. This field is required and must be a JSON array. Each element in a JSON array is a JSON struct that contains the following fields: ProxyPort: the port number. This field is required and must be an integer; RealServers: the IP address. This field is required and must be a string array.
ProxyType: the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::DDoSPro::WebRule
Properties:
RsType:
Ref: RsType
Domain:
Ref: Domain
Rules:
Ref: Rules
Outputs:
Domain:
Description: The domain name of the website that you want to add to the instance.
Value:
Fn::GetAtt:
- ExtensionResource
- Domain
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RsType": {
"Type": "Number",
"Description": {
"en": "The address type of the origin server. Valid values:\n0: IP address\n1: domain name The domain name of the origin server is returned if you deploy proxies, such as Web Application Firewall (WAF), between the origin server and the instance. In this case, the address of the proxy, such as the CNAME provided by WAF, is returned."
},
"Required": true
},
"Domain": {
"Type": "String",
"Description": {
"en": "The domain name of the website that you want to add to the instance."
},
"Required": true
},
"Rules": {
"Type": "String",
"Description": {
"en": "The details of the forwarding rule. The value is a string that consists of JSON arrays. Each element in a JSON array is a JSON struct that contains the following fields: \nProxyRules: the information about the origin server. The information includes the port number and IP address. This field is required and must be a JSON array. Each element in a JSON array is a JSON struct that contains the following fields: ProxyPort: the port number. This field is required and must be an integer; RealServers: the IP address. This field is required and must be a string array.\nProxyType: the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::DDoSPro::WebRule",
"Properties": {
"RsType": {
"Ref": "RsType"
},
"Domain": {
"Ref": "Domain"
},
"Rules": {
"Ref": "Rules"
}
}
}
},
"Outputs": {
"Domain": {
"Description": "The domain name of the website that you want to add to the instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Domain"
]
}
}
}
}