PutSecretValue
Source:
src/AWS/SecretsManager/PutSecretValue.ts
Runtime binding for secretsmanager:PutSecretValue.
Bind this operation to a Secret to get a callable that writes a new
secret version (string or binary); the new version becomes AWSCURRENT.
Provide the implementation with
Effect.provide(AWS.SecretsManager.PutSecretValueHttp).
Writing Secret Values
Section titled “Writing Secret Values”Rotate a Secret’s Value
// init — bind the operation to the secretconst putSecretValue = yield* AWS.SecretsManager.PutSecretValue(secret);
// runtime — write a new version; the response carries its VersionIdconst result = yield* putSecretValue({ SecretString: newPassword,});Store a Binary Payload
yield* putSecretValue({ SecretBinary: new TextEncoder().encode(JSON.stringify(credentials)),});