|
30 | 30 |
|
31 | 31 | from .. import models as _models |
32 | 32 | from .._serialization import Serializer |
33 | | -from .._vendor import _convert_request, _format_url_section |
| 33 | +from .._vendor import _convert_request |
34 | 34 |
|
35 | 35 | T = TypeVar("T") |
36 | 36 | ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] |
@@ -59,7 +59,7 @@ def build_list_request(resource_group_name: str, vault_name: str, subscription_i |
59 | 59 | "vaultName": _SERIALIZER.url("vault_name", vault_name, "str"), |
60 | 60 | } |
61 | 61 |
|
62 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 62 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
63 | 63 |
|
64 | 64 | # Construct parameters |
65 | 65 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -93,7 +93,7 @@ def build_get_request( |
93 | 93 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
94 | 94 | } |
95 | 95 |
|
96 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 96 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
97 | 97 |
|
98 | 98 | # Construct parameters |
99 | 99 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -128,7 +128,7 @@ def build_create_or_update_request( |
128 | 128 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
129 | 129 | } |
130 | 130 |
|
131 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 131 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
132 | 132 |
|
133 | 133 | # Construct parameters |
134 | 134 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -164,7 +164,7 @@ def build_delete_request( |
164 | 164 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
165 | 165 | } |
166 | 166 |
|
167 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 167 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
168 | 168 |
|
169 | 169 | # Construct parameters |
170 | 170 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -199,7 +199,7 @@ def build_adhoc_backup_request( |
199 | 199 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
200 | 200 | } |
201 | 201 |
|
202 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 202 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
203 | 203 |
|
204 | 204 | # Construct parameters |
205 | 205 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -235,7 +235,7 @@ def build_validate_for_backup_request( |
235 | 235 | "vaultName": _SERIALIZER.url("vault_name", vault_name, "str"), |
236 | 236 | } |
237 | 237 |
|
238 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 238 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
239 | 239 |
|
240 | 240 | # Construct parameters |
241 | 241 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -277,7 +277,7 @@ def build_get_backup_instance_operation_result_request( |
277 | 277 | "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), |
278 | 278 | } |
279 | 279 |
|
280 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 280 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
281 | 281 |
|
282 | 282 | # Construct parameters |
283 | 283 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -312,7 +312,7 @@ def build_trigger_rehydrate_request( |
312 | 312 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
313 | 313 | } |
314 | 314 |
|
315 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 315 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
316 | 316 |
|
317 | 317 | # Construct parameters |
318 | 318 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -349,7 +349,7 @@ def build_trigger_restore_request( |
349 | 349 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
350 | 350 | } |
351 | 351 |
|
352 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 352 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
353 | 353 |
|
354 | 354 | # Construct parameters |
355 | 355 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -385,7 +385,7 @@ def build_resume_backups_request( |
385 | 385 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
386 | 386 | } |
387 | 387 |
|
388 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 388 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
389 | 389 |
|
390 | 390 | # Construct parameters |
391 | 391 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -419,7 +419,7 @@ def build_resume_protection_request( |
419 | 419 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
420 | 420 | } |
421 | 421 |
|
422 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 422 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
423 | 423 |
|
424 | 424 | # Construct parameters |
425 | 425 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -453,7 +453,7 @@ def build_stop_protection_request( |
453 | 453 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
454 | 454 | } |
455 | 455 |
|
456 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 456 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
457 | 457 |
|
458 | 458 | # Construct parameters |
459 | 459 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -487,7 +487,7 @@ def build_suspend_backups_request( |
487 | 487 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
488 | 488 | } |
489 | 489 |
|
490 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 490 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
491 | 491 |
|
492 | 492 | # Construct parameters |
493 | 493 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -522,7 +522,7 @@ def build_sync_backup_instance_request( |
522 | 522 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
523 | 523 | } |
524 | 524 |
|
525 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 525 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
526 | 526 |
|
527 | 527 | # Construct parameters |
528 | 528 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -559,7 +559,7 @@ def build_validate_for_restore_request( |
559 | 559 | "backupInstanceName": _SERIALIZER.url("backup_instance_name", backup_instance_name, "str"), |
560 | 560 | } |
561 | 561 |
|
562 | | - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore |
| 562 | + _url: str = _url.format(**path_format_arguments) # type: ignore |
563 | 563 |
|
564 | 564 | # Construct parameters |
565 | 565 | _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") |
@@ -1348,7 +1348,9 @@ def get_long_running_output(pipeline_response): |
1348 | 1348 | return deserialized |
1349 | 1349 |
|
1350 | 1350 | if polling is True: |
1351 | | - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) |
| 1351 | + polling_method: PollingMethod = cast( |
| 1352 | + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) |
| 1353 | + ) |
1352 | 1354 | elif polling is False: |
1353 | 1355 | polling_method = cast(PollingMethod, NoPolling()) |
1354 | 1356 | else: |
@@ -1582,7 +1584,9 @@ def get_long_running_output(pipeline_response): |
1582 | 1584 | return deserialized |
1583 | 1585 |
|
1584 | 1586 | if polling is True: |
1585 | | - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) |
| 1587 | + polling_method: PollingMethod = cast( |
| 1588 | + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) |
| 1589 | + ) |
1586 | 1590 | elif polling is False: |
1587 | 1591 | polling_method = cast(PollingMethod, NoPolling()) |
1588 | 1592 | else: |
@@ -2132,7 +2136,9 @@ def get_long_running_output(pipeline_response): |
2132 | 2136 | return deserialized |
2133 | 2137 |
|
2134 | 2138 | if polling is True: |
2135 | | - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) |
| 2139 | + polling_method: PollingMethod = cast( |
| 2140 | + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) |
| 2141 | + ) |
2136 | 2142 | elif polling is False: |
2137 | 2143 | polling_method = cast(PollingMethod, NoPolling()) |
2138 | 2144 | else: |
@@ -3114,7 +3120,9 @@ def get_long_running_output(pipeline_response): |
3114 | 3120 | return deserialized |
3115 | 3121 |
|
3116 | 3122 | if polling is True: |
3117 | | - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) |
| 3123 | + polling_method: PollingMethod = cast( |
| 3124 | + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) |
| 3125 | + ) |
3118 | 3126 | elif polling is False: |
3119 | 3127 | polling_method = cast(PollingMethod, NoPolling()) |
3120 | 3128 | else: |
|
0 commit comments