Skip to content

method parameters_for_path does not check for next_token #7

@ashleygould

Description

@ashleygould

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'
}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions