Queries topics on an ApsaraMQ for RocketMQ instance.
Syntax
{
"Type": "DATASOURCE::ROCKETMQ::Topics",
"Properties": {
"InstanceId": String,
"TopicName": String,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
InstanceId |
String |
No |
Yes |
The instance ID. |
None. |
|
TopicName |
String |
No |
Yes |
The topic name. |
None. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
Return values
Fn::GetAtt
-
Topics: the details of each topic.
-
TopicNames: the names of the topics.
|
Property |
Type |
Description |
Constraint |
|
TopicNames |
List |
The names of the topics. |
None. |
|
Topics |
List |
The details of each topic. |
None. |
|
Remark |
string |
The description of the topic. |
None. |
|
Tags |
Map |
The tags of the topic. |
Example:
|
|
InstanceId |
string |
The instance ID. |
None. |
|
RelationName |
string |
The relationship between the current account and the topic. |
Valid values:
|
|
MessageType |
Number |
The message type of the topic. |
Valid values:
|
|
CreateTime |
string |
The topic creation time. |
None. |
|
IndependentNaming |
boolean |
Whether the instance uses a separate namespace. |
Valid values:
|
|
Relation |
integer |
The numeric code of the relationship between the current account and the topic. |
Valid values:
|
|
Owner |
string |
The ID of the topic owner. |
None. |
|
TopicName |
string |
The topic name. |
None. |
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
ExtensionDataSource:
Type: DATASOURCE::ROCKETMQ::Topics
Properties:
TopicName: DemoTopic
Outputs:
Topics:
Description: The list of topics.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Topics
TopicNames:
Description: The list of topic names.
Value:
Fn::GetAtt:
- ExtensionDataSource
- TopicNames{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ROCKETMQ::Topics",
"Properties": {
"TopicName": "DemoTopic"
}
}
},
"Outputs": {
"Topics": {
"Description": "The list of topics.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Topics"
]
}
},
"TopicNames": {
"Description": "The list of topic names.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"TopicNames"
]
}
}
}
}