All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::MNS::Queue

更新時間:Sep 10, 2024

DATASOURCE::MNS::Queue is used to query the information about a created queue.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

QueueName

String

Yes

Yes

The queue name.

None.

Return values

Fn::GetAtt

  • ActiveMessages: the total number of active messages in the queue.

  • PollingWaitSeconds: the maximum period of time for which a ReceiveMessage request waits when no message exists in the queue.

  • MaximumMessageSize: the maximum size of the message body that is sent to the queue.

  • CreateTime: the creation time of the queue.

  • VisibilityTimeout: the duration for which a message remains in the Inactive state after the message is received from the queue.

  • QueueInternalUrl: the internal URL of the queue.

  • LastModifyTime: the most recent modification time of the queue.

  • QueueUrl: the URL of the queue.

  • LoggingEnabled: indicates whether the log management feature is enabled.

  • DelayMessages: the total number of delayed messages in the queue.

  • DelaySeconds: the delay period after which all messages sent to the queue are consumed.

  • MessageRetentionPeriod: the maximum period of time for which a message is retained in the queue.

  • InactiveMessages: the total number of inactive messages in the queue.

  • QueueName: the queue name.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      QueueName:
        Type: String
        Description:
          en: The name of the MNS queue.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::MNS::Queue
        Properties:
          QueueName:
            Ref: QueueName
    Outputs:
      ActiveMessages:
        Description: The total number of active messages in the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ActiveMessages
      PollingWaitSeconds:
        Description: The maximum time period that a ReceiveMessage request can wait till a message is in the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - PollingWaitSeconds
      MaximumMessageSize:
        Description: The maximum size of a message that can be sent to the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - MaximumMessageSize
      CreateTime:
        Description: The time when the queue was created.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - CreateTime
      VisibilityTimeout:
        Description: The duration for which a message stays in the Inactive state after it is consumed from the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VisibilityTimeout
      QueueInternalUrl:
        Description: The internal URL of the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - QueueInternalUrl
      LastModifyTime:
        Description: The most recent time when the queue was modified.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - LastModifyTime
      QueueUrl:
        Description: The URL of the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - QueueUrl
      LoggingEnabled:
        Description: Specifies whether to enable the log management feature.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - LoggingEnabled
      DelayMessages:
        Description: The total number of delayed messages in the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DelayMessages
      DelaySeconds:
        Description: The delay time after which all messages that are sent to the queue can be consumed.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DelaySeconds
      MessageRetentionPeriod:
        Description: The maximum lifetime of a message in the queue. After the time that is specified by this parameter expires, the message is deleted, regardless of whether the message has been consumed.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - MessageRetentionPeriod
      InactiveMessages:
        Description: The total number of inactive messages in the queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - InactiveMessages
      QueueName:
        Description: The name of the MNS queue.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - QueueName
    
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "QueueName": {
          "Type": "String",
          "Description": {
            "en": "The name of the MNS queue."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::MNS::Queue",
          "Properties": {
            "QueueName": {
              "Ref": "QueueName"
            }
          }
        }
      },
      "Outputs": {
        "ActiveMessages": {
          "Description": "The total number of active messages in the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ActiveMessages"
            ]
          }
        },
        "PollingWaitSeconds": {
          "Description": "The maximum time period that a ReceiveMessage request can wait till a message is in the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "PollingWaitSeconds"
            ]
          }
        },
        "MaximumMessageSize": {
          "Description": "The maximum size of a message that can be sent to the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "MaximumMessageSize"
            ]
          }
        },
        "CreateTime": {
          "Description": "The time when the queue was created.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CreateTime"
            ]
          }
        },
        "VisibilityTimeout": {
          "Description": "The duration for which a message stays in the Inactive state after it is consumed from the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VisibilityTimeout"
            ]
          }
        },
        "QueueInternalUrl": {
          "Description": "The internal URL of the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "QueueInternalUrl"
            ]
          }
        },
        "LastModifyTime": {
          "Description": "The most recent time when the queue was modified.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "LastModifyTime"
            ]
          }
        },
        "QueueUrl": {
          "Description": "The URL of the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "QueueUrl"
            ]
          }
        },
        "LoggingEnabled": {
          "Description": "Specifies whether to enable the log management feature.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "LoggingEnabled"
            ]
          }
        },
        "DelayMessages": {
          "Description": "The total number of delayed messages in the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DelayMessages"
            ]
          }
        },
        "DelaySeconds": {
          "Description": "The delay time after which all messages that are sent to the queue can be consumed.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DelaySeconds"
            ]
          }
        },
        "MessageRetentionPeriod": {
          "Description": "The maximum lifetime of a message in the queue. After the time that is specified by this parameter expires, the message is deleted, regardless of whether the message has been consumed.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "MessageRetentionPeriod"
            ]
          }
        },
        "InactiveMessages": {
          "Description": "The total number of inactive messages in the queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "InactiveMessages"
            ]
          }
        },
        "QueueName": {
          "Description": "The name of the MNS queue.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "QueueName"
            ]
          }
        }
      }
    }