Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added support for 3 additional attributes for sqs queues, message ret…

…ention period, max message size an queue arn
  • Loading branch information...
commit f6c41c4bf4a38f1c492a3cc98a468304487540f9 1 parent ba91f46
@tsloughter tsloughter authored
Showing with 10 additions and 1 deletion.
  1. +2 −0  src/erlcloud.erl
  2. +8 −1 src/erlcloud_sqs.erl
View
2  src/erlcloud.erl
@@ -5,6 +5,8 @@
start() ->
application:load(?APP),
+ application:start(public_key),
+ application:start(ssl),
{ok, Apps} = application:get_key(?APP, applications),
lists:foreach(fun application:start/1, Apps),
application:start(?APP).
View
9 src/erlcloud_sqs.erl
@@ -134,9 +134,12 @@ get_queue_attributes(QueueName, AttributeNames, Config)
erlcloud_aws:param_list([encode_attribute_name(N) || N <- AttributeNames], "AttributeName")),
Attrs = decode_attributes(xmerl_xpath:string("GetQueueAttributesResult/Attribute", Doc)),
[{decode_attribute_name(Name),
- case Name of "Policy" -> Value; _ -> list_to_integer(Value) end} ||
+ case Name of "Policy" -> Value; "QueueArn" -> Value; _ -> list_to_integer(Value) end} ||
{Name, Value} <- Attrs].
+encode_attribute_name(message_retention_period) -> "MessageRetentionPeriod";
+encode_attribute_name(queue_arn) -> "QueueArn";
+encode_attribute_name(maximum_message_size) -> "MaximumMessageSize";
encode_attribute_name(visibility_timeout) -> "VisibilityTimeout";
encode_attribute_name(approximate_number_of_messages) -> "ApproximateNumberOfMessages";
encode_attribute_name(approximate_number_of_messages_not_visible) -> "ApproximateNumberOfMessagesNotVisible";
@@ -145,6 +148,10 @@ encode_attribute_name(created_timestamp) -> "CreatedTimestamp";
encode_attribute_name(policy) -> "Policy";
encode_attribute_name(all) -> "All".
+
+decode_attribute_name("MessageRetentionPeriod") -> message_retention_period;
+decode_attribute_name("QueueArn") -> queue_arn;
+decode_attribute_name("MaximumMessageSize") -> maximum_message_size;
decode_attribute_name("VisibilityTimeout") -> visibility_timeout;
decode_attribute_name("ApproximateNumberOfMessages") -> approximate_number_of_messages;
decode_attribute_name("ApproximateNumberOfMessagesNotVisible") -> approximate_number_of_messages_not_visible;
Please sign in to comment.
Something went wrong with that request. Please try again.