Class SecretManagerFactory


  • @Factory
    @Requires(classes=com.google.cloud.secretmanager.v1.SecretManagerServiceClient.class)
    public class SecretManagerFactory
    extends java.lang.Object
    Factory to create SecretManager clients.
    Since:
    3.4.0
    Author:
    Vinicius Carvalho
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.api.gax.core.CredentialsProvider credentialsProvider​(com.google.auth.oauth2.GoogleCredentials credentials)
      Returns a default CredentialsProvider, allows users to override it and provide their own implementation.
      com.google.cloud.secretmanager.v1.SecretManagerServiceClient secretManagerServiceClient​(com.google.api.gax.core.CredentialsProvider credentialsProvider, com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider)
      Creates a SecretManagerServiceClient instance.
      com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SecretManagerFactory

        public SecretManagerFactory()
    • Method Detail

      • secretManagerServiceClient

        @Singleton
        public com.google.cloud.secretmanager.v1.SecretManagerServiceClient secretManagerServiceClient​(@Named("secret-manager")
                                                                                                       com.google.api.gax.core.CredentialsProvider credentialsProvider,
                                                                                                       @Named("secret-manager")
                                                                                                       com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider)
        Creates a SecretManagerServiceClient instance.
        Parameters:
        credentialsProvider - - Google Cloud Credentials Provider
        transportChannelProvider - - TransportChannel Provider
        Returns:
        an instance using defaults.
      • credentialsProvider

        @Singleton
        @Named("secret-manager")
        public com.google.api.gax.core.CredentialsProvider credentialsProvider​(com.google.auth.oauth2.GoogleCredentials credentials)
                                                                        throws java.io.IOException
        Returns a default CredentialsProvider, allows users to override it and provide their own implementation.
        Parameters:
        credentials - default credentials, if not overridden by user should be provided by GoogleCredentialsFactory
        Returns:
        A FixedCredentialsProvider holding the given credentials.
        Throws:
        java.io.IOException
      • transportChannelProvider

        @Singleton
        @Named("secret-manager")
        public com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider()
        Returns:
        default TransportChannelProviderTransportChannelProvider