@@ -33,7 +33,7 @@ public class Logical extends OperationsBase {
3333
3434 private String nameSpace ;
3535
36- public enum logicalOperations {authentication , deleteV1 , deleteV2 , destroy , listV1 , listV2 , readV1 , readV2 , writeV1 , writeV2 , unDelete , mount }
36+ public enum logicalOperations {authentication , deleteV1 , deleteV2 , destroy , listV1 , listV2 , listSubKeys , readV1 , readV2 , writeV1 , writeV2 , unDelete , mount }
3737
3838 public Logical (final VaultConfig config ) {
3939 super (config );
@@ -338,7 +338,25 @@ public LogicalResponse list(final String path) throws VaultException {
338338 }
339339 }
340340
341- private LogicalResponse list (final String path , final logicalOperations operation )
341+ /**
342+ * <p>Retrieve a list of keys corresponding to key/value pairs at a given Vault path.</p>
343+ *
344+ * <p>Key values ending with a trailing-slash characters are sub-paths. Running a subsequent
345+ * <code>list()</code>
346+ * call, using the original path appended with this key, will retrieve all secret keys stored at
347+ * that sub-path.</p>
348+ *
349+ * <p>This method returns only the secret keys, not values. To retrieve the actual stored
350+ * value for a key, use <code>read()</code> with the key appended onto the original base
351+ * path.</p>
352+ *
353+ * @param path The Vault key value at which to look for secrets (e.g. <code>secret</code>)
354+ * @param operation The Vault operation involved to retrieve list
355+ * @return A list of keys corresponding to key/value pairs at a given Vault path, or an empty
356+ * list if there are none
357+ * @throws VaultException If any errors occur, or unexpected response received from Vault
358+ */
359+ public LogicalResponse list (final String path , final logicalOperations operation )
342360 throws VaultException {
343361 LogicalResponse response = null ;
344362 try {
0 commit comments