Interface: ISecretClient

Client that will handle the communication with the Secret Storage.

If your function calls the secret store and if the secrets are not modified and, therefore, are static, it is required to implement a secret store cache mechanism as described in the best practices.

Table of contents

Methods

Methods

readSecret

readSecret(key): Promise<ISecretEntry>

Searches the Secret that belong to the provided key. Will raise a SecretError if there is no secret for the provided key.

Parameters

Name Type Description
key string Name of the Secret

Returns

Promise<ISecretEntry>

Secret in Key-Value Format


updateSecret

updateSecret(updatedSecret): Promise<ISecretEntry>

Updates the Secret with the provided update-entry. Will raise a SecretError if there is no secret with the specified key.

Parameters

Name Type Description
updatedSecret ISecretEntry Secret in Key-Value Format

Returns

Promise<ISecretEntry>

Updated Version of the Secret in Key-Value Format


Interface: ISecretEntry

Properties:

key: string

Key of the secret made of chars that match [A-z0-9-_] and limited to 100 chars

value: any

Value of the secret which is limited to 10000 chars.