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

Filtering by tag documentation is confusing. #1238

Closed
glennpratt opened this issue Jul 8, 2016 · 4 comments
Closed

Filtering by tag documentation is confusing. #1238

glennpratt opened this issue Jul 8, 2016 · 4 comments
Labels
documentation This is a problem with documentation. service-api General API label for AWS Services.

Comments

@glennpratt
Copy link

glennpratt commented Jul 8, 2016

The highlighting on the filter by tag documentation is confusing (to me at least).

http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Resource.html#volumes-instance_method

class aws ec2 resource aws sdk for ruby v2 2016-07-08 14-32-02

The highlighting and equal sign had me banging my head against the desk doing:

query = {:filters=>[{:name=>"tag", :values=>["stage=gpratt"]}]}
# => Aws::EC2::Errors::InvalidParameterValue: The filter 'tag' is invalid

When the right answer is:

{:filters=>[{:name=>"tag:stage", :values=>["gpratt"]}]}
@awood45 awood45 added Version 2 documentation This is a problem with documentation. labels Jul 11, 2016
@awood45
Copy link
Member

awood45 commented Jul 11, 2016

Thanks for the documentation feedback - I can see the formatting of the shared documentation is confusing here, and we might need something custom.

@trevorrowe
Copy link
Member

To add some context, the API reference documentation for each service is shared from the service API documentation. In this scenario, the service API reference documentation mentions how things are serialized on over the wire, which includes the querystring formatting of key/value pairs which the SDK does for you. This causes the confusion. This sometimes happens as well when service documentation references names sent over the wire which are actually snake_cased in the SDK.

I'm not sure what we can or should do here. I agree, the documentation is confusing at best and basically wrong for Ruby SDK users. Hand maintaining corrections in our library would be difficult at best, as we would need a way to keep this up to date. We could explore writing a documentation plugin that attempts to detect these situations and correct, but I don't think we would be able to catch 100% of miss-matches. A targeted patch/plugin for the EC2 tags documentation is possible, but it is difficult to guess how the source documentation may be changed over-time, potentially breaking said plugin.

I'm open to suggestions.

@Doug-AWS
Copy link
Contributor

I just added an example of using tags to filter ECS instances with a specific tag value. See "Getting Information about All Instances with a Specific Tag Value" in http://docs.aws.amazon.com/sdk-for-ruby/latest/DeveloperGuide/aws-ruby-sdk-recipes.html#aws-ruby-sdk-ec2-recipes.

@awood45 awood45 added the service-api General API label for AWS Services. label Jul 18, 2016
@trevorrowe
Copy link
Member

I've also submitted an SDK specific example that will appear in the API reference documentation for #describe_instances. This should be published with our next release.

trevorrowe added a commit that referenced this issue Jul 21, 2016
awood45 added a commit that referenced this issue Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. service-api General API label for AWS Services.
Projects
None yet
Development

No branches or pull requests

4 participants