Skip to content

UpdateSecretVersionStage

Source: src/AWS/SecretsManager/UpdateSecretVersionStage.ts

Runtime binding for secretsmanager:UpdateSecretVersionStage.

Bind this operation to a Secret to get a callable that moves a staging label between versions — the final finishSecret step of the rotation protocol, where AWSCURRENT is moved onto the new version. Provide the implementation with Effect.provide(AWS.SecretsManager.UpdateSecretVersionStageHttp).

// init — bind the operation to the secret
const updateStage = yield* AWS.SecretsManager.UpdateSecretVersionStage(secret);
// runtime — finishSecret: move AWSCURRENT onto the pending version
yield* updateStage({
VersionStage: "AWSCURRENT",
MoveToVersionId: pendingVersionId,
RemoveFromVersionId: currentVersionId,
});