azure_storage_blob 0.12.0

Microsoft Azure Blob Storage client library for Rust
Documentation
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT.

/// The access tiers.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum AccessTier {
    /// The archive access tier.
    Archive,

    /// The Cold access tier.
    Cold,

    /// The cool access tier.
    Cool,

    /// The hot access tier.
    Hot,

    /// The hot P10 tier.
    P10,

    /// The hot P15 tier.
    P15,

    /// The hot P20 tier.
    P20,

    /// The hot P30 tier.
    P30,

    /// The hot P4 tier.
    P4,

    /// The hot P40 tier.
    P40,

    /// The hot P50 tier.
    P50,

    /// The hot P6 tier.
    P6,

    /// The hot P60 tier.
    P60,

    /// The hot P70 tier.
    P70,

    /// The hot P80 tier.
    P80,

    /// The Premium access tier.
    Premium,

    /// Any other value not defined in `AccessTier`.
    UnknownValue(String),
}

/// The account kind.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AccountKind {
    /// The storage account is a blob storage account.
    BlobStorage,

    /// The storage account is a block blob storage account.
    BlockBlobStorage,

    /// The storage account is a file storage account.
    FileStorage,

    /// The storage account is a general-purpose account.
    Storage,

    /// The storage account is a storage V2 account.
    StorageV2,
}

/// The archive status.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum ArchiveStatus {
    /// The archive status is rehydrating pending to cold.
    RehydratePendingToCold,

    /// The archive status is rehydrating pending to cool.
    RehydratePendingToCool,

    /// The archive status is rehydrating pending to hot.
    RehydratePendingToHot,

    /// Any other value not defined in `ArchiveStatus`.
    UnknownValue(String),
}

/// The blob copy source tags types.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum BlobCopySourceTags {
    /// The copy blob source tags option.
    Copy,

    /// The replace blob source tags option.
    Replace,
}

/// The type of blob deletions.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum BlobDeleteType {
    /// Permanently delete the blob.
    Permanent,
}

/// The blob type.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum BlobType {
    /// The blob is an append blob.
    AppendBlob,

    /// The blob is a block blob.
    BlockBlob,

    /// The blob is a page blob.
    PageBlob,
}

/// The block list types.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum BlockListType {
    /// Both lists together.
    All,

    /// The list of committed blocks.
    Committed,

    /// The list of uncommitted blocks.
    Uncommitted,
}

/// The copy status.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum CopyStatus {
    /// The copy operation is aborted.
    Aborted,

    /// The copy operation failed.
    Failed,

    /// The copy operation is pending.
    Pending,

    /// The copy operation succeeded.
    Success,
}

/// The delete snapshots option type.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum DeleteSnapshotsOptionType {
    /// The delete snapshots include option is include.
    Include,

    /// The delete snapshots include option is only.
    Only,
}

/// The algorithm used to produce the encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided
/// if the x-ms-encryption-key header is provided.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum EncryptionAlgorithmType {
    /// The AES256 encryption algorithm.
    Aes256,
}

/// The file share token intent types.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum FileShareTokenIntent {
    /// The file share token intent is backup.
    Backup,

    /// Any other value not defined in `FileShareTokenIntent`.
    UnknownValue(String),
}

/// The filter blobs includes.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum FilterBlobsIncludeItem {
    /// The filter includes no versions.
    None,

    /// The filter includes n versions.
    Versions,
}

/// The geo replication status.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum GeoReplicationStatusType {
    /// The geo replication is bootstrap.
    Bootstrap,

    /// The geo replication is live.
    Live,

    /// The geo replication is unavailable.
    Unavailable,

    /// Any other value not defined in `GeoReplicationStatusType`.
    UnknownValue(String),
}

/// The immutability policy mode used in requests and responses.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ImmutabilityPolicyMode {
    /// The immutability policy is locked.
    Locked,

    /// The immutability policy is mutable. Should never be set, only returned.
    Mutable,

    /// The immutability policy is unlocked.
    Unlocked,
}

