aws-parameter-cache
Version:
Parameter cache for AWS System Manager Parameter Store and AWS Secrets Manager
30 lines (29 loc) • 1.37 kB
TypeScript
import { SecretsManagerClientConfig } from '@aws-sdk/client-secrets-manager';
import { Refreshable } from './refreshable';
export interface SecretProps {
/** Specifies the secret containing the version that you want to retrieve. */
secretId: string;
/** Specifies the unique identifier of the version of the secret that you want to retrieve. */
versionId?: string;
/** Specifies the secret version that you want to retrieve by the staging label attached to the version. */
versionStage?: string;
/** Speciifies the key of the seceretString that you want to retireve. */
key?: string;
/** The maximum amount of time in milliseconds a parameter will be considered fresh */
maxAge?: number;
/** https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-secrets-manager/interfaces/secretsmanagerclientconfig.html */
secretsManagerClientConfig?: SecretsManagerClientConfig;
}
export declare class Secret extends Refreshable {
readonly secretId: string;
readonly versionId?: string;
readonly versionStage?: string;
readonly key?: string;
private readonly secretsManagerClient;
private cachedResponse?;
constructor(props: SecretProps);
get secretString(): Promise<string>;
getSecretString(): Promise<string>;
protected refreshParameter(): void;
private getSecretValue;
}