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" ] } } } }