export type DeleteApiV1beta1SharedClusterAnalysisTemplatesClusterAnalysisTemplateArgs = {'cluster-analysis-template': string}; export type DeleteApiV1beta1SharedClusterAnalysisTemplatesClusterAnalysisTemplateOptions = {baseUrl: string, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a ClusterAnalysisTemplate * * DELETE /v1beta1/shared/cluster-analysis-templates/{cluster-analysis-template} */ export const deleteApiV1beta1SharedClusterAnalysisTemplatesClusterAnalysisTemplate = async (args: DeleteApiV1beta1SharedClusterAnalysisTemplatesClusterAnalysisTemplateArgs, options: DeleteApiV1beta1SharedClusterAnalysisTemplatesClusterAnalysisTemplateOptions) => { const {baseUrl, fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set("Authorization", BearerAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1beta1/shared/cluster-analysis-templates/${encodeURIComponent(String(args['cluster-analysis-template']))}${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 };