All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::PVTZ::Rules

Last Updated:Dec 06, 2024

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

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

EndpointId

String

No

Yes

The ID of the outbound endpoint.

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

  • RuleIds: the IDs of the forwarding rules.

  • Rules: details of the forwarding rules.

Property

Type

Description

Constraint

RuleIds

List

The IDs of the forwarding rules.

None.

Rules

List

Details of the forwarding rules.

None.

ForwardIp

List

Details of the destination IP address.

Example:

[{"Ip": "192.168.XX.XX","Port": 53}]

RuleId

String

The ID of the forwarding rule.

None.

Vpcs

List

Details of the associated virtual private cloud (VPC).

Example:

[ {
   "VpcName" : "vpc-name-test",
   "VpcId" : "vpc-8vbl8mpum-vp****",
   "RegionName" : "Hangzhou-test",
   "RegionId" : "cn-hangzhou"
  } ]

EndpointName

String

The endpoint name.

None.

EndpointId

String

The endpoint ID.

None.

RuleName

String

The name of the forwarding rule.

None.

Type

String

The type of the forwarding rule.

Only OUTBOUND may be returned, which indicates that Domain Name System (DNS) traffic is forwarded to external IP addresses.

CreateTime

String

The creation time.

None.

ZoneName

String

The zone for which DNS requests are forwarded.

None.

Examples

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