All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::MNS::Subscription

更新時間:Sep 18, 2024

DATASOURCE::MNS::Subscription is used to query the information about a subscription.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

SubscriptionName

String

Yes

Yes

The subscription name.

None.

TopicName

String

Yes

Yes

The topic name.

None.

Return values

Fn::GetAtt

  • SubscriptionURL: the URL of the subscription.

  • TopicOwner: the account ID of the topic owner of the subscription.

  • Endpoint: the endpoint that is used to receive messages based on the subscription.

  • CreateTime: the time when the subscription was created.

  • NotifyStrategy: the retry policy that is applied if an error occurs when the system pushes a message to the endpoint.

  • NotifyContentFormat: the format of the message that is pushed to the endpoint.

  • FilterTag: the message filtering tag that is specified in the subscription.

  • SubscriptionName: the subscription name.

  • LastModifyTime: the most recent time when the subscription was modified.

  • TopicName: the topic name.

Examples

  • YAML format

    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 format

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