awswrangler.secretsmanager.get_secret_json

awswrangler.secretsmanager.get_secret_json(name: str, boto3_session: Session | None = None) dict[str, Any]

Get JSON 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 (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.

Returns:

Secret JSON value parsed as a dictionary.

Return type:

Dict[str, Any]

Examples

>>> import awswrangler as wr
>>> value = wr.secretsmanager.get_secret_json("my-secret-with-json-content")