/// The lease duration.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum LeaseDuration {
    /// The lease is of fixed duration.
    Fixed,

    /// The lease is of infinite duration.
    Infinite,
}

/// The lease state.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum LeaseState {
    /// The lease is available.
    Available,

    /// The lease is breaking.
    Breaking,

    /// The lease is broken.
    Broken,

    /// The lease is expired.
    Expired,

    /// The lease is currently leased.
    Leased,
}

/// The lease status.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum LeaseStatus {
    /// The lease is locked.
    Locked,

    /// The lease is unlocked.
    Unlocked,
}

/// The list blob includes parameter values.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ListBlobsIncludeItem {
    /// The include copies.
    Copy,

    /// The include deleted blobs.
    Deleted,

    /// The include deleted with versions.
    DeletedWithVersions,

    /// The include immutable policy.
    ImmutabilityPolicy,

    /// The include legal hold.
    LegalHold,

    /// The include metadata.
    Metadata,

    /// The include snapshots.
    Snapshots,

    /// The include tags.
    Tags,

    /// The include uncommitted blobs.
    UncommittedBlobs,

    /// The include versions.
    Versions,
}

/// Include this parameter to specify that the container's metadata be returned as part of the response body.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ListContainersIncludeType {
    /// Include deleted
    Deleted,

    /// Include metadata
    Metadata,

    /// Include system
    System,
}

/// The premium page blob access tier types.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum PremiumPageBlobAccessTier {
    /// The premium page blob access tier is P10.
    P10,

    /// The premium page blob access tier is P15.
    P15,

    /// The premium page blob access tier is P20.
    P20,

    /// The premium page blob access tier is P30.
    P30,

    /// The premium page blob access tier is P4.
    P4,

    /// The premium page blob access tier is P40.
    P40,

    /// The premium page blob access tier is P50.
    P50,

    /// The premium page blob access tier is P6.
    P6,

    /// The premium page blob access tier is P60.
    P60,

    /// The premium page blob access tier is P70.
    P70,

    /// The premium page blob access tier is P80.
    P80,

    /// Any other value not defined in `PremiumPageBlobAccessTier`.
    UnknownValue(String),
}

/// The public access types.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum PublicAccessType {
    /// Blob access.
    Blob,

    /// Container access.
    Container,

    /// Any other value not defined in `PublicAccessType`.
    UnknownValue(String),
}

/// If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High
/// and Standard.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum RehydratePriority {
    /// The rehydrate priority is high.
    High,

    /// The rehydrate priority is standard.
    Standard,

    /// Any other value not defined in `RehydratePriority`.
    UnknownValue(String),
}

/// The sequence number actions.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum SequenceNumberActionType {
    /// Increment the sequence number.
    Increment,

    /// Set the maximum for the sequence number.
    Max,

    /// Update the sequence number.
    Update,
}

/// The SKU types
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum SkuName {
    /// The premium LRS SKU.
    PremiumLrs,

    /// The premium ZRS SKU.
    PremiumZrs,

    /// The standard GRS SKU.
    StandardGrs,

    /// The standard GZRS SKU.
    StandardGzrs,

    /// The standard LRS SKU.
    StandardLrs,

    /// The standard RAGRS SKU.
    StandardRagrs,

    /// The standard RAGZRS SKU.
    StandardRagzrs,

    /// The standard ZRS SKU.
    StandardZrs,
}

