すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:データソース::MNS::Topic

最終更新日:Mar 17, 2025

DATASOURCE::MNS::Topic は、Topic に関する情報をクエリするために使用されます。

構文

{
  "Type": "DATASOURCE::MNS::Topic",
  "Properties": {
    "TopicName": String,
    "RefreshOptions": String
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

TopicName

String

はい

はい

Topic 名。

なし。

RefreshOptions

String

いいえ

はい

スタックが更新されたときのデータソース リソースのリフレッシュ ポリシー。

有効な値:

  • Never (デフォルト): スタックが更新されたときにデータソース リソースをリフレッシュしません。

  • Always: スタックが更新されたときにデータソース リソースをリフレッシュします。

戻り値

Fn::GetAtt

  • MessageRetentionPeriod: Topic 内のメッセージの最大保持期間。

  • CreateTime: Topic が作成された時刻。

  • TopicUrl: トピックのパブリック URL です。

  • MaxMessageSize: Topic に送信されるメッセージ本文の最大サイズ。

  • LastModifyTime: Topic が最後に変更された時刻。

  • MessageCount: Topic 内のメッセージの数。

  • TopicInnerUrl: トピックの非公開 URL です。

  • LoggingEnabled: ロギング機能が有効になっているかどうかを示します。

  • TopicName: Topic 名。

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
{
  "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": "Topic 内のメッセージの保持期間。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MessageRetentionPeriod"
        ]
      }
    },
    "CreateTime": {
      "Description": "Topic が作成された時刻。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "TopicUrl": {
      "Description": "Topic の URL。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TopicUrl"
        ]
      }
    },
    "MaxMessageSize": {
      "Description": "Topic に送信されるメッセージ本文の最大サイズ。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MaxMessageSize"
        ]
      }
    },
    "LastModifyTime": {
      "Description": "Topic が最後に変更された時刻。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LastModifyTime"
        ]
      }
    },
    "MessageCount": {
      "Description": "Topic 内のメッセージの数。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MessageCount"
        ]
      }
    },
    "TopicInnerUrl": {
      "Description": "Topic の内部 URL。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TopicInnerUrl"
        ]
      }
    },
    "LoggingEnabled": {
      "Description": "Topic でログ管理機能が有効になっているかどうかを示します。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LoggingEnabled"
        ]
      }
    },
    "TopicName": {
      "Description": "MNS Topic の名前。",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TopicName"
        ]
      }
    }
  }
}