ALIYUN::PVTZ::Rule is used to add a forwarding rule.
Syntax
{
"Type": "ALIYUN::PVTZ::Rule",
"Properties": {
"ForwardIp": List,
"ZoneName": String,
"Type": String,
"EndpointId": String,
"RuleName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ForwardIp | List | Yes | Yes | The configurations of the destination external server. | For more information, see ForwardIp properties. |
ZoneName | String | Yes | No | The domain name that requires Domain Name System (DNS) traffic forwarding. | None. |
Type | String | Yes | No | The type of the forwarding rule. | Set the value to OUTBOUND, which specifies that DNS traffic is forwarded to external IP addresses. |
EndpointId | String | Yes | No | The ID of the endpoint. | None. |
RuleName | String | Yes | Yes | The name of the forwarding rule. | None. |
ForwardIp syntax
"ForwardIp": [
{
"Ip": String,
"Port": Integer
}
]
ForwardIp properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Ip | String | Yes | Yes | The IP address of the destination external server. | None. |
Port | Integer | Yes | Yes | The port number of the destination external server. | None. |
Return values
Fn::GetAtt
- ForwardIp: the configurations of the destination external server.
- ZoneName: the domain name that requires DNS traffic forwarding.
- Vpcs: the virtual private clouds (VPCs) that are associated with the forwarding rule.
- Type: the type of the forwarding rule.
- EndpointName: the name of the endpoint.
- EndpointId: the ID of the endpoint.
- CreateTime: the time when the forwarding rule was created.
- RuleName: the name of the forwarding rule.
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "EndpointId": { "Type": "String", "Description": "The ID of the endpoint." } }, "Resources": { "ExtensionResource": { "Type": "ALIYUN::PVTZ::Rule", "Properties": { "ForwardIp": { "Ip": "172.16.1.1", "Port": "8080" }, "ZoneName": "example.com", "Type": "OUTBOUND", "EndpointId": { "Ref": "EndpointId" }, "RuleName": "TestRule" } } }, "Outputs": { "ForwardIp": { "Description": "The information about each destination external server.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "ForwardIp" ] } }, "ZoneName": { "Description": "The domain name that requires Domain Name System (DNS) traffic forwarding.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "ZoneName" ] } }, "Vpcs": { "Description": "The information about each virtual private cloud (VPC) that is associated with the forwarding rule.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "Vpcs" ] } }, "Type": { "Description": "The type of the forwarding rule.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "Type" ] } }, "EndpointName": { "Description": "The name of the endpoint.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "EndpointName" ] } }, "EndpointId": { "Description": "The ID of the endpoint.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "EndpointId" ] } }, "CreateTime": { "Description": "The timestamp when the forwarding rule was created.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "CreateTime" ] } }, "RuleName": { "Description": "The name of the forwarding rule.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "RuleName" ] } } } }