//native
/**
* List AWS available managed database instance types
*
*/
export async function main(auth: RT.Qovery, region: string, databaseType: string) {
const url = new URL(
`https://api.qovery.com/aws/managedDatabase/instanceType/${region}/${databaseType}`
)
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: 'Token ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 235 days ago