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

method parameters_for_path does not check for next_token #7

Open
ashleygould opened this issue Feb 9, 2021 · 1 comment
Open

method parameters_for_path does not check for next_token #7

ashleygould opened this issue Feb 9, 2021 · 1 comment

Comments

@ashleygould
Copy link
Contributor

ashleygould commented Feb 9, 2021

If more than MaxResults params are available, this method will fail to retrieve all parameters.

See get_parameters_by_path documentation in https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-ssm/lib/aws-sdk-ssm/client.rb (starting at line 5911)

Also: https://docs.aws.amazon.com/sdk-for-ruby/v2/api/Aws/SSM/Client.html#get_parameters_by_path-instance_method

Frankly, in it's current form I see no reason to include this method in the gem.

For it to be useful, it should by default do decryption and recursive lookup. And it should format it's out put as a array of simple name,value hashes. path should be a positional parameter, options a second positional parameter. This would allow user to override recursion or decryption, or add search filters, but not alter next_token behavior.

example:

myResolver.parameters_for_path("mykey", {recursive: false})

# returns
[{
  /root/path/mykey/thing1 => 'blee',
  /root/path/mykey/thing2 => 'glee'
}]
@ashleygould ashleygould changed the title method parameters for path does not check for next_token method parameters_for_path does not check for next_token Feb 13, 2021
@terrywbrady
Copy link
Contributor

This was ported from the Java code. The java code does do this recursively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants