airflow.providers.amazon.aws.hooks.secrets_manager

Module Contents

Classes

SecretsManagerHook

Interact with Amazon SecretsManager Service.

class airflow.providers.amazon.aws.hooks.secrets_manager.SecretsManagerHook(*args, **kwargs)[source]

Bases: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook

Interact with Amazon SecretsManager Service.

Additional arguments (such as aws_conn_id) may be specified and are passed down to the underlying AwsBaseHook.

get_secret(secret_name)[source]

Retrieve secret value from AWS Secrets Manager as a str or bytes reflecting format it stored in the AWS Secrets Manager

Parameters

secret_name (str) – name of the secrets.

Returns

Union[str, bytes] with the information about the secrets

Return type

str | bytes

get_secret_as_dict(secret_name)[source]

Retrieve secret value from AWS Secrets Manager in a dict representation

Parameters

secret_name (str) – name of the secrets.

Returns

dict with the information about the secrets

Return type

dict

Was this entry helpful?