DATASOURCE::ROCKETMQ5::Topic类型用于获取某个指定主题的详细信息。
语法
{
"Type": "DATASOURCE::ROCKETMQ5::Topic",
"Properties": {
"InstanceId": String,
"TopicName": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
InstanceId | String | 是 | 是 | 待查询主题所属的实例的 ID。 | 无 |
TopicName | String | 是 | 是 | 待查询主题的名称。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
Status:主题的状态。
InstanceId:主题所属实例的 ID。
CreateTime:主题的创建时间。
UpdateTime:主题的最后修改时间。
MessageType:主题的消息类型。
Remark:主题的备注信息。
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::ROCKETMQ5::Topic
Properties:
InstanceId:
Ref: InstanceId
TopicName:
Ref: TopicName
Outputs:
Status:
Description: The state of the topic.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Status
InstanceId:
Description: The ID of the RocketMQ instance.
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::ROCKETMQ5::Topic",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
},
"TopicName": {
"Ref": "TopicName"
}
}
}
},
"Outputs": {
"Status": {
"Description": "The state of the topic.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Status"
]
}
},
"InstanceId": {
"Description": "The ID of the RocketMQ instance.",
"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"
]
}
}
}
}
该文章对您有帮助吗?