Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear or incorrect parameters for call to get_queue_attributes #2996

Closed
lentesta opened this issue Mar 20, 2024 · 2 comments
Closed

Unclear or incorrect parameters for call to get_queue_attributes #2996

lentesta opened this issue Mar 20, 2024 · 2 comments
Labels
guidance Question that needs advice or information.

Comments

@lentesta
Copy link

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

@lentesta lentesta added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Mar 20, 2024
@mullermp
Copy link
Contributor

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"])

@mullermp mullermp added guidance Question that needs advice or information. and removed documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Mar 21, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants