使用Java更新AWS参数存储中的参数值
我在AWS System Manager(SSM)中存储了一个密钥作为值。是否可以使用AWS API更新值?
为了存储密钥,我使用以下API:
SsmClient ssmClientEUWest1 = SsmClient.builder().region(Region.EU_WEST_1).build();
ssmClientEUWest1.putParameter(PutParameterRequest.builder().value(key).name(<some constant name>).type("String").build());
当我第一次创建键时,它会成功创建。但是,正如我再次称呼它的那样,它以&lt;某些常数名称&gt;
是常数,因此无法创建重复的名称。
我需要更新键。我将此键作为我方法的输入,我只需要在给定常数名称存储下更新商店中的密钥即可。
我尝试浏览AWS文档,但找不到解决方案。文档建议使用层,但这也没有证明有用。
I have a key stored as value in aws system manager(ssm). Is it possible to update the value using aws APIs?
For storing the key I am using the following API:
SsmClient ssmClientEUWest1 = SsmClient.builder().region(Region.EU_WEST_1).build();
ssmClientEUWest1.putParameter(PutParameterRequest.builder().value(key).name(<some constant name>).type("String").build());
As I store the key the first time it does create successfully. However as I call it again, it fails as <some constant name>
is constant and hence it can't create duplicate names.
What I need is to update the key. I get this key as an input to my method and I just need to update the key in the store under the given constant name store.
I tried going through aws docs but couldn't find a solution. Docs suggest to use tier but that didn't prove useful either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
探索更多并发现这可以通过设置
oftrite(true)
来
完成
Explored more and found out this can be done by setting
overwrite(true)
So
will do the job