You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
}
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:
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.
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
https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Client.html#get_queue_attributes-instance_method
The text was updated successfully, but these errors were encountered: