如何通过python更新AWS Secrets Manager? [英] How to update AWS Secrets Manager via python?

查看:110
本文介绍了如何通过python更新AWS Secrets Manager?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到任何有关如何上载/更新值到AWS Secrets Manager的文档.我只能通过python检索值.有解决方法吗?

I can't find any documentation on how to upload/update values to the AWS secrets manager. I can only retrieve the values via python. Is there a workaround on this?

推荐答案

您可以使用

You can use update_secret():

response = client.update_secret(
    SecretId='string',
    ClientRequestToken='string',
    Description='string',
    KmsKeyId='string',
    SecretBinary=b'bytes',
    SecretString='string'
)

要创建机密,请使用:

For creating new secrets, use: put_secret_value()

这篇关于如何通过python更新AWS Secrets Manager?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