DATASOURCE::ROCKETMQ::Topics is used to query 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 ID of the instance that contains the topic. | 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: details of the topics.
TopicNames: the names of the topics.
Property | Type | Description | Constraint |
TopicNames | List | Details of the topics. | None. |
Topics | List | The names of the topics. | None. |
Remark | string | The description of the topic. | None. |
Tags | Map | The tags that are added to the topic. | Example: |
InstanceId | string | The ID of the instance that contains the topic. | 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 time when the topic was created. | None. |
IndependentNaming | boolean | Indicates whether the instance that contains the topic has a separate namespace. | Valid values:
|
Relation | integer | The 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"
]
}
}
}
}