//native
type Render = {
apiKey: string
}
/**
* Delete log stream override
* Removes the log stream override for the specified resource. After deletion, the resource will use the workspace's default log stream setting.
*/
export async function main(auth: Render, resourceId: string) {
const url = new URL(`https://api.render.com/v1/logs/streams/resource/${resourceId}`)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: 'Bearer ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.text()
}
Submitted by hugo697 235 days ago