All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::PVTZ::Rule

Last Updated:Apr 22, 2025

DATASOURCE::PVTZ::Rule is used to query the information about a forwarding rule.

Synopsis

{
  "Type": "DATASOURCE::PVTZ::Rule",
  "Properties": {
    "RuleId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

RuleId

String

Yes

Yes

The ID of the forwarding rule.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values

Fn::GetAtt

  • ForwardIp: the destination IP address.

  • ZoneName: the name of the forward zone.

  • Vpcs: the associated virtual private clouds (VPCs).

  • Type: the forwarding type.

  • 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

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