Class DefaultSecretManagerClient

java.lang.Object
io.micronaut.gcp.secretmanager.client.DefaultSecretManagerClient
All Implemented Interfaces:
SecretManagerClient

@Singleton @Requires(classes=com.google.cloud.secretmanager.v1.SecretManagerServiceClient.class) public class DefaultSecretManagerClient extends Object implements SecretManagerClient
Default implementation of SecretManagerClient.
Since:
3.4.0
Author:
Vinicius Carvalho
  • Constructor Details

  • Method Details

    • getSecret

      public reactor.core.publisher.Mono<VersionedSecret> getSecret(String secretId)
      Description copied from interface: SecretManagerClient
      Fetches a secret from the Secret Manager storage using the `gcp.projectId` project, and "latest" as the version.
      Specified by:
      getSecret in interface SecretManagerClient
      Parameters:
      secretId - - name of the secret
      Returns:
      String value of the secret or empty
    • getSecret

      public reactor.core.publisher.Mono<VersionedSecret> getSecret(String secretId, String version)
      Description copied from interface: SecretManagerClient
      Fetches a secret from the Secret Manager storage using the `gcp.projectId` project.
      Specified by:
      getSecret in interface SecretManagerClient
      Parameters:
      secretId - - name of the secret
      version - - version of the secret
      Returns:
      String value of the secret or empty
    • getSecret

      public reactor.core.publisher.Mono<VersionedSecret> getSecret(String secretId, String version, String projectId)
      Description copied from interface: SecretManagerClient
      Fetches a secret from the Secret Manager storage.
      Specified by:
      getSecret in interface SecretManagerClient
      Parameters:
      secretId - - name of the secret
      version - - version of the secret
      projectId - - project identifier
      Returns:
      String value of the secret or empty