awswrangler.secretsmanager.get_secret¶
- awswrangler.secretsmanager.get_secret(name: str, boto3_session: Session | None = None) str | bytes¶
Get secret value.
- Parameters:
name (
str) – Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.boto3_session (
Session|None) – The default boto3 session will be used if boto3_session isNone.
- Return type:
str|bytes- Returns:
Secret value.
Examples
>>> import awswrangler as wr >>> value = wr.secretsmanager.get_secret("my-secret")