DATASOURCE::MNS::Queues is used to query all queues within an Alibaba Cloud account.
Syntax
{
"Type": "DATASOURCE::MNS::Queues",
"Properties": {
"QueueName": String,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
QueueName | String | No | Yes | The queue name. | None. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values (Fn::GetAtt)
QueueNames: the names of the queues.
Queues: details of the queues.
Property | Type | Description | Constraint |
QueueNames | List | The names of the queues. | None. |
Queues | List | Details of the queues. | None. |
QueueName | String | The queue name. | None. |
QueueUrl | String | The public URL of the queue. | None. |
QueueInternalUrl | String | The private URL of the queue. | None. |
CreateTime | String | The time when the queue was created. | This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
LastModifyTime | String | The time when the queue was last modified. | This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
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. A value of 43200 seconds is equivalent to 12 hours. Unit: seconds. |
PollingWaitSeconds | Number | The maximum period for which a ReceiveMessage request of the queue 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. | Valid values:
|
Examples
{
"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"
]
}
}
}
}
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