export type DeleteApiV1StoragesStorageIdSnmpConfigArgs = {storage_id: string}; export type DeleteApiV1StoragesStorageIdSnmpConfigOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Removes snmp alert source information configured on behalf of backend devices * * DELETE /v1/storages/{storage_id}/snmp-config */ export const deleteApiV1StoragesStorageIdSnmpConfig = async (args: DeleteApiV1StoragesStorageIdSnmpConfigArgs, options: DeleteApiV1StoragesStorageIdSnmpConfigOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/storages/${encodeURIComponent(String(args.storage_id))}/snmp-config${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };