lambda-params-secrets
    Preparing search index...

    Class Client

    The Client makes requests to the http:localhost endpoint exposed by the AWS Parameters and Secrets Lambda Extension.

    Index

    Constructors

    Properties

    baseUrl: string

    The Extension's base URL endpoint. Protocol + host + port number.

    http://localhost:2773

    Methods

    • Get a Secrets Manager BinarySecret Value as a Buffer from the Extension.

      Converts the Extension's Base64 string response to a Buffer.

      Parameters

      • secretId: string

        the secret id

      • Optionaloptions: SecretOptions

        optional qualifiers.

      Returns Promise<Buffer<ArrayBufferLike> | null>

      a Promise of a Binary Secret as a Buffer. null` if error or undefined.

    • Get a Binary Secret from the SSM Parameter Store using the Extension.

      Always returns the decrypted value. The WithDecryption flag must be True for retrieving a Secret Manager secret.

      Parameters

      • secretId: string

        the BinarySecret secret name

      • Optionaloptions: SecretFromParamStoreOptions

        optional qualifiers. The Client sets withDecryption: true by default.

      Returns Promise<Buffer<ArrayBufferLike> | null>

      a Promise of a Binary Secret as a Buffer. null` if error or undefined.

    • Get the extension localhost URL path for a SSM Parameter

      Parameters

      • parameterName: string

        the parameter name

      • Optionaloptions: ParameterOptions

        optional qualifiers

      Returns string

      the localhost path of the request

    • Get the full Response object from the Extension for a SSM Parameter

      Parameters

      • parameterName: string

        the parameter name

      • Optionaloptions: ParameterOptions

        optional qualifiers

      Returns Promise<ParameterResponse | ErrorResponse>

      a Promise of the full response object returned by the Extension.

    • Get the extension localhost URL path for a SecretManager Secret

      Parameters

      • secretId: string

        the secret id

      • Optionaloptions: SecretOptions

        optional qualifiers

      Returns string

      the localhost path of the request

    • Get the full Response object from the Extension for a SecretManager Secret.

      For Binary Secrets "The response parameter represents the binary data as a base64-encoded string." (GetSecretValueCommandOutput)

      Parameters

      • secretId: string

        the secret id

      • Optionaloptions: SecretOptions

        optional qualifiers.

      Returns Promise<SecretResponse | ErrorResponse>

      a Promise of the full response object returned by the Extension

    • Get a SSM String Parameter List Value from the Extension.

      Parameters

      • parameterName: string

        the SecureString parameter name

      • Optionaloptions: SecureStringParameterOptions

        optional qualifiers. The Client sets withDecryption: true by default.

      Returns Promise<string | null>

      a Promise of the parameter's value. null if error or undefined.

    • Get a SSM String Parameter List Values as an array from the Extension.

      Use the stringParameter method to return the stringified value of a StringList.

      Parameters

      • parameterName: string

        the StringList parameter name

      • Optionaloptions: StringParameterOptions

        optional qualifiers

      Returns Promise<string[] | null>

      a Promise of the parameter's values as an array. null if error or undefined.

    • Get a SSM String Parameter Value for from the Extension.

      If parameterName returns a comma-deliminated string for a StringList and the decrypted value of a SecureString.

      Parameters

      • parameterName: string

        the String or StringList parameter name

      • Optionaloptions: StringParameterOptions

        optional qualifiers

      Returns Promise<string | null>

      a Promise of the parameter's string valu. null if error or undefined.

      • Get a Secrets Manager StringSecret Value from the Extension.

      Parameters

      • secretId: string

        the secret id

      • Optionaloptions: SecretOptions

        optional qualifiers.

      Returns Promise<string | null>

      a Promise of a String Secret or null if error or undefined

    • Get a String Secret from the SSM Parameter Store using the Extension.

      Always returns the decrypted value. The WithDecryption flag must be True for retrieving a Secret Manager secret.

      Parameters

      • secretId: string

        the StringSecret secret name

      • Optionaloptions: SecretFromParamStoreOptions

        optional qualifiers. The Client sets withDecryption: true by default.

      Returns Promise<string | null>

      a Promise of the parameter's value. null if error or undefined.