Skip to content

Commit fc26f88

Browse files
authored
Manually overriding polling for delete (#40754)
* fixing delete functionality
1 parent 94dded3 commit fc26f88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2025_01_01_preview/operations/_capability_hosts_operations.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements
216216
response_headers = {}
217217
if response.status_code == 202:
218218
response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout'))
219-
response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
219+
response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
220220
response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After'))
221221

222222

@@ -281,7 +281,7 @@ def get_long_running_output(pipeline_response):
281281
return cls(pipeline_response, None, {})
282282

283283

284-
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
284+
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, **kwargs)
285285
elif polling is False: polling_method = NoPolling()
286286
else: polling_method = polling
287287
if cont_token:

0 commit comments

Comments
 (0)