Skip to content

BatchGetSecretValue

Source: src/AWS/SecretsManager/BatchGetSecretValue.ts

Runtime binding for secretsmanager:BatchGetSecretValue.

Bind this operation to a list of Secrets to get a callable that reads all of their current values in a single call — the batch counterpart of GetSecretValue. The bound secrets’ ARNs are injected as the SecretIdList and each secret is granted secretsmanager:GetSecretValue (BatchGetSecretValue authorizes per-secret through GetSecretValue). Provide the implementation with Effect.provide(AWS.SecretsManager.BatchGetSecretValueHttp).

// init — bind the operation to the secrets
const batchGet = yield* AWS.SecretsManager.BatchGetSecretValue([
dbSecret,
apiKeySecret,
]);
// runtime — one call, every current value
const result = yield* batchGet();
for (const entry of result.SecretValues ?? []) {
console.log(entry.Name);
}