All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::MNS::Subscriptions

Last Updated:Dec 02, 2024

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

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

SubscriptionName

String

No

Yes

The subscription name.

None.

TopicName

String

Yes

Yes

The topic name.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

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 subscription name.

The subscription name can be up to 256 characters in length and can contain letters, digits, and hyphens (-). It must start with a letter.

SubscriptionURL

String

The URL of the subscription.

None.

Endpoint

String

The endpoint that is used 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}.

  • SmsEndpoint: This type of endpoint must be in the sms:directsms:anonymous or sms:directsms:{Phone} format.

TopicOwner

String

The owner of the subscribed topic.

None.

NotifyStrategy

String

The retry policy that is applied if an error occurs when the system pushes messages to the endpoint.

Valid values:

  • BACKOFF_RETRY (default)

  • EXPONENTIAL_DECAY_RETRY

For more information about retry policies, see NotifyStrategy.

NotifyContentFormat

String

The format of the message that the system pushes to the endpoint.

Valid values:

  • XML (default)

  • 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 subscribed topic.

None.

Examples

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