DATASOURCE::PVTZ::Rule类型用于获取单个转发规则详情。
语法
{
  "Type": "DATASOURCE::PVTZ::Rule",
  "Properties": {
    "RuleId": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| RuleId | String | 是 | 是 | 转发规则ID。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
Fn::GetAtt
- ForwardIp:转发目标IP地址列表。 
- ZoneName:转发Zone名称。 
- Vpcs:关联的VPC列表。 
- Type:转发类型。 
- EndpointName:终端节点名称。 
- EndpointId:终端节点ID。 
- CreateTime:创建时间。 
- RuleName:转发规则名称。 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RuleId:
    Type: String
    Description:
      en: The ID of the forwarding rule.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::PVTZ::Rule
    Properties:
      RuleId:
        Ref: RuleId
Outputs:
  ForwardIp:
    Description: The destination IP address.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ForwardIp
  ZoneName:
    Description: The name of the forward zone.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ZoneName
  Vpcs:
    Description: The virtual private clouds (VPCs) that are associated with the forwarding rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Vpcs
  Type:
    Description: 'The type of the forwarding rule. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Type
  EndpointName:
    Description: The endpoint name.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EndpointName
  EndpointId:
    Description: The endpoint ID.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EndpointId
  CreateTime:
    Description: The time when the forwarding rule was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  RuleName:
    Description: The name of the forwarding rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RuleName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RuleId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the forwarding rule."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PVTZ::Rule",
      "Properties": {
        "RuleId": {
          "Ref": "RuleId"
        }
      }
    }
  },
  "Outputs": {
    "ForwardIp": {
      "Description": "The destination IP address.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ForwardIp"
        ]
      }
    },
    "ZoneName": {
      "Description": "The name of the forward zone.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ZoneName"
        ]
      }
    },
    "Vpcs": {
      "Description": "The virtual private clouds (VPCs) that are associated with the forwarding rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Vpcs"
        ]
      }
    },
    "Type": {
      "Description": "The type of the forwarding rule. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Type"
        ]
      }
    },
    "EndpointName": {
      "Description": "The endpoint name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EndpointName"
        ]
      }
    },
    "EndpointId": {
      "Description": "The endpoint ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EndpointId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the forwarding rule was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "RuleName": {
      "Description": "The name of the forwarding rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RuleName"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?