public static async Task DeleteCubbyholeSecretAsync( this VaultClient client, string path, CallOptions options = null) { if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); } await client.DeleteAsync( $"{MountName}/{path}", options : options); }
/// <summary> /// Deletes the secret at the specified location. /// </summary> /// <param name="client"></param> /// <param name="path">Specifies the path of the secret to delete.</param> /// <param name="options"></param> public static async Task DeleteGenericSecretAsync( this VaultClient client, string path, GenericSecretOptions options = null) { if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); } var mountName = options?.MountName ?? DefaultMountName; await client.DeleteAsync( $"{mountName}/{path}", options : options); }
/// <summary> /// Removes the plugin with the given name. /// </summary> /// <param name="client"></param> /// <param name="name">Specifies the name of the plugin to delete.</param> /// <param name="options"></param> /// <remarks> /// <para> /// <b><i>sudo required – This operation requires sudo capability in addition to any /// path-specific capabilities.</i></b> /// </para> /// </remarks> public static async Task RemovePluginAsync( this VaultClient client, string name, SystemBackendOptions options = null) { if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException(nameof(name)); } name = name.TrimStart('/'); await client.DeleteAsync($"sys/plugins/catalog/{name}", options : options); }