Accepts a AwsSecretsManagerConfig or plain options.
Whether close was called.
The underlying AWS SDK client (escape hatch for operations not wrapped here).
Reads many secrets at once (BatchGetSecretValue). With a list of ids, lists longer than 20
are split and the values come back in request order; with { filters } every page is read.
Per-secret failures are returned in errors (the call itself succeeds).
Turns rotation off and cancels a rotation in progress (CancelRotateSecret).
Stops every watcher of the providers created by secrets and destroys the SDK client this instance built (never a caller-supplied one). Idempotent.
Creates a secret (CreateSecret). value: string → SecretString, bytes → SecretBinary,
object → JSON SecretString, undefined/null → a secret without a version.
ConflictError when the name exists (or is scheduled for deletion).
Removes the resource policy (DeleteResourcePolicy).
Schedules deletion (DeleteSecret) after recoveryWindowDays (AWS default 30) or deletes
immediately with forceDeleteWithoutRecovery. Note: AWS answers success for a forced delete
of a secret that does not exist.
Metadata of a secret (DescribeSecret), never the value.
Reads one field of a JSON secret: GetSecretValue, parse SecretString as a JSON object,
return field (an exact key first, otherwise a dot path such as "db.host"). null when
the field is absent; ValidationError when the value is binary or not a JSON object;
NotFoundError when the secret is missing.
Generates a random password (GetRandomPassword), returned as a redacting Secret.
Reads the resource policy (GetResourcePolicy); resourcePolicy is absent when there is none.
Reads a secret value (GetSecretValue), by default the AWSCURRENT version. secretId is a
name or ARN. NotFoundError when the secret, version or stage does not exist; ConflictError
when the secret is scheduled for deletion.
Liveness: a signed ListSecrets {MaxResults: 1} with a short timeout and no retries.
ok when AWS answers (also when the credentials are rejected: details.auth = "failed"),
degraded when throttled, unhealthy on HTTP 5xx, unreachable on network errors.
Throws only CancelledError (also on a closed client) and ConfigError.
Lists secrets (ListSecrets) lazily across all pages: for await (const s of client.listSecrets()) or await client.listSecrets().toArray().
Lists the versions of a secret (ListSecretVersionIds) lazily across all pages.
Authenticated round trip (ListSecrets {MaxResults: 1}); returns the latency in ms.
AuthenticationError for unknown keys or bad signatures, PermissionDeniedError when the
principal may not call secretsmanager:ListSecrets.
Attaches a resource policy (PutResourcePolicy); objects are JSON-encoded.
Stores a new version (PutSecretValue). By default it becomes AWSCURRENT (the old one
becomes AWSPREVIOUS); with custom versionStages only those labels are attached.
Cancels a scheduled deletion (RestoreSecret). A no-op for a live secret.
Configures and/or starts rotation (RotateSecret). Without lambdaArn the secret's managed
or existing rotation function is used.
A version-stage aware cache with the AWS caching-client semantics (TTL 1 h, 1 024 entries).
The SecretsProvider view (SPEC §3) of this client. close() of the client stops its
watchers.
Always throws UnsupportedError: AWS Secrets Manager exposes no server version (the API
contract date is the constant API_VERSION).
Adds or replaces tags (TagResource).
Removes tags by key (UntagResource).
Updates description, KMS key and/or value (UpdateSecret). A new version is created only
when value is given.
Moves a stage label between versions (UpdateSecretVersionStage). Moving AWSCURRENT needs
removeFromVersionId = the current version; the old current version gets AWSPREVIOUS.
Checks a policy with IAM Access Analyzer (ValidateResourcePolicy). Emulators that lack the
operation (Moto 5.2.4) raise UnsupportedError.
StaticfromBuilds a client from GROW_AWS_SECRETS_MANAGER_* and the standard AWS environment variables.
StaticwithWraps an existing AWS SDK client; close() leaves it open.
Client for AWS Secrets Manager on the official AWS SDK v3. Builds a
SecretsManagerClientfrom the Grow config (region, credentials, endpoint, timeouts, retries, TLS, proxy, User-Agent, hooks) or wraps one the caller passes (sdkClient).