export type DeleteApiProvidersMicrosoftIntuneLocationsHostNameIosPoliciesPolicyNameAppsAppNameArgs = {hostName: string, policyName: string, appName: string, 'api-version': string}; export type DeleteApiProvidersMicrosoftIntuneLocationsHostNameIosPoliciesPolicyNameAppsAppNameOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete App for Ios Policy * * DELETE /providers/Microsoft.Intune/locations/{hostName}/iosPolicies/{policyName}/apps/{appName} */ export const deleteApiProvidersMicrosoftIntuneLocationsHostNameIosPoliciesPolicyNameAppsAppName = async (args: DeleteApiProvidersMicrosoftIntuneLocationsHostNameIosPoliciesPolicyNameAppsAppNameArgs, options?: DeleteApiProvidersMicrosoftIntuneLocationsHostNameIosPoliciesPolicyNameAppsAppNameOptions) => { 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))}/iosPolicies/${encodeURIComponent(String(args.policyName))}/apps/${encodeURIComponent(String(args.appName))}${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 };