Currently, the only way to retrieve a secret is by its ID with SecretCache.getSecretString(secretId). There is no way to get a specific version of a secret using its ID and versionId. One can build a SecretCacheConfiguration object and call setVersionStage, then pass that configuration to a SecretCache constructor; however, this still only allows retrieving a specific version of a secret by its Id and stage, and would require using the same stage for all secrets (unless constructing separate caches). It would be nice if getSecretString took an optional versionId string, so that we could use specific versionIds and not just version stages.
Currently, the only way to retrieve a secret is by its ID with
SecretCache.getSecretString(secretId). There is no way to get a specific version of a secret using its ID and versionId. One can build aSecretCacheConfigurationobject and callsetVersionStage, then pass that configuration to aSecretCacheconstructor; however, this still only allows retrieving a specific version of a secret by its Id and stage, and would require using the same stage for all secrets (unless constructing separate caches). It would be nice ifgetSecretStringtook an optionalversionIdstring, so that we could use specific versionIds and not just version stages.