DATASOURCE::MNS::Queues is used to query all Message Service (MNS) queues within a specified Alibaba Cloud account.

Syntax

{
  "Type": "DATASOURCE::MNS::Queues",
  "Properties": {
    "QueueName": String
  }
}

Properties

Property Type Required Editable Description Constraint
QueueName String No Yes The name of the queue. None.

Return values (Fn::GetAtt)

  • QueueNames: the names of the queues.
  • Queues: the details of the queues.
Property Type Description Constraint
QueueNames List The names of the queues. None.
Queues List The details of the queues. None.
QueueName String The name of the queue. None.
QueueUrl String The Internet URL of the queue. None.
QueueInternalUrl String The internal URL of the queue. None.
CreateTime String The time when the queue was created. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.
LastModifyTime String The most recent time when the queue was modified. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.
DelaySeconds Number The delay period after which all messages sent to the queue can be consumed.

Unit: seconds.

MaximumMessageSize Number The maximum size of the message body that can be sent to the queue. Unit: bytes.
MessageRetentionPeriod Number The maximum period for which a message can be retained in the queue. After the specified period ends, the message is deleted regardless of whether the message is consumed.

Unit: seconds.

VisibilityTimeout Number The period of time during which the message is invisible. Valid values: 1 to 43200 seconds (12 hours).

Unit: seconds.

PollingWaitSeconds Number The maximum period for which a ReceiveMessage request waits. Valid values: 0 to 30.

Unit: seconds.

ActiveMessages Number The total number of active messages in the queue. None.
InactiveMessages Number The total number of inactive messages in the queue. None.
DelayMessages Number The total number of delayed messages in the queue. None.
LoggingEnabled Boolean Indicates whether the log management feature is enabled for the queue. Valid values:
  • True: The log management feature is enabled.
  • False: The log management feature is disabled.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "QueueName": {
          "Type": "String",
          "Description": "Queue name."
        }
      },
      "Resources": {
        "Queues": {
          "Type": "DATASOURCE::MNS::Queues",
          "Properties": {
            "QueueName": {
              "Ref": "QueueName"
            }
          }
        }
      },
      "Outputs": {
        "QueueNames": {
          "Description": "The list of queue names.",
          "Value": {
            "Fn::GetAtt": [
              "Queues",
              "QueueNames"
            ]
          }
        },
        "Queues": {
          "Description": "The list of queues.",
          "Value": {
            "Fn::GetAtt": [
              "Queues",
              "Queues"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      QueueName:
        Type: String
        Description: Queue name.
    Resources:
      Queues:
        Type: DATASOURCE::MNS::Queues
        Properties:
          QueueName:
            Ref: QueueName
    Outputs:
      QueueNames:
        Description: The list of queue names.
        Value:
          Fn::GetAtt:
            - Queues
            - QueueNames
      Queues:
        Description: The list of queues.
        Value:
          Fn::GetAtt:
            - Queues
            - Queues