export type UpdateApiV1DboDatabasesEntityIdUnobserveArgs = {entityId: string}; export type UpdateApiV1DboDatabasesEntityIdUnobserveOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Unobserve an observed database * * PUT /v1/dbo/databases/{entityId}/unobserve */ export const updateApiV1DboDatabasesEntityIdUnobserve = async (args: UpdateApiV1DboDatabasesEntityIdUnobserveArgs, options?: UpdateApiV1DboDatabasesEntityIdUnobserveOptions) => { const {baseUrl = "https://api.na-01.cloud.solarwinds.com", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/dbo/databases/${encodeURIComponent(String(args.entityId))}/unobserve${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };