azure-storage-blob 12.19.1__py3-none-any.whl → 12.20.0b1__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 +7 -5
- azure/storage/blob/_blob_client.py +12 -4
- azure/storage/blob/_blob_service_client.py +4 -3
- azure/storage/blob/_container_client.py +28 -12
- 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/_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 +112 -20
- 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 +2 -3
- azure/storage/blob/_shared_access_signature.py +37 -27
- azure/storage/blob/_upload_helpers.py +4 -7
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +2 -2
- azure/storage/blob/aio/_blob_client_async.py +16 -5
- azure/storage/blob/aio/_blob_service_client_async.py +3 -1
- azure/storage/blob/aio/_container_client_async.py +25 -8
- azure/storage/blob/aio/_download_async.py +9 -9
- azure/storage/blob/aio/_encryption_async.py +72 -0
- azure/storage/blob/aio/_upload_helpers.py +8 -10
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0b1.dist-info}/METADATA +9 -9
- azure_storage_blob-12.20.0b1.dist-info/RECORD +81 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0b1.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.0b1.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0b1.dist-info}/top_level.txt +0 -0
@@ -104,7 +104,7 @@ class AppendPositionAccessConditions(_serialization.Model):
|
|
104
104
|
class ArrowConfiguration(_serialization.Model):
|
105
105
|
"""Groups the settings used for formatting the response if the response should be Arrow formatted.
|
106
106
|
|
107
|
-
All required parameters must be populated in order to send to
|
107
|
+
All required parameters must be populated in order to send to server.
|
108
108
|
|
109
109
|
:ivar schema: Required.
|
110
110
|
:vartype schema: list[~azure.storage.blob.models.ArrowField]
|
@@ -135,7 +135,7 @@ class ArrowConfiguration(_serialization.Model):
|
|
135
135
|
class ArrowField(_serialization.Model):
|
136
136
|
"""Groups settings regarding specific field of an arrow schema.
|
137
137
|
|
138
|
-
All required parameters must be populated in order to send to
|
138
|
+
All required parameters must be populated in order to send to server.
|
139
139
|
|
140
140
|
:ivar type: Required.
|
141
141
|
:vartype type: str
|
@@ -188,7 +188,7 @@ class ArrowField(_serialization.Model):
|
|
188
188
|
class BlobFlatListSegment(_serialization.Model):
|
189
189
|
"""BlobFlatListSegment.
|
190
190
|
|
191
|
-
All required parameters must be populated in order to send to
|
191
|
+
All required parameters must be populated in order to send to server.
|
192
192
|
|
193
193
|
:ivar blob_items: Required.
|
194
194
|
:vartype blob_items: list[~azure.storage.blob.models.BlobItemInternal]
|
@@ -215,7 +215,7 @@ class BlobFlatListSegment(_serialization.Model):
|
|
215
215
|
class BlobHierarchyListSegment(_serialization.Model):
|
216
216
|
"""BlobHierarchyListSegment.
|
217
217
|
|
218
|
-
All required parameters must be populated in order to send to
|
218
|
+
All required parameters must be populated in order to send to server.
|
219
219
|
|
220
220
|
:ivar blob_prefixes:
|
221
221
|
:vartype blob_prefixes: list[~azure.storage.blob.models.BlobPrefix]
|
@@ -324,7 +324,7 @@ class BlobHTTPHeaders(_serialization.Model):
|
|
324
324
|
class BlobItemInternal(_serialization.Model):
|
325
325
|
"""An Azure Storage blob.
|
326
326
|
|
327
|
-
All required parameters must be populated in order to send to
|
327
|
+
All required parameters must be populated in order to send to server.
|
328
328
|
|
329
329
|
:ivar name: Required.
|
330
330
|
:vartype name: ~azure.storage.blob.models.BlobName
|
@@ -479,7 +479,7 @@ class BlobName(_serialization.Model):
|
|
479
479
|
class BlobPrefix(_serialization.Model):
|
480
480
|
"""BlobPrefix.
|
481
481
|
|
482
|
-
All required parameters must be populated in order to send to
|
482
|
+
All required parameters must be populated in order to send to server.
|
483
483
|
|
484
484
|
:ivar name: Required.
|
485
485
|
:vartype name: ~azure.storage.blob.models.BlobName
|
@@ -505,7 +505,7 @@ class BlobPrefix(_serialization.Model):
|
|
505
505
|
class BlobPropertiesInternal(_serialization.Model): # pylint: disable=too-many-instance-attributes
|
506
506
|
"""Properties of a blob.
|
507
507
|
|
508
|
-
All required parameters must be populated in order to send to
|
508
|
+
All required parameters must be populated in order to send to server.
|
509
509
|
|
510
510
|
:ivar creation_time:
|
511
511
|
:vartype creation_time: ~datetime.datetime
|
@@ -822,7 +822,7 @@ class BlobPropertiesInternal(_serialization.Model): # pylint: disable=too-many-
|
|
822
822
|
class BlobTag(_serialization.Model):
|
823
823
|
"""BlobTag.
|
824
824
|
|
825
|
-
All required parameters must be populated in order to send to
|
825
|
+
All required parameters must be populated in order to send to server.
|
826
826
|
|
827
827
|
:ivar key: Required.
|
828
828
|
:vartype key: str
|
@@ -856,7 +856,7 @@ class BlobTag(_serialization.Model):
|
|
856
856
|
class BlobTags(_serialization.Model):
|
857
857
|
"""Blob tags.
|
858
858
|
|
859
|
-
All required parameters must be populated in order to send to
|
859
|
+
All required parameters must be populated in order to send to server.
|
860
860
|
|
861
861
|
:ivar blob_tag_set: Required.
|
862
862
|
:vartype blob_tag_set: list[~azure.storage.blob.models.BlobTag]
|
@@ -887,7 +887,7 @@ class BlobTags(_serialization.Model):
|
|
887
887
|
class Block(_serialization.Model):
|
888
888
|
"""Represents a single block in a block blob. It describes the block's ID and size.
|
889
889
|
|
890
|
-
All required parameters must be populated in order to send to
|
890
|
+
All required parameters must be populated in order to send to server.
|
891
891
|
|
892
892
|
:ivar name: The base64 encoded block ID. Required.
|
893
893
|
:vartype name: str
|
@@ -992,7 +992,7 @@ class BlockLookupList(_serialization.Model):
|
|
992
992
|
class ClearRange(_serialization.Model):
|
993
993
|
"""ClearRange.
|
994
994
|
|
995
|
-
All required parameters must be populated in order to send to
|
995
|
+
All required parameters must be populated in order to send to server.
|
996
996
|
|
997
997
|
:ivar start: Required.
|
998
998
|
:vartype start: int
|
@@ -1064,7 +1064,7 @@ class ContainerCpkScopeInfo(_serialization.Model):
|
|
1064
1064
|
class ContainerItem(_serialization.Model):
|
1065
1065
|
"""An Azure Storage container.
|
1066
1066
|
|
1067
|
-
All required parameters must be populated in order to send to
|
1067
|
+
All required parameters must be populated in order to send to server.
|
1068
1068
|
|
1069
1069
|
:ivar name: Required.
|
1070
1070
|
:vartype name: str
|
@@ -1125,7 +1125,7 @@ class ContainerItem(_serialization.Model):
|
|
1125
1125
|
class ContainerProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes
|
1126
1126
|
"""Properties of a container.
|
1127
1127
|
|
1128
|
-
All required parameters must be populated in order to send to
|
1128
|
+
All required parameters must be populated in order to send to server.
|
1129
1129
|
|
1130
1130
|
:ivar last_modified: Required.
|
1131
1131
|
:vartype last_modified: ~datetime.datetime
|
@@ -1251,7 +1251,7 @@ class CorsRule(_serialization.Model):
|
|
1251
1251
|
policy that prevents a web page from calling APIs in a different domain; CORS provides a secure
|
1252
1252
|
way to allow one domain (the origin domain) to call APIs in another domain.
|
1253
1253
|
|
1254
|
-
All required parameters must be populated in order to send to
|
1254
|
+
All required parameters must be populated in order to send to server.
|
1255
1255
|
|
1256
1256
|
:ivar allowed_origins: The origin domains that are permitted to make a request against the
|
1257
1257
|
storage service via CORS. The origin domain is the domain from which the request originates.
|
@@ -1460,7 +1460,7 @@ class DelimitedTextConfiguration(_serialization.Model):
|
|
1460
1460
|
class FilterBlobItem(_serialization.Model):
|
1461
1461
|
"""Blob info from a Filter Blobs API call.
|
1462
1462
|
|
1463
|
-
All required parameters must be populated in order to send to
|
1463
|
+
All required parameters must be populated in order to send to server.
|
1464
1464
|
|
1465
1465
|
:ivar name: Required.
|
1466
1466
|
:vartype name: str
|
@@ -1521,7 +1521,7 @@ class FilterBlobItem(_serialization.Model):
|
|
1521
1521
|
class FilterBlobSegment(_serialization.Model):
|
1522
1522
|
"""The result of a Filter Blobs API call.
|
1523
1523
|
|
1524
|
-
All required parameters must be populated in order to send to
|
1524
|
+
All required parameters must be populated in order to send to server.
|
1525
1525
|
|
1526
1526
|
:ivar service_endpoint: Required.
|
1527
1527
|
:vartype service_endpoint: str
|
@@ -1580,7 +1580,7 @@ class FilterBlobSegment(_serialization.Model):
|
|
1580
1580
|
class GeoReplication(_serialization.Model):
|
1581
1581
|
"""Geo-Replication information for the Secondary Storage Service.
|
1582
1582
|
|
1583
|
-
All required parameters must be populated in order to send to
|
1583
|
+
All required parameters must be populated in order to send to server.
|
1584
1584
|
|
1585
1585
|
:ivar status: The status of the secondary location. Required. Known values are: "live",
|
1586
1586
|
"bootstrap", and "unavailable".
|
@@ -1646,7 +1646,7 @@ class JsonTextConfiguration(_serialization.Model):
|
|
1646
1646
|
class KeyInfo(_serialization.Model):
|
1647
1647
|
"""Key information.
|
1648
1648
|
|
1649
|
-
All required parameters must be populated in order to send to
|
1649
|
+
All required parameters must be populated in order to send to server.
|
1650
1650
|
|
1651
1651
|
:ivar start: The date-time the key is active in ISO 8601 UTC time. Required.
|
1652
1652
|
:vartype start: str
|
@@ -1701,7 +1701,7 @@ class LeaseAccessConditions(_serialization.Model):
|
|
1701
1701
|
class ListBlobsFlatSegmentResponse(_serialization.Model):
|
1702
1702
|
"""An enumeration of blobs.
|
1703
1703
|
|
1704
|
-
All required parameters must be populated in order to send to
|
1704
|
+
All required parameters must be populated in order to send to server.
|
1705
1705
|
|
1706
1706
|
:ivar service_endpoint: Required.
|
1707
1707
|
:vartype service_endpoint: str
|
@@ -1777,7 +1777,7 @@ class ListBlobsFlatSegmentResponse(_serialization.Model):
|
|
1777
1777
|
class ListBlobsHierarchySegmentResponse(_serialization.Model):
|
1778
1778
|
"""An enumeration of blobs.
|
1779
1779
|
|
1780
|
-
All required parameters must be populated in order to send to
|
1780
|
+
All required parameters must be populated in order to send to server.
|
1781
1781
|
|
1782
1782
|
:ivar service_endpoint: Required.
|
1783
1783
|
:vartype service_endpoint: str
|
@@ -1860,7 +1860,7 @@ class ListBlobsHierarchySegmentResponse(_serialization.Model):
|
|
1860
1860
|
class ListContainersSegmentResponse(_serialization.Model):
|
1861
1861
|
"""An enumeration of containers.
|
1862
1862
|
|
1863
|
-
All required parameters must be populated in order to send to
|
1863
|
+
All required parameters must be populated in order to send to server.
|
1864
1864
|
|
1865
1865
|
:ivar service_endpoint: Required.
|
1866
1866
|
:vartype service_endpoint: str
|
@@ -1932,7 +1932,7 @@ class ListContainersSegmentResponse(_serialization.Model):
|
|
1932
1932
|
class Logging(_serialization.Model):
|
1933
1933
|
"""Azure Analytics Logging settings.
|
1934
1934
|
|
1935
|
-
All required parameters must be populated in order to send to
|
1935
|
+
All required parameters must be populated in order to send to server.
|
1936
1936
|
|
1937
1937
|
:ivar version: The version of Storage Analytics to configure. Required.
|
1938
1938
|
:vartype version: str
|
@@ -1997,7 +1997,7 @@ class Logging(_serialization.Model):
|
|
1997
1997
|
class Metrics(_serialization.Model):
|
1998
1998
|
"""a summary of request statistics grouped by API in hour or minute aggregates for blobs.
|
1999
1999
|
|
2000
|
-
All required parameters must be populated in order to send to
|
2000
|
+
All required parameters must be populated in order to send to server.
|
2001
2001
|
|
2002
2002
|
:ivar version: The version of Storage Analytics to configure.
|
2003
2003
|
:vartype version: str
|
@@ -2152,7 +2152,7 @@ class PageList(_serialization.Model):
|
|
2152
2152
|
class PageRange(_serialization.Model):
|
2153
2153
|
"""PageRange.
|
2154
2154
|
|
2155
|
-
All required parameters must be populated in order to send to
|
2155
|
+
All required parameters must be populated in order to send to server.
|
2156
2156
|
|
2157
2157
|
:ivar start: Required.
|
2158
2158
|
:vartype start: int
|
@@ -2186,7 +2186,7 @@ class PageRange(_serialization.Model):
|
|
2186
2186
|
class QueryFormat(_serialization.Model):
|
2187
2187
|
"""QueryFormat.
|
2188
2188
|
|
2189
|
-
All required parameters must be populated in order to send to
|
2189
|
+
All required parameters must be populated in order to send to server.
|
2190
2190
|
|
2191
2191
|
:ivar type: The quick query format type. Required. Known values are: "delimited", "json",
|
2192
2192
|
"arrow", and "parquet".
|
@@ -2253,7 +2253,7 @@ class QueryRequest(_serialization.Model):
|
|
2253
2253
|
|
2254
2254
|
Variables are only populated by the server, and will be ignored when sending a request.
|
2255
2255
|
|
2256
|
-
All required parameters must be populated in order to send to
|
2256
|
+
All required parameters must be populated in order to send to server.
|
2257
2257
|
|
2258
2258
|
:ivar query_type: Required. The type of the provided query expression. Required. Default value
|
2259
2259
|
is "SQL".
|
@@ -2308,7 +2308,7 @@ class QueryRequest(_serialization.Model):
|
|
2308
2308
|
class QuerySerialization(_serialization.Model):
|
2309
2309
|
"""QuerySerialization.
|
2310
2310
|
|
2311
|
-
All required parameters must be populated in order to send to
|
2311
|
+
All required parameters must be populated in order to send to server.
|
2312
2312
|
|
2313
2313
|
:ivar format: Required.
|
2314
2314
|
:vartype format: ~azure.storage.blob.models.QueryFormat
|
@@ -2334,7 +2334,7 @@ class QuerySerialization(_serialization.Model):
|
|
2334
2334
|
class RetentionPolicy(_serialization.Model):
|
2335
2335
|
"""the retention policy which determines how long the associated data should persist.
|
2336
2336
|
|
2337
|
-
All required parameters must be populated in order to send to
|
2337
|
+
All required parameters must be populated in order to send to server.
|
2338
2338
|
|
2339
2339
|
:ivar enabled: Indicates whether a retention policy is enabled for the storage service.
|
2340
2340
|
Required.
|
@@ -2426,7 +2426,7 @@ class SequenceNumberAccessConditions(_serialization.Model):
|
|
2426
2426
|
class SignedIdentifier(_serialization.Model):
|
2427
2427
|
"""signed identifier.
|
2428
2428
|
|
2429
|
-
All required parameters must be populated in order to send to
|
2429
|
+
All required parameters must be populated in order to send to server.
|
2430
2430
|
|
2431
2431
|
:ivar id: a unique id. Required.
|
2432
2432
|
:vartype id: str
|
@@ -2526,7 +2526,7 @@ class SourceModifiedAccessConditions(_serialization.Model):
|
|
2526
2526
|
class StaticWebsite(_serialization.Model):
|
2527
2527
|
"""The properties that enable an account to host a static website.
|
2528
2528
|
|
2529
|
-
All required parameters must be populated in order to send to
|
2529
|
+
All required parameters must be populated in order to send to server.
|
2530
2530
|
|
2531
2531
|
:ivar enabled: Indicates whether this account is hosting a static website. Required.
|
2532
2532
|
:vartype enabled: bool
|
@@ -2695,7 +2695,7 @@ class StorageServiceStats(_serialization.Model):
|
|
2695
2695
|
class UserDelegationKey(_serialization.Model):
|
2696
2696
|
"""A user delegation key.
|
2697
2697
|
|
2698
|
-
All required parameters must be populated in order to send to
|
2698
|
+
All required parameters must be populated in order to send to server.
|
2699
2699
|
|
2700
2700
|
:ivar signed_oid: The Azure Active Directory object ID in GUID format. Required.
|
2701
2701
|
:vartype signed_oid: str
|
@@ -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, IO, Optional, TypeVar, Union
|
10
|
+
from typing import Any, Callable, Dict, IO, 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
|
|
@@ -156,7 +151,7 @@ def build_append_block_request(
|
|
156
151
|
url: str,
|
157
152
|
*,
|
158
153
|
content_length: int,
|
159
|
-
content: IO,
|
154
|
+
content: IO[bytes],
|
160
155
|
timeout: Optional[int] = None,
|
161
156
|
transactional_content_md5: Optional[bytes] = None,
|
162
157
|
transactional_content_crc64: Optional[bytes] = None,
|
@@ -490,11 +485,6 @@ class AppendBlobOperations:
|
|
490
485
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
491
486
|
:param modified_access_conditions: Parameter group. Default value is None.
|
492
487
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
493
|
-
:keyword blob_type: Specifies the type of blob to create: block blob, page blob, or append
|
494
|
-
blob. Default value is "AppendBlob". Note that overriding this default value may result in
|
495
|
-
unsupported behavior.
|
496
|
-
:paramtype blob_type: str
|
497
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
498
488
|
:return: None or the result of cls(response)
|
499
489
|
:rtype: None
|
500
490
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -551,7 +541,7 @@ class AppendBlobOperations:
|
|
551
541
|
_if_tags = modified_access_conditions.if_tags
|
552
542
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
553
543
|
|
554
|
-
|
544
|
+
_request = build_create_request(
|
555
545
|
url=self._config.url,
|
556
546
|
content_length=content_length,
|
557
547
|
timeout=timeout,
|
@@ -579,16 +569,15 @@ class AppendBlobOperations:
|
|
579
569
|
legal_hold=legal_hold,
|
580
570
|
blob_type=blob_type,
|
581
571
|
version=self._config.version,
|
582
|
-
template_url=self.create.metadata["url"],
|
583
572
|
headers=_headers,
|
584
573
|
params=_params,
|
585
574
|
)
|
586
|
-
|
587
|
-
|
575
|
+
_request = _convert_request(_request)
|
576
|
+
_request.url = self._client.format_url(_request.url)
|
588
577
|
|
589
578
|
_stream = False
|
590
579
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
591
|
-
|
580
|
+
_request, stream=_stream, **kwargs
|
592
581
|
)
|
593
582
|
|
594
583
|
response = pipeline_response.http_response
|
@@ -620,15 +609,13 @@ class AppendBlobOperations:
|
|
620
609
|
)
|
621
610
|
|
622
611
|
if cls:
|
623
|
-
return cls(pipeline_response, None, response_headers)
|
624
|
-
|
625
|
-
create.metadata = {"url": "{url}"}
|
612
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
626
613
|
|
627
614
|
@distributed_trace
|
628
615
|
def append_block( # pylint: disable=inconsistent-return-statements
|
629
616
|
self,
|
630
617
|
content_length: int,
|
631
|
-
body: IO,
|
618
|
+
body: IO[bytes],
|
632
619
|
timeout: Optional[int] = None,
|
633
620
|
transactional_content_md5: Optional[bytes] = None,
|
634
621
|
transactional_content_crc64: Optional[bytes] = None,
|
@@ -647,7 +634,7 @@ class AppendBlobOperations:
|
|
647
634
|
:param content_length: The length of the request. Required.
|
648
635
|
:type content_length: int
|
649
636
|
:param body: Initial data. Required.
|
650
|
-
:type body: IO
|
637
|
+
:type body: IO[bytes]
|
651
638
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
652
639
|
:code:`<a
|
653
640
|
href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
|
@@ -674,10 +661,6 @@ class AppendBlobOperations:
|
|
674
661
|
:type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo
|
675
662
|
:param modified_access_conditions: Parameter group. Default value is None.
|
676
663
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
677
|
-
:keyword comp: comp. Default value is "appendblock". Note that overriding this default value
|
678
|
-
may result in unsupported behavior.
|
679
|
-
:paramtype comp: str
|
680
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
681
664
|
:return: None or the result of cls(response)
|
682
665
|
:rtype: None
|
683
666
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -728,7 +711,7 @@ class AppendBlobOperations:
|
|
728
711
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
729
712
|
_content = body
|
730
713
|
|
731
|
-
|
714
|
+
_request = build_append_block_request(
|
732
715
|
url=self._config.url,
|
733
716
|
content_length=content_length,
|
734
717
|
timeout=timeout,
|
@@ -751,16 +734,15 @@ class AppendBlobOperations:
|
|
751
734
|
content_type=content_type,
|
752
735
|
version=self._config.version,
|
753
736
|
content=_content,
|
754
|
-
template_url=self.append_block.metadata["url"],
|
755
737
|
headers=_headers,
|
756
738
|
params=_params,
|
757
739
|
)
|
758
|
-
|
759
|
-
|
740
|
+
_request = _convert_request(_request)
|
741
|
+
_request.url = self._client.format_url(_request.url)
|
760
742
|
|
761
743
|
_stream = False
|
762
744
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
763
|
-
|
745
|
+
_request, stream=_stream, **kwargs
|
764
746
|
)
|
765
747
|
|
766
748
|
response = pipeline_response.http_response
|
@@ -800,9 +782,7 @@ class AppendBlobOperations:
|
|
800
782
|
)
|
801
783
|
|
802
784
|
if cls:
|
803
|
-
return cls(pipeline_response, None, response_headers)
|
804
|
-
|
805
|
-
append_block.metadata = {"url": "{url}"}
|
785
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
806
786
|
|
807
787
|
@distributed_trace
|
808
788
|
def append_block_from_url( # pylint: disable=inconsistent-return-statements
|
@@ -870,10 +850,6 @@ class AppendBlobOperations:
|
|
870
850
|
:param source_modified_access_conditions: Parameter group. Default value is None.
|
871
851
|
:type source_modified_access_conditions:
|
872
852
|
~azure.storage.blob.models.SourceModifiedAccessConditions
|
873
|
-
:keyword comp: comp. Default value is "appendblock". Note that overriding this default value
|
874
|
-
may result in unsupported behavior.
|
875
|
-
:paramtype comp: str
|
876
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
877
853
|
:return: None or the result of cls(response)
|
878
854
|
:rtype: None
|
879
855
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -931,7 +907,7 @@ class AppendBlobOperations:
|
|
931
907
|
_source_if_none_match = source_modified_access_conditions.source_if_none_match
|
932
908
|
_source_if_unmodified_since = source_modified_access_conditions.source_if_unmodified_since
|
933
909
|
|
934
|
-
|
910
|
+
_request = build_append_block_from_url_request(
|
935
911
|
url=self._config.url,
|
936
912
|
source_url=source_url,
|
937
913
|
content_length=content_length,
|
@@ -960,16 +936,15 @@ class AppendBlobOperations:
|
|
960
936
|
copy_source_authorization=copy_source_authorization,
|
961
937
|
comp=comp,
|
962
938
|
version=self._config.version,
|
963
|
-
template_url=self.append_block_from_url.metadata["url"],
|
964
939
|
headers=_headers,
|
965
940
|
params=_params,
|
966
941
|
)
|
967
|
-
|
968
|
-
|
942
|
+
_request = _convert_request(_request)
|
943
|
+
_request.url = self._client.format_url(_request.url)
|
969
944
|
|
970
945
|
_stream = False
|
971
946
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
972
|
-
|
947
|
+
_request, stream=_stream, **kwargs
|
973
948
|
)
|
974
949
|
|
975
950
|
response = pipeline_response.http_response
|
@@ -1006,9 +981,7 @@ class AppendBlobOperations:
|
|
1006
981
|
)
|
1007
982
|
|
1008
983
|
if cls:
|
1009
|
-
return cls(pipeline_response, None, response_headers)
|
1010
|
-
|
1011
|
-
append_block_from_url.metadata = {"url": "{url}"}
|
984
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1012
985
|
|
1013
986
|
@distributed_trace
|
1014
987
|
def seal( # pylint: disable=inconsistent-return-statements
|
@@ -1039,10 +1012,6 @@ class AppendBlobOperations:
|
|
1039
1012
|
:param append_position_access_conditions: Parameter group. Default value is None.
|
1040
1013
|
:type append_position_access_conditions:
|
1041
1014
|
~azure.storage.blob.models.AppendPositionAccessConditions
|
1042
|
-
:keyword comp: comp. Default value is "seal". Note that overriding this default value may
|
1043
|
-
result in unsupported behavior.
|
1044
|
-
:paramtype comp: str
|
1045
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1046
1015
|
:return: None or the result of cls(response)
|
1047
1016
|
:rtype: None
|
1048
1017
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1077,7 +1046,7 @@ class AppendBlobOperations:
|
|
1077
1046
|
if append_position_access_conditions is not None:
|
1078
1047
|
_append_position = append_position_access_conditions.append_position
|
1079
1048
|
|
1080
|
-
|
1049
|
+
_request = build_seal_request(
|
1081
1050
|
url=self._config.url,
|
1082
1051
|
timeout=timeout,
|
1083
1052
|
request_id_parameter=request_id_parameter,
|
@@ -1089,16 +1058,15 @@ class AppendBlobOperations:
|
|
1089
1058
|
append_position=_append_position,
|
1090
1059
|
comp=comp,
|
1091
1060
|
version=self._config.version,
|
1092
|
-
template_url=self.seal.metadata["url"],
|
1093
1061
|
headers=_headers,
|
1094
1062
|
params=_params,
|
1095
1063
|
)
|
1096
|
-
|
1097
|
-
|
1064
|
+
_request = _convert_request(_request)
|
1065
|
+
_request.url = self._client.format_url(_request.url)
|
1098
1066
|
|
1099
1067
|
_stream = False
|
1100
1068
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1101
|
-
|
1069
|
+
_request, stream=_stream, **kwargs
|
1102
1070
|
)
|
1103
1071
|
|
1104
1072
|
response = pipeline_response.http_response
|
@@ -1120,6 +1088,4 @@ class AppendBlobOperations:
|
|
1120
1088
|
response_headers["x-ms-blob-sealed"] = self._deserialize("bool", response.headers.get("x-ms-blob-sealed"))
|
1121
1089
|
|
1122
1090
|
if cls:
|
1123
|
-
return cls(pipeline_response, None, response_headers)
|
1124
|
-
|
1125
|
-
seal.metadata = {"url": "{url}"}
|
1091
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|