list_queues¶
- SQSQueuesApi.list_queues(role_id, limit=None, offset=None, sortorder=None, sortby=None, projection_expression=None, filter_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List SQS queues
Returns monitored SQS queues from configuration (name, type, display name, description, CanPurge). Does not call SQS per queue. Requires system-settings.view. Pagination is in-memory; last page when next_available is no.
- Parameters:
role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Also recorded in audit logs. (required)
limit (str) – Page size as a string. Defaults to 100. Values above 1000 are wrapped as IPV-1002. Non-numeric values fail as GE-1052.
offset (str) – 1-based item offset as a string (1 is the first queue, not a page number). Defaults to 1. Last page when next_available is no.
sortorder (str) – Sort direction. Defaults to desc. Any other value (including asc) is used as-is; there is no allow-list.
sortby (str) – Sort field after the list is loaded. Defaults to Name. Unknown fields fail as GE-1052.
projection_expression (str) – Comma-separated item keys to keep (Name, Type, DisplayName, Description, CanPurge). Omitted returns all item keys.
filter_expression (str) – Filter applied to DisplayName or Name before pagination. Empty or omitted returns the full list.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /queues
Success (HTTP 200)¶
queues for this page plus count, total_count, and next_available. next_available is no on the last page.
Request / response example
{
"queues": [
{
"Name": "projectshortname-dev-email-queue",
"Type": "Standard",
"DisplayName": "Email",
"Description": "Outbound email notifications",
"CanPurge": true
}
],
"count": 1,
"total_count": 1,
"next_available": "no"
}
Errors¶
Documented error codes: AUTH-1001, AUTH-1003, AUTH-1030, IPV-1002, GE-1052, GE-1028, IPV-1005, RTE-1001.
HTTP 400
Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: AUTH-1001, AUTH-1003, AUTH-1030 (missing system-settings.view), IPV-1002 (role_id, or list failures wrapped as “Queue list configuration mismatch - <original>”, including limit over 1000 and SSM list length mismatch), GE-1052 (non-integer limit/offset, unknown sortby, and other list failures). GenericFailure is HTTP 400 on this Lambda.
Caller lacks system-settings.view
{
"Message": "AUTH-1030 - User is not authorized to list all SQS queues due to the following missing permission(s) - {'System Settings': ['view']}"
}
limit over 1000, wrapped as IPV-1002
{
"Message": "IPV-1002 - Queue list configuration mismatch - GE-1028 - Out of range for items per page, Limit is 1000"
}
SSM queue list length does not match QUEUE_CONFIG
{
"Message": "IPV-1002 - Queue list configuration mismatch - IPV-1005 - Invalid parameter - queue list configuration mismatch, contact administrator"
}
Non-integer limit or other list failure
{
"Message": "GE-1052 - Unable to list queues, error - invalid literal for int() with base 10: 'abc'"
}
HTTP 500
Uncaught errors outside this GET use {“Message”: “RTE-1001 - <exception>.”}.
Uncaught handler failure
{
"Message": "RTE-1001 - 'NoneType' object is not subscriptable."
}