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

Fetching a single parameter with full path does not work #47

Open
tompanchee opened this issue Aug 9, 2019 · 10 comments
Open

Fetching a single parameter with full path does not work #47

tompanchee opened this issue Aug 9, 2019 · 10 comments
Labels
feature-request A feature should be added or improved. module/sys-mgr-ext p2 This is a standard priority issue queued

Comments

@tompanchee
Copy link

We are working on multiple projects in AWS and have multiple parameters. Some projects need only one parameter from a hierarchy. When adding a full path to the source's path property no parameters are fetched.

I tried with the SimpleSystemsManagement client and noticed that the method used (GetParametersByPathAsync) does not return any parameters with a full parameter path. There should be a method for getting single parameter(s) and optionally it could have the configuration key(s) as an parameter.

@klaytaybai klaytaybai added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Aug 12, 2019
@klaytaybai
Copy link

Hi @tompanchee , could you please clarify what you are hoping to do? Maybe providing a short sample of code would help. The client has another method called GetParameterAsync that allows you search by a single parameter. Is this what you are looking for?

@tompanchee
Copy link
Author

Hi @klaytaybai, I was thinking of using GetParametesAsync to reduce roundtrips to the API when there are multiple fully qualified paths.

I thought it could work like this

config.AddSystemsManager(source => {
    source.Parameters = new Dictionary<string, string> {
        {"/foo/bar/param1", "aws:app:param1"},
        {"/bar/foo/param2", null }    
    };
    source.ReloadAfter = TimeSpan.FromMinutes(15);
});

The dictionary contains the parameters to be fetched and their parameter names in .net configuration. If the .net configuration name is not given the parameter will be named according to the source (/bar/foo/param2 => bar:foo:param2.

If this sounds sensible I could catch this one and start working on a PR.

@tompanchee
Copy link
Author

Could someone please comment on my suggestion. This will start closing in a few days.

@klaytaybai
Copy link

I think you're going to find that you will be limited by the service's API. The new method could possibly be setup to do GetParametersAsync requests as few times as necessary to get all the parameters based on their shared path prefixes. Is that essentially what you are thinking? I've asked some of the other AWS .NET SDK teams members to take a look at this and give you their opinion too.

@klaytaybai klaytaybai added the feature-request A feature should be added or improved. label Sep 19, 2019
@tompanchee
Copy link
Author

I wrote a simple test app to test the GetParametersAsyncMethod and it seemed to work. We are using the same method in node.js projects.

@klaytaybai klaytaybai removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 11, 2019
@github-actions
Copy link

We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 19, 2022
@cfbao
Copy link

cfbao commented Feb 19, 2022

This is a feature greatly desired by our team. We have multiple use cases where the ability to retrieve a single SSM parameter (or a few parameters in different path sections) into IConfiguration would be very helpful.
Please don't close this issue.

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 20, 2022
@cfbao
Copy link

cfbao commented Feb 23, 2022

draft PR to support this: #107

@ashishdhingra
Copy link
Contributor

@tompanchee Good afternoon. Could you please check if of Amazon.Extensions.Configuration.SystemsManager version 4.0.0 fixes your scenario and if this issue could be closed?

Thanks,
Ashish

@ashishdhingra ashishdhingra added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 27, 2022
@cfbao
Copy link

cfbao commented Dec 28, 2022

Not the issue author, but I've looked at the code change for v4, and pretty sure this requested use case is not covered by it.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 29, 2022
@ashishdhingra ashishdhingra added needs-review p2 This is a standard priority issue labels Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/sys-mgr-ext p2 This is a standard priority issue queued
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants