@InjectSecretString
このデコレータは、1 番目と 2 番目の引数として、シークレット ID 文字列と SecretCache を必要とします。このデコレータはシークレット文字列値を返します。シークレットに文字列が含まれている必要があります。
from aws_secretsmanager_caching import SecretCache from aws_secretsmanager_caching import InjectKeywordedSecretString, InjectSecretString cache = SecretCache() @InjectSecretString ( 'mysecret' , cache ) deffunction_to_be_decorated( arg1, arg2, arg3):