//native
/**
* Delete a set of AWS credentials
*
*/
export async function main(auth: RT.Qovery, credentialsId: string, organizationId: string) {
const url = new URL(
`https://api.qovery.com/organization/${organizationId}/aws/credentials/${credentialsId}`
)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: 'Token ' + 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