ALIYUN::DDoSPro::Port类型用于创建一条DDoS高防端口转发规则。
语法
{
"Type": "ALIYUN::DDoSPro::Port",
"Properties": {
"BackendPort": String,
"InstanceId": String,
"RealServers": List,
"FrontendPort": String,
"FrontendProtocol": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
FrontendProtocol | String | 是 | 否 | 转发协议类型。 | 取值:
|
InstanceId | String | 是 | 否 | 端口转发规则所属的DDoS高防实例的ID。 | 无 |
RealServers | List | 是 | 否 | 源站IP地址列表。 | 无 |
BackendPort | String | 否 | 否 | 源站端口。 | 取值范围:0~65535。 |
FrontendPort | String | 否 | 否 | 转发端口。 | 取值范围:0~65535。 |
返回值
Fn::GetAtt
FrontendPort:转发端口。
示例
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
BackendPort:
Type: String
Description:
en: 'The port of the origin server. Valid values: 0 to 65535.'
Required: false
InstanceId:
Type: String
Description:
en: The ID of the Anti-DDoS Pro or Anti-DDoS Premium instance to which the port forwarding rule belongs.
Required: true
RealServers:
AssociationPropertyMetadata:
Parameter:
Type: String
Description:
en: The IP address of the origin server.
Required: true
AssociationProperty: List[Parameter]
Type: Json
Description:
en: An array that consists of the IP addresses of origin servers.
Required: true
FrontendPort:
Type: String
Description:
en: 'The forwarding port. Valid values: 0 to 65535.'
Required: false
FrontendProtocol:
Type: String
Description:
en: |-
The type of the protocol. Valid values:
tcp
udp
AllowedValues:
- tcp
- udp
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::DDoSPro::Port
Properties:
BackendPort:
Ref: BackendPort
InstanceId:
Ref: InstanceId
RealServers:
Ref: RealServers
FrontendPort:
Ref: FrontendPort
FrontendProtocol:
Ref: FrontendProtocol
Outputs:
FrontendPort:
Description: The forwarding port.
Value:
Fn::GetAtt:
- ExtensionResource
- FrontendPort
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"BackendPort": {
"Type": "String",
"Description": {
"en": "The port of the origin server. Valid values: 0 to 65535."
},
"Required": false
},
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the Anti-DDoS Pro or Anti-DDoS Premium instance to which the port forwarding rule belongs."
},
"Required": true
},
"RealServers": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Description": {
"en": "The IP address of the origin server."
},
"Required": true
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "An array that consists of the IP addresses of origin servers."
},
"Required": true
},
"FrontendPort": {
"Type": "String",
"Description": {
"en": "The forwarding port. Valid values: 0 to 65535."
},
"Required": false
},
"FrontendProtocol": {
"Type": "String",
"Description": {
"en": "The type of the protocol. Valid values: \ntcp\nudp"
},
"AllowedValues": [
"tcp",
"udp"
],
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::DDoSPro::Port",
"Properties": {
"BackendPort": {
"Ref": "BackendPort"
},
"InstanceId": {
"Ref": "InstanceId"
},
"RealServers": {
"Ref": "RealServers"
},
"FrontendPort": {
"Ref": "FrontendPort"
},
"FrontendProtocol": {
"Ref": "FrontendProtocol"
}
}
}
},
"Outputs": {
"FrontendPort": {
"Description": "The forwarding port.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FrontendPort"
]
}
}
}
}
文档内容是否对您有帮助?