全部产品
Search
文档中心

资源编排:DATASOURCE::ROCKETMQ::Topic

更新时间:Sep 02, 2024

DATASOURCE::ROCKETMQ::Topic类型用于查询单个Topic的详情信息。

语法

{
  "Type": "DATASOURCE::ROCKETMQ::Topic",
  "Properties": {
    "InstanceId": String,
    "TopicName": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

Topic所在的实例ID。

TopicName

String

Topic名称。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • InstanceId:Topic所在的实例ID。

  • CreateTime:创建时间。

  • UpdateTime:消息最后的修改时间。

  • MessageType:消息类型。

  • Remark:备注信息。

  • TopicName:Topic名称。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description:
      en: The ID of the instance to which the topic belongs.
    Required: true
  TopicName:
    Type: String
    Description:
      en: The name of the topic.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ROCKETMQ::Topic
    Properties:
      InstanceId:
        Ref: InstanceId
      TopicName:
        Ref: TopicName
Outputs:
  InstanceId:
    Description: The ID of the instance to which the topic belongs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceId
  CreateTime:
    Description: The time when the topic was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  UpdateTime:
    Description: The time when the topic was last updated.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UpdateTime
  MessageType:
    Description: The message type of the topic.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MessageType
  Remark:
    Description: The remarks on the topic.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Remark
  TopicName:
    Description: The name of the topic.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TopicName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the instance to which the topic belongs."
      },
      "Required": true
    },
    "TopicName": {
      "Type": "String",
      "Description": {
        "en": "The name of the topic."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ROCKETMQ::Topic",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "TopicName": {
          "Ref": "TopicName"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "The ID of the instance to which the topic belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the topic was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "UpdateTime": {
      "Description": "The time when the topic was last updated.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UpdateTime"
        ]
      }
    },
    "MessageType": {
      "Description": "The message type of the topic.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MessageType"
        ]
      }
    },
    "Remark": {
      "Description": "The remarks on the topic.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Remark"
        ]
      }
    },
    "TopicName": {
      "Description": "The name of the topic.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TopicName"
        ]
      }
    }
  }
}