ADK for TypeScript: API Reference
    Preparing search index...

    Class SecretManagerClient

    Reads secrets from Google Cloud Secret Manager.

    The client authenticates with serviceAccountJson when it is set, then with authToken, and otherwise with application default credentials.

    @google-cloud/secret-manager is an optional peer dependency. It is loaded on the first call to SecretManagerClient.getSecret, so constructing the client does not require it.

    • Returns the payload of a secret version as a UTF-8 string.

      Parameters

      • resourceName: string

        The secret version, in the form projects/{project}/secrets/{secret}/versions/{version}. Use latest as the version to read the newest one.

      Returns Promise<string>

      When default credentials are needed and cannot be resolved, or when Secret Manager returns an error, such as a missing secret or a denied permission.