DATASOURCE::PVTZ::Rules is used to query forwarding rules.

Syntax

{
  "Type": "DATASOURCE::PVTZ::Rules",
  "Properties": {
    "EndpointId": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
EndpointIdStringNoYesThe ID of the outbound endpoint. None.

Return values

Fn::GetAtt

  • RuleIds: the IDs of the forwarding rules.
  • Rules: details of the forwarding rules.
PropertyTypeDescriptionConstraint
RuleIdsListThe IDs of the forwarding rules. None.
RulesListDetails of the forwarding rules. None.
ForwardIpListDetails of the destination IP address. Sample value:
[{"Ip": "192.168.XX.XX","Port": 53}]
RuleIdStringThe ID of the forwarding rule. None.
VpcsListDetails of associated virtual private clouds (VPCs). Sample value:
[ {
      "VpcName" : "vpc-name-test",
      "VpcId" : "vpc-8vbl8mpum-vp****",
      "RegionName" : "Hangzhou-test",
      "RegionId" : "cn-hangzhou"
    } ]
EndpointNameStringThe name of the endpoint. None.
EndpointIdStringThe ID of the endpoint. None.
RuleNameStringThe name of the forwarding rule. None.
TypeStringThe type of the forwarding rule.

Set the value to OUTBOUND, which indicates that Domain Name System (DNS) traffic is forwarded to external IP addresses.

CreateTimeStringThe time when the forwarding rule was created. None.
ZoneNameStringThe domain name that requires DNS traffic forwarding. None.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      EndpointId:
        Description: EndpointId
        Type: String
    Resources:
      ExtensionDataSource:
        Properties:
          EndpointId:
            Ref: EndpointId
        Type: DATASOURCE::PVTZ::Rules
    Outputs:
      RuleIds:
        Description: The list of rule IDs.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - RuleIds
      Rules:
        Description: The list of rules.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - Rules
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "EndpointId": {
          "Type": "String",
          "Description": "EndpointId"
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::PVTZ::Rules",
          "Properties": {
            "EndpointId": {
              "Ref": "EndpointId"
            }
          }
        }
      },
      "Outputs": {
        "RuleIds": {
          "Description": "The list of rule IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "RuleIds"
            ]
          }
        },
        "Rules": {
          "Description": "The list of rules.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Rules"
            ]
          }
        }
      }
    }