-
Notifications
You must be signed in to change notification settings - Fork 180
/
ContainerClient.yml
918 lines (778 loc) · 30 KB
/
ContainerClient.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
### YamlMime:TSType
name: ContainerClient
uid: '@azure/storage-blob.ContainerClient'
package: '@azure/storage-blob'
summary: >-
A ContainerClient represents a URL to the Azure Storage container allowing you
to manipulate its blobs.
fullName: ContainerClient
remarks: ''
isPreview: false
isDeprecated: false
type: class
constructors:
- name: 'ContainerClient(string, PipelineLike)'
uid: '@azure/storage-blob.ContainerClient.constructor_2'
package: '@azure/storage-blob'
summary: >-
Creates an instance of ContainerClient.
This method accepts an URL pointing to a container.
Encoded URL string will NOT be escaped twice, only special characters in
URL path will be escaped.
If a blob name includes ? or %, blob name must be encoded in the URL.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'new ContainerClient(url: string, pipeline: PipelineLike)'
parameters:
- id: url
type: string
description: |-
A URL string pointing to Azure Storage container, such as
"https://myaccount.blob.core.windows.net/mycontainer". You can
append a SAS if using AnonymousCredential, such as
"https://myaccount.blob.core.windows.net/mycontainer?sasString".
- id: pipeline
type: <xref uid="@azure/storage-blob.PipelineLike" />
description: |
Call newPipeline() to create a default
pipeline, or provide a customized pipeline.
- name: >-
ContainerClient(string, StorageSharedKeyCredential | AnonymousCredential |
TokenCredential, StoragePipelineOptions)
uid: '@azure/storage-blob.ContainerClient.constructor_1'
package: '@azure/storage-blob'
summary: >-
Creates an instance of ContainerClient.
This method accepts an URL pointing to a container.
Encoded URL string will NOT be escaped twice, only special characters in
URL path will be escaped.
If a blob name includes ? or %, blob name must be encoded in the URL.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
new ContainerClient(url: string, credential?: StorageSharedKeyCredential
| AnonymousCredential | TokenCredential, options?:
StoragePipelineOptions)
parameters:
- id: url
type: string
description: |-
A URL string pointing to Azure Storage container, such as
"https://myaccount.blob.core.windows.net/mycontainer". You can
append a SAS if using AnonymousCredential, such as
"https://myaccount.blob.core.windows.net/mycontainer?sasString".
- id: credential
type: >-
<xref uid="@azure/storage-blob.StorageSharedKeyCredential" /> |
<xref uid="@azure/storage-blob.AnonymousCredential" /> |
TokenCredential
description: >-
Such as AnonymousCredential, StorageSharedKeyCredential or any
credential from the `@azure/identity` package to authenticate
requests to the service. You can also provide an object that
implements the TokenCredential interface. If not specified,
AnonymousCredential is used.
- id: options
type: <xref uid="@azure/storage-blob.StoragePipelineOptions" />
description: |
Optional. Options to configure the HTTP pipeline.
- name: 'ContainerClient(string, string, StoragePipelineOptions)'
uid: '@azure/storage-blob.ContainerClient.constructor'
package: '@azure/storage-blob'
summary: Creates an instance of ContainerClient.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
new ContainerClient(connectionString: string, containerName: string,
options?: StoragePipelineOptions)
parameters:
- id: connectionString
type: string
description: >-
Account connection string or a SAS connection string of an Azure
storage account.
[ Note - Account connection string can only be used in NODE.JS runtime. ]
Account connection string example -
`DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
SAS connection string example -
`BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
- id: containerName
type: string
description: Container name.
- id: options
type: <xref uid="@azure/storage-blob.StoragePipelineOptions" />
description: |
Optional. Options to configure the HTTP pipeline.
properties:
- name: accountName
uid: '@azure/storage-blob.ContainerClient.accountName'
package: '@azure/storage-blob'
summary: ''
fullName: accountName
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'accountName: string'
return:
type: string
description: ''
- name: containerName
uid: '@azure/storage-blob.ContainerClient.containerName'
package: '@azure/storage-blob'
summary: The name of the container.
fullName: containerName
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: string containerName
return:
type: string
description: ''
- name: credential
uid: '@azure/storage-blob.ContainerClient.credential'
package: '@azure/storage-blob'
summary: >-
Such as AnonymousCredential, StorageSharedKeyCredential or any credential
from the `@azure/identity` package to authenticate requests to the
service. You can also provide an object that implements the
TokenCredential interface. If not specified, AnonymousCredential is used.
fullName: credential
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
credential: StorageSharedKeyCredential | AnonymousCredential |
TokenCredential
return:
type: >-
<xref uid="@azure/storage-blob.StorageSharedKeyCredential" /> | <xref
uid="@azure/storage-blob.AnonymousCredential" /> | TokenCredential
description: ''
- name: url
uid: '@azure/storage-blob.ContainerClient.url'
package: '@azure/storage-blob'
summary: Encoded URL string value.
fullName: url
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'url: string'
return:
type: string
description: ''
methods:
- name: create(ContainerCreateOptions)
uid: '@azure/storage-blob.ContainerClient.create'
package: '@azure/storage-blob'
summary: |-
Creates a new container under the specified account. If the container with
the same name already exists, the operation fails.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function create(options?: ContainerCreateOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerCreateOptions" />
description: >
Options to Container Create operation.
Example usage:
```js
const containerClient =
blobServiceClient.getContainerClient("<container name>");
const createContainerResponse = await containerClient.create();
console.log("Container was created successfully",
createContainerResponse.requestId);
```
return:
type: >-
Promise<<xref uid="@azure/storage-blob.ContainerCreateResponse"
/>>
description: ''
- name: createIfNotExists(ContainerCreateOptions)
uid: '@azure/storage-blob.ContainerClient.createIfNotExists'
package: '@azure/storage-blob'
summary: |-
Creates a new container under the specified account. If the container with
the same name already exists, it is not changed.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function createIfNotExists(options?: ContainerCreateOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerCreateOptions" />
description: |
-
return:
type: >-
Promise<<xref
uid="@azure/storage-blob.ContainerCreateIfNotExistsResponse" />>
description: ''
- name: delete(ContainerDeleteMethodOptions)
uid: '@azure/storage-blob.ContainerClient.delete'
package: '@azure/storage-blob'
summary: |-
Marks the specified container for deletion. The container and any blobs
contained within it are later deleted during garbage collection.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function delete(options?: ContainerDeleteMethodOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerDeleteMethodOptions" />
description: |
Options to Container Delete operation.
return:
type: >-
Promise<<xref uid="@azure/storage-blob.ContainerDeleteResponse"
/>>
description: ''
- name: 'deleteBlob(string, ContainerDeleteBlobOptions)'
uid: '@azure/storage-blob.ContainerClient.deleteBlob'
package: '@azure/storage-blob'
summary: >-
Marks the specified blob or snapshot for deletion. The blob is later
deleted
during garbage collection. Note that in order to delete a blob, you must
delete
all of its snapshots. You can delete both at the same time with the Delete
Blob operation.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function deleteBlob(blobName: string, options?:
ContainerDeleteBlobOptions)
parameters:
- id: blobName
type: string
description: '-'
- id: options
type: <xref uid="@azure/storage-blob.ContainerDeleteBlobOptions" />
description: Options to Blob Delete operation.
return:
type: Promise<<xref uid="@azure/storage-blob.BlobDeleteResponse" />>
description: Block blob deletion response data.
- name: deleteIfExists(ContainerDeleteMethodOptions)
uid: '@azure/storage-blob.ContainerClient.deleteIfExists'
package: '@azure/storage-blob'
summary: >-
Marks the specified container for deletion if it exists. The container and
any blobs
contained within it are later deleted during garbage collection.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function deleteIfExists(options?: ContainerDeleteMethodOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerDeleteMethodOptions" />
description: |
Options to Container Delete operation.
return:
type: >-
Promise<<xref
uid="@azure/storage-blob.ContainerDeleteIfExistsResponse" />>
description: ''
- name: exists(ContainerExistsOptions)
uid: '@azure/storage-blob.ContainerClient.exists'
package: '@azure/storage-blob'
summary: >
Returns true if the Azure container resource represented by this client
exists; false otherwise.
NOTE: use this function with care since an existing container might be
deleted by other clients or
applications. Vice versa new containers with the same name might be added
by other clients or
applications after this function completes.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function exists(options?: ContainerExistsOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerExistsOptions" />
description: |
-
return:
type: Promise<boolean>
description: ''
- name: generateSasUrl(ContainerGenerateSasUrlOptions)
uid: '@azure/storage-blob.ContainerClient.generateSasUrl'
package: '@azure/storage-blob'
summary: >
Only available for ContainerClient constructed with a shared key
credential.
Generates a Blob Container Service Shared Access Signature (SAS) URI based
on the client properties
and parameters passed in. The SAS is signed by the shared key credential
of the client.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function generateSasUrl(options: ContainerGenerateSasUrlOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerGenerateSasUrlOptions" />
description: Optional parameters.
return:
type: Promise<string>
description: >-
The SAS URI consisting of the URI to the resource represented by this
client, followed by the generated SAS token.
- name: getAccessPolicy(ContainerGetAccessPolicyOptions)
uid: '@azure/storage-blob.ContainerClient.getAccessPolicy'
package: '@azure/storage-blob'
summary: >
Gets the permissions for the specified container. The permissions indicate
whether container data may be accessed publicly.
WARNING: JavaScript Date will potentially lose precision when parsing
startsOn and expiresOn strings.
For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will
get "2018-12-31T03:44:23.882Z".
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getAccessPolicy(options?: ContainerGetAccessPolicyOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerGetAccessPolicyOptions" />
description: |
Options to Container Get Access Policy operation.
return:
type: >-
Promise<<xref
uid="@azure/storage-blob.ContainerGetAccessPolicyResponse" />>
description: ''
- name: getAppendBlobClient(string)
uid: '@azure/storage-blob.ContainerClient.getAppendBlobClient'
package: '@azure/storage-blob'
summary: 'Creates an <xref:AppendBlobClient>'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getAppendBlobClient(blobName: string)'
parameters:
- id: blobName
type: string
description: |
An append blob name
return:
type: <xref uid="@azure/storage-blob.AppendBlobClient" />
description: ''
- name: getBlobBatchClient()
uid: '@azure/storage-blob.ContainerClient.getBlobBatchClient'
package: '@azure/storage-blob'
summary: Creates a BlobBatchClient object to conduct batch operations.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: function getBlobBatchClient()
return:
type: <xref uid="@azure/storage-blob.BlobBatchClient" />
description: A new BlobBatchClient object for this container.
- name: getBlobClient(string)
uid: '@azure/storage-blob.ContainerClient.getBlobClient'
package: '@azure/storage-blob'
summary: 'Creates a <xref:BlobClient>'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getBlobClient(blobName: string)'
parameters:
- id: blobName
type: string
description: A blob name
return:
type: <xref uid="@azure/storage-blob.BlobClient" />
description: A new BlobClient object for the given blob name.
- name: getBlobLeaseClient(string)
uid: '@azure/storage-blob.ContainerClient.getBlobLeaseClient'
package: '@azure/storage-blob'
summary: 'Get a <xref:BlobLeaseClient> that manages leases on the container.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getBlobLeaseClient(proposeLeaseId?: string)'
parameters:
- id: proposeLeaseId
type: string
description: Initial proposed lease Id.
return:
type: <xref uid="@azure/storage-blob.BlobLeaseClient" />
description: A new BlobLeaseClient object for managing leases on the container.
- name: getBlockBlobClient(string)
uid: '@azure/storage-blob.ContainerClient.getBlockBlobClient'
package: '@azure/storage-blob'
summary: 'Creates a <xref:BlockBlobClient>'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getBlockBlobClient(blobName: string)'
parameters:
- id: blobName
type: string
description: >
A block blob name
Example usage:
```js
const content = "Hello world!";
const blockBlobClient = containerClient.getBlockBlobClient("<blob
name>");
const uploadBlobResponse = await blockBlobClient.upload(content,
content.length);
```
return:
type: <xref uid="@azure/storage-blob.BlockBlobClient" />
description: ''
- name: getPageBlobClient(string)
uid: '@azure/storage-blob.ContainerClient.getPageBlobClient'
package: '@azure/storage-blob'
summary: 'Creates a <xref:PageBlobClient>'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getPageBlobClient(blobName: string)'
parameters:
- id: blobName
type: string
description: |
A page blob name
return:
type: <xref uid="@azure/storage-blob.PageBlobClient" />
description: ''
- name: getProperties(ContainerGetPropertiesOptions)
uid: '@azure/storage-blob.ContainerClient.getProperties'
package: '@azure/storage-blob'
summary: >-
Returns all user-defined metadata and system properties for the specified
container. The data returned does not include the container's list of
blobs.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getProperties(options?: ContainerGetPropertiesOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerGetPropertiesOptions" />
description: |
Options to Container Get Properties operation.
return:
type: >-
Promise<<xref
uid="@azure/storage-blob.ContainerGetPropertiesResponse" />>
description: ''
- name: 'listBlobsByHierarchy(string, ContainerListBlobsOptions)'
uid: '@azure/storage-blob.ContainerClient.listBlobsByHierarchy'
package: '@azure/storage-blob'
summary: >
Returns an async iterable iterator to list all the blobs by hierarchy.
under the specified account.
.byPage() returns an async iterable iterator to list the blobs by
hierarchy in pages.
Example using `for await` syntax:
```js
for await (const item of containerClient.listBlobsByHierarchy("/")) {
if (item.kind === "prefix") {
console.log(`\tBlobPrefix: ${item.name}`);
} else {
console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
}
}
```
Example using `iter.next()`:
```js
let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/"
});
let entity = await iter.next();
while (!entity.done) {
let item = entity.value;
if (item.kind === "prefix") {
console.log(`\tBlobPrefix: ${item.name}`);
} else {
console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
}
entity = await iter.next();
}
```
Example using `byPage()`:
```js
console.log("Listing blobs by hierarchy by page");
for await (const response of
containerClient.listBlobsByHierarchy("/").byPage()) {
const segment = response.segment;
if (segment.blobPrefixes) {
for (const prefix of segment.blobPrefixes) {
console.log(`\tBlobPrefix: ${prefix.name}`);
}
}
for (const blob of response.segment.blobItems) {
console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
}
}
```
Example using paging with a max page size:
```js
console.log("Listing blobs by hierarchy by page, specifying a prefix and a
max page size");
let i = 1;
for await (const response of containerClient.listBlobsByHierarchy("/", {
prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) {
console.log(`Page ${i++}`);
const segment = response.segment;
if (segment.blobPrefixes) {
for (const prefix of segment.blobPrefixes) {
console.log(`\tBlobPrefix: ${prefix.name}`);
}
}
for (const blob of response.segment.blobItems) {
console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
}
}
```
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function listBlobsByHierarchy(delimiter: string, options?:
ContainerListBlobsOptions)
parameters:
- id: delimiter
type: string
description: The character or string used to define the virtual hierarchy
- id: options
type: <xref uid="@azure/storage-blob.ContainerListBlobsOptions" />
description: |
Options to list blobs operation.
return:
type: >-
PagedAsyncIterableIterator<Object & <xref
uid="@azure/storage-blob.BlobPrefix" /> | Object & <xref
uid="@azure/storage-blob.BlobItem" />, <xref
uid="@azure/storage-blob.ContainerListBlobHierarchySegmentResponse"
/>>
description: ''
- name: listBlobsFlat(ContainerListBlobsOptions)
uid: '@azure/storage-blob.ContainerClient.listBlobsFlat'
package: '@azure/storage-blob'
summary: >
Returns an async iterable iterator to list all the blobs
under the specified account.
.byPage() returns an async iterable iterator to list the blobs in pages.
Example using `for await` syntax:
```js
// Get the containerClient before you run these snippets,
// Can be obtained from
`blobServiceClient.getContainerClient("<your-container-name>");`
let i = 1;
for await (const blob of containerClient.listBlobsFlat()) {
console.log(`Blob ${i++}: ${blob.name}`);
}
```
Example using `iter.next()`:
```js
let i = 1;
let iter = containerClient.listBlobsFlat();
let blobItem = await iter.next();
while (!blobItem.done) {
console.log(`Blob ${i++}: ${blobItem.value.name}`);
blobItem = await iter.next();
}
```
Example using `byPage()`:
```js
// passing optional maxPageSize in the page settings
let i = 1;
for await (const response of containerClient.listBlobsFlat().byPage({
maxPageSize: 20 })) {
for (const blob of response.segment.blobItems) {
console.log(`Blob ${i++}: ${blob.name}`);
}
}
```
Example using paging with a marker:
```js
let i = 1;
let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 });
let response = (await iterator.next()).value;
// Prints 2 blob names
for (const blob of response.segment.blobItems) {
console.log(`Blob ${i++}: ${blob.name}`);
}
// Gets next marker
let marker = response.continuationToken;
// Passing next marker as continuationToken
iterator = containerClient.listBlobsFlat().byPage({ continuationToken:
marker, maxPageSize: 10 });
response = (await iterator.next()).value;
// Prints 10 blob names
for (const blob of response.segment.blobItems) {
console.log(`Blob ${i++}: ${blob.name}`);
}
```
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function listBlobsFlat(options?: ContainerListBlobsOptions)'
parameters:
- id: options
type: <xref uid="@azure/storage-blob.ContainerListBlobsOptions" />
description: Options to list blobs.
return:
type: >-
PagedAsyncIterableIterator<<xref uid="@azure/storage-blob.BlobItem"
/>, <xref
uid="@azure/storage-blob.ContainerListBlobFlatSegmentResponse" />>
description: An asyncIterableIterator that supports paging.
- name: >-
setAccessPolicy(PublicAccessType, SignedIdentifier[],
ContainerSetAccessPolicyOptions)
uid: '@azure/storage-blob.ContainerClient.setAccessPolicy'
package: '@azure/storage-blob'
summary: >-
Sets the permissions for the specified container. The permissions indicate
whether blobs in a container may be accessed publicly.
When you set permissions for a container, the existing permissions are
replaced.
If no access or containerAcl provided, the existing container ACL will be
removed.
When you establish a stored access policy on a container, it may take up
to 30 seconds to take effect.
During this interval, a shared access signature that is associated with
the stored access policy will
fail with status code 403 (Forbidden), until the access policy becomes
active.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function setAccessPolicy(access?: PublicAccessType, containerAcl?:
SignedIdentifier[], options?: ContainerSetAccessPolicyOptions)
parameters:
- id: access
type: <xref uid="@azure/storage-blob.PublicAccessType" />
description: The level of public access to data in the container.
- id: containerAcl
type: '<xref uid="@azure/storage-blob.SignedIdentifier" />[]'
description: >-
Array of elements each having a unique Id and details of the access
policy.
- id: options
type: <xref uid="@azure/storage-blob.ContainerSetAccessPolicyOptions" />
description: |
Options to Container Set Access Policy operation.
return:
type: >-
Promise<<xref
uid="@azure/storage-blob.ContainerSetAccessPolicyResponse" />>
description: ''
- name: 'setMetadata(Metadata, ContainerSetMetadataOptions)'
uid: '@azure/storage-blob.ContainerClient.setMetadata'
package: '@azure/storage-blob'
summary: >
Sets one or more user-defined name-value pairs for the specified
container.
If no option provided, or no metadata defined in the parameter, the
container
metadata will be removed.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function setMetadata(metadata?: Metadata, options?:
ContainerSetMetadataOptions)
parameters:
- id: metadata
type: <xref uid="@azure/storage-blob.Metadata" />
description: |-
Replace existing metadata with this value.
If no value provided the existing metadata will be removed.
- id: options
type: <xref uid="@azure/storage-blob.ContainerSetMetadataOptions" />
description: |
Options to Container Set Metadata operation.
return:
type: >-
Promise<<xref
uid="@azure/storage-blob.ContainerSetMetadataResponse" />>
description: ''
- name: 'uploadBlockBlob(string, HttpRequestBody, number, BlockBlobUploadOptions)'
uid: '@azure/storage-blob.ContainerClient.uploadBlockBlob'
package: '@azure/storage-blob'
summary: >
Creates a new block blob, or updates the content of an existing block
blob.
Updating an existing block blob overwrites any existing metadata on the
blob.
Partial updates are not supported; the content of the existing blob is
overwritten with the new content. To perform a partial update of a block
blob's,
use <xref:BlockBlobClient.stageBlock> and
<xref:BlockBlobClient.commitBlockList>.
This is a non-parallel uploading method, please use
<xref:BlockBlobClient.uploadFile>,
<xref:BlockBlobClient.uploadStream> or
<xref:BlockBlobClient.uploadBrowserData> for better
performance with concurrency uploading.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function uploadBlockBlob(blobName: string, body: HttpRequestBody,
contentLength: number, options?: BlockBlobUploadOptions)
parameters:
- id: blobName
type: string
description: Name of the block blob to create or update.
- id: body
type: HttpRequestBody
description: |-
Blob, string, ArrayBuffer, ArrayBufferView or a function
which returns a new Readable stream whose offset is from data source beginning.
- id: contentLength
type: number
description: >-
Length of body in bytes. Use Buffer.byteLength() to calculate body
length for a
string including non non-Base64/Hex-encoded characters.
- id: options
type: <xref uid="@azure/storage-blob.BlockBlobUploadOptions" />
description: Options to configure the Block Blob Upload operation.
return:
type: Promise<Object>
description: >-
Block Blob upload response data and the corresponding BlockBlobClient
instance.
extends: <xref uid="@azure/storage-blob.StorageClient" />