From e752d363ba01f323e29909a5308b052c497f8540 Mon Sep 17 00:00:00 2001 From: "tim.reichard" Date: Tue, 3 May 2022 17:21:23 -0500 Subject: [PATCH] Add update_secret function to ds_utils --- HISTORY.rst | 5 +++++ aioradio/ds_utils.py | 6 ++++++ setup.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 087cd0c..cc34b98 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ======= +v0.17.7 (2022-05-03) + +* Add update_secret function to ds_utils. + + v0.17.6 (2022-04-14) * Remove ip parameters from ds_utils function get_ftp_connection. diff --git a/aioradio/ds_utils.py b/aioradio/ds_utils.py index e0e3311..b50a791 100644 --- a/aioradio/ds_utils.py +++ b/aioradio/ds_utils.py @@ -52,6 +52,12 @@ def get_secret(s3_client, secret_name): return secret +def update_secret(s3_client, secret_name, secret_value): + """Update secret value in AWS Secrets Manager.""" + + return s3_client.put_secret_value(SecretId=secret_name, SecretString=secret_value) + + def list_s3_objects(s3_client, s3_bucket, s3_prefix, with_attributes=False): """List all objects within s3 folder.""" diff --git a/setup.py b/setup.py index 7a868ba..d6920fe 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ long_description = fileobj.read() setup(name='aioradio', - version='0.17.6', + version='0.17.7', description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more', long_description=long_description, long_description_content_type="text/markdown",