@Override
    public List<Secret> listSecretVersions(Key key) {
        var client = getClient(key.vaultName());
        try {
            var response = client.listSecretVersionIds(ListSecretVersionIdsRequest.builder()
                                                               .secretId(awsSecretId(key))
                                                               .build());
            var secretVersions = response.versions().stream()
                    .map(version -> getSecret(key, SecretVersionId.of(version.versionId())))
                    .sorted().toList();

            secretVersions.forEach(secret -> cache.put(new VersionKey(key, secret.version()), secret));

            return secretVersions;
        } catch (ResourceNotFoundException e) {
            return List.of();
        } catch (Exception e) {
            throw new IllegalArgumentException("Failed to list secret versions for %s:\n%s".formatted(key, e.getMessage()));
        }
    }
List all versions of the given secret, sorted according to
{@link Secret#compareTo(Secret)}. Always retrieves all versions from ASM,
and refreshes the cache for each version.
jdisc-cloud-aws/src/main/java/ai/vespa/secret/aws/AsmSecretReader.java