class documentation

class SecretsManagerExtension(ClientConfigExtension): (source)

View In Hierarchy

Client config extension that loads client credentials from AWS Secrets Manager.

Pass to temporalio.envconfig.ClientConfig.load_client_connect_config. See the temporalio.contrib.aws.secrets_manager module documentation for configuration details.

Warning

This API is experimental and unstable.

Method client_plugin Read secret IDs from the profile and env, and return a plugin that fetches the configured secrets, or None if none are configured.
Method name The extension name, aws_secrets_manager.
Class Variable max_staleness How long after its last successful fetch a secret may still be used if refreshing it fails. Defaults to 24 hours. Values less than the refresh interval are treated as the refresh interval.
Class Variable refresh_interval How long a fetched secret is used before it is refreshed. If unset, defaults to the SECRETS_MANAGER_TTL env var (non-negative whole seconds, where 0 refreshes on every use) as used by the AWS Parameters and Secrets Lambda Extension, or 5 minutes if that is unset.
Class Variable secrets_client Secrets Manager client used to fetch secrets, e.g. boto3.client("secretsmanager"). Called from a worker thread. If unset, secrets are fetched through the AWS Parameters and Secrets Lambda Extension if it is detected, and otherwise with a client created from the default AWS config, which requires the ...
Method _refresh_interval Undocumented
def client_plugin(self, req: ClientConfigExtensionRequest) -> temporalio.client.Plugin | None: (source)

Read secret IDs from the profile and env, and return a plugin that fetches the configured secrets, or None if none are configured.

def name(self) -> str: (source)

The extension name, aws_secrets_manager.

max_staleness: timedelta | None = (source)

How long after its last successful fetch a secret may still be used if refreshing it fails. Defaults to 24 hours. Values less than the refresh interval are treated as the refresh interval.

refresh_interval: timedelta | None = (source)

How long a fetched secret is used before it is refreshed. If unset, defaults to the SECRETS_MANAGER_TTL env var (non-negative whole seconds, where 0 refreshes on every use) as used by the AWS Parameters and Secrets Lambda Extension, or 5 minutes if that is unset.

secrets_client: SecretsClient | None = (source)

Secrets Manager client used to fetch secrets, e.g. boto3.client("secretsmanager"). Called from a worker thread. If unset, secrets are fetched through the AWS Parameters and Secrets Lambda Extension if it is detected, and otherwise with a client created from the default AWS config, which requires the boto3 extra.

def _refresh_interval(self) -> timedelta: (source)

Undocumented