azure-storage-blob 12.19.1__py3-none-any.whl → 12.20.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azure/storage/blob/__init__.py +17 -5
- azure/storage/blob/_blob_client.py +23 -7
- azure/storage/blob/_blob_service_client.py +9 -3
- azure/storage/blob/_container_client.py +37 -13
- azure/storage/blob/_download.py +3 -3
- azure/storage/blob/_encryption.py +254 -165
- azure/storage/blob/_generated/_azure_blob_storage.py +21 -3
- azure/storage/blob/_generated/_configuration.py +4 -11
- azure/storage/blob/_generated/_serialization.py +41 -49
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +23 -3
- azure/storage/blob/_generated/aio/_configuration.py +4 -11
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +24 -58
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +37 -86
- azure/storage/blob/_generated/aio/operations/_container_operations.py +98 -289
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +51 -150
- azure/storage/blob/_generated/aio/operations/_service_operations.py +49 -125
- azure/storage/blob/_generated/models/_models_py3.py +31 -31
- azure/storage/blob/_generated/operations/_append_blob_operations.py +25 -59
- azure/storage/blob/_generated/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/operations/_block_blob_operations.py +39 -88
- azure/storage/blob/_generated/operations/_container_operations.py +100 -291
- azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -151
- azure/storage/blob/_generated/operations/_service_operations.py +50 -126
- azure/storage/blob/_lease.py +1 -0
- azure/storage/blob/_models.py +3 -4
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/authentication.py +1 -1
- azure/storage/blob/_shared/avro/avro_io.py +0 -6
- azure/storage/blob/_shared/avro/avro_io_async.py +0 -6
- azure/storage/blob/_shared/avro/datafile.py +0 -4
- azure/storage/blob/_shared/avro/datafile_async.py +0 -4
- azure/storage/blob/_shared/avro/schema.py +4 -4
- azure/storage/blob/_shared/base_client.py +72 -87
- azure/storage/blob/_shared/base_client_async.py +115 -27
- azure/storage/blob/_shared/models.py +120 -27
- azure/storage/blob/_shared/parser.py +7 -6
- azure/storage/blob/_shared/policies.py +96 -66
- azure/storage/blob/_shared/policies_async.py +48 -21
- azure/storage/blob/_shared/response_handlers.py +14 -16
- azure/storage/blob/_shared/shared_access_signature.py +3 -3
- azure/storage/blob/_shared_access_signature.py +38 -27
- azure/storage/blob/_upload_helpers.py +4 -7
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +13 -4
- azure/storage/blob/aio/_blob_client_async.py +17 -6
- azure/storage/blob/aio/_blob_service_client_async.py +4 -2
- azure/storage/blob/aio/_container_client_async.py +26 -9
- azure/storage/blob/aio/_download_async.py +9 -9
- azure/storage/blob/aio/_encryption_async.py +72 -0
- azure/storage/blob/aio/_lease_async.py +1 -1
- azure/storage/blob/aio/_upload_helpers.py +8 -10
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/METADATA +10 -10
- azure_storage_blob-12.20.0.dist-info/RECORD +81 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/WHEEL +1 -1
- azure/storage/blob/_generated/py.typed +0 -1
- azure_storage_blob-12.19.1.dist-info/RECORD +0 -81
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines,too-many-statements
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -7,8 +7,7 @@
|
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
9
|
import datetime
|
10
|
-
import
|
11
|
-
from typing import Any, Callable, Dict, Iterator, Optional, TypeVar, Union
|
10
|
+
from typing import Any, Callable, Dict, Iterator, Literal, Optional, TypeVar, Union
|
12
11
|
|
13
12
|
from azure.core.exceptions import (
|
14
13
|
ClientAuthenticationError,
|
@@ -28,10 +27,6 @@ from .. import models as _models
|
|
28
27
|
from .._serialization import Serializer
|
29
28
|
from .._vendor import _convert_request
|
30
29
|
|
31
|
-
if sys.version_info >= (3, 8):
|
32
|
-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
|
33
|
-
else:
|
34
|
-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
|
35
30
|
T = TypeVar("T")
|
36
31
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
37
32
|
|
@@ -1534,8 +1529,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1534
1529
|
:type cpk_info: ~azure.storage.blob.models.CpkInfo
|
1535
1530
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1536
1531
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1537
|
-
:
|
1538
|
-
:return: Iterator of the response bytes or the result of cls(response)
|
1532
|
+
:return: Iterator[bytes] or the result of cls(response)
|
1539
1533
|
:rtype: Iterator[bytes]
|
1540
1534
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1541
1535
|
"""
|
@@ -1574,7 +1568,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1574
1568
|
_if_tags = modified_access_conditions.if_tags
|
1575
1569
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1576
1570
|
|
1577
|
-
|
1571
|
+
_request = build_download_request(
|
1578
1572
|
url=self._config.url,
|
1579
1573
|
snapshot=snapshot,
|
1580
1574
|
version_id=version_id,
|
@@ -1593,16 +1587,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1593
1587
|
if_tags=_if_tags,
|
1594
1588
|
request_id_parameter=request_id_parameter,
|
1595
1589
|
version=self._config.version,
|
1596
|
-
template_url=self.download.metadata["url"],
|
1597
1590
|
headers=_headers,
|
1598
1591
|
params=_params,
|
1599
1592
|
)
|
1600
|
-
|
1601
|
-
|
1593
|
+
_request = _convert_request(_request)
|
1594
|
+
_request.url = self._client.format_url(_request.url)
|
1602
1595
|
|
1603
1596
|
_stream = True
|
1604
1597
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1605
|
-
|
1598
|
+
_request, stream=_stream, **kwargs
|
1606
1599
|
)
|
1607
1600
|
|
1608
1601
|
response = pipeline_response.http_response
|
@@ -1783,8 +1776,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1783
1776
|
|
1784
1777
|
return deserialized # type: ignore
|
1785
1778
|
|
1786
|
-
download.metadata = {"url": "{url}"}
|
1787
|
-
|
1788
1779
|
@distributed_trace
|
1789
1780
|
def get_properties( # pylint: disable=inconsistent-return-statements
|
1790
1781
|
self,
|
@@ -1825,7 +1816,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1825
1816
|
:type cpk_info: ~azure.storage.blob.models.CpkInfo
|
1826
1817
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1827
1818
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1828
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1829
1819
|
:return: None or the result of cls(response)
|
1830
1820
|
:rtype: None
|
1831
1821
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1865,7 +1855,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1865
1855
|
_if_tags = modified_access_conditions.if_tags
|
1866
1856
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1867
1857
|
|
1868
|
-
|
1858
|
+
_request = build_get_properties_request(
|
1869
1859
|
url=self._config.url,
|
1870
1860
|
snapshot=snapshot,
|
1871
1861
|
version_id=version_id,
|
@@ -1881,16 +1871,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1881
1871
|
if_tags=_if_tags,
|
1882
1872
|
request_id_parameter=request_id_parameter,
|
1883
1873
|
version=self._config.version,
|
1884
|
-
template_url=self.get_properties.metadata["url"],
|
1885
1874
|
headers=_headers,
|
1886
1875
|
params=_params,
|
1887
1876
|
)
|
1888
|
-
|
1889
|
-
|
1877
|
+
_request = _convert_request(_request)
|
1878
|
+
_request.url = self._client.format_url(_request.url)
|
1890
1879
|
|
1891
1880
|
_stream = False
|
1892
1881
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1893
|
-
|
1882
|
+
_request, stream=_stream, **kwargs
|
1894
1883
|
)
|
1895
1884
|
|
1896
1885
|
response = pipeline_response.http_response
|
@@ -1988,9 +1977,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1988
1977
|
response_headers["x-ms-legal-hold"] = self._deserialize("bool", response.headers.get("x-ms-legal-hold"))
|
1989
1978
|
|
1990
1979
|
if cls:
|
1991
|
-
return cls(pipeline_response, None, response_headers)
|
1992
|
-
|
1993
|
-
get_properties.metadata = {"url": "{url}"}
|
1980
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1994
1981
|
|
1995
1982
|
@distributed_trace
|
1996
1983
|
def delete( # pylint: disable=inconsistent-return-statements
|
@@ -2050,7 +2037,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2050
2037
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
2051
2038
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2052
2039
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2053
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2054
2040
|
:return: None or the result of cls(response)
|
2055
2041
|
:rtype: None
|
2056
2042
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2083,7 +2069,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2083
2069
|
_if_tags = modified_access_conditions.if_tags
|
2084
2070
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2085
2071
|
|
2086
|
-
|
2072
|
+
_request = build_delete_request(
|
2087
2073
|
url=self._config.url,
|
2088
2074
|
snapshot=snapshot,
|
2089
2075
|
version_id=version_id,
|
@@ -2098,16 +2084,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2098
2084
|
request_id_parameter=request_id_parameter,
|
2099
2085
|
blob_delete_type=blob_delete_type,
|
2100
2086
|
version=self._config.version,
|
2101
|
-
template_url=self.delete.metadata["url"],
|
2102
2087
|
headers=_headers,
|
2103
2088
|
params=_params,
|
2104
2089
|
)
|
2105
|
-
|
2106
|
-
|
2090
|
+
_request = _convert_request(_request)
|
2091
|
+
_request.url = self._client.format_url(_request.url)
|
2107
2092
|
|
2108
2093
|
_stream = False
|
2109
2094
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2110
|
-
|
2095
|
+
_request, stream=_stream, **kwargs
|
2111
2096
|
)
|
2112
2097
|
|
2113
2098
|
response = pipeline_response.http_response
|
@@ -2126,9 +2111,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2126
2111
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2127
2112
|
|
2128
2113
|
if cls:
|
2129
|
-
return cls(pipeline_response, None, response_headers)
|
2130
|
-
|
2131
|
-
delete.metadata = {"url": "{url}"}
|
2114
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2132
2115
|
|
2133
2116
|
@distributed_trace
|
2134
2117
|
def undelete( # pylint: disable=inconsistent-return-statements
|
@@ -2145,10 +2128,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2145
2128
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
2146
2129
|
value is None.
|
2147
2130
|
:type request_id_parameter: str
|
2148
|
-
:keyword comp: comp. Default value is "undelete". Note that overriding this default value may
|
2149
|
-
result in unsupported behavior.
|
2150
|
-
:paramtype comp: str
|
2151
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2152
2131
|
:return: None or the result of cls(response)
|
2153
2132
|
:rtype: None
|
2154
2133
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2167,22 +2146,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2167
2146
|
comp: Literal["undelete"] = kwargs.pop("comp", _params.pop("comp", "undelete"))
|
2168
2147
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
2169
2148
|
|
2170
|
-
|
2149
|
+
_request = build_undelete_request(
|
2171
2150
|
url=self._config.url,
|
2172
2151
|
timeout=timeout,
|
2173
2152
|
request_id_parameter=request_id_parameter,
|
2174
2153
|
comp=comp,
|
2175
2154
|
version=self._config.version,
|
2176
|
-
template_url=self.undelete.metadata["url"],
|
2177
2155
|
headers=_headers,
|
2178
2156
|
params=_params,
|
2179
2157
|
)
|
2180
|
-
|
2181
|
-
|
2158
|
+
_request = _convert_request(_request)
|
2159
|
+
_request.url = self._client.format_url(_request.url)
|
2182
2160
|
|
2183
2161
|
_stream = False
|
2184
2162
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2185
|
-
|
2163
|
+
_request, stream=_stream, **kwargs
|
2186
2164
|
)
|
2187
2165
|
|
2188
2166
|
response = pipeline_response.http_response
|
@@ -2201,9 +2179,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2201
2179
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2202
2180
|
|
2203
2181
|
if cls:
|
2204
|
-
return cls(pipeline_response, None, response_headers)
|
2205
|
-
|
2206
|
-
undelete.metadata = {"url": "{url}"}
|
2182
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2207
2183
|
|
2208
2184
|
@distributed_trace
|
2209
2185
|
def set_expiry( # pylint: disable=inconsistent-return-statements
|
@@ -2230,10 +2206,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2230
2206
|
:type request_id_parameter: str
|
2231
2207
|
:param expires_on: The time to set the blob to expiry. Default value is None.
|
2232
2208
|
:type expires_on: str
|
2233
|
-
:keyword comp: comp. Default value is "expiry". Note that overriding this default value may
|
2234
|
-
result in unsupported behavior.
|
2235
|
-
:paramtype comp: str
|
2236
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2237
2209
|
:return: None or the result of cls(response)
|
2238
2210
|
:rtype: None
|
2239
2211
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2252,7 +2224,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2252
2224
|
comp: Literal["expiry"] = kwargs.pop("comp", _params.pop("comp", "expiry"))
|
2253
2225
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
2254
2226
|
|
2255
|
-
|
2227
|
+
_request = build_set_expiry_request(
|
2256
2228
|
url=self._config.url,
|
2257
2229
|
expiry_options=expiry_options,
|
2258
2230
|
timeout=timeout,
|
@@ -2260,16 +2232,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2260
2232
|
expires_on=expires_on,
|
2261
2233
|
comp=comp,
|
2262
2234
|
version=self._config.version,
|
2263
|
-
template_url=self.set_expiry.metadata["url"],
|
2264
2235
|
headers=_headers,
|
2265
2236
|
params=_params,
|
2266
2237
|
)
|
2267
|
-
|
2268
|
-
|
2238
|
+
_request = _convert_request(_request)
|
2239
|
+
_request.url = self._client.format_url(_request.url)
|
2269
2240
|
|
2270
2241
|
_stream = False
|
2271
2242
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2272
|
-
|
2243
|
+
_request, stream=_stream, **kwargs
|
2273
2244
|
)
|
2274
2245
|
|
2275
2246
|
response = pipeline_response.http_response
|
@@ -2290,9 +2261,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2290
2261
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2291
2262
|
|
2292
2263
|
if cls:
|
2293
|
-
return cls(pipeline_response, None, response_headers)
|
2294
|
-
|
2295
|
-
set_expiry.metadata = {"url": "{url}"}
|
2264
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2296
2265
|
|
2297
2266
|
@distributed_trace
|
2298
2267
|
def set_http_headers( # pylint: disable=inconsistent-return-statements
|
@@ -2321,10 +2290,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2321
2290
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
2322
2291
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2323
2292
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2324
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
2325
|
-
result in unsupported behavior.
|
2326
|
-
:paramtype comp: str
|
2327
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2328
2293
|
:return: None or the result of cls(response)
|
2329
2294
|
:rtype: None
|
2330
2295
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2371,7 +2336,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2371
2336
|
_if_tags = modified_access_conditions.if_tags
|
2372
2337
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2373
2338
|
|
2374
|
-
|
2339
|
+
_request = build_set_http_headers_request(
|
2375
2340
|
url=self._config.url,
|
2376
2341
|
timeout=timeout,
|
2377
2342
|
blob_cache_control=_blob_cache_control,
|
@@ -2389,16 +2354,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2389
2354
|
request_id_parameter=request_id_parameter,
|
2390
2355
|
comp=comp,
|
2391
2356
|
version=self._config.version,
|
2392
|
-
template_url=self.set_http_headers.metadata["url"],
|
2393
2357
|
headers=_headers,
|
2394
2358
|
params=_params,
|
2395
2359
|
)
|
2396
|
-
|
2397
|
-
|
2360
|
+
_request = _convert_request(_request)
|
2361
|
+
_request.url = self._client.format_url(_request.url)
|
2398
2362
|
|
2399
2363
|
_stream = False
|
2400
2364
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2401
|
-
|
2365
|
+
_request, stream=_stream, **kwargs
|
2402
2366
|
)
|
2403
2367
|
|
2404
2368
|
response = pipeline_response.http_response
|
@@ -2422,9 +2386,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2422
2386
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2423
2387
|
|
2424
2388
|
if cls:
|
2425
|
-
return cls(pipeline_response, None, response_headers)
|
2426
|
-
|
2427
|
-
set_http_headers.metadata = {"url": "{url}"}
|
2389
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2428
2390
|
|
2429
2391
|
@distributed_trace
|
2430
2392
|
def set_immutability_policy( # pylint: disable=inconsistent-return-statements
|
@@ -2455,10 +2417,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2455
2417
|
:type immutability_policy_mode: str or ~azure.storage.blob.models.BlobImmutabilityPolicyMode
|
2456
2418
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2457
2419
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2458
|
-
:keyword comp: comp. Default value is "immutabilityPolicies". Note that overriding this default
|
2459
|
-
value may result in unsupported behavior.
|
2460
|
-
:paramtype comp: str
|
2461
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2462
2420
|
:return: None or the result of cls(response)
|
2463
2421
|
:rtype: None
|
2464
2422
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2481,7 +2439,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2481
2439
|
if modified_access_conditions is not None:
|
2482
2440
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2483
2441
|
|
2484
|
-
|
2442
|
+
_request = build_set_immutability_policy_request(
|
2485
2443
|
url=self._config.url,
|
2486
2444
|
timeout=timeout,
|
2487
2445
|
request_id_parameter=request_id_parameter,
|
@@ -2490,16 +2448,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2490
2448
|
immutability_policy_mode=immutability_policy_mode,
|
2491
2449
|
comp=comp,
|
2492
2450
|
version=self._config.version,
|
2493
|
-
template_url=self.set_immutability_policy.metadata["url"],
|
2494
2451
|
headers=_headers,
|
2495
2452
|
params=_params,
|
2496
2453
|
)
|
2497
|
-
|
2498
|
-
|
2454
|
+
_request = _convert_request(_request)
|
2455
|
+
_request.url = self._client.format_url(_request.url)
|
2499
2456
|
|
2500
2457
|
_stream = False
|
2501
2458
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2502
|
-
|
2459
|
+
_request, stream=_stream, **kwargs
|
2503
2460
|
)
|
2504
2461
|
|
2505
2462
|
response = pipeline_response.http_response
|
@@ -2524,9 +2481,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2524
2481
|
)
|
2525
2482
|
|
2526
2483
|
if cls:
|
2527
|
-
return cls(pipeline_response, None, response_headers)
|
2528
|
-
|
2529
|
-
set_immutability_policy.metadata = {"url": "{url}"}
|
2484
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2530
2485
|
|
2531
2486
|
@distributed_trace
|
2532
2487
|
def delete_immutability_policy( # pylint: disable=inconsistent-return-statements
|
@@ -2543,10 +2498,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2543
2498
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
2544
2499
|
value is None.
|
2545
2500
|
:type request_id_parameter: str
|
2546
|
-
:keyword comp: comp. Default value is "immutabilityPolicies". Note that overriding this default
|
2547
|
-
value may result in unsupported behavior.
|
2548
|
-
:paramtype comp: str
|
2549
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2550
2501
|
:return: None or the result of cls(response)
|
2551
2502
|
:rtype: None
|
2552
2503
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2565,22 +2516,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2565
2516
|
comp: Literal["immutabilityPolicies"] = kwargs.pop("comp", _params.pop("comp", "immutabilityPolicies"))
|
2566
2517
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
2567
2518
|
|
2568
|
-
|
2519
|
+
_request = build_delete_immutability_policy_request(
|
2569
2520
|
url=self._config.url,
|
2570
2521
|
timeout=timeout,
|
2571
2522
|
request_id_parameter=request_id_parameter,
|
2572
2523
|
comp=comp,
|
2573
2524
|
version=self._config.version,
|
2574
|
-
template_url=self.delete_immutability_policy.metadata["url"],
|
2575
2525
|
headers=_headers,
|
2576
2526
|
params=_params,
|
2577
2527
|
)
|
2578
|
-
|
2579
|
-
|
2528
|
+
_request = _convert_request(_request)
|
2529
|
+
_request.url = self._client.format_url(_request.url)
|
2580
2530
|
|
2581
2531
|
_stream = False
|
2582
2532
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2583
|
-
|
2533
|
+
_request, stream=_stream, **kwargs
|
2584
2534
|
)
|
2585
2535
|
|
2586
2536
|
response = pipeline_response.http_response
|
@@ -2599,9 +2549,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2599
2549
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2600
2550
|
|
2601
2551
|
if cls:
|
2602
|
-
return cls(pipeline_response, None, response_headers)
|
2603
|
-
|
2604
|
-
delete_immutability_policy.metadata = {"url": "{url}"}
|
2552
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2605
2553
|
|
2606
2554
|
@distributed_trace
|
2607
2555
|
def set_legal_hold( # pylint: disable=inconsistent-return-statements
|
@@ -2620,10 +2568,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2620
2568
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
2621
2569
|
value is None.
|
2622
2570
|
:type request_id_parameter: str
|
2623
|
-
:keyword comp: comp. Default value is "legalhold". Note that overriding this default value may
|
2624
|
-
result in unsupported behavior.
|
2625
|
-
:paramtype comp: str
|
2626
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2627
2571
|
:return: None or the result of cls(response)
|
2628
2572
|
:rtype: None
|
2629
2573
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2642,23 +2586,22 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2642
2586
|
comp: Literal["legalhold"] = kwargs.pop("comp", _params.pop("comp", "legalhold"))
|
2643
2587
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
2644
2588
|
|
2645
|
-
|
2589
|
+
_request = build_set_legal_hold_request(
|
2646
2590
|
url=self._config.url,
|
2647
2591
|
legal_hold=legal_hold,
|
2648
2592
|
timeout=timeout,
|
2649
2593
|
request_id_parameter=request_id_parameter,
|
2650
2594
|
comp=comp,
|
2651
2595
|
version=self._config.version,
|
2652
|
-
template_url=self.set_legal_hold.metadata["url"],
|
2653
2596
|
headers=_headers,
|
2654
2597
|
params=_params,
|
2655
2598
|
)
|
2656
|
-
|
2657
|
-
|
2599
|
+
_request = _convert_request(_request)
|
2600
|
+
_request.url = self._client.format_url(_request.url)
|
2658
2601
|
|
2659
2602
|
_stream = False
|
2660
2603
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2661
|
-
|
2604
|
+
_request, stream=_stream, **kwargs
|
2662
2605
|
)
|
2663
2606
|
|
2664
2607
|
response = pipeline_response.http_response
|
@@ -2678,9 +2621,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2678
2621
|
response_headers["x-ms-legal-hold"] = self._deserialize("bool", response.headers.get("x-ms-legal-hold"))
|
2679
2622
|
|
2680
2623
|
if cls:
|
2681
|
-
return cls(pipeline_response, None, response_headers)
|
2682
|
-
|
2683
|
-
set_legal_hold.metadata = {"url": "{url}"}
|
2624
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2684
2625
|
|
2685
2626
|
@distributed_trace
|
2686
2627
|
def set_metadata( # pylint: disable=inconsistent-return-statements
|
@@ -2722,10 +2663,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2722
2663
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
2723
2664
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2724
2665
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2725
|
-
:keyword comp: comp. Default value is "metadata". Note that overriding this default value may
|
2726
|
-
result in unsupported behavior.
|
2727
|
-
:paramtype comp: str
|
2728
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2729
2666
|
:return: None or the result of cls(response)
|
2730
2667
|
:rtype: None
|
2731
2668
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2769,7 +2706,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2769
2706
|
_if_tags = modified_access_conditions.if_tags
|
2770
2707
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2771
2708
|
|
2772
|
-
|
2709
|
+
_request = build_set_metadata_request(
|
2773
2710
|
url=self._config.url,
|
2774
2711
|
timeout=timeout,
|
2775
2712
|
metadata=metadata,
|
@@ -2786,16 +2723,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2786
2723
|
request_id_parameter=request_id_parameter,
|
2787
2724
|
comp=comp,
|
2788
2725
|
version=self._config.version,
|
2789
|
-
template_url=self.set_metadata.metadata["url"],
|
2790
2726
|
headers=_headers,
|
2791
2727
|
params=_params,
|
2792
2728
|
)
|
2793
|
-
|
2794
|
-
|
2729
|
+
_request = _convert_request(_request)
|
2730
|
+
_request.url = self._client.format_url(_request.url)
|
2795
2731
|
|
2796
2732
|
_stream = False
|
2797
2733
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2798
|
-
|
2734
|
+
_request, stream=_stream, **kwargs
|
2799
2735
|
)
|
2800
2736
|
|
2801
2737
|
response = pipeline_response.http_response
|
@@ -2826,9 +2762,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2826
2762
|
)
|
2827
2763
|
|
2828
2764
|
if cls:
|
2829
|
-
return cls(pipeline_response, None, response_headers)
|
2830
|
-
|
2831
|
-
set_metadata.metadata = {"url": "{url}"}
|
2765
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2832
2766
|
|
2833
2767
|
@distributed_trace
|
2834
2768
|
def acquire_lease( # pylint: disable=inconsistent-return-statements
|
@@ -2862,13 +2796,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2862
2796
|
:type request_id_parameter: str
|
2863
2797
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2864
2798
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2865
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
2866
|
-
result in unsupported behavior.
|
2867
|
-
:paramtype comp: str
|
2868
|
-
:keyword action: Describes what lease action to take. Default value is "acquire". Note that
|
2869
|
-
overriding this default value may result in unsupported behavior.
|
2870
|
-
:paramtype action: str
|
2871
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2872
2799
|
:return: None or the result of cls(response)
|
2873
2800
|
:rtype: None
|
2874
2801
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2900,7 +2827,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2900
2827
|
_if_tags = modified_access_conditions.if_tags
|
2901
2828
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2902
2829
|
|
2903
|
-
|
2830
|
+
_request = build_acquire_lease_request(
|
2904
2831
|
url=self._config.url,
|
2905
2832
|
timeout=timeout,
|
2906
2833
|
duration=duration,
|
@@ -2914,16 +2841,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2914
2841
|
comp=comp,
|
2915
2842
|
action=action,
|
2916
2843
|
version=self._config.version,
|
2917
|
-
template_url=self.acquire_lease.metadata["url"],
|
2918
2844
|
headers=_headers,
|
2919
2845
|
params=_params,
|
2920
2846
|
)
|
2921
|
-
|
2922
|
-
|
2847
|
+
_request = _convert_request(_request)
|
2848
|
+
_request.url = self._client.format_url(_request.url)
|
2923
2849
|
|
2924
2850
|
_stream = False
|
2925
2851
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2926
|
-
|
2852
|
+
_request, stream=_stream, **kwargs
|
2927
2853
|
)
|
2928
2854
|
|
2929
2855
|
response = pipeline_response.http_response
|
@@ -2945,9 +2871,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2945
2871
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2946
2872
|
|
2947
2873
|
if cls:
|
2948
|
-
return cls(pipeline_response, None, response_headers)
|
2949
|
-
|
2950
|
-
acquire_lease.metadata = {"url": "{url}"}
|
2874
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2951
2875
|
|
2952
2876
|
@distributed_trace
|
2953
2877
|
def release_lease( # pylint: disable=inconsistent-return-statements
|
@@ -2974,13 +2898,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2974
2898
|
:type request_id_parameter: str
|
2975
2899
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2976
2900
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2977
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
2978
|
-
result in unsupported behavior.
|
2979
|
-
:paramtype comp: str
|
2980
|
-
:keyword action: Describes what lease action to take. Default value is "release". Note that
|
2981
|
-
overriding this default value may result in unsupported behavior.
|
2982
|
-
:paramtype action: str
|
2983
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2984
2901
|
:return: None or the result of cls(response)
|
2985
2902
|
:rtype: None
|
2986
2903
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3012,7 +2929,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3012
2929
|
_if_tags = modified_access_conditions.if_tags
|
3013
2930
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
3014
2931
|
|
3015
|
-
|
2932
|
+
_request = build_release_lease_request(
|
3016
2933
|
url=self._config.url,
|
3017
2934
|
lease_id=lease_id,
|
3018
2935
|
timeout=timeout,
|
@@ -3025,16 +2942,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3025
2942
|
comp=comp,
|
3026
2943
|
action=action,
|
3027
2944
|
version=self._config.version,
|
3028
|
-
template_url=self.release_lease.metadata["url"],
|
3029
2945
|
headers=_headers,
|
3030
2946
|
params=_params,
|
3031
2947
|
)
|
3032
|
-
|
3033
|
-
|
2948
|
+
_request = _convert_request(_request)
|
2949
|
+
_request.url = self._client.format_url(_request.url)
|
3034
2950
|
|
3035
2951
|
_stream = False
|
3036
2952
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
3037
|
-
|
2953
|
+
_request, stream=_stream, **kwargs
|
3038
2954
|
)
|
3039
2955
|
|
3040
2956
|
response = pipeline_response.http_response
|
@@ -3055,9 +2971,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3055
2971
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
3056
2972
|
|
3057
2973
|
if cls:
|
3058
|
-
return cls(pipeline_response, None, response_headers)
|
3059
|
-
|
3060
|
-
release_lease.metadata = {"url": "{url}"}
|
2974
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
3061
2975
|
|
3062
2976
|
@distributed_trace
|
3063
2977
|
def renew_lease( # pylint: disable=inconsistent-return-statements
|
@@ -3084,13 +2998,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3084
2998
|
:type request_id_parameter: str
|
3085
2999
|
:param modified_access_conditions: Parameter group. Default value is None.
|
3086
3000
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
3087
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
3088
|
-
result in unsupported behavior.
|
3089
|
-
:paramtype comp: str
|
3090
|
-
:keyword action: Describes what lease action to take. Default value is "renew". Note that
|
3091
|
-
overriding this default value may result in unsupported behavior.
|
3092
|
-
:paramtype action: str
|
3093
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
3094
3001
|
:return: None or the result of cls(response)
|
3095
3002
|
:rtype: None
|
3096
3003
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3122,7 +3029,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3122
3029
|
_if_tags = modified_access_conditions.if_tags
|
3123
3030
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
3124
3031
|
|
3125
|
-
|
3032
|
+
_request = build_renew_lease_request(
|
3126
3033
|
url=self._config.url,
|
3127
3034
|
lease_id=lease_id,
|
3128
3035
|
timeout=timeout,
|
@@ -3135,16 +3042,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3135
3042
|
comp=comp,
|
3136
3043
|
action=action,
|
3137
3044
|
version=self._config.version,
|
3138
|
-
template_url=self.renew_lease.metadata["url"],
|
3139
3045
|
headers=_headers,
|
3140
3046
|
params=_params,
|
3141
3047
|
)
|
3142
|
-
|
3143
|
-
|
3048
|
+
_request = _convert_request(_request)
|
3049
|
+
_request.url = self._client.format_url(_request.url)
|
3144
3050
|
|
3145
3051
|
_stream = False
|
3146
3052
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
3147
|
-
|
3053
|
+
_request, stream=_stream, **kwargs
|
3148
3054
|
)
|
3149
3055
|
|
3150
3056
|
response = pipeline_response.http_response
|
@@ -3166,9 +3072,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3166
3072
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
3167
3073
|
|
3168
3074
|
if cls:
|
3169
|
-
return cls(pipeline_response, None, response_headers)
|
3170
|
-
|
3171
|
-
renew_lease.metadata = {"url": "{url}"}
|
3075
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
3172
3076
|
|
3173
3077
|
@distributed_trace
|
3174
3078
|
def change_lease( # pylint: disable=inconsistent-return-statements
|
@@ -3200,13 +3104,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3200
3104
|
:type request_id_parameter: str
|
3201
3105
|
:param modified_access_conditions: Parameter group. Default value is None.
|
3202
3106
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
3203
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
3204
|
-
result in unsupported behavior.
|
3205
|
-
:paramtype comp: str
|
3206
|
-
:keyword action: Describes what lease action to take. Default value is "change". Note that
|
3207
|
-
overriding this default value may result in unsupported behavior.
|
3208
|
-
:paramtype action: str
|
3209
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
3210
3107
|
:return: None or the result of cls(response)
|
3211
3108
|
:rtype: None
|
3212
3109
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3238,7 +3135,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3238
3135
|
_if_tags = modified_access_conditions.if_tags
|
3239
3136
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
3240
3137
|
|
3241
|
-
|
3138
|
+
_request = build_change_lease_request(
|
3242
3139
|
url=self._config.url,
|
3243
3140
|
lease_id=lease_id,
|
3244
3141
|
proposed_lease_id=proposed_lease_id,
|
@@ -3252,16 +3149,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3252
3149
|
comp=comp,
|
3253
3150
|
action=action,
|
3254
3151
|
version=self._config.version,
|
3255
|
-
template_url=self.change_lease.metadata["url"],
|
3256
3152
|
headers=_headers,
|
3257
3153
|
params=_params,
|
3258
3154
|
)
|
3259
|
-
|
3260
|
-
|
3155
|
+
_request = _convert_request(_request)
|
3156
|
+
_request.url = self._client.format_url(_request.url)
|
3261
3157
|
|
3262
3158
|
_stream = False
|
3263
3159
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
3264
|
-
|
3160
|
+
_request, stream=_stream, **kwargs
|
3265
3161
|
)
|
3266
3162
|
|
3267
3163
|
response = pipeline_response.http_response
|
@@ -3283,9 +3179,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3283
3179
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
3284
3180
|
|
3285
3181
|
if cls:
|
3286
|
-
return cls(pipeline_response, None, response_headers)
|
3287
|
-
|
3288
|
-
change_lease.metadata = {"url": "{url}"}
|
3182
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
3289
3183
|
|
3290
3184
|
@distributed_trace
|
3291
3185
|
def break_lease( # pylint: disable=inconsistent-return-statements
|
@@ -3318,13 +3212,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3318
3212
|
:type request_id_parameter: str
|
3319
3213
|
:param modified_access_conditions: Parameter group. Default value is None.
|
3320
3214
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
3321
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
3322
|
-
result in unsupported behavior.
|
3323
|
-
:paramtype comp: str
|
3324
|
-
:keyword action: Describes what lease action to take. Default value is "break". Note that
|
3325
|
-
overriding this default value may result in unsupported behavior.
|
3326
|
-
:paramtype action: str
|
3327
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
3328
3215
|
:return: None or the result of cls(response)
|
3329
3216
|
:rtype: None
|
3330
3217
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3356,7 +3243,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3356
3243
|
_if_tags = modified_access_conditions.if_tags
|
3357
3244
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
3358
3245
|
|
3359
|
-
|
3246
|
+
_request = build_break_lease_request(
|
3360
3247
|
url=self._config.url,
|
3361
3248
|
timeout=timeout,
|
3362
3249
|
break_period=break_period,
|
@@ -3369,16 +3256,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3369
3256
|
comp=comp,
|
3370
3257
|
action=action,
|
3371
3258
|
version=self._config.version,
|
3372
|
-
template_url=self.break_lease.metadata["url"],
|
3373
3259
|
headers=_headers,
|
3374
3260
|
params=_params,
|
3375
3261
|
)
|
3376
|
-
|
3377
|
-
|
3262
|
+
_request = _convert_request(_request)
|
3263
|
+
_request.url = self._client.format_url(_request.url)
|
3378
3264
|
|
3379
3265
|
_stream = False
|
3380
3266
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
3381
|
-
|
3267
|
+
_request, stream=_stream, **kwargs
|
3382
3268
|
)
|
3383
3269
|
|
3384
3270
|
response = pipeline_response.http_response
|
@@ -3400,9 +3286,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3400
3286
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
3401
3287
|
|
3402
3288
|
if cls:
|
3403
|
-
return cls(pipeline_response, None, response_headers)
|
3404
|
-
|
3405
|
-
break_lease.metadata = {"url": "{url}"}
|
3289
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
3406
3290
|
|
3407
3291
|
@distributed_trace
|
3408
3292
|
def create_snapshot( # pylint: disable=inconsistent-return-statements
|
@@ -3443,10 +3327,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3443
3327
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
3444
3328
|
:param lease_access_conditions: Parameter group. Default value is None.
|
3445
3329
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
3446
|
-
:keyword comp: comp. Default value is "snapshot". Note that overriding this default value may
|
3447
|
-
result in unsupported behavior.
|
3448
|
-
:paramtype comp: str
|
3449
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
3450
3330
|
:return: None or the result of cls(response)
|
3451
3331
|
:rtype: None
|
3452
3332
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3490,7 +3370,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3490
3370
|
if lease_access_conditions is not None:
|
3491
3371
|
_lease_id = lease_access_conditions.lease_id
|
3492
3372
|
|
3493
|
-
|
3373
|
+
_request = build_create_snapshot_request(
|
3494
3374
|
url=self._config.url,
|
3495
3375
|
timeout=timeout,
|
3496
3376
|
metadata=metadata,
|
@@ -3507,16 +3387,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3507
3387
|
request_id_parameter=request_id_parameter,
|
3508
3388
|
comp=comp,
|
3509
3389
|
version=self._config.version,
|
3510
|
-
template_url=self.create_snapshot.metadata["url"],
|
3511
3390
|
headers=_headers,
|
3512
3391
|
params=_params,
|
3513
3392
|
)
|
3514
|
-
|
3515
|
-
|
3393
|
+
_request = _convert_request(_request)
|
3394
|
+
_request.url = self._client.format_url(_request.url)
|
3516
3395
|
|
3517
3396
|
_stream = False
|
3518
3397
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
3519
|
-
|
3398
|
+
_request, stream=_stream, **kwargs
|
3520
3399
|
)
|
3521
3400
|
|
3522
3401
|
response = pipeline_response.http_response
|
@@ -3542,9 +3421,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3542
3421
|
)
|
3543
3422
|
|
3544
3423
|
if cls:
|
3545
|
-
return cls(pipeline_response, None, response_headers)
|
3546
|
-
|
3547
|
-
create_snapshot.metadata = {"url": "{url}"}
|
3424
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
3548
3425
|
|
3549
3426
|
@distributed_trace
|
3550
3427
|
def start_copy_from_url( # pylint: disable=inconsistent-return-statements
|
@@ -3617,7 +3494,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3617
3494
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
3618
3495
|
:param lease_access_conditions: Parameter group. Default value is None.
|
3619
3496
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
3620
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
3621
3497
|
:return: None or the result of cls(response)
|
3622
3498
|
:rtype: None
|
3623
3499
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3661,7 +3537,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3661
3537
|
if lease_access_conditions is not None:
|
3662
3538
|
_lease_id = lease_access_conditions.lease_id
|
3663
3539
|
|
3664
|
-
|
3540
|
+
_request = build_start_copy_from_url_request(
|
3665
3541
|
url=self._config.url,
|
3666
3542
|
copy_source=copy_source,
|
3667
3543
|
timeout=timeout,
|
@@ -3686,16 +3562,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3686
3562
|
immutability_policy_mode=immutability_policy_mode,
|
3687
3563
|
legal_hold=legal_hold,
|
3688
3564
|
version=self._config.version,
|
3689
|
-
template_url=self.start_copy_from_url.metadata["url"],
|
3690
3565
|
headers=_headers,
|
3691
3566
|
params=_params,
|
3692
3567
|
)
|
3693
|
-
|
3694
|
-
|
3568
|
+
_request = _convert_request(_request)
|
3569
|
+
_request.url = self._client.format_url(_request.url)
|
3695
3570
|
|
3696
3571
|
_stream = False
|
3697
3572
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
3698
|
-
|
3573
|
+
_request, stream=_stream, **kwargs
|
3699
3574
|
)
|
3700
3575
|
|
3701
3576
|
response = pipeline_response.http_response
|
@@ -3719,9 +3594,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3719
3594
|
response_headers["x-ms-copy-status"] = self._deserialize("str", response.headers.get("x-ms-copy-status"))
|
3720
3595
|
|
3721
3596
|
if cls:
|
3722
|
-
return cls(pipeline_response, None, response_headers)
|
3723
|
-
|
3724
|
-
start_copy_from_url.metadata = {"url": "{url}"}
|
3597
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
3725
3598
|
|
3726
3599
|
@distributed_trace
|
3727
3600
|
def copy_from_url( # pylint: disable=inconsistent-return-statements
|
@@ -3803,11 +3676,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3803
3676
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
3804
3677
|
:param cpk_scope_info: Parameter group. Default value is None.
|
3805
3678
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
3806
|
-
:keyword x_ms_requires_sync: This header indicates that this is a synchronous Copy Blob From
|
3807
|
-
URL instead of a Asynchronous Copy Blob. Default value is "true". Note that overriding this
|
3808
|
-
default value may result in unsupported behavior.
|
3809
|
-
:paramtype x_ms_requires_sync: str
|
3810
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
3811
3679
|
:return: None or the result of cls(response)
|
3812
3680
|
:rtype: None
|
3813
3681
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3855,7 +3723,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3855
3723
|
if cpk_scope_info is not None:
|
3856
3724
|
_encryption_scope = cpk_scope_info.encryption_scope
|
3857
3725
|
|
3858
|
-
|
3726
|
+
_request = build_copy_from_url_request(
|
3859
3727
|
url=self._config.url,
|
3860
3728
|
copy_source=copy_source,
|
3861
3729
|
timeout=timeout,
|
@@ -3882,16 +3750,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3882
3750
|
copy_source_tags=copy_source_tags,
|
3883
3751
|
x_ms_requires_sync=x_ms_requires_sync,
|
3884
3752
|
version=self._config.version,
|
3885
|
-
template_url=self.copy_from_url.metadata["url"],
|
3886
3753
|
headers=_headers,
|
3887
3754
|
params=_params,
|
3888
3755
|
)
|
3889
|
-
|
3890
|
-
|
3756
|
+
_request = _convert_request(_request)
|
3757
|
+
_request.url = self._client.format_url(_request.url)
|
3891
3758
|
|
3892
3759
|
_stream = False
|
3893
3760
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
3894
|
-
|
3761
|
+
_request, stream=_stream, **kwargs
|
3895
3762
|
)
|
3896
3763
|
|
3897
3764
|
response = pipeline_response.http_response
|
@@ -3922,9 +3789,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3922
3789
|
)
|
3923
3790
|
|
3924
3791
|
if cls:
|
3925
|
-
return cls(pipeline_response, None, response_headers)
|
3926
|
-
|
3927
|
-
copy_from_url.metadata = {"url": "{url}"}
|
3792
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
3928
3793
|
|
3929
3794
|
@distributed_trace
|
3930
3795
|
def abort_copy_from_url( # pylint: disable=inconsistent-return-statements
|
@@ -3952,13 +3817,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3952
3817
|
:type request_id_parameter: str
|
3953
3818
|
:param lease_access_conditions: Parameter group. Default value is None.
|
3954
3819
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
3955
|
-
:keyword comp: comp. Default value is "copy". Note that overriding this default value may
|
3956
|
-
result in unsupported behavior.
|
3957
|
-
:paramtype comp: str
|
3958
|
-
:keyword copy_action_abort_constant: Copy action. Default value is "abort". Note that
|
3959
|
-
overriding this default value may result in unsupported behavior.
|
3960
|
-
:paramtype copy_action_abort_constant: str
|
3961
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
3962
3820
|
:return: None or the result of cls(response)
|
3963
3821
|
:rtype: None
|
3964
3822
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -3984,7 +3842,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3984
3842
|
if lease_access_conditions is not None:
|
3985
3843
|
_lease_id = lease_access_conditions.lease_id
|
3986
3844
|
|
3987
|
-
|
3845
|
+
_request = build_abort_copy_from_url_request(
|
3988
3846
|
url=self._config.url,
|
3989
3847
|
copy_id=copy_id,
|
3990
3848
|
timeout=timeout,
|
@@ -3993,16 +3851,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3993
3851
|
comp=comp,
|
3994
3852
|
copy_action_abort_constant=copy_action_abort_constant,
|
3995
3853
|
version=self._config.version,
|
3996
|
-
template_url=self.abort_copy_from_url.metadata["url"],
|
3997
3854
|
headers=_headers,
|
3998
3855
|
params=_params,
|
3999
3856
|
)
|
4000
|
-
|
4001
|
-
|
3857
|
+
_request = _convert_request(_request)
|
3858
|
+
_request.url = self._client.format_url(_request.url)
|
4002
3859
|
|
4003
3860
|
_stream = False
|
4004
3861
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
4005
|
-
|
3862
|
+
_request, stream=_stream, **kwargs
|
4006
3863
|
)
|
4007
3864
|
|
4008
3865
|
response = pipeline_response.http_response
|
@@ -4021,9 +3878,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4021
3878
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
4022
3879
|
|
4023
3880
|
if cls:
|
4024
|
-
return cls(pipeline_response, None, response_headers)
|
4025
|
-
|
4026
|
-
abort_copy_from_url.metadata = {"url": "{url}"}
|
3881
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
4027
3882
|
|
4028
3883
|
@distributed_trace
|
4029
3884
|
def set_tier( # pylint: disable=inconsistent-return-statements
|
@@ -4074,10 +3929,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4074
3929
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
4075
3930
|
:param modified_access_conditions: Parameter group. Default value is None.
|
4076
3931
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
4077
|
-
:keyword comp: comp. Default value is "tier". Note that overriding this default value may
|
4078
|
-
result in unsupported behavior.
|
4079
|
-
:paramtype comp: str
|
4080
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
4081
3932
|
:return: None or the result of cls(response)
|
4082
3933
|
:rtype: None
|
4083
3934
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -4103,7 +3954,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4103
3954
|
if modified_access_conditions is not None:
|
4104
3955
|
_if_tags = modified_access_conditions.if_tags
|
4105
3956
|
|
4106
|
-
|
3957
|
+
_request = build_set_tier_request(
|
4107
3958
|
url=self._config.url,
|
4108
3959
|
tier=tier,
|
4109
3960
|
snapshot=snapshot,
|
@@ -4115,16 +3966,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4115
3966
|
if_tags=_if_tags,
|
4116
3967
|
comp=comp,
|
4117
3968
|
version=self._config.version,
|
4118
|
-
template_url=self.set_tier.metadata["url"],
|
4119
3969
|
headers=_headers,
|
4120
3970
|
params=_params,
|
4121
3971
|
)
|
4122
|
-
|
4123
|
-
|
3972
|
+
_request = _convert_request(_request)
|
3973
|
+
_request.url = self._client.format_url(_request.url)
|
4124
3974
|
|
4125
3975
|
_stream = False
|
4126
3976
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
4127
|
-
|
3977
|
+
_request, stream=_stream, **kwargs
|
4128
3978
|
)
|
4129
3979
|
|
4130
3980
|
response = pipeline_response.http_response
|
@@ -4150,21 +4000,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4150
4000
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
4151
4001
|
|
4152
4002
|
if cls:
|
4153
|
-
return cls(pipeline_response, None, response_headers)
|
4154
|
-
|
4155
|
-
set_tier.metadata = {"url": "{url}"}
|
4003
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
4156
4004
|
|
4157
4005
|
@distributed_trace
|
4158
4006
|
def get_account_info(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements
|
4159
4007
|
"""Returns the sku name and account kind.
|
4160
4008
|
|
4161
|
-
:keyword restype: restype. Default value is "account". Note that overriding this default value
|
4162
|
-
may result in unsupported behavior.
|
4163
|
-
:paramtype restype: str
|
4164
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
4165
|
-
result in unsupported behavior.
|
4166
|
-
:paramtype comp: str
|
4167
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
4168
4009
|
:return: None or the result of cls(response)
|
4169
4010
|
:rtype: None
|
4170
4011
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -4184,21 +4025,20 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4184
4025
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
4185
4026
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
4186
4027
|
|
4187
|
-
|
4028
|
+
_request = build_get_account_info_request(
|
4188
4029
|
url=self._config.url,
|
4189
4030
|
restype=restype,
|
4190
4031
|
comp=comp,
|
4191
4032
|
version=self._config.version,
|
4192
|
-
template_url=self.get_account_info.metadata["url"],
|
4193
4033
|
headers=_headers,
|
4194
4034
|
params=_params,
|
4195
4035
|
)
|
4196
|
-
|
4197
|
-
|
4036
|
+
_request = _convert_request(_request)
|
4037
|
+
_request.url = self._client.format_url(_request.url)
|
4198
4038
|
|
4199
4039
|
_stream = False
|
4200
4040
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
4201
|
-
|
4041
|
+
_request, stream=_stream, **kwargs
|
4202
4042
|
)
|
4203
4043
|
|
4204
4044
|
response = pipeline_response.http_response
|
@@ -4219,9 +4059,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4219
4059
|
response_headers["x-ms-account-kind"] = self._deserialize("str", response.headers.get("x-ms-account-kind"))
|
4220
4060
|
|
4221
4061
|
if cls:
|
4222
|
-
return cls(pipeline_response, None, response_headers)
|
4223
|
-
|
4224
|
-
get_account_info.metadata = {"url": "{url}"}
|
4062
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
4225
4063
|
|
4226
4064
|
@distributed_trace
|
4227
4065
|
def query(
|
@@ -4261,11 +4099,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4261
4099
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
4262
4100
|
:param query_request: the query request. Default value is None.
|
4263
4101
|
:type query_request: ~azure.storage.blob.models.QueryRequest
|
4264
|
-
:
|
4265
|
-
result in unsupported behavior.
|
4266
|
-
:paramtype comp: str
|
4267
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
4268
|
-
:return: Iterator of the response bytes or the result of cls(response)
|
4102
|
+
:return: Iterator[bytes] or the result of cls(response)
|
4269
4103
|
:rtype: Iterator[bytes]
|
4270
4104
|
:raises ~azure.core.exceptions.HttpResponseError:
|
4271
4105
|
"""
|
@@ -4310,7 +4144,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4310
4144
|
else:
|
4311
4145
|
_content = None
|
4312
4146
|
|
4313
|
-
|
4147
|
+
_request = build_query_request(
|
4314
4148
|
url=self._config.url,
|
4315
4149
|
snapshot=snapshot,
|
4316
4150
|
timeout=timeout,
|
@@ -4328,16 +4162,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4328
4162
|
content_type=content_type,
|
4329
4163
|
version=self._config.version,
|
4330
4164
|
content=_content,
|
4331
|
-
template_url=self.query.metadata["url"],
|
4332
4165
|
headers=_headers,
|
4333
4166
|
params=_params,
|
4334
4167
|
)
|
4335
|
-
|
4336
|
-
|
4168
|
+
_request = _convert_request(_request)
|
4169
|
+
_request.url = self._client.format_url(_request.url)
|
4337
4170
|
|
4338
4171
|
_stream = True
|
4339
4172
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
4340
|
-
|
4173
|
+
_request, stream=_stream, **kwargs
|
4341
4174
|
)
|
4342
4175
|
|
4343
4176
|
response = pipeline_response.http_response
|
@@ -4476,8 +4309,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4476
4309
|
|
4477
4310
|
return deserialized # type: ignore
|
4478
4311
|
|
4479
|
-
query.metadata = {"url": "{url}"}
|
4480
|
-
|
4481
4312
|
@distributed_trace
|
4482
4313
|
def get_tags(
|
4483
4314
|
self,
|
@@ -4514,10 +4345,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4514
4345
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
4515
4346
|
:param lease_access_conditions: Parameter group. Default value is None.
|
4516
4347
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
4517
|
-
:keyword comp: comp. Default value is "tags". Note that overriding this default value may
|
4518
|
-
result in unsupported behavior.
|
4519
|
-
:paramtype comp: str
|
4520
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
4521
4348
|
:return: BlobTags or the result of cls(response)
|
4522
4349
|
:rtype: ~azure.storage.blob.models.BlobTags
|
4523
4350
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -4543,7 +4370,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4543
4370
|
if lease_access_conditions is not None:
|
4544
4371
|
_lease_id = lease_access_conditions.lease_id
|
4545
4372
|
|
4546
|
-
|
4373
|
+
_request = build_get_tags_request(
|
4547
4374
|
url=self._config.url,
|
4548
4375
|
timeout=timeout,
|
4549
4376
|
request_id_parameter=request_id_parameter,
|
@@ -4553,16 +4380,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4553
4380
|
lease_id=_lease_id,
|
4554
4381
|
comp=comp,
|
4555
4382
|
version=self._config.version,
|
4556
|
-
template_url=self.get_tags.metadata["url"],
|
4557
4383
|
headers=_headers,
|
4558
4384
|
params=_params,
|
4559
4385
|
)
|
4560
|
-
|
4561
|
-
|
4386
|
+
_request = _convert_request(_request)
|
4387
|
+
_request.url = self._client.format_url(_request.url)
|
4562
4388
|
|
4563
4389
|
_stream = False
|
4564
4390
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
4565
|
-
|
4391
|
+
_request, stream=_stream, **kwargs
|
4566
4392
|
)
|
4567
4393
|
|
4568
4394
|
response = pipeline_response.http_response
|
@@ -4583,11 +4409,9 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4583
4409
|
deserialized = self._deserialize("BlobTags", pipeline_response)
|
4584
4410
|
|
4585
4411
|
if cls:
|
4586
|
-
return cls(pipeline_response, deserialized, response_headers)
|
4587
|
-
|
4588
|
-
return deserialized
|
4412
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
4589
4413
|
|
4590
|
-
|
4414
|
+
return deserialized # type: ignore
|
4591
4415
|
|
4592
4416
|
@distributed_trace
|
4593
4417
|
def set_tags( # pylint: disable=inconsistent-return-statements
|
@@ -4629,10 +4453,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4629
4453
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
4630
4454
|
:param tags: Blob tags. Default value is None.
|
4631
4455
|
:type tags: ~azure.storage.blob.models.BlobTags
|
4632
|
-
:keyword comp: comp. Default value is "tags". Note that overriding this default value may
|
4633
|
-
result in unsupported behavior.
|
4634
|
-
:paramtype comp: str
|
4635
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
4636
4456
|
:return: None or the result of cls(response)
|
4637
4457
|
:rtype: None
|
4638
4458
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -4663,7 +4483,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4663
4483
|
else:
|
4664
4484
|
_content = None
|
4665
4485
|
|
4666
|
-
|
4486
|
+
_request = build_set_tags_request(
|
4667
4487
|
url=self._config.url,
|
4668
4488
|
timeout=timeout,
|
4669
4489
|
version_id=version_id,
|
@@ -4676,16 +4496,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4676
4496
|
content_type=content_type,
|
4677
4497
|
version=self._config.version,
|
4678
4498
|
content=_content,
|
4679
|
-
template_url=self.set_tags.metadata["url"],
|
4680
4499
|
headers=_headers,
|
4681
4500
|
params=_params,
|
4682
4501
|
)
|
4683
|
-
|
4684
|
-
|
4502
|
+
_request = _convert_request(_request)
|
4503
|
+
_request.url = self._client.format_url(_request.url)
|
4685
4504
|
|
4686
4505
|
_stream = False
|
4687
4506
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
4688
|
-
|
4507
|
+
_request, stream=_stream, **kwargs
|
4689
4508
|
)
|
4690
4509
|
|
4691
4510
|
response = pipeline_response.http_response
|
@@ -4704,6 +4523,4 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4704
4523
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
4705
4524
|
|
4706
4525
|
if cls:
|
4707
|
-
return cls(pipeline_response, None, response_headers)
|
4708
|
-
|
4709
|
-
set_tags.metadata = {"url": "{url}"}
|
4526
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|