// Create new token using the builder (supports all current parameters).Tokentoken=Token.builder().withId("token-id").withDisplayName("token name").build();// Write token to Vault (orphan creation and role binding possible).AuthResponsecreateResponse=connector.createToken(token);
// Create new role using the builder. Supports all current role parameters.AppRolerole=AppRole.builder("role-name").build();// Write the new role to Vault.booleancreated=connector.createAppRole(role);// Lookup the role by name.AppRoleResponseres=connector.lookupAppRole("role-name");// Create a new secret with random ID.AppRoleSecretResponsesecret=connector.createAppRoleSecret("role-name");// Destroy the secret.booleandestroyed=connector.destroyAppRoleSecret("role-name",secret.getSecret().getId());