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

PropertyTypeRequiredEditableDescriptionConstraint
ForwardIpListYesYesThe configurations of the destination external server. For more information, see ForwardIp properties.
ZoneNameStringYesNoThe domain name that requires Domain Name System (DNS) traffic forwarding. None.
TypeStringYesNoThe type of the forwarding rule. Set the value to OUTBOUND, which specifies that DNS traffic is forwarded to external IP addresses.
EndpointIdStringYesNoThe ID of the endpoint. None.
RuleNameStringYesYesThe name of the forwarding rule. None.

ForwardIp syntax

"ForwardIp": [
  {
    "Ip": String,
    "Port": Integer
  }
]

ForwardIp properties

PropertyTypeRequiredEditableDescriptionConstraint
IpStringYesYesThe IP address of the destination external server. None.
PortIntegerYesYesThe 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

  • YAML 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
  • 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"
            ]
          }
        }
      }
    }