Class DefaultSecretManagerServiceClientFactory
java.lang.Object
com.google.cloud.spring.autoconfigure.secretmanager.DefaultSecretManagerServiceClientFactory
- All Implemented Interfaces:
SecretManagerServiceClientFactory
@Component
public class DefaultSecretManagerServiceClientFactory
extends Object
implements SecretManagerServiceClientFactory
A default implementation of the
SecretManagerServiceClientFactory interface.
This factory provides a caching layer for SecretManagerServiceClient instances.
Clients are created using the provided CredentialsProvider and a UserAgentHeaderProvider that adds the Spring Cloud GCP agent header to the client.
-
Method Summary
-
Method Details
-
getClient
public com.google.cloud.secretmanager.v1.SecretManagerServiceClient getClient(@Nullable String location) Description copied from interface:SecretManagerServiceClientFactoryCreates a Secret Manager service client for the given location.- Specified by:
getClientin interfaceSecretManagerServiceClientFactory- Parameters:
location- the location to create a client for.- Returns:
- a Secret Manager service client.
-