ALIYUN::DDoSPro::Port is used to create a port forwarding rule for an Anti-DDoS Proxy instance.
Syntax
{
"Type": "ALIYUN::DDoSPro::Port",
"Properties": {
"BackendPort": String,
"InstanceId": String,
"RealServers": List,
"FrontendPort": String,
"FrontendProtocol": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
FrontendProtocol | String | Yes | No | The type of the forwarding protocol. | Valid values:
|
InstanceId | String | Yes | No | The ID of the Anti-DDoS Proxy instance to which the port forwarding rule belongs. | None. |
RealServers | List | Yes | No | The IP addresses of the origin server. | None. |
BackendPort | String | No | No | The port of the origin server. | Valid values: 0 to 65535. |
FrontendPort | String | No | No | The forwarding port. | Valid values: 0 to 65535. |
Return values
Fn::GetAtt
FrontendPort: the forwarding port.
Examples
YAML
format
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
format
{
"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"
]
}
}
}
}