DATASOURCE::MNS::Subscriptions is used to query the information about subscriptions.

Syntax

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

Properties

Property Type Required Editable Description Constraint
SubscriptionName String No Yes The name of the subscription. None.
TopicName String Yes Yes The name of the topic. None.

Return values (Fn::GetAtt)

  • SubscriptionIds: the IDs of the subscriptions.
  • Subscriptions: details of the subscriptions.
Property Type Description Constraint
SubscriptionIds List The IDs of the subscriptions. None.
Subscriptions List Details of the subscriptions. None.
SubscriptionName String The name of the subscription. The name can be up to 256 characters in length and can contain letters, digits, and hyphens (-). The name must start with a letter.
SubscriptionURL String The URL of the subscription. None.
Endpoint String The endpoint that is used by the subscriber to receive messages. Valid values:
  • HttpEndpoint: This type of endpoint must be prefixed with http://.
  • QueueEndpoint: This type of endpoint must be in the acs:mns:{REGION}:{AccountID}:queues/{QueueName} format.
  • MailEndpoint: This type of endpoint must be in the mail:directmail:{MailAddress} format.
  • SmsEndpoint: This type of endpoint must be in the sms:directsms:anonymous or sms:directsms:{Phone} format.
TopicOwner String The owner of the topic. None.
NotifyStrategy String The retry policy that is applied if an error occurs when Message Service (MNS) pushes messages to the endpoint. Default value: BACKOFF_RETRY. Valid values:
  • BACKOFF_RETRY
  • EXPONENTIAL_DECAY_RETRY

For more information about retry policies, see NotifyStrategy.

NotifyContentFormat String The format of the message that is pushed to the endpoint. Default value: XML. Valid values:
  • XML
  • JSON
  • SIMPLIFIED
CreateTime String The time when the subscription was created. None.
LastModifyTime String The time when the subscription was last modified. None.
TopicName String The name of the topic. None.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "SubscriptionName": {
          "Type": "String",
          "Description": "Subscription name."
        }
      },
      "Resources": {
        "Subscriptions": {
          "Type": "DATASOURCE::MNS::Subscriptions",
          "Properties": {
            "SubscriptionName": {
              "Ref": "SubscriptionName"
            }
          }
        }
      },
      "Outputs": {
        "Subscriptions": {
          "Description": "The list of subscriptions.",
          "Value": {
            "Fn::GetAtt": [
              "Subscriptions",
              "Subscriptions"
            ]
          }
        },
        "SubscriptionIds": {
          "Description": "The list of subscription names.",
          "Value": {
            "Fn::GetAtt": [
              "Subscriptions",
              "SubscriptionIds"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      SubscriptionName:
        Type: String
        Description: Subscription name.
    Resources:
      Subscriptions:
        Type: DATASOURCE::MNS::Subscriptions
        Properties:
          SubscriptionName:
            Ref: SubscriptionName
    Outputs:
      Subscriptions:
        Description: The list of subscriptions.
        Value:
          Fn::GetAtt:
            - Subscriptions
            - Subscriptions
      SubscriptionIds:
        Description: The list of subscription names.
        Value:
          Fn::GetAtt:
            - Subscriptions
            - SubscriptionIds