/// Error codes returned by the Azure Blob Storage service.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum StorageErrorCode {
    /// Account already exists.
    AccountAlreadyExists,

    /// Account is being created.
    AccountBeingCreated,

    /// Account is disabled.
    AccountIsDisabled,

    /// Append position condition not met.
    AppendPositionConditionNotMet,

    /// Authentication failed.
    AuthenticationFailed,

    /// Authorization failure.
    AuthorizationFailure,

    /// Authorization permission mismatch.
    AuthorizationPermissionMismatch,

    /// Authorization protocol mismatch.
    AuthorizationProtocolMismatch,

    /// Authorization resource type mismatch.
    AuthorizationResourceTypeMismatch,

    /// Authorization service mismatch.
    AuthorizationServiceMismatch,

    /// Authorization source IP mismatch.
    AuthorizationSourceIPMismatch,

    /// Blob access tier not supported for account type.
    BlobAccessTierNotSupportedForAccountType,

    /// Blob already exists.
    BlobAlreadyExists,

    /// Blob archived.
    BlobArchived,

    /// Blob being rehydrated.
    BlobBeingRehydrated,

    /// Blob is immutable due to policy.
    BlobImmutableDueToPolicy,

    /// Blob not archived.
    BlobNotArchived,

    /// Blob not found.
    BlobNotFound,

    /// Blob overwritten.
    BlobOverwritten,

    /// Blob tier inadequate for content length.
    BlobTierInadequateForContentLength,

    /// Blob uses customer specified encryption.
    BlobUsesCustomerSpecifiedEncryption,

    /// Block count exceeds limit.
    BlockCountExceedsLimit,

    /// Block list too long.
    BlockListTooLong,

    /// Cannot change to lower tier.
    CannotChangeToLowerTier,

    /// Cannot verify copy source.
    CannotVerifyCopySource,

    /// Condition headers not supported.
    ConditionHeadersNotSupported,

    /// Condition not met.
    ConditionNotMet,

    /// Container already exists.
    ContainerAlreadyExists,

    /// Container being deleted.
    ContainerBeingDeleted,

    /// Container disabled.
    ContainerDisabled,

    /// Container not found.
    ContainerNotFound,

    /// Content length larger than tier limit.
    ContentLengthLargerThanTierLimit,

    /// Copy across accounts not supported.
    CopyAcrossAccountsNotSupported,

    /// Copy ID mismatch.
    CopyIdMismatch,

    /// Empty metadata key.
    EmptyMetadataKey,

    /// Feature version mismatch.
    FeatureVersionMismatch,

    /// Incremental copy blob mismatch.
    IncrementalCopyBlobMismatch,

    /// Incremental copy of an earlier snapshot is not allowed.
    IncrementalCopyOfEarlierSnapshotNotAllowed,

    /// Incremental copy of earlier version snapshot not allowed.
    IncrementalCopyOfEarlierVersionSnapshotNotAllowed,

    /// Incremental copy source must be snapshot.
    IncrementalCopySourceMustBeSnapshot,

    /// Infinite lease duration required.
    InfiniteLeaseDurationRequired,

    /// Insufficient account permissions.
    InsufficientAccountPermissions,

    /// Internal error.
    InternalError,

    /// Invalid authentication information.
    InvalidAuthenticationInfo,

    /// Invalid blob or block.
    InvalidBlobOrBlock,

    /// Invalid blob tier.
    InvalidBlobTier,

    /// Invalid blob type.
    InvalidBlobType,

    /// Invalid block ID.
    InvalidBlockId,

    /// Invalid block list.
    InvalidBlockList,

    /// Invalid header value.
    InvalidHeaderValue,

    /// Invalid HTTP verb.
    InvalidHttpVerb,

    /// Invalid input.
    InvalidInput,

    /// Invalid MD5.
    InvalidMd5,

    /// Invalid metadata.
    InvalidMetadata,

    /// Invalid operation.
    InvalidOperation,

    /// Invalid page range.
    InvalidPageRange,

    /// Invalid query parameter value.
    InvalidQueryParameterValue,

    /// Invalid range.
    InvalidRange,

    /// Invalid request URL.
    InvalidRequestUrl,

    /// Invalid resource name.
    InvalidResourceName,

    /// Invalid source blob type.
    InvalidSourceBlobType,

    /// Invalid source blob URL.
    InvalidSourceBlobUrl,

    /// Invalid URI.
    InvalidUri,

    /// Invalid version for page blob operation.
    InvalidVersionForPageBlobOperation,

    /// Invalid XML document.
    InvalidXmlDocument,

    /// Invalid XML node value.
    InvalidXmlNodeValue,

    /// Lease already broken.
    LeaseAlreadyBroken,

    /// Lease already present.
    LeaseAlreadyPresent,

    /// Lease ID mismatch with blob operation.
    LeaseIdMismatchWithBlobOperation,

    /// Lease ID mismatch with container operation.
    LeaseIdMismatchWithContainerOperation,

    /// Lease ID mismatch with lease operation.
    LeaseIdMismatchWithLeaseOperation,

    /// Lease ID missing.
    LeaseIdMissing,

    /// Lease is breaking and cannot be acquired.
    LeaseIsBreakingAndCannotBeAcquired,

    /// Lease is breaking and cannot be changed.
    LeaseIsBreakingAndCannotBeChanged,

    /// Lease is broken and cannot be renewed.
    LeaseIsBrokenAndCannotBeRenewed,

    /// Lease lost.
    LeaseLost,

    /// Lease not present with blob operation.
    LeaseNotPresentWithBlobOperation,

    /// Lease not present with container operation.
    LeaseNotPresentWithContainerOperation,

    /// Lease not present with lease operation.
    LeaseNotPresentWithLeaseOperation,

    /// Maximum blob size condition not met.
    MaxBlobSizeConditionNotMet,

    /// MD5 mismatch.
    Md5Mismatch,

    /// Metadata too large.
    MetadataTooLarge,

    /// Missing content length header.
    MissingContentLengthHeader,

    /// Missing required header.
    MissingRequiredHeader,

    /// Missing required query parameter.
    MissingRequiredQueryParameter,

    /// Missing required XML node.
    MissingRequiredXmlNode,

    /// Multiple condition headers not supported.
    MultipleConditionHeadersNotSupported,

    /// No authentication information.
    NoAuthenticationInformation,

    /// No pending copy operation.
    NoPendingCopyOperation,

    /// Operation not allowed on incremental copy blob.
    OperationNotAllowedOnIncrementalCopyBlob,

    /// Operation timed out.
    OperationTimedOut,

    /// Out of range input.
    OutOfRangeInput,

    /// Out of range query parameter value.
    OutOfRangeQueryParameterValue,

    /// Pending copy operation.
    PendingCopyOperation,

    /// Previous snapshot cannot be newer.
    PreviousSnapshotCannotBeNewer,

    /// Previous snapshot not found.
    PreviousSnapshotNotFound,

    /// Previous snapshot operation not supported.
    PreviousSnapshotOperationNotSupported,

    /// Request body too large.
    RequestBodyTooLarge,

    /// Request URL failed to parse.
    RequestUrlFailedToParse,

    /// Resource already exists.
    ResourceAlreadyExists,

    /// Resource not found.
    ResourceNotFound,

    /// Resource type mismatch.
    ResourceTypeMismatch,

    /// Sequence number condition not met.
    SequenceNumberConditionNotMet,

    /// Sequence number increment too large.
    SequenceNumberIncrementTooLarge,

    /// Server busy.
    ServerBusy,

    /// Snapshot count exceeded.
    SnapshotCountExceeded,

    /// Snapshot operation rate exceeded.
    SnapshotOperationRateExceeded,

    /// Snapshots present.
    SnapshotsPresent,

    /// Source condition not met.
    SourceConditionNotMet,

    /// System in use.
    SystemInUse,

    /// Target condition not met.
    TargetConditionNotMet,

    /// Unauthorized blob overwrite.
    UnauthorizedBlobOverwrite,

    /// Unsupported header.
    UnsupportedHeader,

    /// Unsupported HTTP verb.
    UnsupportedHttpVerb,

    /// Unsupported query parameter.
    UnsupportedQueryParameter,

    /// Unsupported XML node.
    UnsupportedXmlNode,

    /// Any other value not defined in `StorageErrorCode`.
    UnknownValue(String),
}