export type DeleteApiConfigRouteDestinationIPNetIpAddressMaskArgs = {ip_address: string, mask: number}; export type DeleteApiConfigRouteDestinationIPNetIpAddressMaskOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Create a new Load balancer service * * DELETE /config/route/destinationIPNet/{ip_address}/{mask} */ export const deleteApiConfigRouteDestinationIPNetIpAddressMask = async (args: DeleteApiConfigRouteDestinationIPNetIpAddressMaskArgs, options?: DeleteApiConfigRouteDestinationIPNetIpAddressMaskOptions) => { const {baseUrl = "http://0.0.0.0:11111/netlox/v1", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set("Authorization", BearerAuth) const url = `${baseUrl.replace(/\/+$/, '')}/config/route/destinationIPNet/${encodeURIComponent(String(args.ip_address))}/${encodeURIComponent(String(args.mask))}${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 };