export type DeleteApiProvidersMicrosoftIntuneLocationsHostNameAndroidPoliciesPolicyNameArgs = {hostName: string, policyName: string, 'api-version': string}; export type DeleteApiProvidersMicrosoftIntuneLocationsHostNameAndroidPoliciesPolicyNameOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Android Policy * * DELETE /providers/Microsoft.Intune/locations/{hostName}/androidPolicies/{policyName} */ export const deleteApiProvidersMicrosoftIntuneLocationsHostNameAndroidPoliciesPolicyName = async (args: DeleteApiProvidersMicrosoftIntuneLocationsHostNameAndroidPoliciesPolicyNameArgs, options?: DeleteApiProvidersMicrosoftIntuneLocationsHostNameAndroidPoliciesPolicyNameOptions) => { const {baseUrl = "https://management.azure.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['api-version'] != null) query.append("api-version", String(args['api-version'])) const url = `${baseUrl.replace(/\/+$/, '')}/providers/Microsoft.Intune/locations/${encodeURIComponent(String(args.hostName))}/androidPolicies/${encodeURIComponent(String(args.policyName))}${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 };