ALIYUN::PVTZ::Rule类型用于新增转发规则。
语法
{
  "Type": "ALIYUN::PVTZ::Rule",
  "Properties": {
    "ForwardIp": List,
    "ZoneName": String,
    "Type": String,
    "EndpointId": String,
    "RuleName": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
|---|---|---|---|---|---|
| ForwardIp | List | 是 | 是 | 转发目标IP配置。 | 更多信息,请参见ForwardIp属性。 | 
| ZoneName | String | 是 | 否 | 转发Zone名称。 | 无 | 
| Type | String | 是 | 否 | 转发规则类型。 | 取值:OUTBOUND: 转发至外部IP。 | 
| EndpointId | String | 是 | 否 | 终端节点ID。 | 无 | 
| RuleName | String | 是 | 是 | 转发规则名称。 | 无 | 
ForwardIp语法
"ForwardIp": [
  {
    "Ip": String,
    "Port": Integer
  }
]ForwardIp属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
|---|---|---|---|---|---|
| Ip | String | 是 | 是 | 转发目标IP地址。 | 无 | 
| Port | Integer | 是 | 是 | 转发目标IP地址端口号。 | 无 | 
返回值
Fn::GetAtt
- ForwardIp:转发目标IP地址。
- ZoneName:转发Zone名称。
- Vpcs:转发规则绑定的VPC列表。
- Type:转发规则类型。
- EndpointName:终端节点名称。
- EndpointId:终端节点ID。
- CreateTime:转发规则的创建时间。
- RuleName:转发规则名称。
示例
- JSON格式- { "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" ] } } } }