ALIYUN::CDN::DomainConfig is used to add domain name settings.
Syntax
{
"Type": "ALIYUN::WAF::DomainConfig",
"Properties": {
"HttpToUserIp": Integer,
"Domain": String,
"SourceIps": String,
"InstanceId": String,
"Region": String,
"HttpPort": String,
"LoadBalancing": Integer,
"HttpsPort": String,
"RsType": Integer,
"IsAccessProduct": Integer,
"HttpsRedirect": Integer,
"Protocols": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
HttpToUserIp | Integer | No | Yes | Specifies whether to enable the HTTP back-to-origin feature. After the feature is
enabled, the Web Application Firewall (WAF) instance can use HTTP to forward HTTPS
requests to the origin.
Note If your website does not support HTTPS access, you can enable the HTTP back-to-origin
feature to allow HTTPS access through WAF. By default, port 80 is used to forward
the requests to the origin.
|
Default value: 0. Valid values:
|
Domain | String | Yes | No | The domain name. | None |
SourceIps | String | No | Yes | The origin IP address. You can specify multiple IP addresses. Example: ["1.1.1.1", "10.0.0.0"] .
|
None |
InstanceId | String | Yes | No | The ID of the WAF instance. | None |
Region | String | No | Yes | The region where the WAF instance resides. | Default value: cn. Valid values:
|
HttpPort | String | No | Yes | The HTTP port number. Separate multiple port numbers with commas (,). Example: [80, 8000] .
|
This parameter is required if the Protocols parameter is set to HTTP. Default value: 80. You must specify one of the HttpPort and HttpsPort parameters in a request. |
LoadBalancing | Integer | No | Yes | The load balancing policy for back-to-origin traffic. | Valid values:
|
HttpsPort | String | No | Yes | The HTTPS port number. Separate multiple HTTPS port numbers with commas (,). Example:
[443] .
|
This parameter is required if the Protocols parameter is set to https. Default value: 443. You must specify one of the HttpPort and HttpsPort parameters in a request. |
RsType | Integer | No | No | The origin address type of the domain name. | Valid values:
|
IsAccessProduct | Integer | Yes | No | Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. | Valid values:
|
HttpsRedirect | Integer | No | Yes | Specifies whether to redirect HTTP requests as HTTPS requests. | Default value: 0. Valid values:
|
Protocols | String | Yes | No | The access protocols supported by the domain name. | Valid values:
|
Response parameters
Fn::GetAtt
- ProtocolType: the supported protocol type. 0 indicates HTTP. 1 indicates HTTPS. 2 indicates both HTTP and HTTPS.
- Cname: the alias assigned by WAF.
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"HttpToUserIp": {
"Type": "Number",
"Description": "Whether to open HTTPS access request is forwarded back to the source station via the HTTP protocol, the value of:\n0: off (default)\n1: Turn\nNote If your site does not support HTTPS back to the source, open source HTTP return (default back to the source port is port 80) function key, can be realized by WAF HTTPS access.",
"AllowedValues": [
0,
1
]
},
"HttpPort": {
"Type": "String",
"Description": "HTTP protocol configuration port. When specifying a plurality of HTTP port \",\" separated. Example values: [80].\nConfigure the HTTP protocol, this parameter is required. The default value is 80. HttpPort HttpsPort with at least two parameters need to fill a request."
},
"IsAccessProduct": {
"Type": "Number",
"Description": "The domain before WAF is configured with seven agents (eg, high defense, CDN, etc.), the value of:\n0: none.\n1: expressed.",
"AllowedValues": [
0,
1
]
},
"RsType": {
"Type": "Number",
"Description": "Back to the source address type the domain name values:\n0: back to the source to IP.\n1: Indicates the domain name back to the source.",
"AllowedValues": [
0,
1
]
},
"Protocols": {
"Type": "String",
"Description": "The domain supports access protocols, values:\nhttp: expressed support for the HTTP protocol.\nhttps: support for HTTPS protocol.\nhttp, https: supports HTTP, HTTPS protocol."
},
"InstanceId": {
"Type": "String",
"Description": "WAF instance ID.\nDescription Interface You can view your current WAF instance ID by calling DescribePayInfo."
},
"SourceIps": {
"Type": "String",
"Description": "Source station IP, supports a plurality of specified IP. Example values: [ \"1.1.1.1\"]."
},
"HttpsRedirect": {
"Type": "Number",
"Description": "HTTPS is turned forcefully jump the argument:\n0: off (default)\n1: Turn\nDescription required to complete the request parameters using only HTTPS access protocol. After opening force will show a jump HTTP request is HTTPS, a default jump to 443.",
"AllowedValues": [
0,
1
]
},
"Region": {
"Type": "String",
"Description": "Examples of areas where the WAF. Value:\ncn: China mainland (default)\ncn-hongkong: China HongKong and other overseas",
"AllowedValues": [
"cn",
"cn-hongkong"
]
},
"Domain": {
"Type": "String",
"Description": "Domain name."
},
"LoadBalancing": {
"Type": "Number",
"Description": "Back to the source load balancing policy values:\n0: IP Hash way.\n1: represents a polling mode.",
"AllowedValues": [
0,
1
]
},
"HttpsPort": {
"Type": "String",
"Description": "HTTPS protocol configuration port. When specifying a plurality HTTPS port, using the \",\" separated. Example values: [443].\nConfigure the protocol is HTTPS, this parameter is required. The default value is 443. HttpPort HttpsPort with at least two parameters need to fill a request."
}
},
"Resources": {
"DomainConfig": {
"Type": "ALIYUN::WAF::DomainConfig",
"Properties": {
"HttpToUserIp": {
"Ref": "HttpToUserIp"
},
"HttpPort": {
"Ref": "HttpPort"
},
"IsAccessProduct": {
"Ref": "IsAccessProduct"
},
"RsType": {
"Ref": "RsType"
},
"Protocols": {
"Ref": "Protocols"
},
"InstanceId": {
"Ref": "InstanceId"
},
"SourceIps": {
"Ref": "SourceIps"
},
"HttpsRedirect": {
"Ref": "HttpsRedirect"
},
"Region": {
"Ref": "Region"
},
"Domain": {
"Ref": "Domain"
},
"LoadBalancing": {
"Ref": "LoadBalancing"
},
"HttpsPort": {
"Ref": "HttpsPort"
}
}
}
},
"Outputs": {
"ProtocolType": {
"Description": "agreement type:0: indicates that the HTTP protocol is supported.1: indicates that the HTTPS protocol is supported.2: indicates that both HTTP and HTTPS protocols are supported.",
"Value": {
"Fn::GetAtt": [
"DomainConfig",
"ProtocolType"
]
}
},
"Cname": {
"Description": "CNAME assigned by WAF instance.",
"Value": {
"Fn::GetAtt": [
"DomainConfig",
"Cname"
]
}
}
}
}
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
HttpToUserIp:
Type: Number
Description: >-
Whether to open HTTPS access request is forwarded back to the source
station via the HTTP protocol, the value of:
0: off (default)
1: Turn
Note If your site does not support HTTPS back to the source, open source
HTTP return (default back to the source port is port 80) function key, can
be realized by WAF HTTPS access.
AllowedValues:
- 0
- 1
HttpPort:
Type: String
Description: >-
HTTP protocol configuration port. When specifying a plurality of HTTP port
"," separated. Example values: [80].
Configure the HTTP protocol, this parameter is required. The default value
is 80. HttpPort HttpsPort with at least two parameters need to fill a
request.
IsAccessProduct:
Type: Number
Description: >-
The domain before WAF is configured with seven agents (eg, high defense,
CDN, etc.), the value of:
0: none.
1: expressed.
AllowedValues:
- 0
- 1
RsType:
Type: Number
Description: |-
Back to the source address type the domain name values:
0: back to the source to IP.
1: Indicates the domain name back to the source.
AllowedValues:
- 0
- 1
Protocols:
Type: String
Description: |-
The domain supports access protocols, values:
http: expressed support for the HTTP protocol.
https: support for HTTPS protocol.
http, https: supports HTTP, HTTPS protocol.
InstanceId:
Type: String
Description: >-
WAF instance ID.
Description Interface You can view your current WAF instance ID by calling
DescribePayInfo.
SourceIps:
Type: String
Description: >-
Source station IP, supports a plurality of specified IP. Example values: [
"1.1.1.1"].
HttpsRedirect:
Type: Number
Description: >-
HTTPS is turned forcefully jump the argument:
0: off (default)
1: Turn
Description required to complete the request parameters using only HTTPS
access protocol. After opening force will show a jump HTTP request is
HTTPS, a default jump to 443.
AllowedValues:
- 0
- 1
Region:
Type: String
Description: |-
Examples of areas where the WAF. Value:
cn: China mainland (default)
cn-hongkong: China HongKong and other overseas
AllowedValues:
- cn
- cn-hongkong
Domain:
Type: String
Description: Domain name.
LoadBalancing:
Type: Number
Description: |-
Back to the source load balancing policy values:
0: IP Hash way.
1: represents a polling mode.
AllowedValues:
- 0
- 1
HttpsPort:
Type: String
Description: >-
HTTPS protocol configuration port. When specifying a plurality HTTPS port,
using the "," separated. Example values: [443].
Configure the protocol is HTTPS, this parameter is required. The default
value is 443. HttpPort HttpsPort with at least two parameters need to fill
a request.
Resources:
DomainConfig:
Type: 'ALIYUN::WAF::DomainConfig'
Properties:
HttpToUserIp:
Ref: HttpToUserIp
HttpPort:
Ref: HttpPort
IsAccessProduct:
Ref: IsAccessProduct
RsType:
Ref: RsType
Protocols:
Ref: Protocols
InstanceId:
Ref: InstanceId
SourceIps:
Ref: SourceIps
HttpsRedirect:
Ref: HttpsRedirect
Region:
Ref: Region
Domain:
Ref: Domain
LoadBalancing:
Ref: LoadBalancing
HttpsPort:
Ref: HttpsPort
Outputs:
ProtocolType:
Description: >-
agreement type:0: indicates that the HTTP protocol is supported.1:
indicates that the HTTPS protocol is supported.2: indicates that both HTTP
and HTTPS protocols are supported.
Value:
'Fn::GetAtt':
- DomainConfig
- ProtocolType
Cname:
Description: CNAME assigned by WAF instance.
Value:
'Fn::GetAtt':
- DomainConfig
- Cname