文档

DATASOURCE::MNS::Subscription

更新时间:

DATASOURCE::MNS::Subscription类型用于获取某个的订阅信息详情。

语法

{
  "Type": "DATASOURCE::MNS::Subscription",
  "Properties": {
    "SubscriptionName": String,
    "TopicName": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

SubscriptionName

String

订阅信息的名称。

TopicName

String

主题的名称。

返回值

Fn::GetAtt

  • SubscriptionURL:订阅信息的URL。

  • TopicOwner:Subscription 订阅的主题所有者的 AccountId。

  • Endpoint:订阅的终端地址。

  • CreateTime:Subscription 的创建时间。

  • NotifyStrategy:向 Endpoint 推送消息错误时的重试策略。

  • NotifyContentFormat:向 Endpoint 推送的消息内容格式。

  • FilterTag:描述了该订阅中消息过滤的标签。

  • SubscriptionName:Subscription 的名称。

  • LastModifyTime:最近一次修改 Subscription 属性信息的时间

  • TopicName:主题的名称。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      SubscriptionName:
        Type: String
        Description:
          en: The name of the subscription.
        Required: true
      TopicName:
        Type: String
        Description:
          en: The name of the topic.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::MNS::Subscription
        Properties:
          SubscriptionName:
            Ref: SubscriptionName
          TopicName:
            Ref: TopicName
    Outputs:
      SubscriptionURL:
        Description: TThe URL of the subscription.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - SubscriptionURL
      TopicOwner:
        Description: The owner of the topic.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - TopicOwner
      Endpoint:
        Description: The endpoint that is used by the subscriber to receive messages.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Endpoint
      CreateTime:
        Description: The time when the subscription was created.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - CreateTime
      NotifyStrategy:
        Description: The retry policy that is applied if an error occurs when Message Service (MNS) pushes messages to the endpoint.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - NotifyStrategy
      NotifyContentFormat:
        Description: The format of the message that is pushed to the endpoint.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - NotifyContentFormat
      FilterTag:
        Description: Describes the labels by which messages are filtered in this subscription (only messages with consistent labels are pushed).
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - FilterTag
      SubscriptionName:
        Description: The name of the subscription.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - SubscriptionName
      LastModifyTime:
        Description: The time when the subscription was last modified.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - LastModifyTime
      TopicName:
        Description: The name of the topic.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - TopicName
    
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "SubscriptionName": {
          "Type": "String",
          "Description": {
            "en": "The name of the subscription."
          },
          "Required": true
        },
        "TopicName": {
          "Type": "String",
          "Description": {
            "en": "The name of the topic."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::MNS::Subscription",
          "Properties": {
            "SubscriptionName": {
              "Ref": "SubscriptionName"
            },
            "TopicName": {
              "Ref": "TopicName"
            }
          }
        }
      },
      "Outputs": {
        "SubscriptionURL": {
          "Description": "TThe URL of the subscription.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "SubscriptionURL"
            ]
          }
        },
        "TopicOwner": {
          "Description": "The owner of the topic.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "TopicOwner"
            ]
          }
        },
        "Endpoint": {
          "Description": "The endpoint that is used by the subscriber to receive messages.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Endpoint"
            ]
          }
        },
        "CreateTime": {
          "Description": "The time when the subscription was created.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CreateTime"
            ]
          }
        },
        "NotifyStrategy": {
          "Description": "The retry policy that is applied if an error occurs when Message Service (MNS) pushes messages to the endpoint.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "NotifyStrategy"
            ]
          }
        },
        "NotifyContentFormat": {
          "Description": "The format of the message that is pushed to the endpoint.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "NotifyContentFormat"
            ]
          }
        },
        "FilterTag": {
          "Description": "Describes the labels by which messages are filtered in this subscription (only messages with consistent labels are pushed).",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "FilterTag"
            ]
          }
        },
        "SubscriptionName": {
          "Description": "The name of the subscription.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "SubscriptionName"
            ]
          }
        },
        "LastModifyTime": {
          "Description": "The time when the subscription was last modified.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "LastModifyTime"
            ]
          }
        },
        "TopicName": {
          "Description": "The name of the topic.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "TopicName"
            ]
          }
        }
      }
    }