Cria uma regra de encaminhamento para um site.
Sintaxe
{
"Type": "ALIYUN::DDoSPro::WebRule",
"Properties": {
"RsType": Integer,
"ResourceGroupId": String,
"DefenseId": String,
"Domain": String,
"InstanceIds": List,
"Rules": String,
"HttpsExt": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
Domain |
String |
Sim |
Não |
Nome de domínio do site a ser adicionado ao Anti-DDoS Proxy. |
Nenhuma. |
|
RsType |
Integer |
Sim |
Não |
Tipo de endereço do servidor de origem. |
Valores válidos:
|
|
Rules |
String |
Sim |
Não |
Detalhes da regra de encaminhamento. |
String composta por arrays JSON. Cada elemento do array é uma estrutura JSON com os seguintes campos:
|
|
DefenseId |
String |
Não |
Não |
ID de defesa a associar à regra de encaminhamento. |
Nenhuma. |
|
HttpsExt |
String |
Não |
Não |
Configurações avançadas de HTTPS. Aplica-se apenas quando ProxyType inclui https. |
String composta por uma estrutura JSON com os seguintes campos:
|
|
InstanceIds |
List |
Não |
Não |
IDs das instâncias do Anti-DDoS Proxy a associar à regra de encaminhamento. |
Nenhuma. |
|
ResourceGroupId |
String |
Não |
Não |
ID do grupo de recursos ao qual a instância do Anti-DDoS Proxy pertence no Resource Management. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
Domain: nome de domínio do site adicionado ao Anti-DDoS Proxy.
Exemplos
Formato YAML
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
Formato JSON
{
"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"
]
}
}
}
}