DATASOURCE::MNS::Topic類型用于獲取單個主題的詳情信息。
語法
{
"Type": "DATASOURCE::MNS::Topic",
"Properties": {
"TopicName": String
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
TopicName | String | 是 | 是 | 主題的名稱。 | 無 |
返回值
Fn::GetAtt
MessageRetentionPeriod:消息在主題中最長存活時間。
CreateTime:主題的創建時間。
TopicUrl:主題的公網訪問地址。
MaxMessageSize:發送到該主題的消息體最大長度。
LastModifyTime:修改主題屬性信息的最近時間。
MessageCount:當前該主題中消息數目。
TopicInnerUrl:主題的內網訪問地址。
LoggingEnabled:是否開啟日志管理功能。
TopicName:主題的名稱。
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: TopicName: Type: String Description: en: The name of the resource. Required: true Resources: ExtensionDataSource: Type: DATASOURCE::MNS::Topic Properties: TopicName: Ref: TopicName Outputs: MessageRetentionPeriod: Description: The retention period of the message in the topic. Value: Fn::GetAtt: - ExtensionDataSource - MessageRetentionPeriod CreateTime: Description: The time when the topic was created. Value: Fn::GetAtt: - ExtensionDataSource - CreateTime TopicUrl: Description: The URL of the topic. Value: Fn::GetAtt: - ExtensionDataSource - TopicUrl MaxMessageSize: Description: The maximum size of a message body that is sent to the topic. Value: Fn::GetAtt: - ExtensionDataSource - MaxMessageSize LastModifyTime: Description: The time when the topic was last modified. Value: Fn::GetAtt: - ExtensionDataSource - LastModifyTime MessageCount: Description: The number of messages in the topic. Value: Fn::GetAtt: - ExtensionDataSource - MessageCount TopicInnerUrl: Description: The internal URL of the topic. Value: Fn::GetAtt: - ExtensionDataSource - TopicInnerUrl LoggingEnabled: Description: Indicates whether the log management feature is enabled for the topic. Value: Fn::GetAtt: - ExtensionDataSource - LoggingEnabled TopicName: Description: The name of the MNS topic. Value: Fn::GetAtt: - ExtensionDataSource - TopicName
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "TopicName": { "Type": "String", "Description": { "en": "The name of the resource." }, "Required": true } }, "Resources": { "ExtensionDataSource": { "Type": "DATASOURCE::MNS::Topic", "Properties": { "TopicName": { "Ref": "TopicName" } } } }, "Outputs": { "MessageRetentionPeriod": { "Description": "The retention period of the message in the topic.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MessageRetentionPeriod" ] } }, "CreateTime": { "Description": "The time when the topic was created.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "CreateTime" ] } }, "TopicUrl": { "Description": "The URL of the topic.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "TopicUrl" ] } }, "MaxMessageSize": { "Description": "The maximum size of a message body that is sent to the topic.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MaxMessageSize" ] } }, "LastModifyTime": { "Description": "The time when the topic was last modified.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LastModifyTime" ] } }, "MessageCount": { "Description": "The number of messages in the topic.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MessageCount" ] } }, "TopicInnerUrl": { "Description": "The internal URL of the topic.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "TopicInnerUrl" ] } }, "LoggingEnabled": { "Description": "Indicates whether the log management feature is enabled for the topic.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LoggingEnabled" ] } }, "TopicName": { "Description": "The name of the MNS topic.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "TopicName" ] } } } }
文檔內容是否對您有幫助?