Unclear or incorrect parameters for call to get_queue_attributes
lentesta opened this issue · 2 comments
Describe the issue
In the latest version of the Ruby SDK documentation, the parameters to get_queue_attributes seem to be incorrectly listed as a hash:
{
"AttributeNames": [ "string" ],
"QueueUrl": "string"
}
And the SDK shows the method call like this:
resp = client.get_queue_attributes({
queue_url: "String", # required
attribute_names: ["All"],
})
But if you pass this hash to the method, you get an error message that says something like "Expected 2 parameters, got 1". That's a big hint that the documentation is wrong.
I can get this method call to work by passing two named paramters, not a hash:
resp = client.get_queue_attributes(queue_url="some_string", options=["An","Array","Of","Attribute","Names","To","Get"])
I have a sample program that illustrates this, if needed.
Links
It looks like you have bad syntax - your syntax looks to be Pythonic? And options
is not a member, you need to use attribute_names
sqs.get_queue_attributes(queue_url: 'https://myqueue.sqs.us-west-2.amazonaws.com', attribute_names: ["array", "of", "attributes"])
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.