Giter Site home page Giter Site logo

Comments (10)

klaytaybai avatar klaytaybai commented on August 16, 2024

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?

from aws-dotnet-extensions-configuration.

tompanchee avatar tompanchee commented on August 16, 2024

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.

from aws-dotnet-extensions-configuration.

tompanchee avatar tompanchee commented on August 16, 2024

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

from aws-dotnet-extensions-configuration.

klaytaybai avatar klaytaybai commented on August 16, 2024

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.

from aws-dotnet-extensions-configuration.

tompanchee avatar tompanchee commented on August 16, 2024

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.

from aws-dotnet-extensions-configuration.

github-actions avatar github-actions commented on August 16, 2024

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.

from aws-dotnet-extensions-configuration.

cfbao avatar cfbao commented on August 16, 2024

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.

from aws-dotnet-extensions-configuration.

cfbao avatar cfbao commented on August 16, 2024

draft PR to support this: #107

from aws-dotnet-extensions-configuration.

ashishdhingra avatar ashishdhingra commented on August 16, 2024

@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

from aws-dotnet-extensions-configuration.

cfbao avatar cfbao commented on August 16, 2024

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.

from aws-dotnet-extensions-configuration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.