com.ibm.cp4waiops.connectors.sdk.VaultInstance Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connectors-sdk Show documentation
Show all versions of connectors-sdk Show documentation
A developer SDK for creating connectors for CP4WAIOps.
package com.ibm.cp4waiops.connectors.sdk;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import io.micrometer.core.instrument.MeterRegistry;
/**
* Provides methods to access a vault instance
*
* @deprecated Do not use vault as it has been removed from CPAIOps
*/
@Deprecated(since = "1.5.0")
public class VaultInstance implements AutoCloseable {
/**
* Constructs a new instance
*
* @param accessInfo
* info needed to access vault
* @param registry
* stores request level metrics
*/
public VaultInstance(VaultAccessInfo accessInfo, MeterRegistry registry) {
this(accessInfo, null, registry);
}
/**
* Constructor for testing purposes
*
* @param accessInfo
* info needed to access vault
* @param client
* the client to use
* @param registry
* stores request level metrics
*/
public VaultInstance(VaultAccessInfo accessInfo, CloseableHttpClient client, MeterRegistry registry) {
}
@Override
public void close() {
// Do nothing, close no longer needs to cleanup things due to deprecation
}
/**
* Retrieves a value from vault
*
* @param path
* the path to the secret in vault (does not include /v1)
* @param key
* the key in the secret data to return
*
* @return the value found
*/
public String lookupValue(String path, String key) {
throw new VaultException("Could not lookup value.",
new Exception("Vault has been deprecated, so lookupValue is not longer supported."));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy