-
Notifications
You must be signed in to change notification settings - Fork 234
/
azure.storage.blob.appendblobservice.AppendBlobService.yml
4882 lines (3851 loc) · 161 KB
/
azure.storage.blob.appendblobservice.AppendBlobService.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### YamlMime:PythonClass
uid: azure.storage.blob.appendblobservice.AppendBlobService
name: AppendBlobService
fullName: azure.storage.blob.appendblobservice.AppendBlobService
module: azure.storage.blob.appendblobservice
inheritances:
- azure.storage.blob.baseblobservice.BaseBlobService
summary: 'An append blob is comprised of blocks and is optimized for append operations.
When you modify an append blob, blocks are added to the end of the blob only,
via the append_block operation. Updating or deleting of existing blocks is not
supported. Unlike a block blob, an append blob does not expose its block IDs.
Each block in an append blob can be a different size, up to a maximum of 4 MB,
and an append blob can include up to 50,000 blocks. The maximum size of an
append blob is therefore slightly more than 195 GB (4 MB X 50,000 blocks).
:type *~azure.storage.common.TokenCredential*'
constructor:
syntax: AppendBlobService(account_name=None, account_key=None, sas_token=None, is_emulated=False,
protocol='https', endpoint_suffix='core.windows.net', custom_domain=None, request_session=None,
connection_string=None, socket_timeout=None, token_credential=None)
parameters:
- name: account_name
description: 'The storage account name. This is used to authenticate requests
signed with an account key and to construct the storage endpoint. It
is required unless a connection string is given, or if a custom
domain is used with anonymous authentication.'
defaultValue: None
types:
- <xref:str>
- name: account_key
description: 'The storage account key. This is used for shared key authentication.
If neither account key or sas token is specified, anonymous access
will be used.'
defaultValue: None
types:
- <xref:str>
- name: sas_token
description: 'A shared access signature token to use to authenticate requests
instead of the account key. If account key and sas token are both
specified, account key will be used to sign. If neither are
specified, anonymous access will be used.'
defaultValue: None
types:
- <xref:str>
- name: is_emulated
description: 'Whether to use the emulator. Defaults to False. If specified, will
override all other parameters besides connection string and request
session.'
defaultValue: 'False'
types:
- <xref:bool>
- name: protocol
description: The protocol to use for requests. Defaults to https.
defaultValue: https
types:
- <xref:str>
- name: endpoint_suffix
description: 'The host base component of the url, minus the account name. Defaults
to Azure (core.windows.net). Override this to use the China cloud
(core.chinacloudapi.cn).'
defaultValue: core.windows.net
types:
- <xref:str>
- name: custom_domain
description: 'The custom domain to use. This can be set in the Azure Portal. For
example, ''www.mydomain.com''.'
defaultValue: None
types:
- <xref:str>
- name: request_session
description: The session object to use for http requests.
defaultValue: None
types:
- <xref:requests.Session>
- name: connection_string
description: 'If specified, this will override all other parameters besides
request session. See
[http://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string/](http://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string/)
for the connection string format.'
defaultValue: None
types:
- <xref:str>
- name: socket_timeout
description: 'If specified, this will override the default socket timeout. The
timeout specified is in seconds.
See DEFAULT_SOCKET_TIMEOUT in _constants.py for the default value.'
defaultValue: None
types:
- <xref:int>
- name: token_credential
description: 'A token credential used to authenticate HTTPS requests. The token
value
should be updated before its expiration.'
defaultValue: None
variables:
- description: 'The size of the blocks put by append_blob_from_* methods. Smaller
blocks
may be put if there is less data provided. The maximum block size the service
supports is 4MB.'
name: MAX_BLOCK_SIZE
types:
- <xref:int>
methods:
- uid: azure.storage.blob.appendblobservice.AppendBlobService.abort_copy_blob
name: abort_copy_blob
summary: 'Aborts a pending copy_blob operation, and leaves a destination blob
with zero length and full metadata.'
signature: abort_copy_blob(container_name, blob_name, copy_id, lease_id=None, timeout=None)
parameters:
- name: container_name
description: Name of destination container.
isRequired: true
types:
- <xref:str>
- name: blob_name
description: Name of destination blob.
isRequired: true
types:
- <xref:str>
- name: copy_id
description: 'Copy identifier provided in the copy.id of the original
copy_blob operation.'
isRequired: true
types:
- <xref:str>
- name: lease_id
description: Required if the destination blob has an active infinite lease.
defaultValue: None
types:
- <xref:str>
- name: timeout
description: The timeout parameter is expressed in seconds.
defaultValue: None
types:
- <xref:int>
- uid: azure.storage.blob.appendblobservice.AppendBlobService.acquire_blob_lease
name: acquire_blob_lease
summary: 'Requests a new lease. If the blob does not have an active lease, the Blob
service creates a lease on the blob and returns a new lease ID.'
signature: acquire_blob_lease(container_name, blob_name, lease_duration=-1, proposed_lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None, if_none_match=None,
timeout=None)
parameters:
- name: container_name
description: Name of existing container.
isRequired: true
types:
- <xref:str>
- name: blob_name
description: Name of existing blob.
isRequired: true
types:
- <xref:str>
- name: lease_duration
description: 'Specifies the duration of the lease, in seconds, or negative one
(-1) for a lease that never expires. A non-infinite lease can be
between 15 and 60 seconds. A lease duration cannot be changed
using renew or change. Default is -1 (infinite lease).'
defaultValue: '-1'
types:
- <xref:int>
- name: proposed_lease_id
description: 'Proposed lease ID, in a GUID string format. The Blob service
returns 400 (Invalid request) if the proposed lease ID is not
in the correct format.'
defaultValue: None
types:
- <xref:str>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform
the operation only if the resource''s ETag matches the value specified.'
defaultValue: None
types:
- <xref:str>
- name: if_none_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform the operation only if the resource''s ETag does not match
the value specified. Specify the wildcard character (*) to perform
the operation only if the resource does not exist, and fail the
operation if it does exist.'
defaultValue: None
types:
- <xref:str>
- name: timeout
description: The timeout parameter is expressed in seconds.
defaultValue: None
types:
- <xref:int>
return:
description: str
- uid: azure.storage.blob.appendblobservice.AppendBlobService.acquire_container_lease
name: acquire_container_lease
summary: 'Requests a new lease. If the container does not have an active lease,
the Blob service creates a lease on the container and returns a new
lease ID.'
signature: acquire_container_lease(container_name, lease_duration=-1, proposed_lease_id=None,
if_modified_since=None, if_unmodified_since=None, timeout=None)
parameters:
- name: container_name
description: Name of existing container.
isRequired: true
types:
- <xref:str>
- name: lease_duration
description: 'Specifies the duration of the lease, in seconds, or negative one
(-1) for a lease that never expires. A non-infinite lease can be
between 15 and 60 seconds. A lease duration cannot be changed
using renew or change. Default is -1 (infinite lease).'
defaultValue: '-1'
types:
- <xref:int>
- name: proposed_lease_id
description: 'Proposed lease ID, in a GUID string format. The Blob service returns
400 (Invalid request) if the proposed lease ID is not in the correct format.'
defaultValue: None
types:
- <xref:str>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
defaultValue: None
types:
- <xref:datetime>
- name: timeout
description: The timeout parameter is expressed in seconds.
defaultValue: None
types:
- <xref:int>
return:
description: str
- uid: azure.storage.blob.appendblobservice.AppendBlobService.append_blob_from_bytes
name: append_blob_from_bytes
summary: 'Appends to the content of an existing blob from an array of bytes, with
automatic chunking and progress notifications.'
signature: append_blob_from_bytes(container_name, blob_name, blob, index=0, count=None,
validate_content=False, maxsize_condition=None, progress_callback=None, lease_id=None,
timeout=None, if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None)
parameters:
- name: container_name
description: Name of existing container.
isRequired: true
types:
- <xref:str>
- name: blob_name
description: Name of blob to create or update.
isRequired: true
types:
- <xref:str>
- name: blob
description: Content of blob as an array of bytes.
isRequired: true
types:
- <xref:bytes>
- name: index
description: Start index in the array of bytes.
defaultValue: '0'
types:
- <xref:int>
- name: count
description: 'Number of bytes to upload. Set to None or negative value to upload
all bytes starting from index.'
defaultValue: None
types:
- <xref:int>
- name: validate_content
description: 'If true, calculates an MD5 hash for each chunk of the blob. The
storage
service checks the hash of the content that has arrived with the hash
that was sent. This is primarily valuable for detecting bitflips on
the wire if using http instead of https as https (the default) will
already validate. Note that this MD5 hash is not stored with the
blob.'
defaultValue: 'False'
types:
- <xref:bool>
- name: maxsize_condition
description: 'Optional conditional header. The max length in bytes permitted for
the append blob. If the Append Block operation would cause the blob
to exceed that limit or if the blob size is already greater than the
value specified in this header, the request will fail with
MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).'
defaultValue: None
types:
- <xref:int>
- name: progress_callback
description: 'Callback for progress with signature function(current, total) where
current is the number of bytes transfered so far, and total is the
size of the blob, or None if the total size is unknown.'
defaultValue: None
types:
- <xref:func>(<xref:current>, <xref:total>)
- name: lease_id
description: Required if the blob has an active lease.
defaultValue: None
types:
- <xref:str>
- name: timeout
description: 'The timeout parameter is expressed in seconds. This method may make
multiple calls to the Azure service and the timeout will apply to
each call individually.'
defaultValue: None
types:
- <xref:int>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform
the operation only if the resource''s ETag matches the value specified.'
defaultValue: None
types:
- <xref:str>
- name: if_none_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform the operation only if the resource''s ETag does not match
the value specified. Specify the wildcard character (*) to perform
the operation only if the resource does not exist, and fail the
operation if it does exist.'
defaultValue: None
types:
- <xref:str>
- name: cpk
description: 'Encrypts the data on the service-side with the given key.
Use of customer-provided keys must be done over HTTPS.
As the encryption key itself is provided in the request,
a secure connection must be established to transfer the key.'
defaultValue: None
types:
- <xref:azure.storage.blob.models.CustomerProvidedEncryptionKey>
return:
description: ETag and last modified properties for the Append Blob
types:
- <xref:azure.storage.blob.models.ResourceProperties>
- uid: azure.storage.blob.appendblobservice.AppendBlobService.append_blob_from_path
name: append_blob_from_path
summary: 'Appends to the content of an existing blob from a file path, with automatic
chunking and progress notifications.'
signature: append_blob_from_path(container_name, blob_name, file_path, validate_content=False,
maxsize_condition=None, progress_callback=None, lease_id=None, timeout=None, if_modified_since=None,
if_unmodified_since=None, if_match=None, if_none_match=None, cpk=None)
parameters:
- name: container_name
description: Name of existing container.
isRequired: true
types:
- <xref:str>
- name: blob_name
description: Name of blob to create or update.
isRequired: true
types:
- <xref:str>
- name: file_path
description: Path of the file to upload as the blob content.
isRequired: true
types:
- <xref:str>
- name: validate_content
description: 'If true, calculates an MD5 hash for each chunk of the blob. The
storage
service checks the hash of the content that has arrived with the hash
that was sent. This is primarily valuable for detecting bitflips on
the wire if using http instead of https as https (the default) will
already validate. Note that this MD5 hash is not stored with the
blob.'
defaultValue: 'False'
types:
- <xref:bool>
- name: maxsize_condition
description: 'Optional conditional header. The max length in bytes permitted for
the append blob. If the Append Block operation would cause the blob
to exceed that limit or if the blob size is already greater than the
value specified in this header, the request will fail with
MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).'
defaultValue: None
types:
- <xref:int>
- name: progress_callback
description: 'Callback for progress with signature function(current, total) where
current is the number of bytes transfered so far, and total is the
size of the blob, or None if the total size is unknown.'
defaultValue: None
types:
- <xref:func>(<xref:current>, <xref:total>)
- name: lease_id
description: Required if the blob has an active lease.
defaultValue: None
types:
- <xref:str>
- name: timeout
description: 'The timeout parameter is expressed in seconds. This method may make
multiple calls to the Azure service and the timeout will apply to
each call individually.'
defaultValue: None
types:
- <xref:int>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform
the operation only if the resource''s ETag matches the value specified.'
defaultValue: None
types:
- <xref:str>
- name: if_none_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform the operation only if the resource''s ETag does not match
the value specified. Specify the wildcard character (*) to perform
the operation only if the resource does not exist, and fail the
operation if it does exist.'
defaultValue: None
types:
- <xref:str>
- name: cpk
description: 'Encrypts the data on the service-side with the given key.
Use of customer-provided keys must be done over HTTPS.
As the encryption key itself is provided in the request,
a secure connection must be established to transfer the key.'
defaultValue: None
types:
- <xref:azure.storage.blob.models.CustomerProvidedEncryptionKey>
return:
description: ETag and last modified properties for the Append Blob
types:
- <xref:azure.storage.blob.models.ResourceProperties>
- uid: azure.storage.blob.appendblobservice.AppendBlobService.append_blob_from_stream
name: append_blob_from_stream
summary: 'Appends to the content of an existing blob from a file/stream, with
automatic chunking and progress notifications.'
signature: append_blob_from_stream(container_name, blob_name, stream, count=None,
validate_content=False, maxsize_condition=None, progress_callback=None, lease_id=None,
timeout=None, if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None)
parameters:
- name: container_name
description: Name of existing container.
isRequired: true
types:
- <xref:str>
- name: blob_name
description: Name of blob to create or update.
isRequired: true
types:
- <xref:str>
- name: stream
description: Opened stream to upload as the blob content.
isRequired: true
types:
- <xref:io.IOBase>
- name: count
description: 'Number of bytes to read from the stream. This is optional, but
should be supplied for optimal performance.'
defaultValue: None
types:
- <xref:int>
- name: validate_content
description: 'If true, calculates an MD5 hash for each chunk of the blob. The
storage
service checks the hash of the content that has arrived with the hash
that was sent. This is primarily valuable for detecting bitflips on
the wire if using http instead of https as https (the default) will
already validate. Note that this MD5 hash is not stored with the
blob.'
defaultValue: 'False'
types:
- <xref:bool>
- name: maxsize_condition
description: 'Conditional header. The max length in bytes permitted for
the append blob. If the Append Block operation would cause the blob
to exceed that limit or if the blob size is already greater than the
value specified in this header, the request will fail with
MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).'
defaultValue: None
types:
- <xref:int>
- name: progress_callback
description: 'Callback for progress with signature function(current, total) where
current is the number of bytes transfered so far, and total is the
size of the blob, or None if the total size is unknown.'
defaultValue: None
types:
- <xref:func>(<xref:current>, <xref:total>)
- name: lease_id
description: Required if the blob has an active lease.
defaultValue: None
types:
- <xref:str>
- name: timeout
description: 'The timeout parameter is expressed in seconds. This method may make
multiple calls to the Azure service and the timeout will apply to
each call individually.'
defaultValue: None
types:
- <xref:int>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform
the operation only if the resource''s ETag matches the value specified.'
defaultValue: None
types:
- <xref:str>
- name: if_none_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform the operation only if the resource''s ETag does not match
the value specified. Specify the wildcard character (*) to perform
the operation only if the resource does not exist, and fail the
operation if it does exist.'
defaultValue: None
types:
- <xref:str>
- name: cpk
description: 'Encrypts the data on the service-side with the given key.
Use of customer-provided keys must be done over HTTPS.
As the encryption key itself is provided in the request,
a secure connection must be established to transfer the key.'
defaultValue: None
types:
- <xref:azure.storage.blob.models.CustomerProvidedEncryptionKey>
return:
description: ETag and last modified properties for the Append Blob
types:
- <xref:azure.storage.blob.models.ResourceProperties>
- uid: azure.storage.blob.appendblobservice.AppendBlobService.append_blob_from_text
name: append_blob_from_text
summary: 'Appends to the content of an existing blob from str/unicode, with
automatic chunking and progress notifications.'
signature: append_blob_from_text(container_name, blob_name, text, encoding='utf-8',
validate_content=False, maxsize_condition=None, progress_callback=None, lease_id=None,
timeout=None, if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None)
parameters:
- name: container_name
description: Name of existing container.
isRequired: true
types:
- <xref:str>
- name: blob_name
description: Name of blob to create or update.
isRequired: true
types:
- <xref:str>
- name: text
description: Text to upload to the blob.
isRequired: true
types:
- <xref:str>
- name: encoding
description: Python encoding to use to convert the text to bytes.
defaultValue: utf-8
types:
- <xref:str>
- name: validate_content
description: 'If true, calculates an MD5 hash for each chunk of the blob. The
storage
service checks the hash of the content that has arrived with the hash
that was sent. This is primarily valuable for detecting bitflips on
the wire if using http instead of https as https (the default) will
already validate. Note that this MD5 hash is not stored with the
blob.'
defaultValue: 'False'
types:
- <xref:bool>
- name: maxsize_condition
description: 'Optional conditional header. The max length in bytes permitted for
the append blob. If the Append Block operation would cause the blob
to exceed that limit or if the blob size is already greater than the
value specified in this header, the request will fail with
MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).'
defaultValue: None
types:
- <xref:int>
- name: progress_callback
description: 'Callback for progress with signature function(current, total) where
current is the number of bytes transfered so far, and total is the
size of the blob, or None if the total size is unknown.'
defaultValue: None
types:
- <xref:func>(<xref:current>, <xref:total>)
- name: lease_id
description: Required if the blob has an active lease.
defaultValue: None
types:
- <xref:str>
- name: timeout
description: 'The timeout parameter is expressed in seconds. This method may make
multiple calls to the Azure service and the timeout will apply to
each call individually.'
defaultValue: None
types:
- <xref:int>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetime will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform
the operation only if the resource''s ETag matches the value specified.'
defaultValue: None
types:
- <xref:str>
- name: if_none_match
description: 'An ETag value, or the wildcard character (*). Specify this header
to perform the operation only if the resource''s ETag does not match
the value specified. Specify the wildcard character (*) to perform
the operation only if the resource does not exist, and fail the
operation if it does exist.'
defaultValue: None
types:
- <xref:str>
- name: cpk
description: 'Encrypts the data on the service-side with the given key.
Use of customer-provided keys must be done over HTTPS.
As the encryption key itself is provided in the request,
a secure connection must be established to transfer the key.'
defaultValue: None
types:
- <xref:azure.storage.blob.models.CustomerProvidedEncryptionKey>
return:
description: ETag and last modified properties for the Append Blob
types:
- <xref:azure.storage.blob.models.ResourceProperties>
- uid: azure.storage.blob.appendblobservice.AppendBlobService.append_block
name: append_block
summary: Commits a new block of data to the end of an existing append blob.
signature: append_block(container_name, blob_name, block, validate_content=False,
maxsize_condition=None, appendpos_condition=None, lease_id=None, if_modified_since=None,
if_unmodified_since=None, if_match=None, if_none_match=None, timeout=None, cpk=None)
parameters:
- name: container_name
description: Name of existing container.
isRequired: true
types:
- <xref:str>
- name: blob_name
description: Name of existing blob.
isRequired: true
types:
- <xref:str>
- name: block
description: Content of the block in bytes.
isRequired: true
types:
- <xref:bytes>
- name: validate_content
description: 'If true, calculates an MD5 hash of the block content. The storage
service checks the hash of the content that has arrived
with the hash that was sent. This is primarily valuable for detecting
bitflips on the wire if using http instead of https as https (the default)
will already validate. Note that this MD5 hash is not stored with the
blob.'
defaultValue: 'False'
types:
- <xref:bool>
- name: maxsize_condition
description: 'Optional conditional header. The max length in bytes permitted for
the append blob. If the Append Block operation would cause the blob
to exceed that limit or if the blob size is already greater than the
value specified in this header, the request will fail with
MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).'
defaultValue: None
types:
- <xref:int>
- name: appendpos_condition
description: 'Optional conditional header, used only for the Append Block operation.
A number indicating the byte offset to compare. Append Block will
succeed only if the append position is equal to this number. If it
is not, the request will fail with the
AppendPositionConditionNotMet error
(HTTP status code 412 - Precondition Failed).'
defaultValue: None
types:
- <xref:int>
- name: lease_id
description: Required if the blob has an active lease.
defaultValue: None
types:
- <xref:str>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
defaultValue: None
types:
- <xref:datetime>
- name: if_match