SecretsManagerClient interacts with the AWS Secrets Manager.
With it, you can perform several operations such as listing, creating and downloading secrets owned by the authenticated user. For a full list of supported operations, see Methods.
SecretsManagerClient is included in both the dedicated jslib secrets-manager.js bundle, and the aws.js one, containing all the services clients.
Methods
Function | Description |
---|---|
listSecrets() | List secrets owned by the authenticated user |
getSecret(secretID) | Download a secret |
createSecret(name, secretString, description, [versionID], [tags]) | Create a new secret |
putSecretValue(secretID, secretString, [versionID]) | Update a secret |
deleteSecret(secretID, { recoveryWindow: 30, noRecovery: false}}) | Delete a secret |
Throws
S3 Client methods will throw errors in case of failure.
Error | Condition |
---|---|
InvalidSignatureError | when invalid credentials were provided. |
SecretsManagerServiceError | when AWS replied to the requested operation with an error. |