UNPKG

446 kBTypeScriptView Raw
1/// <reference types="node" />
2
3import { AbortSignalLike } from '@azure/abort-controller';
4import { AzureLogger } from '@azure/logger';
5import { BaseRequestPolicy } from '@azure/core-http';
6import * as coreHttp from '@azure/core-http';
7import { deserializationPolicy } from '@azure/core-http';
8import { HttpHeaders } from '@azure/core-http';
9import { HttpOperationResponse } from '@azure/core-http';
10import { HttpRequestBody } from '@azure/core-http';
11import { HttpResponse } from '@azure/core-http';
12import { HttpClient as IHttpClient } from '@azure/core-http';
13import { KeepAliveOptions } from '@azure/core-http';
14import { OperationTracingOptions } from '@azure/core-tracing';
15import { PagedAsyncIterableIterator } from '@azure/core-paging';
16import { PollerLike } from '@azure/core-lro';
17import { PollOperationState } from '@azure/core-lro';
18import { ProxyOptions } from '@azure/core-http';
19import { Readable } from 'stream';
20import { RequestPolicy } from '@azure/core-http';
21import { RequestPolicyFactory } from '@azure/core-http';
22import { RequestPolicyOptions } from '@azure/core-http';
23import { RestError } from '@azure/core-http';
24import { ServiceClientOptions } from '@azure/core-http';
25import { TokenCredential } from '@azure/core-http';
26import { TransferProgressEvent } from '@azure/core-http';
27import { UserAgentOptions } from '@azure/core-http';
28import { WebResource } from '@azure/core-http';
29
30/** An Access policy */
31export declare interface AccessPolicy {
32 /** the date-time the policy is active */
33 startsOn?: string;
34 /** the date-time the policy expires */
35 expiresOn?: string;
36 /** the permissions for the acl policy */
37 permissions?: string;
38}
39
40/** Defines values for AccessTier. */
41export declare type AccessTier = "P4" | "P6" | "P10" | "P15" | "P20" | "P30" | "P40" | "P50" | "P60" | "P70" | "P80" | "Hot" | "Cool" | "Archive";
42
43/** Defines values for AccountKind. */
44export declare type AccountKind = "Storage" | "BlobStorage" | "StorageV2" | "FileStorage" | "BlockBlobStorage";
45
46/**
47 * ONLY AVAILABLE IN NODE.JS RUNTIME.
48 *
49 * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value
50 * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the
51 * values are set, this should be serialized with toString and set as the permissions field on an
52 * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but
53 * the order of the permissions is particular and this class guarantees correctness.
54 */
55export declare class AccountSASPermissions {
56 /**
57 * Parse initializes the AccountSASPermissions fields from a string.
58 *
59 * @param permissions -
60 */
61 static parse(permissions: string): AccountSASPermissions;
62 /**
63 * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it
64 * and boolean values for them.
65 *
66 * @param permissionLike -
67 */
68 static from(permissionLike: AccountSASPermissionsLike): AccountSASPermissions;
69 /**
70 * Permission to read resources and list queues and tables granted.
71 */
72 read: boolean;
73 /**
74 * Permission to write resources granted.
75 */
76 write: boolean;
77 /**
78 * Permission to create blobs and files granted.
79 */
80 delete: boolean;
81 /**
82 * Permission to delete versions granted.
83 */
84 deleteVersion: boolean;
85 /**
86 * Permission to list blob containers, blobs, shares, directories, and files granted.
87 */
88 list: boolean;
89 /**
90 * Permission to add messages, table entities, and append to blobs granted.
91 */
92 add: boolean;
93 /**
94 * Permission to create blobs and files granted.
95 */
96 create: boolean;
97 /**
98 * Permissions to update messages and table entities granted.
99 */
100 update: boolean;
101 /**
102 * Permission to get and delete messages granted.
103 */
104 process: boolean;
105 /**
106 * Specfies Tag access granted.
107 */
108 tag: boolean;
109 /**
110 * Permission to filter blobs.
111 */
112 filter: boolean;
113 /**
114 * Permission to set immutability policy.
115 */
116 setImmutabilityPolicy: boolean;
117 /**
118 * Specifies that Permanent Delete is permitted.
119 */
120 permanentDelete: boolean;
121 /**
122 * Produces the SAS permissions string for an Azure Storage account.
123 * Call this method to set AccountSASSignatureValues Permissions field.
124 *
125 * Using this method will guarantee the resource types are in
126 * an order accepted by the service.
127 *
128 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
129 *
130 */
131 toString(): string;
132}
133
134/**
135 * A type that looks like an account SAS permission.
136 * Used in {@link AccountSASPermissions} to parse SAS permissions from raw objects.
137 */
138export declare interface AccountSASPermissionsLike {
139 /**
140 * Permission to read resources and list queues and tables granted.
141 */
142 read?: boolean;
143 /**
144 * Permission to write resources granted.
145 */
146 write?: boolean;
147 /**
148 * Permission to delete blobs and files granted.
149 */
150 delete?: boolean;
151 /**
152 * Permission to delete versions granted.
153 */
154 deleteVersion?: boolean;
155 /**
156 * Permission to list blob containers, blobs, shares, directories, and files granted.
157 */
158 list?: boolean;
159 /**
160 * Permission to add messages, table entities, and append to blobs granted.
161 */
162 add?: boolean;
163 /**
164 * Permission to create blobs and files granted.
165 */
166 create?: boolean;
167 /**
168 * Permissions to update messages and table entities granted.
169 */
170 update?: boolean;
171 /**
172 * Permission to get and delete messages granted.
173 */
174 process?: boolean;
175 /**
176 * Specfies Tag access granted.
177 */
178 tag?: boolean;
179 /**
180 * Permission to filter blobs.
181 */
182 filter?: boolean;
183 /**
184 * Permission to set immutability policy.
185 */
186 setImmutabilityPolicy?: boolean;
187 /**
188 * Specifies that Permanent Delete is permitted.
189 */
190 permanentDelete?: boolean;
191}
192
193/**
194 * ONLY AVAILABLE IN NODE.JS RUNTIME.
195 *
196 * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value
197 * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the
198 * values are set, this should be serialized with toString and set as the resources field on an
199 * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but
200 * the order of the resources is particular and this class guarantees correctness.
201 */
202export declare class AccountSASResourceTypes {
203 /**
204 * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an
205 * Error if it encounters a character that does not correspond to a valid resource type.
206 *
207 * @param resourceTypes -
208 */
209 static parse(resourceTypes: string): AccountSASResourceTypes;
210 /**
211 * Permission to access service level APIs granted.
212 */
213 service: boolean;
214 /**
215 * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.
216 */
217 container: boolean;
218 /**
219 * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.
220 */
221 object: boolean;
222 /**
223 * Converts the given resource types to a string.
224 *
225 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
226 *
227 */
228 toString(): string;
229}
230
231/**
232 * ONLY AVAILABLE IN NODE.JS RUNTIME.
233 *
234 * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value
235 * to true means that any SAS which uses these permissions will grant access to that service. Once all the
236 * values are set, this should be serialized with toString and set as the services field on an
237 * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but
238 * the order of the services is particular and this class guarantees correctness.
239 */
240export declare class AccountSASServices {
241 /**
242 * Creates an {@link AccountSASServices} from the specified services string. This method will throw an
243 * Error if it encounters a character that does not correspond to a valid service.
244 *
245 * @param services -
246 */
247 static parse(services: string): AccountSASServices;
248 /**
249 * Permission to access blob resources granted.
250 */
251 blob: boolean;
252 /**
253 * Permission to access file resources granted.
254 */
255 file: boolean;
256 /**
257 * Permission to access queue resources granted.
258 */
259 queue: boolean;
260 /**
261 * Permission to access table resources granted.
262 */
263 table: boolean;
264 /**
265 * Converts the given services to a string.
266 *
267 */
268 toString(): string;
269}
270
271/**
272 * ONLY AVAILABLE IN NODE.JS RUNTIME.
273 *
274 * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once
275 * all the values here are set appropriately, call {@link generateAccountSASQueryParameters} to obtain a representation
276 * of the SAS which can actually be applied to blob urls. Note: that both this class and {@link SASQueryParameters}
277 * exist because the former is mutable and a logical representation while the latter is immutable and used to generate
278 * actual REST requests.
279 *
280 * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1
281 * for more conceptual information on SAS
282 *
283 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
284 * for descriptions of the parameters, including which are required
285 */
286export declare interface AccountSASSignatureValues {
287 /**
288 * If not provided, this defaults to the service version targeted by this version of the library.
289 */
290 version?: string;
291 /**
292 * Optional. SAS protocols allowed.
293 */
294 protocol?: SASProtocol;
295 /**
296 * Optional. When the SAS will take effect.
297 */
298 startsOn?: Date;
299 /**
300 * The time after which the SAS will no longer work.
301 */
302 expiresOn: Date;
303 /**
304 * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help
305 * constructing the permissions string.
306 */
307 permissions: AccountSASPermissions;
308 /**
309 * Optional. IP range allowed.
310 */
311 ipRange?: SasIPRange;
312 /**
313 * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to
314 * construct this value.
315 */
316 services: string;
317 /**
318 * The values that indicate the resource types accessible with this SAS. Please refer
319 * to {@link AccountSASResourceTypes} to construct this value.
320 */
321 resourceTypes: string;
322 /**
323 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.
324 */
325 encryptionScope?: string;
326}
327
328/**
329 * AnonymousCredential provides a credentialPolicyCreator member used to create
330 * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with
331 * HTTP(S) requests that read public resources or for use with Shared Access
332 * Signatures (SAS).
333 */
334export declare class AnonymousCredential extends Credential_2 {
335 /**
336 * Creates an {@link AnonymousCredentialPolicy} object.
337 *
338 * @param nextPolicy -
339 * @param options -
340 */
341 create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): AnonymousCredentialPolicy;
342}
343
344/**
345 * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources
346 * or for use with Shared Access Signatures (SAS).
347 */
348export declare class AnonymousCredentialPolicy extends CredentialPolicy {
349 /**
350 * Creates an instance of AnonymousCredentialPolicy.
351 * @param nextPolicy -
352 * @param options -
353 */
354 constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions);
355}
356
357/** Defines headers for AppendBlob_appendBlockFromUrl operation. */
358export declare interface AppendBlobAppendBlockFromUrlHeaders {
359 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
360 etag?: string;
361 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
362 lastModified?: Date;
363 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
364 contentMD5?: Uint8Array;
365 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
366 xMsContentCrc64?: Uint8Array;
367 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
368 requestId?: string;
369 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
370 version?: string;
371 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
372 date?: Date;
373 /** This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes. */
374 blobAppendOffset?: string;
375 /** The number of committed blocks present in the blob. This header is returned only for append blobs. */
376 blobCommittedBlockCount?: number;
377 /** The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key. */
378 encryptionKeySha256?: string;
379 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
380 encryptionScope?: string;
381 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
382 isServerEncrypted?: boolean;
383 /** Error Code */
384 errorCode?: string;
385}
386
387/**
388 * Options to configure the {@link AppendBlobClient.appendBlockFromURL} operation.
389 */
390export declare interface AppendBlobAppendBlockFromURLOptions extends CommonOptions {
391 /**
392 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
393 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
394 */
395 abortSignal?: AbortSignalLike;
396 /**
397 * Conditions to meet when appending append blob blocks.
398 */
399 conditions?: AppendBlobRequestConditions;
400 /**
401 * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.
402 */
403 sourceConditions?: MatchConditions & ModificationConditions;
404 /**
405 * An MD5 hash of the append block content from the URI.
406 * This hash is used to verify the integrity of the append block during transport of the data from the URI.
407 * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.
408 *
409 * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.
410 */
411 sourceContentMD5?: Uint8Array;
412 /**
413 * A CRC64 hash of the append block content from the URI.
414 * This hash is used to verify the integrity of the append block during transport of the data from the URI.
415 * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.
416 *
417 * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.
418 */
419 sourceContentCrc64?: Uint8Array;
420 /**
421 * Customer Provided Key Info.
422 */
423 customerProvidedKey?: CpkInfo;
424 /**
425 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
426 * encrypt the data provided in the request. If not specified, encryption is performed with the
427 * default account encryption scope. For more information, see Encryption at Rest for Azure
428 * Storage Services.
429 */
430 encryptionScope?: string;
431 /**
432 * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
433 */
434 sourceAuthorization?: HttpAuthorization;
435}
436
437/** Contains response data for the appendBlockFromUrl operation. */
438export declare type AppendBlobAppendBlockFromUrlResponse = AppendBlobAppendBlockFromUrlHeaders & {
439 /** The underlying HTTP response. */
440 _response: coreHttp.HttpResponse & {
441 /** The parsed HTTP response headers. */
442 parsedHeaders: AppendBlobAppendBlockFromUrlHeaders;
443 };
444};
445
446/** Defines headers for AppendBlob_appendBlock operation. */
447export declare interface AppendBlobAppendBlockHeaders {
448 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
449 etag?: string;
450 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
451 lastModified?: Date;
452 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
453 contentMD5?: Uint8Array;
454 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
455 xMsContentCrc64?: Uint8Array;
456 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
457 clientRequestId?: string;
458 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
459 requestId?: string;
460 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
461 version?: string;
462 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
463 date?: Date;
464 /** This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes. */
465 blobAppendOffset?: string;
466 /** The number of committed blocks present in the blob. This header is returned only for append blobs. */
467 blobCommittedBlockCount?: number;
468 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
469 isServerEncrypted?: boolean;
470 /** The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key. */
471 encryptionKeySha256?: string;
472 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
473 encryptionScope?: string;
474 /** Error Code */
475 errorCode?: string;
476}
477
478/**
479 * Options to configure the {@link AppendBlobClient.appendBlock} operation.
480 */
481export declare interface AppendBlobAppendBlockOptions extends CommonOptions {
482 /**
483 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
484 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
485 */
486 abortSignal?: AbortSignalLike;
487 /**
488 * Conditions to meet when appending append blob blocks.
489 */
490 conditions?: AppendBlobRequestConditions;
491 /**
492 * Callback to receive events on the progress of append block operation.
493 */
494 onProgress?: (progress: TransferProgressEvent) => void;
495 /**
496 * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.
497 * When this is specified, the storage service compares the hash of the content that has arrived with this value.
498 *
499 * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.
500 */
501 transactionalContentMD5?: Uint8Array;
502 /**
503 * A CRC64 hash of the append block content. This hash is used to verify the integrity of the append block during transport.
504 * When this is specified, the storage service compares the hash of the content that has arrived with this value.
505 *
506 * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.
507 */
508 transactionalContentCrc64?: Uint8Array;
509 /**
510 * Customer Provided Key Info.
511 */
512 customerProvidedKey?: CpkInfo;
513 /**
514 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
515 * encrypt the data provided in the request. If not specified, encryption is performed with the
516 * default account encryption scope. For more information, see Encryption at Rest for Azure
517 * Storage Services.
518 */
519 encryptionScope?: string;
520}
521
522/** Contains response data for the appendBlock operation. */
523export declare type AppendBlobAppendBlockResponse = AppendBlobAppendBlockHeaders & {
524 /** The underlying HTTP response. */
525 _response: coreHttp.HttpResponse & {
526 /** The parsed HTTP response headers. */
527 parsedHeaders: AppendBlobAppendBlockHeaders;
528 };
529};
530
531/**
532 * AppendBlobClient defines a set of operations applicable to append blobs.
533 */
534export declare class AppendBlobClient extends BlobClient {
535 /**
536 * appendBlobsContext provided by protocol layer.
537 */
538 private appendBlobContext;
539 /**
540 *
541 * Creates an instance of AppendBlobClient.
542 *
543 * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
544 * [ Note - Account connection string can only be used in NODE.JS runtime. ]
545 * Account connection string example -
546 * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
547 * SAS connection string example -
548 * `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`
549 * @param containerName - Container name.
550 * @param blobName - Blob name.
551 * @param options - Optional. Options to configure the HTTP pipeline.
552 */
553 constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions);
554 /**
555 * Creates an instance of AppendBlobClient.
556 * This method accepts an encoded URL or non-encoded URL pointing to an append blob.
557 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
558 * If a blob name includes ? or %, blob name must be encoded in the URL.
559 *
560 * @param url - A URL string pointing to Azure Storage append blob, such as
561 * "https://myaccount.blob.core.windows.net/mycontainer/appendblob". You can
562 * append a SAS if using AnonymousCredential, such as
563 * "https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString".
564 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
565 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
566 * However, if a blob name includes ? or %, blob name must be encoded in the URL.
567 * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25".
568 * @param credential - 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.
569 * @param options - Optional. Options to configure the HTTP pipeline.
570 */
571 constructor(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
572 /**
573 * Creates an instance of AppendBlobClient.
574 * This method accepts an encoded URL or non-encoded URL pointing to an append blob.
575 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
576 * If a blob name includes ? or %, blob name must be encoded in the URL.
577 *
578 * @param url - A URL string pointing to Azure Storage append blob, such as
579 * "https://myaccount.blob.core.windows.net/mycontainer/appendblob". You can
580 * append a SAS if using AnonymousCredential, such as
581 * "https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString".
582 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
583 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
584 * However, if a blob name includes ? or %, blob name must be encoded in the URL.
585 * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25".
586 * @param pipeline - Call newPipeline() to create a default
587 * pipeline, or provide a customized pipeline.
588 */
589 constructor(url: string, pipeline: PipelineLike);
590 /**
591 * Creates a new AppendBlobClient object identical to the source but with the
592 * specified snapshot timestamp.
593 * Provide "" will remove the snapshot and return a Client to the base blob.
594 *
595 * @param snapshot - The snapshot timestamp.
596 * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.
597 */
598 withSnapshot(snapshot: string): AppendBlobClient;
599 /**
600 * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.
601 * @see https://docs.microsoft.com/rest/api/storageservices/put-blob
602 *
603 * @param options - Options to the Append Block Create operation.
604 *
605 *
606 * Example usage:
607 *
608 * ```js
609 * const appendBlobClient = containerClient.getAppendBlobClient("<blob name>");
610 * await appendBlobClient.create();
611 * ```
612 */
613 create(options?: AppendBlobCreateOptions): Promise<AppendBlobCreateResponse>;
614 /**
615 * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.
616 * If the blob with the same name already exists, the content of the existing blob will remain unchanged.
617 * @see https://docs.microsoft.com/rest/api/storageservices/put-blob
618 *
619 * @param options -
620 */
621 createIfNotExists(options?: AppendBlobCreateIfNotExistsOptions): Promise<AppendBlobCreateIfNotExistsResponse>;
622 /**
623 * Seals the append blob, making it read only.
624 *
625 * @param options -
626 */
627 seal(options?: AppendBlobSealOptions): Promise<AppendBlobAppendBlockResponse>;
628 /**
629 * Commits a new block of data to the end of the existing append blob.
630 * @see https://docs.microsoft.com/rest/api/storageservices/append-block
631 *
632 * @param body - Data to be appended.
633 * @param contentLength - Length of the body in bytes.
634 * @param options - Options to the Append Block operation.
635 *
636 *
637 * Example usage:
638 *
639 * ```js
640 * const content = "Hello World!";
641 *
642 * // Create a new append blob and append data to the blob.
643 * const newAppendBlobClient = containerClient.getAppendBlobClient("<blob name>");
644 * await newAppendBlobClient.create();
645 * await newAppendBlobClient.appendBlock(content, content.length);
646 *
647 * // Append data to an existing append blob.
648 * const existingAppendBlobClient = containerClient.getAppendBlobClient("<blob name>");
649 * await existingAppendBlobClient.appendBlock(content, content.length);
650 * ```
651 */
652 appendBlock(body: HttpRequestBody, contentLength: number, options?: AppendBlobAppendBlockOptions): Promise<AppendBlobAppendBlockResponse>;
653 /**
654 * The Append Block operation commits a new block of data to the end of an existing append blob
655 * where the contents are read from a source url.
656 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url
657 *
658 * @param sourceURL -
659 * The url to the blob that will be the source of the copy. A source blob in the same storage account can
660 * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob
661 * must either be public or must be authenticated via a shared access signature. If the source blob is
662 * public, no authentication is required to perform the operation.
663 * @param sourceOffset - Offset in source to be appended
664 * @param count - Number of bytes to be appended as a block
665 * @param options -
666 */
667 appendBlockFromURL(sourceURL: string, sourceOffset: number, count: number, options?: AppendBlobAppendBlockFromURLOptions): Promise<AppendBlobAppendBlockFromUrlResponse>;
668}
669
670/** Defines headers for AppendBlob_create operation. */
671export declare interface AppendBlobCreateHeaders {
672 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
673 etag?: string;
674 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
675 lastModified?: Date;
676 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
677 contentMD5?: Uint8Array;
678 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
679 clientRequestId?: string;
680 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
681 requestId?: string;
682 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
683 version?: string;
684 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
685 versionId?: string;
686 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
687 date?: Date;
688 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
689 isServerEncrypted?: boolean;
690 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
691 encryptionKeySha256?: string;
692 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
693 encryptionScope?: string;
694 /** Error Code */
695 errorCode?: string;
696}
697
698/**
699 * Options to configure {@link AppendBlobClient.createIfNotExists} operation.
700 */
701export declare interface AppendBlobCreateIfNotExistsOptions extends CommonOptions {
702 /**
703 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
704 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
705 */
706 abortSignal?: AbortSignalLike;
707 /**
708 * HTTP headers to set when creating append blobs. A common header to set is
709 * `blobContentType`, enabling the browser to provide functionality
710 * based on file type.
711 *
712 */
713 blobHTTPHeaders?: BlobHTTPHeaders;
714 /**
715 * A collection of key-value string pair to associate with the blob when creating append blobs.
716 */
717 metadata?: Metadata;
718 /**
719 * Customer Provided Key Info.
720 */
721 customerProvidedKey?: CpkInfo;
722 /**
723 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
724 * encrypt the data provided in the request. If not specified, encryption is performed with the
725 * default account encryption scope. For more information, see Encryption at Rest for Azure
726 * Storage Services.
727 */
728 encryptionScope?: string;
729 /**
730 * Optional. Specifies immutability policy for a blob.
731 * Note that is parameter is only applicable to a blob within a container that
732 * has version level worm enabled.
733 */
734 immutabilityPolicy?: BlobImmutabilityPolicy;
735 /**
736 * Optional. Indicates if a legal hold should be placed on the blob.
737 * Note that is parameter is only applicable to a blob within a container that
738 * has version level worm enabled.
739 */
740 legalHold?: boolean;
741}
742
743/**
744 * Contains response data for the {@link appendBlobClient.createIfNotExists} operation.
745 */
746export declare interface AppendBlobCreateIfNotExistsResponse extends AppendBlobCreateResponse {
747 /**
748 * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.
749 */
750 succeeded: boolean;
751}
752
753/**
754 * Options to configure {@link AppendBlobClient.create} operation.
755 */
756export declare interface AppendBlobCreateOptions extends CommonOptions {
757 /**
758 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
759 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
760 */
761 abortSignal?: AbortSignalLike;
762 /**
763 * Conditions to meet when creating append blobs.
764 */
765 conditions?: BlobRequestConditions;
766 /**
767 * HTTP headers to set when creating append blobs. A common header
768 * to set is `blobContentType`, enabling the browser to provide functionality
769 * based on file type.
770 *
771 */
772 blobHTTPHeaders?: BlobHTTPHeaders;
773 /**
774 * A collection of key-value string pair to associate with the blob when creating append blobs.
775 */
776 metadata?: Metadata;
777 /**
778 * Customer Provided Key Info.
779 */
780 customerProvidedKey?: CpkInfo;
781 /**
782 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
783 * encrypt the data provided in the request. If not specified, encryption is performed with the
784 * default account encryption scope. For more information, see Encryption at Rest for Azure
785 * Storage Services.
786 */
787 encryptionScope?: string;
788 /**
789 * Optional. Specifies immutability policy for a blob.
790 * Note that is parameter is only applicable to a blob within a container that
791 * has version level worm enabled.
792 */
793 immutabilityPolicy?: BlobImmutabilityPolicy;
794 /**
795 * Optional. Indicates if a legal hold should be placed on the blob.
796 * Note that is parameter is only applicable to a blob within a container that
797 * has version level worm enabled.
798 */
799 legalHold?: boolean;
800 /**
801 * Blob tags.
802 */
803 tags?: Tags;
804}
805
806/** Contains response data for the create operation. */
807export declare type AppendBlobCreateResponse = AppendBlobCreateHeaders & {
808 /** The underlying HTTP response. */
809 _response: coreHttp.HttpResponse & {
810 /** The parsed HTTP response headers. */
811 parsedHeaders: AppendBlobCreateHeaders;
812 };
813};
814
815/**
816 * Conditions to add to the creation of this append blob.
817 */
818export declare interface AppendBlobRequestConditions extends BlobRequestConditions, AppendPositionAccessConditions {
819}
820
821/**
822 * Options to configure {@link AppendBlobClient.seal} operation.
823 */
824export declare interface AppendBlobSealOptions extends CommonOptions {
825 /**
826 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
827 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
828 */
829 abortSignal?: AbortSignalLike;
830 /**
831 * Conditions to meet.
832 */
833 conditions?: AppendBlobRequestConditions;
834}
835
836/** Parameter group */
837export declare interface AppendPositionAccessConditions {
838 /** 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). */
839 maxSize?: number;
840 /** 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). */
841 appendPosition?: number;
842}
843
844/** Defines values for ArchiveStatus. */
845export declare type ArchiveStatus = "rehydrate-pending-to-hot" | "rehydrate-pending-to-cool";
846
847export { BaseRequestPolicy }
848
849/**
850 * A request associated with a batch operation.
851 */
852export declare interface BatchSubRequest {
853 /**
854 * The URL of the resource to request operation.
855 */
856 url: string;
857 /**
858 * The credential used for sub request.
859 * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service.
860 * You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
861 */
862 credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;
863}
864
865/**
866 * The response data associated with a single request within a batch operation.
867 */
868export declare interface BatchSubResponse {
869 /**
870 * The status code of the sub operation.
871 */
872 status: number;
873 /**
874 * The status message of the sub operation.
875 */
876 statusMessage: string;
877 /**
878 * The error code of the sub operation, if the sub operation failed.
879 */
880 errorCode?: string;
881 /**
882 * The HTTP response headers.
883 */
884 headers: HttpHeaders;
885 /**
886 * The body as text.
887 */
888 bodyAsText?: string;
889 /**
890 * The batch sub request corresponding to the sub response.
891 */
892 _request: BatchSubRequest;
893}
894
895/** Defines headers for Blob_abortCopyFromURL operation. */
896export declare interface BlobAbortCopyFromURLHeaders {
897 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
898 clientRequestId?: string;
899 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
900 requestId?: string;
901 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
902 version?: string;
903 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
904 date?: Date;
905 /** Error Code */
906 errorCode?: string;
907}
908
909/**
910 * Options to configure the {@link BlobClient.abortCopyFromURL} operation.
911 */
912export declare interface BlobAbortCopyFromURLOptions extends CommonOptions {
913 /**
914 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
915 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
916 */
917 abortSignal?: AbortSignalLike;
918 /**
919 * If specified, contains the lease id that must be matched and lease with this id
920 * must be active in order for the operation to succeed.
921 */
922 conditions?: LeaseAccessConditions;
923}
924
925/** Contains response data for the abortCopyFromURL operation. */
926export declare type BlobAbortCopyFromURLResponse = BlobAbortCopyFromURLHeaders & {
927 /** The underlying HTTP response. */
928 _response: coreHttp.HttpResponse & {
929 /** The parsed HTTP response headers. */
930 parsedHeaders: BlobAbortCopyFromURLHeaders;
931 };
932};
933
934/**
935 * Options to configure Blob - Acquire Lease operation.
936 */
937export declare interface BlobAcquireLeaseOptions extends CommonOptions {
938 /**
939 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
940 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
941 */
942 abortSignal?: AbortSignalLike;
943 /**
944 * Conditions to meet when acquiring the lease of a blob.
945 */
946 conditions?: ModifiedAccessConditions;
947}
948
949/**
950 * A BlobBatch represents an aggregated set of operations on blobs.
951 * Currently, only `delete` and `setAccessTier` are supported.
952 */
953export declare class BlobBatch {
954 private batchRequest;
955 private readonly batch;
956 private batchType;
957 constructor();
958 /**
959 * Get the value of Content-Type for a batch request.
960 * The value must be multipart/mixed with a batch boundary.
961 * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252
962 */
963 getMultiPartContentType(): string;
964 /**
965 * Get assembled HTTP request body for sub requests.
966 */
967 getHttpRequestBody(): string;
968 /**
969 * Get sub requests that are added into the batch request.
970 */
971 getSubRequests(): Map<number, BatchSubRequest>;
972 private addSubRequestInternal;
973 private setBatchType;
974 /**
975 * The deleteBlob operation marks the specified blob or snapshot for deletion.
976 * The blob is later deleted during garbage collection.
977 * Only one kind of operation is allowed per batch request.
978 *
979 * Note that in order to delete a blob, you must delete all of its snapshots.
980 * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).
981 * The operation will be authenticated and authorized with specified credential.
982 * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
983 *
984 * @param url - The url of the blob resource to delete.
985 * @param credential - 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.
986 * @param options -
987 */
988 deleteBlob(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: BlobDeleteOptions): Promise<void>;
989 /**
990 * The deleteBlob operation marks the specified blob or snapshot for deletion.
991 * The blob is later deleted during garbage collection.
992 * Only one kind of operation is allowed per batch request.
993 *
994 * Note that in order to delete a blob, you must delete all of its snapshots.
995 * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).
996 * The operation will be authenticated and authorized with specified credential.
997 * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
998 *
999 * @param blobClient - The BlobClient.
1000 * @param options -
1001 */
1002 deleteBlob(blobClient: BlobClient, options?: BlobDeleteOptions): Promise<void>;
1003 /**
1004 * The setBlobAccessTier operation sets the tier on a blob.
1005 * The operation is allowed on block blobs in a blob storage or general purpose v2 account.
1006 * Only one kind of operation is allowed per batch request.
1007 *
1008 * A block blob's tier determines Hot/Cool/Archive storage type.
1009 * This operation does not update the blob's ETag.
1010 * For detailed information about block blob level tiering
1011 * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers).
1012 * The operation will be authenticated and authorized
1013 * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
1014 *
1015 * @param url - The url of the blob resource to delete.
1016 * @param credential - 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.
1017 * @param tier -
1018 * @param options -
1019 */
1020 setBlobAccessTier(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, tier: AccessTier, options?: BlobSetTierOptions): Promise<void>;
1021 /**
1022 * The setBlobAccessTier operation sets the tier on a blob.
1023 * The operation is allowed on block blobs in a blob storage or general purpose v2 account.
1024 * Only one kind of operation is allowed per batch request.
1025 *
1026 * A block blob's tier determines Hot/Cool/Archive storage type.
1027 * This operation does not update the blob's ETag.
1028 * For detailed information about block blob level tiering
1029 * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers).
1030 * The operation will be authenticated and authorized
1031 * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
1032 *
1033 * @param blobClient - The BlobClient.
1034 * @param tier -
1035 * @param options -
1036 */
1037 setBlobAccessTier(blobClient: BlobClient, tier: AccessTier, options?: BlobSetTierOptions): Promise<void>;
1038}
1039
1040/**
1041 * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service.
1042 *
1043 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch
1044 */
1045export declare class BlobBatchClient {
1046 private serviceOrContainerContext;
1047 /**
1048 * Creates an instance of BlobBatchClient.
1049 *
1050 * @param url - A url pointing to Azure Storage blob service, such as
1051 * "https://myaccount.blob.core.windows.net". You can append a SAS
1052 * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
1053 * @param credential - 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.
1054 * @param options - Options to configure the HTTP pipeline.
1055 */
1056 constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
1057 /**
1058 * Creates an instance of BlobBatchClient.
1059 *
1060 * @param url - A url pointing to Azure Storage blob service, such as
1061 * "https://myaccount.blob.core.windows.net". You can append a SAS
1062 * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
1063 * @param pipeline - Call newPipeline() to create a default
1064 * pipeline, or provide a customized pipeline.
1065 */
1066 constructor(url: string, pipeline: PipelineLike);
1067 /**
1068 * Creates a {@link BlobBatch}.
1069 * A BlobBatch represents an aggregated set of operations on blobs.
1070 */
1071 createBatch(): BlobBatch;
1072 /**
1073 * Create multiple delete operations to mark the specified blobs or snapshots for deletion.
1074 * Note that in order to delete a blob, you must delete all of its snapshots.
1075 * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).
1076 * The operations will be authenticated and authorized with specified credential.
1077 * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
1078 *
1079 * @param urls - The urls of the blob resources to delete.
1080 * @param credential - 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.
1081 * @param options -
1082 */
1083 deleteBlobs(urls: string[], credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: BlobDeleteOptions): Promise<BlobBatchDeleteBlobsResponse>;
1084 /**
1085 * Create multiple delete operations to mark the specified blobs or snapshots for deletion.
1086 * Note that in order to delete a blob, you must delete all of its snapshots.
1087 * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).
1088 * The operation(subrequest) will be authenticated and authorized with specified credential.
1089 * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
1090 *
1091 * @param blobClients - The BlobClients for the blobs to delete.
1092 * @param options -
1093 */
1094 deleteBlobs(blobClients: BlobClient[], options?: BlobDeleteOptions): Promise<BlobBatchDeleteBlobsResponse>;
1095 /**
1096 * Create multiple set tier operations to set the tier on a blob.
1097 * The operation is allowed on a page blob in a premium
1098 * storage account and on a block blob in a blob storage account (locally redundant
1099 * storage only). A premium page blob's tier determines the allowed size, IOPS,
1100 * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive
1101 * storage type. This operation does not update the blob's ETag.
1102 * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier).
1103 * The operation(subrequest) will be authenticated and authorized
1104 * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
1105 *
1106 * @param urls - The urls of the blob resource to delete.
1107 * @param credential - 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.
1108 * @param tier -
1109 * @param options -
1110 */
1111 setBlobsAccessTier(urls: string[], credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, tier: AccessTier, options?: BlobSetTierOptions): Promise<BlobBatchSetBlobsAccessTierResponse>;
1112 /**
1113 * Create multiple set tier operations to set the tier on a blob.
1114 * The operation is allowed on a page blob in a premium
1115 * storage account and on a block blob in a blob storage account (locally redundant
1116 * storage only). A premium page blob's tier determines the allowed size, IOPS,
1117 * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive
1118 * storage type. This operation does not update the blob's ETag.
1119 * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier).
1120 * The operation(subrequest) will be authenticated and authorized
1121 * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).
1122 *
1123 * @param blobClients - The BlobClients for the blobs which should have a new tier set.
1124 * @param tier -
1125 * @param options -
1126 */
1127 setBlobsAccessTier(blobClients: BlobClient[], tier: AccessTier, options?: BlobSetTierOptions): Promise<BlobBatchSetBlobsAccessTierResponse>;
1128 /**
1129 * Submit batch request which consists of multiple subrequests.
1130 *
1131 * Get `blobBatchClient` and other details before running the snippets.
1132 * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient`
1133 *
1134 * Example usage:
1135 *
1136 * ```js
1137 * let batchRequest = new BlobBatch();
1138 * await batchRequest.deleteBlob(urlInString0, credential0);
1139 * await batchRequest.deleteBlob(urlInString1, credential1, {
1140 * deleteSnapshots: "include"
1141 * });
1142 * const batchResp = await blobBatchClient.submitBatch(batchRequest);
1143 * console.log(batchResp.subResponsesSucceededCount);
1144 * ```
1145 *
1146 * Example using a lease:
1147 *
1148 * ```js
1149 * let batchRequest = new BlobBatch();
1150 * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool");
1151 * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", {
1152 * conditions: { leaseId: leaseId }
1153 * });
1154 * const batchResp = await blobBatchClient.submitBatch(batchRequest);
1155 * console.log(batchResp.subResponsesSucceededCount);
1156 * ```
1157 *
1158 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch
1159 *
1160 * @param batchRequest - A set of Delete or SetTier operations.
1161 * @param options -
1162 */
1163 submitBatch(batchRequest: BlobBatch, options?: BlobBatchSubmitBatchOptionalParams): Promise<BlobBatchSubmitBatchResponse>;
1164}
1165
1166/**
1167 * Contains response data for the {@link deleteBlobs} operation.
1168 */
1169export declare type BlobBatchDeleteBlobsResponse = BlobBatchSubmitBatchResponse;
1170
1171/**
1172 * Contains response data for the {@link setBlobsAccessTier} operation.
1173 */
1174export declare type BlobBatchSetBlobsAccessTierResponse = BlobBatchSubmitBatchResponse;
1175
1176/**
1177 * Options to configure the Service - Submit Batch Optional Params.
1178 */
1179export declare interface BlobBatchSubmitBatchOptionalParams extends ServiceSubmitBatchOptionalParamsModel {
1180}
1181
1182/**
1183 * Contains response data for blob batch operations.
1184 */
1185export declare type BlobBatchSubmitBatchResponse = ParsedBatchResponse & ServiceSubmitBatchHeaders & {
1186 /**
1187 * The underlying HTTP response.
1188 */
1189 _response: HttpResponse & {
1190 /**
1191 * The parsed HTTP response headers.
1192 */
1193 parsedHeaders: ServiceSubmitBatchHeaders;
1194 };
1195};
1196
1197/**
1198 * Options to configure the {@link BlobClient.beginCopyFromURL} operation.
1199 */
1200export declare interface BlobBeginCopyFromURLOptions extends BlobStartCopyFromURLOptions {
1201 /**
1202 * The amount of time in milliseconds the poller should wait between
1203 * calls to the service to determine the status of the Blob copy.
1204 * Defaults to 15 seconds.
1205 */
1206 intervalInMs?: number;
1207 /**
1208 * Callback to receive the state of the copy progress.
1209 */
1210 onProgress?: (state: BlobBeginCopyFromUrlPollState) => void;
1211 /**
1212 * Serialized poller state that can be used to resume polling from.
1213 * This may be useful when starting a copy on one process or thread
1214 * and you wish to continue polling on another process or thread.
1215 *
1216 * To get serialized poller state, call `poller.toString()` on an existing
1217 * poller.
1218 */
1219 resumeFrom?: string;
1220}
1221
1222/**
1223 * The state used by the poller returned from {@link BlobClient.beginCopyFromURL}.
1224 *
1225 * This state is passed into the user-specified `onProgress` callback
1226 * whenever copy progress is detected.
1227 */
1228export declare interface BlobBeginCopyFromUrlPollState extends PollOperationState<BlobBeginCopyFromURLResponse> {
1229 /**
1230 * The instance of {@link BlobClient} that was used when calling {@link BlobClient.beginCopyFromURL}.
1231 */
1232 readonly blobClient: CopyPollerBlobClient;
1233 /**
1234 * The copyId that identifies the in-progress blob copy.
1235 */
1236 copyId?: string;
1237 /**
1238 * the progress of the blob copy as reported by the service.
1239 */
1240 copyProgress?: string;
1241 /**
1242 * The source URL provided in {@link BlobClient.beginCopyFromURL}.
1243 */
1244 copySource: string;
1245 /**
1246 * The options that were passed to the initial {@link BlobClient.beginCopyFromURL} call.
1247 * This is exposed for the poller and should not be modified directly.
1248 */
1249 readonly startCopyFromURLOptions?: BlobStartCopyFromURLOptions;
1250}
1251
1252/**
1253 * Contains response data for the {@link BlobClient.beginCopyFromURL} operation.
1254 */
1255export declare interface BlobBeginCopyFromURLResponse extends BlobStartCopyFromURLResponse {
1256}
1257
1258/**
1259 * Options to configure Blob - Break Lease operation.
1260 */
1261export declare interface BlobBreakLeaseOptions extends CommonOptions {
1262 /**
1263 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
1264 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
1265 */
1266 abortSignal?: AbortSignalLike;
1267 /**
1268 * Conditions to meet when breaking the lease of a blob.
1269 */
1270 conditions?: ModifiedAccessConditions;
1271}
1272
1273/**
1274 * Options to configure Blob - Change Lease operation.
1275 */
1276export declare interface BlobChangeLeaseOptions extends CommonOptions {
1277 /**
1278 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
1279 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
1280 */
1281 abortSignal?: AbortSignalLike;
1282 /**
1283 * Conditions to meet when changing the lease of a blob.
1284 */
1285 conditions?: ModifiedAccessConditions;
1286}
1287
1288/**
1289 * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
1290 * append blob, or page blob.
1291 */
1292export declare class BlobClient extends StorageClient {
1293 /**
1294 * blobContext provided by protocol layer.
1295 */
1296 private blobContext;
1297 private _name;
1298 private _containerName;
1299 private _versionId?;
1300 private _snapshot?;
1301 /**
1302 * The name of the blob.
1303 */
1304 get name(): string;
1305 /**
1306 * The name of the storage container the blob is associated with.
1307 */
1308 get containerName(): string;
1309 /**
1310 *
1311 * Creates an instance of BlobClient from connection string.
1312 *
1313 * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
1314 * [ Note - Account connection string can only be used in NODE.JS runtime. ]
1315 * Account connection string example -
1316 * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
1317 * SAS connection string example -
1318 * `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`
1319 * @param containerName - Container name.
1320 * @param blobName - Blob name.
1321 * @param options - Optional. Options to configure the HTTP pipeline.
1322 */
1323 constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions);
1324 /**
1325 * Creates an instance of BlobClient.
1326 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
1327 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
1328 * If a blob name includes ? or %, blob name must be encoded in the URL.
1329 *
1330 * @param url - A Client string pointing to Azure Storage blob service, such as
1331 * "https://myaccount.blob.core.windows.net". You can append a SAS
1332 * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
1333 * @param credential - 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.
1334 * @param options - Optional. Options to configure the HTTP pipeline.
1335 */
1336 constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
1337 /**
1338 * Creates an instance of BlobClient.
1339 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
1340 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
1341 * If a blob name includes ? or %, blob name must be encoded in the URL.
1342 *
1343 * @param url - A URL string pointing to Azure Storage blob, such as
1344 * "https://myaccount.blob.core.windows.net/mycontainer/blob".
1345 * You can append a SAS if using AnonymousCredential, such as
1346 * "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString".
1347 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
1348 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
1349 * However, if a blob name includes ? or %, blob name must be encoded in the URL.
1350 * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25".
1351 * @param pipeline - Call newPipeline() to create a default
1352 * pipeline, or provide a customized pipeline.
1353 */
1354 constructor(url: string, pipeline: PipelineLike);
1355 /**
1356 * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
1357 * Provide "" will remove the snapshot and return a Client to the base blob.
1358 *
1359 * @param snapshot - The snapshot timestamp.
1360 * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp
1361 */
1362 withSnapshot(snapshot: string): BlobClient;
1363 /**
1364 * Creates a new BlobClient object pointing to a version of this blob.
1365 * Provide "" will remove the versionId and return a Client to the base blob.
1366 *
1367 * @param versionId - The versionId.
1368 * @returns A new BlobClient object pointing to the version of this blob.
1369 */
1370 withVersion(versionId: string): BlobClient;
1371 /**
1372 * Creates a AppendBlobClient object.
1373 *
1374 */
1375 getAppendBlobClient(): AppendBlobClient;
1376 /**
1377 * Creates a BlockBlobClient object.
1378 *
1379 */
1380 getBlockBlobClient(): BlockBlobClient;
1381 /**
1382 * Creates a PageBlobClient object.
1383 *
1384 */
1385 getPageBlobClient(): PageBlobClient;
1386 /**
1387 * Reads or downloads a blob from the system, including its metadata and properties.
1388 * You can also call Get Blob to read a snapshot.
1389 *
1390 * * In Node.js, data returns in a Readable stream readableStreamBody
1391 * * In browsers, data returns in a promise blobBody
1392 *
1393 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob
1394 *
1395 * @param offset - From which position of the blob to download, greater than or equal to 0
1396 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
1397 * @param options - Optional options to Blob Download operation.
1398 *
1399 *
1400 * Example usage (Node.js):
1401 *
1402 * ```js
1403 * // Download and convert a blob to a string
1404 * const downloadBlockBlobResponse = await blobClient.download();
1405 * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody);
1406 * console.log("Downloaded blob content:", downloaded.toString());
1407 *
1408 * async function streamToBuffer(readableStream) {
1409 * return new Promise((resolve, reject) => {
1410 * const chunks = [];
1411 * readableStream.on("data", (data) => {
1412 * chunks.push(data instanceof Buffer ? data : Buffer.from(data));
1413 * });
1414 * readableStream.on("end", () => {
1415 * resolve(Buffer.concat(chunks));
1416 * });
1417 * readableStream.on("error", reject);
1418 * });
1419 * }
1420 * ```
1421 *
1422 * Example usage (browser):
1423 *
1424 * ```js
1425 * // Download and convert a blob to a string
1426 * const downloadBlockBlobResponse = await blobClient.download();
1427 * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody);
1428 * console.log(
1429 * "Downloaded blob content",
1430 * downloaded
1431 * );
1432 *
1433 * async function blobToString(blob: Blob): Promise<string> {
1434 * const fileReader = new FileReader();
1435 * return new Promise<string>((resolve, reject) => {
1436 * fileReader.onloadend = (ev: any) => {
1437 * resolve(ev.target!.result);
1438 * };
1439 * fileReader.onerror = reject;
1440 * fileReader.readAsText(blob);
1441 * });
1442 * }
1443 * ```
1444 */
1445 download(offset?: number, count?: number, options?: BlobDownloadOptions): Promise<BlobDownloadResponseParsed>;
1446 /**
1447 * Returns true if the Azure blob resource represented by this client exists; false otherwise.
1448 *
1449 * NOTE: use this function with care since an existing blob might be deleted by other clients or
1450 * applications. Vice versa new blobs might be added by other clients or applications after this
1451 * function completes.
1452 *
1453 * @param options - options to Exists operation.
1454 */
1455 exists(options?: BlobExistsOptions): Promise<boolean>;
1456 /**
1457 * Returns all user-defined metadata, standard HTTP properties, and system properties
1458 * for the blob. It does not return the content of the blob.
1459 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties
1460 *
1461 * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
1462 * they originally contained uppercase characters. This differs from the metadata keys returned by
1463 * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which
1464 * will retain their original casing.
1465 *
1466 * @param options - Optional options to Get Properties operation.
1467 */
1468 getProperties(options?: BlobGetPropertiesOptions): Promise<BlobGetPropertiesResponse>;
1469 /**
1470 * Marks the specified blob or snapshot for deletion. The blob is later deleted
1471 * during garbage collection. Note that in order to delete a blob, you must delete
1472 * all of its snapshots. You can delete both at the same time with the Delete
1473 * Blob operation.
1474 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob
1475 *
1476 * @param options - Optional options to Blob Delete operation.
1477 */
1478 delete(options?: BlobDeleteOptions): Promise<BlobDeleteResponse>;
1479 /**
1480 * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted
1481 * during garbage collection. Note that in order to delete a blob, you must delete
1482 * all of its snapshots. You can delete both at the same time with the Delete
1483 * Blob operation.
1484 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob
1485 *
1486 * @param options - Optional options to Blob Delete operation.
1487 */
1488 deleteIfExists(options?: BlobDeleteOptions): Promise<BlobDeleteIfExistsResponse>;
1489 /**
1490 * Restores the contents and metadata of soft deleted blob and any associated
1491 * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29
1492 * or later.
1493 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob
1494 *
1495 * @param options - Optional options to Blob Undelete operation.
1496 */
1497 undelete(options?: BlobUndeleteOptions): Promise<BlobUndeleteResponse>;
1498 /**
1499 * Sets system properties on the blob.
1500 *
1501 * If no value provided, or no value provided for the specified blob HTTP headers,
1502 * these blob HTTP headers without a value will be cleared.
1503 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
1504 *
1505 * @param blobHTTPHeaders - If no value provided, or no value provided for
1506 * the specified blob HTTP headers, these blob HTTP
1507 * headers without a value will be cleared.
1508 * A common header to set is `blobContentType`
1509 * enabling the browser to provide functionality
1510 * based on file type.
1511 * @param options - Optional options to Blob Set HTTP Headers operation.
1512 */
1513 setHTTPHeaders(blobHTTPHeaders?: BlobHTTPHeaders, options?: BlobSetHTTPHeadersOptions): Promise<BlobSetHTTPHeadersResponse>;
1514 /**
1515 * Sets user-defined metadata for the specified blob as one or more name-value pairs.
1516 *
1517 * If no option provided, or no metadata defined in the parameter, the blob
1518 * metadata will be removed.
1519 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata
1520 *
1521 * @param metadata - Replace existing metadata with this value.
1522 * If no value provided the existing metadata will be removed.
1523 * @param options - Optional options to Set Metadata operation.
1524 */
1525 setMetadata(metadata?: Metadata, options?: BlobSetMetadataOptions): Promise<BlobSetMetadataResponse>;
1526 /**
1527 * Sets tags on the underlying blob.
1528 * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters.
1529 * Valid tag key and value characters include lower and upper case letters, digits (0-9),
1530 * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').
1531 *
1532 * @param tags -
1533 * @param options -
1534 */
1535 setTags(tags: Tags, options?: BlobSetTagsOptions): Promise<BlobSetTagsResponse>;
1536 /**
1537 * Gets the tags associated with the underlying blob.
1538 *
1539 * @param options -
1540 */
1541 getTags(options?: BlobGetTagsOptions): Promise<BlobGetTagsResponse>;
1542 /**
1543 * Get a {@link BlobLeaseClient} that manages leases on the blob.
1544 *
1545 * @param proposeLeaseId - Initial proposed lease Id.
1546 * @returns A new BlobLeaseClient object for managing leases on the blob.
1547 */
1548 getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient;
1549 /**
1550 * Creates a read-only snapshot of a blob.
1551 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob
1552 *
1553 * @param options - Optional options to the Blob Create Snapshot operation.
1554 */
1555 createSnapshot(options?: BlobCreateSnapshotOptions): Promise<BlobCreateSnapshotResponse>;
1556 /**
1557 * Asynchronously copies a blob to a destination within the storage account.
1558 * This method returns a long running operation poller that allows you to wait
1559 * indefinitely until the copy is completed.
1560 * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.
1561 * Note that the onProgress callback will not be invoked if the operation completes in the first
1562 * request, and attempting to cancel a completed copy will result in an error being thrown.
1563 *
1564 * In version 2012-02-12 and later, the source for a Copy Blob operation can be
1565 * a committed blob in any Azure storage account.
1566 * Beginning with version 2015-02-21, the source for a Copy Blob operation can be
1567 * an Azure file in any Azure storage account.
1568 * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
1569 * operation to copy from another storage account.
1570 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob
1571 *
1572 * Example using automatic polling:
1573 *
1574 * ```js
1575 * const copyPoller = await blobClient.beginCopyFromURL('url');
1576 * const result = await copyPoller.pollUntilDone();
1577 * ```
1578 *
1579 * Example using manual polling:
1580 *
1581 * ```js
1582 * const copyPoller = await blobClient.beginCopyFromURL('url');
1583 * while (!poller.isDone()) {
1584 * await poller.poll();
1585 * }
1586 * const result = copyPoller.getResult();
1587 * ```
1588 *
1589 * Example using progress updates:
1590 *
1591 * ```js
1592 * const copyPoller = await blobClient.beginCopyFromURL('url', {
1593 * onProgress(state) {
1594 * console.log(`Progress: ${state.copyProgress}`);
1595 * }
1596 * });
1597 * const result = await copyPoller.pollUntilDone();
1598 * ```
1599 *
1600 * Example using a changing polling interval (default 15 seconds):
1601 *
1602 * ```js
1603 * const copyPoller = await blobClient.beginCopyFromURL('url', {
1604 * intervalInMs: 1000 // poll blob every 1 second for copy progress
1605 * });
1606 * const result = await copyPoller.pollUntilDone();
1607 * ```
1608 *
1609 * Example using copy cancellation:
1610 *
1611 * ```js
1612 * const copyPoller = await blobClient.beginCopyFromURL('url');
1613 * // cancel operation after starting it.
1614 * try {
1615 * await copyPoller.cancelOperation();
1616 * // calls to get the result now throw PollerCancelledError
1617 * await copyPoller.getResult();
1618 * } catch (err) {
1619 * if (err.name === 'PollerCancelledError') {
1620 * console.log('The copy was cancelled.');
1621 * }
1622 * }
1623 * ```
1624 *
1625 * @param copySource - url to the source Azure Blob/File.
1626 * @param options - Optional options to the Blob Start Copy From URL operation.
1627 */
1628 beginCopyFromURL(copySource: string, options?: BlobBeginCopyFromURLOptions): Promise<PollerLike<PollOperationState<BlobBeginCopyFromURLResponse>, BlobBeginCopyFromURLResponse>>;
1629 /**
1630 * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero
1631 * length and full metadata. Version 2012-02-12 and newer.
1632 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob
1633 *
1634 * @param copyId - Id of the Copy From URL operation.
1635 * @param options - Optional options to the Blob Abort Copy From URL operation.
1636 */
1637 abortCopyFromURL(copyId: string, options?: BlobAbortCopyFromURLOptions): Promise<BlobAbortCopyFromURLResponse>;
1638 /**
1639 * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not
1640 * return a response until the copy is complete.
1641 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url
1642 *
1643 * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication
1644 * @param options -
1645 */
1646 syncCopyFromURL(copySource: string, options?: BlobSyncCopyFromURLOptions): Promise<BlobCopyFromURLResponse>;
1647 /**
1648 * Sets the tier on a blob. The operation is allowed on a page blob in a premium
1649 * storage account and on a block blob in a blob storage account (locally redundant
1650 * storage only). A premium page blob's tier determines the allowed size, IOPS,
1651 * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive
1652 * storage type. This operation does not update the blob's ETag.
1653 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier
1654 *
1655 * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive.
1656 * @param options - Optional options to the Blob Set Tier operation.
1657 */
1658 setAccessTier(tier: BlockBlobTier | PremiumPageBlobTier | string, options?: BlobSetTierOptions): Promise<BlobSetTierResponse>;
1659 /**
1660 * ONLY AVAILABLE IN NODE.JS RUNTIME.
1661 *
1662 * Downloads an Azure Blob in parallel to a buffer.
1663 * Offset and count are optional, downloads the entire blob if they are not provided.
1664 *
1665 * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two
1666 * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,
1667 * consider {@link downloadToFile}.
1668 *
1669 * @param offset - From which position of the block blob to download(in bytes)
1670 * @param count - How much data(in bytes) to be downloaded. Will download to the end when passing undefined
1671 * @param options - BlobDownloadToBufferOptions
1672 */
1673 downloadToBuffer(offset?: number, count?: number, options?: BlobDownloadToBufferOptions): Promise<Buffer>;
1674 /**
1675 * ONLY AVAILABLE IN NODE.JS RUNTIME.
1676 *
1677 * Downloads an Azure Blob in parallel to a buffer.
1678 * Offset and count are optional, downloads the entire blob if they are not provided.
1679 *
1680 * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two
1681 * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,
1682 * consider {@link downloadToFile}.
1683 *
1684 * @param buffer - Buffer to be fill, must have length larger than count
1685 * @param offset - From which position of the block blob to download(in bytes)
1686 * @param count - How much data(in bytes) to be downloaded. Will download to the end when passing undefined
1687 * @param options - BlobDownloadToBufferOptions
1688 */
1689 downloadToBuffer(buffer: Buffer, offset?: number, count?: number, options?: BlobDownloadToBufferOptions): Promise<Buffer>;
1690 /**
1691 * ONLY AVAILABLE IN NODE.JS RUNTIME.
1692 *
1693 * Downloads an Azure Blob to a local file.
1694 * Fails if the the given file path already exits.
1695 * Offset and count are optional, pass 0 and undefined respectively to download the entire blob.
1696 *
1697 * @param filePath -
1698 * @param offset - From which position of the block blob to download.
1699 * @param count - How much data to be downloaded. Will download to the end when passing undefined.
1700 * @param options - Options to Blob download options.
1701 * @returns The response data for blob download operation,
1702 * but with readableStreamBody set to undefined since its
1703 * content is already read and written into a local file
1704 * at the specified path.
1705 */
1706 downloadToFile(filePath: string, offset?: number, count?: number, options?: BlobDownloadOptions): Promise<BlobDownloadResponseParsed>;
1707 private getBlobAndContainerNamesFromUrl;
1708 /**
1709 * Asynchronously copies a blob to a destination within the storage account.
1710 * In version 2012-02-12 and later, the source for a Copy Blob operation can be
1711 * a committed blob in any Azure storage account.
1712 * Beginning with version 2015-02-21, the source for a Copy Blob operation can be
1713 * an Azure file in any Azure storage account.
1714 * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
1715 * operation to copy from another storage account.
1716 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob
1717 *
1718 * @param copySource - url to the source Azure Blob/File.
1719 * @param options - Optional options to the Blob Start Copy From URL operation.
1720 */
1721 private startCopyFromURL;
1722 /**
1723 * Only available for BlobClient constructed with a shared key credential.
1724 *
1725 * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties
1726 * and parameters passed in. The SAS is signed by the shared key credential of the client.
1727 *
1728 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
1729 *
1730 * @param options - Optional parameters.
1731 * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
1732 */
1733 generateSasUrl(options: BlobGenerateSasUrlOptions): Promise<string>;
1734 /**
1735 * Delete the immutablility policy on the blob.
1736 *
1737 * @param options - Optional options to delete immutability policy on the blob.
1738 */
1739 deleteImmutabilityPolicy(options?: BlobDeleteImmutabilityPolicyOptions): Promise<BlobDeleteImmutabilityPolicyResponse>;
1740 /**
1741 * Set immutablility policy on the blob.
1742 *
1743 * @param options - Optional options to set immutability policy on the blob.
1744 */
1745 setImmutabilityPolicy(immutabilityPolicy: BlobImmutabilityPolicy, options?: BlobSetImmutabilityPolicyOptions): Promise<BlobSetImmutabilityPolicyResponse>;
1746 /**
1747 * Set legal hold on the blob.
1748 *
1749 * @param options - Optional options to set legal hold on the blob.
1750 */
1751 setLegalHold(legalHoldEnabled: boolean, options?: BlobSetLegalHoldOptions): Promise<BlobSetLegalHoldResponse>;
1752}
1753
1754/** Defines headers for Blob_copyFromURL operation. */
1755export declare interface BlobCopyFromURLHeaders {
1756 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
1757 etag?: string;
1758 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
1759 lastModified?: Date;
1760 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
1761 clientRequestId?: string;
1762 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
1763 requestId?: string;
1764 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
1765 version?: string;
1766 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
1767 versionId?: string;
1768 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
1769 date?: Date;
1770 /** String identifier for this copy operation. */
1771 copyId?: string;
1772 /** State of the copy operation identified by x-ms-copy-id. */
1773 copyStatus?: SyncCopyStatusType;
1774 /** This response header is returned so that the client can check for the integrity of the copied content. This header is only returned if the source content MD5 was specified. */
1775 contentMD5?: Uint8Array;
1776 /** This response header is returned so that the client can check for the integrity of the copied content. */
1777 xMsContentCrc64?: Uint8Array;
1778 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
1779 encryptionScope?: string;
1780 /** Error Code */
1781 errorCode?: string;
1782}
1783
1784/** Contains response data for the copyFromURL operation. */
1785export declare type BlobCopyFromURLResponse = BlobCopyFromURLHeaders & {
1786 /** The underlying HTTP response. */
1787 _response: coreHttp.HttpResponse & {
1788 /** The parsed HTTP response headers. */
1789 parsedHeaders: BlobCopyFromURLHeaders;
1790 };
1791};
1792
1793/** Defines values for BlobCopySourceTags. */
1794export declare type BlobCopySourceTags = "REPLACE" | "COPY";
1795
1796/** Defines headers for Blob_createSnapshot operation. */
1797export declare interface BlobCreateSnapshotHeaders {
1798 /** Uniquely identifies the snapshot and indicates the snapshot version. It may be used in subsequent requests to access the snapshot */
1799 snapshot?: string;
1800 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
1801 etag?: string;
1802 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
1803 lastModified?: Date;
1804 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
1805 clientRequestId?: string;
1806 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
1807 requestId?: string;
1808 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
1809 version?: string;
1810 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
1811 versionId?: string;
1812 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
1813 date?: Date;
1814 /** True if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. For a snapshot request, this header is set to true when metadata was provided in the request and encrypted with a customer-provided key. */
1815 isServerEncrypted?: boolean;
1816 /** Error Code */
1817 errorCode?: string;
1818}
1819
1820/**
1821 * Options to configure the {@link BlobClient.createSnapshot} operation.
1822 */
1823export declare interface BlobCreateSnapshotOptions extends CommonOptions {
1824 /**
1825 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
1826 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
1827 */
1828 abortSignal?: AbortSignalLike;
1829 /**
1830 * A collection of key-value string pair to associate with the snapshot.
1831 */
1832 metadata?: Metadata;
1833 /**
1834 * Conditions to meet when creating blob snapshots.
1835 */
1836 conditions?: BlobRequestConditions;
1837 /**
1838 * Customer Provided Key Info.
1839 */
1840 customerProvidedKey?: CpkInfo;
1841 /**
1842 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
1843 * encrypt the data provided in the request. If not specified, encryption is performed with the
1844 * default account encryption scope. For more information, see Encryption at Rest for Azure
1845 * Storage Services.
1846 */
1847 encryptionScope?: string;
1848}
1849
1850/** Contains response data for the createSnapshot operation. */
1851export declare type BlobCreateSnapshotResponse = BlobCreateSnapshotHeaders & {
1852 /** The underlying HTTP response. */
1853 _response: coreHttp.HttpResponse & {
1854 /** The parsed HTTP response headers. */
1855 parsedHeaders: BlobCreateSnapshotHeaders;
1856 };
1857};
1858
1859/** Defines headers for Blob_delete operation. */
1860export declare interface BlobDeleteHeaders {
1861 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
1862 clientRequestId?: string;
1863 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
1864 requestId?: string;
1865 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
1866 version?: string;
1867 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
1868 date?: Date;
1869 /** Error Code */
1870 errorCode?: string;
1871}
1872
1873/**
1874 * Contains response data for the {@link BlobClient.deleteIfExists} operation.
1875 */
1876export declare interface BlobDeleteIfExistsResponse extends BlobDeleteResponse {
1877 /**
1878 * Indicate whether the blob is successfully deleted. Is false if the blob does not exist in the first place.
1879 */
1880 succeeded: boolean;
1881}
1882
1883/** Defines headers for Blob_deleteImmutabilityPolicy operation. */
1884export declare interface BlobDeleteImmutabilityPolicyHeaders {
1885 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
1886 clientRequestId?: string;
1887 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
1888 requestId?: string;
1889 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
1890 version?: string;
1891 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
1892 date?: Date;
1893}
1894
1895/**
1896 * Options for deleting immutability policy {@link BlobClient.deleteImmutabilityPolicy} operation.
1897 */
1898export declare interface BlobDeleteImmutabilityPolicyOptions extends CommonOptions {
1899 /**
1900 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
1901 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
1902 */
1903 abortSignal?: AbortSignalLike;
1904}
1905
1906/** Contains response data for the deleteImmutabilityPolicy operation. */
1907export declare type BlobDeleteImmutabilityPolicyResponse = BlobDeleteImmutabilityPolicyHeaders & {
1908 /** The underlying HTTP response. */
1909 _response: coreHttp.HttpResponse & {
1910 /** The parsed HTTP response headers. */
1911 parsedHeaders: BlobDeleteImmutabilityPolicyHeaders;
1912 };
1913};
1914
1915/**
1916 * Options to configure the {@link BlobClient.delete} operation.
1917 */
1918export declare interface BlobDeleteOptions extends CommonOptions {
1919 /**
1920 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
1921 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
1922 */
1923 abortSignal?: AbortSignalLike;
1924 /**
1925 * Conditions to meet when deleting blobs.
1926 */
1927 conditions?: BlobRequestConditions;
1928 /**
1929 * Specifies options to delete blobs that have associated snapshots.
1930 * - `include`: Delete the base blob and all of its snapshots.
1931 * - `only`: Delete only the blob's snapshots and not the blob itself.
1932 */
1933 deleteSnapshots?: DeleteSnapshotsOptionType;
1934 /**
1935 * Customer Provided Key Info.
1936 */
1937 customerProvidedKey?: CpkInfo;
1938}
1939
1940/** Contains response data for the delete operation. */
1941export declare type BlobDeleteResponse = BlobDeleteHeaders & {
1942 /** The underlying HTTP response. */
1943 _response: coreHttp.HttpResponse & {
1944 /** The parsed HTTP response headers. */
1945 parsedHeaders: BlobDeleteHeaders;
1946 };
1947};
1948
1949/** Defines headers for Blob_download operation. */
1950export declare interface BlobDownloadHeaders {
1951 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
1952 lastModified?: Date;
1953 metadata?: {
1954 [propertyName: string]: string;
1955 };
1956 /** Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication. */
1957 objectReplicationPolicyId?: string;
1958 /** Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed). */
1959 objectReplicationRules?: {
1960 [propertyName: string]: string;
1961 };
1962 /** The number of bytes present in the response body. */
1963 contentLength?: number;
1964 /** The media type of the body of the response. For Download Blob this is 'application/octet-stream' */
1965 contentType?: string;
1966 /** Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header. */
1967 contentRange?: string;
1968 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
1969 etag?: string;
1970 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
1971 contentMD5?: Uint8Array;
1972 /** This header returns the value that was specified for the Content-Encoding request header */
1973 contentEncoding?: string;
1974 /** This header is returned if it was previously specified for the blob. */
1975 cacheControl?: string;
1976 /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */
1977 contentDisposition?: string;
1978 /** This header returns the value that was specified for the Content-Language request header. */
1979 contentLanguage?: string;
1980 /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs */
1981 blobSequenceNumber?: number;
1982 /** The blob's type. */
1983 blobType?: BlobType;
1984 /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */
1985 copyCompletedOn?: Date;
1986 /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */
1987 copyStatusDescription?: string;
1988 /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */
1989 copyId?: string;
1990 /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */
1991 copyProgress?: string;
1992 /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */
1993 copySource?: string;
1994 /** State of the copy operation identified by x-ms-copy-id. */
1995 copyStatus?: CopyStatusType;
1996 /** When a blob is leased, specifies whether the lease is of infinite or fixed duration. */
1997 leaseDuration?: LeaseDurationType;
1998 /** Lease state of the blob. */
1999 leaseState?: LeaseStateType;
2000 /** The current lease status of the blob. */
2001 leaseStatus?: LeaseStatusType;
2002 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
2003 clientRequestId?: string;
2004 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
2005 requestId?: string;
2006 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
2007 version?: string;
2008 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
2009 versionId?: string;
2010 /** The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header. */
2011 isCurrentVersion?: boolean;
2012 /** Indicates that the service supports requests for partial blob content. */
2013 acceptRanges?: string;
2014 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
2015 date?: Date;
2016 /** The number of committed blocks present in the blob. This header is returned only for append blobs. */
2017 blobCommittedBlockCount?: number;
2018 /** The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). */
2019 isServerEncrypted?: boolean;
2020 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
2021 encryptionKeySha256?: string;
2022 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
2023 encryptionScope?: string;
2024 /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */
2025 blobContentMD5?: Uint8Array;
2026 /** The number of tags associated with the blob */
2027 tagCount?: number;
2028 /** If this blob has been sealed */
2029 isSealed?: boolean;
2030 /** UTC date/time value generated by the service that indicates the time at which the blob was last read or written to */
2031 lastAccessed?: Date;
2032 /** UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. */
2033 immutabilityPolicyExpiresOn?: Date;
2034 /** Indicates immutability policy mode. */
2035 immutabilityPolicyMode?: BlobImmutabilityPolicyMode;
2036 /** Indicates if a legal hold is present on the blob. */
2037 legalHold?: boolean;
2038 /** Error Code */
2039 errorCode?: string;
2040 /** If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the request returns a crc64 for the range, as long as the range size is less than or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is specified in the same request, it will fail with 400(Bad Request). */
2041 contentCrc64?: Uint8Array;
2042}
2043
2044/** Optional parameters. */
2045export declare interface BlobDownloadOptionalParams extends coreHttp.OperationOptions {
2046 /** Parameter group */
2047 leaseAccessConditions?: LeaseAccessConditions;
2048 /** Parameter group */
2049 modifiedAccessConditions?: ModifiedAccessConditionsModel;
2050 /** Parameter group */
2051 cpkInfo?: CpkInfo;
2052 /** The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a> */
2053 timeoutInSeconds?: number;
2054 /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
2055 requestId?: string;
2056 /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a> */
2057 snapshot?: string;
2058 /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */
2059 versionId?: string;
2060 /** Return only the bytes of the blob in the specified range. */
2061 range?: string;
2062 /** When set to true and specified together with the Range, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. */
2063 rangeGetContentMD5?: boolean;
2064 /** When set to true and specified together with the Range, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 MB in size. */
2065 rangeGetContentCRC64?: boolean;
2066}
2067
2068/**
2069 * Options to configure the {@link BlobClient.download} operation.
2070 */
2071export declare interface BlobDownloadOptions extends CommonOptions {
2072 /**
2073 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
2074 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
2075 */
2076 abortSignal?: AbortSignalLike;
2077 /**
2078 * An opaque DateTime string value that, when present, specifies the blob snapshot to retrieve.
2079 */
2080 snapshot?: string;
2081 /**
2082 * When this is set to true and download range of blob, the service returns the MD5 hash for the range,
2083 * as long as the range is less than or equal to 4 MB in size.
2084 *
2085 * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.
2086 */
2087 rangeGetContentMD5?: boolean;
2088 /**
2089 * When this is set to true and download range of blob, the service returns the CRC64 hash for the range,
2090 * as long as the range is less than or equal to 4 MB in size.
2091 *
2092 * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.
2093 */
2094 rangeGetContentCrc64?: boolean;
2095 /**
2096 * Conditions to meet when downloading blobs.
2097 */
2098 conditions?: BlobRequestConditions;
2099 /**
2100 * Call back to receive events on the progress of download operation.
2101 */
2102 onProgress?: (progress: TransferProgressEvent) => void;
2103 /**
2104 * Optional. ONLY AVAILABLE IN NODE.JS.
2105 *
2106 * How many retries will perform when original body download stream unexpected ends.
2107 * Above kind of ends will not trigger retry policy defined in a pipeline,
2108 * because they doesn't emit network errors.
2109 *
2110 * With this option, every additional retry means an additional `FileClient.download()` request will be made
2111 * from the broken point, until the requested range has been successfully downloaded or maxRetryRequests is reached.
2112 *
2113 * Default value is 5, please set a larger value when loading large files in poor network.
2114 */
2115 maxRetryRequests?: number;
2116 /**
2117 * Customer Provided Key Info.
2118 */
2119 customerProvidedKey?: CpkInfo;
2120}
2121
2122/** Contains response data for the download operation. */
2123export declare type BlobDownloadResponseModel = BlobDownloadHeaders & {
2124 /**
2125 * BROWSER ONLY
2126 *
2127 * The response body as a browser Blob.
2128 * Always `undefined` in node.js.
2129 */
2130 blobBody?: Promise<Blob>;
2131 /**
2132 * NODEJS ONLY
2133 *
2134 * The response body as a node.js Readable stream.
2135 * Always `undefined` in the browser.
2136 */
2137 readableStreamBody?: NodeJS.ReadableStream;
2138 /** The underlying HTTP response. */
2139 _response: coreHttp.HttpResponse & {
2140 /** The parsed HTTP response headers. */
2141 parsedHeaders: BlobDownloadHeaders;
2142 };
2143};
2144
2145/**
2146 * Contains response data for the {@link BlobClient.download} operation.
2147 */
2148export declare interface BlobDownloadResponseParsed extends BlobDownloadResponseModel {
2149 /**
2150 * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.
2151 */
2152 objectReplicationSourceProperties?: ObjectReplicationPolicy[];
2153 /**
2154 * Object Replication Policy Id of the destination blob.
2155 */
2156 objectReplicationDestinationPolicyId?: string;
2157}
2158
2159/**
2160 * Option interface for the {@link BlobClient.downloadToBuffer} operation.
2161 */
2162export declare interface BlobDownloadToBufferOptions extends CommonOptions {
2163 /**
2164 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
2165 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
2166 */
2167 abortSignal?: AbortSignalLike;
2168 /**
2169 * blockSize is the data every request trying to download.
2170 * Must be greater than or equal to 0.
2171 * If set to 0 or undefined, blockSize will automatically calculated according to the blob size.
2172 */
2173 blockSize?: number;
2174 /**
2175 * Optional. ONLY AVAILABLE IN NODE.JS.
2176 *
2177 * How many retries will perform when original block download stream unexpected ends.
2178 * Above kind of ends will not trigger retry policy defined in a pipeline,
2179 * because they doesn't emit network errors.
2180 *
2181 * With this option, every additional retry means an additional FileClient.download() request will be made
2182 * from the broken point, until the requested block has been successfully downloaded or
2183 * maxRetryRequestsPerBlock is reached.
2184 *
2185 * Default value is 5, please set a larger value when in poor network.
2186 */
2187 maxRetryRequestsPerBlock?: number;
2188 /**
2189 * Progress updater.
2190 */
2191 onProgress?: (progress: TransferProgressEvent) => void;
2192 /**
2193 * Access conditions headers.
2194 */
2195 conditions?: BlobRequestConditions;
2196 /**
2197 * Concurrency of parallel download.
2198 */
2199 concurrency?: number;
2200 /**
2201 * Customer Provided Key Info.
2202 */
2203 customerProvidedKey?: CpkInfo;
2204}
2205
2206/**
2207 * Options to configure the {@link BlobClient.exists} operation.
2208 */
2209export declare interface BlobExistsOptions extends CommonOptions {
2210 /**
2211 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
2212 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
2213 */
2214 abortSignal?: AbortSignalLike;
2215 /**
2216 * Customer Provided Key Info.
2217 */
2218 customerProvidedKey?: CpkInfo;
2219 /**
2220 * Conditions to meet.
2221 */
2222 conditions?: BlobRequestConditions;
2223}
2224
2225/**
2226 * An interface representing BlobFlatListSegment.
2227 */
2228export declare interface BlobFlatListSegment {
2229 blobItems: BlobItem[];
2230}
2231
2232export declare interface BlobFlatListSegmentModel {
2233 blobItems: BlobItemInternal[];
2234}
2235
2236/**
2237 * Options to configure {@link BlobClient.generateSasUrl} operation.
2238 */
2239export declare interface BlobGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {
2240 /**
2241 * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.
2242 */
2243 permissions?: BlobSASPermissions;
2244}
2245
2246/** Defines headers for Blob_getProperties operation. */
2247export declare interface BlobGetPropertiesHeaders {
2248 /** Returns the date and time the blob was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
2249 lastModified?: Date;
2250 /** Returns the date and time the blob was created. */
2251 createdOn?: Date;
2252 metadata?: {
2253 [propertyName: string]: string;
2254 };
2255 /** Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication. */
2256 objectReplicationPolicyId?: string;
2257 /** Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed). */
2258 objectReplicationRules?: {
2259 [propertyName: string]: string;
2260 };
2261 /** The blob's type. */
2262 blobType?: BlobType;
2263 /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */
2264 copyCompletedOn?: Date;
2265 /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */
2266 copyStatusDescription?: string;
2267 /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */
2268 copyId?: string;
2269 /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */
2270 copyProgress?: string;
2271 /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */
2272 copySource?: string;
2273 /** State of the copy operation identified by x-ms-copy-id. */
2274 copyStatus?: CopyStatusType;
2275 /** Included if the blob is incremental copy blob. */
2276 isIncrementalCopy?: boolean;
2277 /** Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot for this blob. */
2278 destinationSnapshot?: string;
2279 /** When a blob is leased, specifies whether the lease is of infinite or fixed duration. */
2280 leaseDuration?: LeaseDurationType;
2281 /** Lease state of the blob. */
2282 leaseState?: LeaseStateType;
2283 /** The current lease status of the blob. */
2284 leaseStatus?: LeaseStatusType;
2285 /** The size of the blob in bytes. For a page blob, this header returns the value of the x-ms-blob-content-length header that is stored with the blob. */
2286 contentLength?: number;
2287 /** The content type specified for the blob. The default content type is 'application/octet-stream' */
2288 contentType?: string;
2289 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
2290 etag?: string;
2291 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
2292 contentMD5?: Uint8Array;
2293 /** This header returns the value that was specified for the Content-Encoding request header */
2294 contentEncoding?: string;
2295 /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */
2296 contentDisposition?: string;
2297 /** This header returns the value that was specified for the Content-Language request header. */
2298 contentLanguage?: string;
2299 /** This header is returned if it was previously specified for the blob. */
2300 cacheControl?: string;
2301 /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs */
2302 blobSequenceNumber?: number;
2303 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
2304 clientRequestId?: string;
2305 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
2306 requestId?: string;
2307 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
2308 version?: string;
2309 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
2310 date?: Date;
2311 /** Indicates that the service supports requests for partial blob content. */
2312 acceptRanges?: string;
2313 /** The number of committed blocks present in the blob. This header is returned only for append blobs. */
2314 blobCommittedBlockCount?: number;
2315 /** The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). */
2316 isServerEncrypted?: boolean;
2317 /** The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the metadata was encrypted with a customer-provided key. */
2318 encryptionKeySha256?: string;
2319 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
2320 encryptionScope?: string;
2321 /** The tier of page blob on a premium storage account or tier of block blob on blob storage LRS accounts. For a list of allowed premium page blob tiers, see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features. For blob storage LRS accounts, valid values are Hot/Cool/Archive. */
2322 accessTier?: string;
2323 /** For page blobs on a premium storage account only. If the access tier is not explicitly set on the blob, the tier is inferred based on its content length and this header will be returned with true value. */
2324 accessTierInferred?: boolean;
2325 /** For blob storage LRS accounts, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not complete then this header is returned indicating that rehydrate is pending and also tells the destination tier. */
2326 archiveStatus?: string;
2327 /** The time the tier was changed on the object. This is only returned if the tier on the block blob was ever set. */
2328 accessTierChangedOn?: Date;
2329 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
2330 versionId?: string;
2331 /** The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header. */
2332 isCurrentVersion?: boolean;
2333 /** The number of tags associated with the blob */
2334 tagCount?: number;
2335 /** The time this blob will expire. */
2336 expiresOn?: Date;
2337 /** If this blob has been sealed */
2338 isSealed?: boolean;
2339 /** If an object is in rehydrate pending state then this header is returned with priority of rehydrate. */
2340 rehydratePriority?: RehydratePriority;
2341 /** UTC date/time value generated by the service that indicates the time at which the blob was last read or written to */
2342 lastAccessed?: Date;
2343 /** UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. */
2344 immutabilityPolicyExpiresOn?: Date;
2345 /** Indicates immutability policy mode. */
2346 immutabilityPolicyMode?: BlobImmutabilityPolicyMode;
2347 /** Indicates if a legal hold is present on the blob. */
2348 legalHold?: boolean;
2349 /** Error Code */
2350 errorCode?: string;
2351}
2352
2353/**
2354 * Options to configure the {@link BlobClient.getProperties} operation.
2355 */
2356export declare interface BlobGetPropertiesOptions extends CommonOptions {
2357 /**
2358 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
2359 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
2360 */
2361 abortSignal?: AbortSignalLike;
2362 /**
2363 * Conditions to meet when getting blob properties.
2364 */
2365 conditions?: BlobRequestConditions;
2366 /**
2367 * Customer Provided Key Info.
2368 */
2369 customerProvidedKey?: CpkInfo;
2370}
2371
2372/**
2373 * Contains response data for the {@link BlobClient.getProperties} operation.
2374 */
2375export declare interface BlobGetPropertiesResponse extends BlobGetPropertiesResponseModel {
2376 /**
2377 * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.
2378 */
2379 objectReplicationSourceProperties?: ObjectReplicationPolicy[];
2380 /**
2381 * Object Replication Policy Id of the destination blob.
2382 */
2383 objectReplicationDestinationPolicyId?: string;
2384}
2385
2386/** Contains response data for the getProperties operation. */
2387export declare type BlobGetPropertiesResponseModel = BlobGetPropertiesHeaders & {
2388 /** The underlying HTTP response. */
2389 _response: coreHttp.HttpResponse & {
2390 /** The parsed HTTP response headers. */
2391 parsedHeaders: BlobGetPropertiesHeaders;
2392 };
2393};
2394
2395/** Defines headers for Blob_getTags operation. */
2396export declare interface BlobGetTagsHeaders {
2397 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
2398 clientRequestId?: string;
2399 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
2400 requestId?: string;
2401 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
2402 version?: string;
2403 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
2404 date?: Date;
2405 /** Error Code */
2406 errorCode?: string;
2407}
2408
2409/**
2410 * Options to configure the {@link BlobClient.getTags} operation.
2411 */
2412export declare interface BlobGetTagsOptions extends CommonOptions {
2413 /**
2414 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
2415 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
2416 */
2417 abortSignal?: AbortSignalLike;
2418 /**
2419 * Conditions to meet for the blob to perform this operation.
2420 */
2421 conditions?: TagConditions & LeaseAccessConditions;
2422}
2423
2424/**
2425 * Contains response data for the {@link BlobClient.getTags} operation.
2426 */
2427export declare type BlobGetTagsResponse = {
2428 tags: Tags;
2429} & BlobGetTagsHeaders & {
2430 /**
2431 * The underlying HTTP response.
2432 */
2433 _response: HttpResponse & {
2434 /**
2435 * The parsed HTTP response headers.
2436 */
2437 parsedHeaders: BlobGetTagsHeaders;
2438 /**
2439 * The response body as text (string format)
2440 */
2441 bodyAsText: string;
2442 /**
2443 * The response body as parsed JSON or XML
2444 */
2445 parsedBody: BlobTags;
2446 };
2447};
2448
2449/**
2450 * An interface representing BlobHierarchyListSegment.
2451 */
2452export declare interface BlobHierarchyListSegment {
2453 blobPrefixes?: BlobPrefix[];
2454 blobItems: BlobItem[];
2455}
2456
2457export declare interface BlobHierarchyListSegmentModel {
2458 blobPrefixes?: BlobPrefix[];
2459 blobItems: BlobItemInternal[];
2460}
2461
2462/** Parameter group */
2463export declare interface BlobHTTPHeaders {
2464 /** Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */
2465 blobCacheControl?: string;
2466 /** Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */
2467 blobContentType?: string;
2468 /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */
2469 blobContentMD5?: Uint8Array;
2470 /** Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */
2471 blobContentEncoding?: string;
2472 /** Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */
2473 blobContentLanguage?: string;
2474 /** Optional. Sets the blob's Content-Disposition header. */
2475 blobContentDisposition?: string;
2476}
2477
2478/**
2479 * Describe immutable policy for blob.
2480 */
2481export declare interface BlobImmutabilityPolicy {
2482 /**
2483 * Specifies the date time when the blobs immutability policy is set to expire.
2484 */
2485 expiriesOn?: Date;
2486 /**
2487 * Specifies the immutability policy mode to set on the blob.
2488 */
2489 policyMode?: BlobImmutabilityPolicyMode;
2490}
2491
2492/** Defines values for BlobImmutabilityPolicyMode. */
2493export declare type BlobImmutabilityPolicyMode = "Mutable" | "Unlocked" | "Locked";
2494
2495/**
2496 * An Azure Storage blob
2497 */
2498export declare interface BlobItem {
2499 name: string;
2500 deleted: boolean;
2501 snapshot: string;
2502 versionId?: string;
2503 isCurrentVersion?: boolean;
2504 properties: BlobProperties;
2505 metadata?: {
2506 [propertyName: string]: string;
2507 };
2508 tags?: Tags;
2509 objectReplicationSourceProperties?: ObjectReplicationPolicy[];
2510 hasVersionsOnly?: boolean;
2511}
2512
2513/** An Azure Storage blob */
2514export declare interface BlobItemInternal {
2515 name: string;
2516 deleted: boolean;
2517 snapshot: string;
2518 versionId?: string;
2519 isCurrentVersion?: boolean;
2520 /** Properties of a blob */
2521 properties: BlobProperties;
2522 /** Dictionary of <string> */
2523 metadata?: {
2524 [propertyName: string]: string;
2525 };
2526 /** Blob tags */
2527 blobTags?: BlobTags;
2528 /** Dictionary of <string> */
2529 objectReplicationMetadata?: {
2530 [propertyName: string]: string;
2531 };
2532 /** Inactive root blobs which have any versions would have such tag with value true. */
2533 hasVersionsOnly?: boolean;
2534}
2535
2536/**
2537 * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.
2538 */
2539export declare class BlobLeaseClient {
2540 private _leaseId;
2541 private _url;
2542 private _containerOrBlobOperation;
2543 private _isContainer;
2544 /**
2545 * Gets the lease Id.
2546 *
2547 * @readonly
2548 */
2549 get leaseId(): string;
2550 /**
2551 * Gets the url.
2552 *
2553 * @readonly
2554 */
2555 get url(): string;
2556 /**
2557 * Creates an instance of BlobLeaseClient.
2558 * @param client - The client to make the lease operation requests.
2559 * @param leaseId - Initial proposed lease id.
2560 */
2561 constructor(client: ContainerClient | BlobClient, leaseId?: string);
2562 /**
2563 * Establishes and manages a lock on a container for delete operations, or on a blob
2564 * for write and delete operations.
2565 * The lock duration can be 15 to 60 seconds, or can be infinite.
2566 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
2567 * and
2568 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
2569 *
2570 * @param duration - Must be between 15 to 60 seconds, or infinite (-1)
2571 * @param options - option to configure lease management operations.
2572 * @returns Response data for acquire lease operation.
2573 */
2574 acquireLease(duration: number, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>;
2575 /**
2576 * To change the ID of the lease.
2577 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
2578 * and
2579 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
2580 *
2581 * @param proposedLeaseId - the proposed new lease Id.
2582 * @param options - option to configure lease management operations.
2583 * @returns Response data for change lease operation.
2584 */
2585 changeLease(proposedLeaseId: string, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>;
2586 /**
2587 * To free the lease if it is no longer needed so that another client may
2588 * immediately acquire a lease against the container or the blob.
2589 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
2590 * and
2591 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
2592 *
2593 * @param options - option to configure lease management operations.
2594 * @returns Response data for release lease operation.
2595 */
2596 releaseLease(options?: LeaseOperationOptions): Promise<LeaseOperationResponse>;
2597 /**
2598 * To renew the lease.
2599 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
2600 * and
2601 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
2602 *
2603 * @param options - Optional option to configure lease management operations.
2604 * @returns Response data for renew lease operation.
2605 */
2606 renewLease(options?: LeaseOperationOptions): Promise<Lease>;
2607 /**
2608 * To end the lease but ensure that another client cannot acquire a new lease
2609 * until the current lease period has expired.
2610 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
2611 * and
2612 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
2613 *
2614 * @param breakPeriod - Break period
2615 * @param options - Optional options to configure lease management operations.
2616 * @returns Response data for break lease operation.
2617 */
2618 breakLease(breakPeriod: number, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>;
2619}
2620
2621export declare interface BlobPrefix {
2622 name: string;
2623}
2624
2625/** Properties of a blob */
2626export declare interface BlobProperties {
2627 createdOn?: Date;
2628 lastModified: Date;
2629 etag: string;
2630 /** Size in bytes */
2631 contentLength?: number;
2632 contentType?: string;
2633 contentEncoding?: string;
2634 contentLanguage?: string;
2635 contentMD5?: Uint8Array;
2636 contentDisposition?: string;
2637 cacheControl?: string;
2638 blobSequenceNumber?: number;
2639 blobType?: BlobType;
2640 leaseStatus?: LeaseStatusType;
2641 leaseState?: LeaseStateType;
2642 leaseDuration?: LeaseDurationType;
2643 copyId?: string;
2644 copyStatus?: CopyStatusType;
2645 copySource?: string;
2646 copyProgress?: string;
2647 copyCompletedOn?: Date;
2648 copyStatusDescription?: string;
2649 serverEncrypted?: boolean;
2650 incrementalCopy?: boolean;
2651 destinationSnapshot?: string;
2652 deletedOn?: Date;
2653 remainingRetentionDays?: number;
2654 accessTier?: AccessTier;
2655 accessTierInferred?: boolean;
2656 archiveStatus?: ArchiveStatus;
2657 customerProvidedKeySha256?: string;
2658 /** The name of the encryption scope under which the blob is encrypted. */
2659 encryptionScope?: string;
2660 accessTierChangedOn?: Date;
2661 tagCount?: number;
2662 expiresOn?: Date;
2663 isSealed?: boolean;
2664 /** If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard. */
2665 rehydratePriority?: RehydratePriority;
2666 lastAccessedOn?: Date;
2667 /** UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. */
2668 immutabilityPolicyExpiresOn?: Date;
2669 /** Indicates immutability policy mode. */
2670 immutabilityPolicyMode?: BlobImmutabilityPolicyMode;
2671 /** Indicates if a legal hold is present on the blob. */
2672 legalHold?: boolean;
2673}
2674
2675/**
2676 * Options to query blob with Apache Arrow format. Only valid for {@link BlockBlobQueryOptions.outputTextConfiguration}.
2677 */
2678export declare interface BlobQueryArrowConfiguration {
2679 /**
2680 * Kind.
2681 */
2682 kind: "arrow";
2683 /**
2684 * List of {@link BlobQueryArrowField} describing the schema of the data.
2685 */
2686 schema: BlobQueryArrowField[];
2687}
2688
2689/**
2690 * Describe a field in {@link BlobQueryArrowConfiguration}.
2691 */
2692export declare interface BlobQueryArrowField {
2693 /**
2694 * The type of the field.
2695 */
2696 type: BlobQueryArrowFieldType;
2697 /**
2698 * The name of the field.
2699 */
2700 name?: string;
2701 /**
2702 * The precision of the field. Required if type is "decimal".
2703 */
2704 precision?: number;
2705 /**
2706 * The scale of the field. Required if type is is "decimal".
2707 */
2708 scale?: number;
2709}
2710
2711/**
2712 * The type of a {@link BlobQueryArrowField}.
2713 */
2714export declare type BlobQueryArrowFieldType = "int64" | "bool" | "timestamp[ms]" | "string" | "double" | "decimal";
2715
2716/**
2717 * Options to query blob with CSV format.
2718 */
2719export declare interface BlobQueryCsvTextConfiguration {
2720 /**
2721 * Record separator.
2722 */
2723 recordSeparator: string;
2724 /**
2725 * Query for a CSV format blob.
2726 */
2727 kind: "csv";
2728 /**
2729 * Column separator. Default is ",".
2730 */
2731 columnSeparator?: string;
2732 /**
2733 * Field quote.
2734 */
2735 fieldQuote?: string;
2736 /**
2737 * Escape character.
2738 */
2739 escapeCharacter?: string;
2740 /**
2741 * Has headers. Default is false.
2742 */
2743 hasHeaders?: boolean;
2744}
2745
2746/**
2747 * Blob query error type.
2748 */
2749export declare interface BlobQueryError {
2750 /**
2751 * Whether error is fatal. Fatal error will stop query.
2752 */
2753 isFatal: boolean;
2754 /**
2755 * Error name.
2756 */
2757 name: string;
2758 /**
2759 * Position in bytes of the query.
2760 */
2761 position: number;
2762 /**
2763 * Error description.
2764 */
2765 description: string;
2766}
2767
2768/** Defines headers for Blob_query operation. */
2769export declare interface BlobQueryHeaders {
2770 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
2771 lastModified?: Date;
2772 metadata?: {
2773 [propertyName: string]: string;
2774 };
2775 /** The number of bytes present in the response body. */
2776 contentLength?: number;
2777 /** The media type of the body of the response. For Download Blob this is 'application/octet-stream' */
2778 contentType?: string;
2779 /** Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header. */
2780 contentRange?: string;
2781 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
2782 etag?: string;
2783 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
2784 contentMD5?: Uint8Array;
2785 /** This header returns the value that was specified for the Content-Encoding request header */
2786 contentEncoding?: string;
2787 /** This header is returned if it was previously specified for the blob. */
2788 cacheControl?: string;
2789 /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */
2790 contentDisposition?: string;
2791 /** This header returns the value that was specified for the Content-Language request header. */
2792 contentLanguage?: string;
2793 /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs */
2794 blobSequenceNumber?: number;
2795 /** The blob's type. */
2796 blobType?: BlobType;
2797 /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */
2798 copyCompletionTime?: Date;
2799 /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */
2800 copyStatusDescription?: string;
2801 /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */
2802 copyId?: string;
2803 /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */
2804 copyProgress?: string;
2805 /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */
2806 copySource?: string;
2807 /** State of the copy operation identified by x-ms-copy-id. */
2808 copyStatus?: CopyStatusType;
2809 /** When a blob is leased, specifies whether the lease is of infinite or fixed duration. */
2810 leaseDuration?: LeaseDurationType;
2811 /** Lease state of the blob. */
2812 leaseState?: LeaseStateType;
2813 /** The current lease status of the blob. */
2814 leaseStatus?: LeaseStatusType;
2815 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
2816 clientRequestId?: string;
2817 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
2818 requestId?: string;
2819 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
2820 version?: string;
2821 /** Indicates that the service supports requests for partial blob content. */
2822 acceptRanges?: string;
2823 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
2824 date?: Date;
2825 /** The number of committed blocks present in the blob. This header is returned only for append blobs. */
2826 blobCommittedBlockCount?: number;
2827 /** The value of this header is set to true if the blob data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). */
2828 isServerEncrypted?: boolean;
2829 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
2830 encryptionKeySha256?: string;
2831 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
2832 encryptionScope?: string;
2833 /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */
2834 blobContentMD5?: Uint8Array;
2835 /** Error Code */
2836 errorCode?: string;
2837 /** If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the request returns a crc64 for the range, as long as the range size is less than or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is specified in the same request, it will fail with 400(Bad Request). */
2838 contentCrc64?: Uint8Array;
2839}
2840
2841/**
2842 * Options to query blob with JSON format.
2843 */
2844export declare interface BlobQueryJsonTextConfiguration {
2845 /**
2846 * Record separator.
2847 */
2848 recordSeparator: string;
2849 /**
2850 * Query for a JSON format blob.
2851 */
2852 kind: "json";
2853}
2854
2855/**
2856 * Options to query blob with Parquet format. Only valid for {@link BlockBlobQueryOptions.inputTextConfiguration}.
2857 */
2858export declare interface BlobQueryParquetConfiguration {
2859 /**
2860 * Kind.
2861 */
2862 kind: "parquet";
2863}
2864
2865/** Contains response data for the query operation. */
2866export declare type BlobQueryResponseModel = BlobQueryHeaders & {
2867 /**
2868 * BROWSER ONLY
2869 *
2870 * The response body as a browser Blob.
2871 * Always `undefined` in node.js.
2872 */
2873 blobBody?: Promise<Blob>;
2874 /**
2875 * NODEJS ONLY
2876 *
2877 * The response body as a node.js Readable stream.
2878 * Always `undefined` in the browser.
2879 */
2880 readableStreamBody?: NodeJS.ReadableStream;
2881 /** The underlying HTTP response. */
2882 _response: coreHttp.HttpResponse & {
2883 /** The parsed HTTP response headers. */
2884 parsedHeaders: BlobQueryHeaders;
2885 };
2886};
2887
2888/**
2889 * Options to configure Blob - Release Lease operation.
2890 */
2891export declare interface BlobReleaseLeaseOptions extends CommonOptions {
2892 /**
2893 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
2894 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
2895 */
2896 abortSignal?: AbortSignalLike;
2897 /**
2898 * Conditions to meet when releasing the lease of a blob.
2899 */
2900 conditions?: ModifiedAccessConditions;
2901}
2902
2903/**
2904 * Options to configure Blob - Renew Lease operation.
2905 */
2906export declare interface BlobRenewLeaseOptions extends CommonOptions {
2907 /**
2908 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
2909 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
2910 */
2911 abortSignal?: AbortSignalLike;
2912 /**
2913 * Conditions to meet when renewing the lease of a blob.
2914 */
2915 conditions?: ModifiedAccessConditions;
2916}
2917
2918/**
2919 * standard HTTP conditional headers, tags condition and lease condition
2920 */
2921export declare interface BlobRequestConditions extends ModifiedAccessConditions, LeaseAccessConditions {
2922}
2923
2924/**
2925 * ONLY AVAILABLE IN NODE.JS RUNTIME.
2926 *
2927 * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting
2928 * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all
2929 * the values are set, this should be serialized with toString and set as the permissions field on a
2930 * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but
2931 * the order of the permissions is particular and this class guarantees correctness.
2932 */
2933export declare class BlobSASPermissions {
2934 /**
2935 * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
2936 * Error if it encounters a character that does not correspond to a valid permission.
2937 *
2938 * @param permissions -
2939 */
2940 static parse(permissions: string): BlobSASPermissions;
2941 /**
2942 * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it
2943 * and boolean values for them.
2944 *
2945 * @param permissionLike -
2946 */
2947 static from(permissionLike: BlobSASPermissionsLike): BlobSASPermissions;
2948 /**
2949 * Specifies Read access granted.
2950 */
2951 read: boolean;
2952 /**
2953 * Specifies Add access granted.
2954 */
2955 add: boolean;
2956 /**
2957 * Specifies Create access granted.
2958 */
2959 create: boolean;
2960 /**
2961 * Specifies Write access granted.
2962 */
2963 write: boolean;
2964 /**
2965 * Specifies Delete access granted.
2966 */
2967 delete: boolean;
2968 /**
2969 * Specifies Delete version access granted.
2970 */
2971 deleteVersion: boolean;
2972 /**
2973 * Specfies Tag access granted.
2974 */
2975 tag: boolean;
2976 /**
2977 * Specifies Move access granted.
2978 */
2979 move: boolean;
2980 /**
2981 * Specifies Execute access granted.
2982 */
2983 execute: boolean;
2984 /**
2985 * Specifies SetImmutabilityPolicy access granted.
2986 */
2987 setImmutabilityPolicy: boolean;
2988 /**
2989 * Specifies that Permanent Delete is permitted.
2990 */
2991 permanentDelete: boolean;
2992 /**
2993 * Converts the given permissions to a string. Using this method will guarantee the permissions are in an
2994 * order accepted by the service.
2995 *
2996 * @returns A string which represents the BlobSASPermissions
2997 */
2998 toString(): string;
2999}
3000
3001/**
3002 * A type that looks like a Blob SAS permission.
3003 * Used in {@link BlobSASPermissions} to parse SAS permissions from raw objects.
3004 */
3005export declare interface BlobSASPermissionsLike {
3006 /**
3007 * Specifies Read access granted.
3008 */
3009 read?: boolean;
3010 /**
3011 * Specifies Add access granted.
3012 */
3013 add?: boolean;
3014 /**
3015 * Specifies Create access granted.
3016 */
3017 create?: boolean;
3018 /**
3019 * Specifies Write access granted.
3020 */
3021 write?: boolean;
3022 /**
3023 * Specifies Delete access granted.
3024 */
3025 delete?: boolean;
3026 /**
3027 * Specifies Delete version access granted.
3028 */
3029 deleteVersion?: boolean;
3030 /**
3031 * Specfies Tag access granted.
3032 */
3033 tag?: boolean;
3034 /**
3035 * Specifies Move access granted.
3036 */
3037 move?: boolean;
3038 /**
3039 * Specifies Execute access granted.
3040 */
3041 execute?: boolean;
3042 /**
3043 * Specifies SetImmutabilityPolicy access granted.
3044 */
3045 setImmutabilityPolicy?: boolean;
3046 /**
3047 * Specifies that Permanent Delete is permitted.
3048 */
3049 permanentDelete?: boolean;
3050}
3051
3052/**
3053 * ONLY AVAILABLE IN NODE.JS RUNTIME.
3054 *
3055 * BlobSASSignatureValues is used to help generating Blob service SAS tokens for containers or blobs.
3056 */
3057export declare interface BlobSASSignatureValues {
3058 /**
3059 * The version of the service this SAS will target. If not specified, it will default to the version targeted by the
3060 * library.
3061 */
3062 version?: string;
3063 /**
3064 * Optional. SAS protocols, HTTPS only or HTTPSandHTTP
3065 */
3066 protocol?: SASProtocol;
3067 /**
3068 * Optional. When the SAS will take effect.
3069 */
3070 startsOn?: Date;
3071 /**
3072 * Optional only when identifier is provided. The time after which the SAS will no longer work.
3073 */
3074 expiresOn?: Date;
3075 /**
3076 * Optional only when identifier is provided.
3077 * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource
3078 * being accessed for help constructing the permissions string.
3079 */
3080 permissions?: BlobSASPermissions | ContainerSASPermissions;
3081 /**
3082 * Optional. IP ranges allowed in this SAS.
3083 */
3084 ipRange?: SasIPRange;
3085 /**
3086 * The name of the container the SAS user may access.
3087 */
3088 containerName: string;
3089 /**
3090 * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided.
3091 */
3092 blobName?: string;
3093 /**
3094 * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09.
3095 */
3096 snapshotTime?: string;
3097 /**
3098 * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10.
3099 */
3100 versionId?: string;
3101 /**
3102 * Optional. The name of the access policy on the container this SAS references if any.
3103 *
3104 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy
3105 */
3106 identifier?: string;
3107 /**
3108 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.
3109 */
3110 encryptionScope?: string;
3111 /**
3112 * Optional. The cache-control header for the SAS.
3113 */
3114 cacheControl?: string;
3115 /**
3116 * Optional. The content-disposition header for the SAS.
3117 */
3118 contentDisposition?: string;
3119 /**
3120 * Optional. The content-encoding header for the SAS.
3121 */
3122 contentEncoding?: string;
3123 /**
3124 * Optional. The content-language header for the SAS.
3125 */
3126 contentLanguage?: string;
3127 /**
3128 * Optional. The content-type header for the SAS.
3129 */
3130 contentType?: string;
3131 /**
3132 * Optional. Beginning in version 2020-02-10, specifies the Authorized AAD Object ID in GUID format. The AAD Object ID of a user
3133 * authorized by the owner of the user delegation key to perform the action granted by the SAS. The Azure Storage service will
3134 * ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission
3135 * check for the user specified in this value will be performed. This is only used for User Delegation SAS.
3136 */
3137 preauthorizedAgentObjectId?: string;
3138 /**
3139 * Optional. Beginning in version 2020-02-10, this is a GUID value that will be logged in the storage diagnostic logs and can be used to
3140 * correlate SAS generation with storage resource access. This is only used for User Delegation SAS.
3141 */
3142 correlationId?: string;
3143}
3144
3145/**
3146 * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you
3147 * to manipulate blob containers.
3148 */
3149export declare class BlobServiceClient extends StorageClient {
3150 /**
3151 * serviceContext provided by protocol layer.
3152 */
3153 private serviceContext;
3154 /**
3155 *
3156 * Creates an instance of BlobServiceClient from connection string.
3157 *
3158 * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
3159 * [ Note - Account connection string can only be used in NODE.JS runtime. ]
3160 * Account connection string example -
3161 * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
3162 * SAS connection string example -
3163 * `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`
3164 * @param options - Optional. Options to configure the HTTP pipeline.
3165 */
3166 static fromConnectionString(connectionString: string, options?: StoragePipelineOptions): BlobServiceClient;
3167 /**
3168 * Creates an instance of BlobServiceClient.
3169 *
3170 * @param url - A Client string pointing to Azure Storage blob service, such as
3171 * "https://myaccount.blob.core.windows.net". You can append a SAS
3172 * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
3173 * @param credential - 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.
3174 * @param options - Optional. Options to configure the HTTP pipeline.
3175 *
3176 * Example using DefaultAzureCredential from `@azure/identity`:
3177 *
3178 * ```js
3179 * const account = "<storage account name>";
3180 *
3181 * const defaultAzureCredential = new DefaultAzureCredential();
3182 *
3183 * const blobServiceClient = new BlobServiceClient(
3184 * `https://${account}.blob.core.windows.net`,
3185 * defaultAzureCredential
3186 * );
3187 * ```
3188 *
3189 * Example using an account name/key:
3190 *
3191 * ```js
3192 * const account = "<storage account name>"
3193 * const sharedKeyCredential = new StorageSharedKeyCredential(account, "<account key>");
3194 *
3195 * const blobServiceClient = new BlobServiceClient(
3196 * `https://${account}.blob.core.windows.net`,
3197 * sharedKeyCredential
3198 * );
3199 * ```
3200 */
3201 constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
3202 /**
3203 * Creates an instance of BlobServiceClient.
3204 *
3205 * @param url - A Client string pointing to Azure Storage blob service, such as
3206 * "https://myaccount.blob.core.windows.net". You can append a SAS
3207 * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
3208 * @param pipeline - Call newPipeline() to create a default
3209 * pipeline, or provide a customized pipeline.
3210 */
3211 constructor(url: string, pipeline: PipelineLike);
3212 /**
3213 * Creates a {@link ContainerClient} object
3214 *
3215 * @param containerName - A container name
3216 * @returns A new ContainerClient object for the given container name.
3217 *
3218 * Example usage:
3219 *
3220 * ```js
3221 * const containerClient = blobServiceClient.getContainerClient("<container name>");
3222 * ```
3223 */
3224 getContainerClient(containerName: string): ContainerClient;
3225 /**
3226 * Create a Blob container.
3227 *
3228 * @param containerName - Name of the container to create.
3229 * @param options - Options to configure Container Create operation.
3230 * @returns Container creation response and the corresponding container client.
3231 */
3232 createContainer(containerName: string, options?: ContainerCreateOptions): Promise<{
3233 containerClient: ContainerClient;
3234 containerCreateResponse: ContainerCreateResponse;
3235 }>;
3236 /**
3237 * Deletes a Blob container.
3238 *
3239 * @param containerName - Name of the container to delete.
3240 * @param options - Options to configure Container Delete operation.
3241 * @returns Container deletion response.
3242 */
3243 deleteContainer(containerName: string, options?: ContainerDeleteMethodOptions): Promise<ContainerDeleteResponse>;
3244 /**
3245 * Restore a previously deleted Blob container.
3246 * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.
3247 *
3248 * @param deletedContainerName - Name of the previously deleted container.
3249 * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container.
3250 * @param options - Options to configure Container Restore operation.
3251 * @returns Container deletion response.
3252 */
3253 undeleteContainer(deletedContainerName: string, deletedContainerVersion: string, options?: ServiceUndeleteContainerOptions): Promise<{
3254 containerClient: ContainerClient;
3255 containerUndeleteResponse: ContainerUndeleteResponse;
3256 }>;
3257 /**
3258 * Rename an existing Blob Container.
3259 *
3260 * @param sourceContainerName - The name of the source container.
3261 * @param destinationContainerName - The new name of the container.
3262 * @param options - Options to configure Container Rename operation.
3263 */
3264 private renameContainer;
3265 /**
3266 * Gets the properties of a storage account’s Blob service, including properties
3267 * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
3268 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties
3269 *
3270 * @param options - Options to the Service Get Properties operation.
3271 * @returns Response data for the Service Get Properties operation.
3272 */
3273 getProperties(options?: ServiceGetPropertiesOptions): Promise<ServiceGetPropertiesResponse>;
3274 /**
3275 * Sets properties for a storage account’s Blob service endpoint, including properties
3276 * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
3277 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties
3278 *
3279 * @param properties -
3280 * @param options - Options to the Service Set Properties operation.
3281 * @returns Response data for the Service Set Properties operation.
3282 */
3283 setProperties(properties: BlobServiceProperties, options?: ServiceSetPropertiesOptions): Promise<ServiceSetPropertiesResponse>;
3284 /**
3285 * Retrieves statistics related to replication for the Blob service. It is only
3286 * available on the secondary location endpoint when read-access geo-redundant
3287 * replication is enabled for the storage account.
3288 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats
3289 *
3290 * @param options - Options to the Service Get Statistics operation.
3291 * @returns Response data for the Service Get Statistics operation.
3292 */
3293 getStatistics(options?: ServiceGetStatisticsOptions): Promise<ServiceGetStatisticsResponse>;
3294 /**
3295 * The Get Account Information operation returns the sku name and account kind
3296 * for the specified account.
3297 * The Get Account Information operation is available on service versions beginning
3298 * with version 2018-03-28.
3299 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information
3300 *
3301 * @param options - Options to the Service Get Account Info operation.
3302 * @returns Response data for the Service Get Account Info operation.
3303 */
3304 getAccountInfo(options?: ServiceGetAccountInfoOptions): Promise<ServiceGetAccountInfoResponse>;
3305 /**
3306 * Returns a list of the containers under the specified account.
3307 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2
3308 *
3309 * @param marker - A string value that identifies the portion of
3310 * the list of containers to be returned with the next listing operation. The
3311 * operation returns the continuationToken value within the response body if the
3312 * listing operation did not return all containers remaining to be listed
3313 * with the current page. The continuationToken value can be used as the value for
3314 * the marker parameter in a subsequent call to request the next page of list
3315 * items. The marker value is opaque to the client.
3316 * @param options - Options to the Service List Container Segment operation.
3317 * @returns Response data for the Service List Container Segment operation.
3318 */
3319 private listContainersSegment;
3320 /**
3321 * The Filter Blobs operation enables callers to list blobs across all containers whose tags
3322 * match a given search expression. Filter blobs searches across all containers within a
3323 * storage account but can be scoped within the expression to a single container.
3324 *
3325 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
3326 * The given expression must evaluate to true for a blob to be returned in the results.
3327 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
3328 * however, only a subset of the OData filter syntax is supported in the Blob service.
3329 * @param marker - A string value that identifies the portion of
3330 * the list of blobs to be returned with the next listing operation. The
3331 * operation returns the continuationToken value within the response body if the
3332 * listing operation did not return all blobs remaining to be listed
3333 * with the current page. The continuationToken value can be used as the value for
3334 * the marker parameter in a subsequent call to request the next page of list
3335 * items. The marker value is opaque to the client.
3336 * @param options - Options to find blobs by tags.
3337 */
3338 private findBlobsByTagsSegment;
3339 /**
3340 * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.
3341 *
3342 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
3343 * The given expression must evaluate to true for a blob to be returned in the results.
3344 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
3345 * however, only a subset of the OData filter syntax is supported in the Blob service.
3346 * @param marker - A string value that identifies the portion of
3347 * the list of blobs to be returned with the next listing operation. The
3348 * operation returns the continuationToken value within the response body if the
3349 * listing operation did not return all blobs remaining to be listed
3350 * with the current page. The continuationToken value can be used as the value for
3351 * the marker parameter in a subsequent call to request the next page of list
3352 * items. The marker value is opaque to the client.
3353 * @param options - Options to find blobs by tags.
3354 */
3355 private findBlobsByTagsSegments;
3356 /**
3357 * Returns an AsyncIterableIterator for blobs.
3358 *
3359 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
3360 * The given expression must evaluate to true for a blob to be returned in the results.
3361 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
3362 * however, only a subset of the OData filter syntax is supported in the Blob service.
3363 * @param options - Options to findBlobsByTagsItems.
3364 */
3365 private findBlobsByTagsItems;
3366 /**
3367 * Returns an async iterable iterator to find all blobs with specified tag
3368 * under the specified account.
3369 *
3370 * .byPage() returns an async iterable iterator to list the blobs in pages.
3371 *
3372 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties
3373 *
3374 * Example using `for await` syntax:
3375 *
3376 * ```js
3377 * let i = 1;
3378 * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) {
3379 * console.log(`Blob ${i++}: ${container.name}`);
3380 * }
3381 * ```
3382 *
3383 * Example using `iter.next()`:
3384 *
3385 * ```js
3386 * let i = 1;
3387 * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'");
3388 * let blobItem = await iter.next();
3389 * while (!blobItem.done) {
3390 * console.log(`Blob ${i++}: ${blobItem.value.name}`);
3391 * blobItem = await iter.next();
3392 * }
3393 * ```
3394 *
3395 * Example using `byPage()`:
3396 *
3397 * ```js
3398 * // passing optional maxPageSize in the page settings
3399 * let i = 1;
3400 * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
3401 * if (response.blobs) {
3402 * for (const blob of response.blobs) {
3403 * console.log(`Blob ${i++}: ${blob.name}`);
3404 * }
3405 * }
3406 * }
3407 * ```
3408 *
3409 * Example using paging with a marker:
3410 *
3411 * ```js
3412 * let i = 1;
3413 * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
3414 * let response = (await iterator.next()).value;
3415 *
3416 * // Prints 2 blob names
3417 * if (response.blobs) {
3418 * for (const blob of response.blobs) {
3419 * console.log(`Blob ${i++}: ${blob.name}`);
3420 * }
3421 * }
3422 *
3423 * // Gets next marker
3424 * let marker = response.continuationToken;
3425 * // Passing next marker as continuationToken
3426 * iterator = blobServiceClient
3427 * .findBlobsByTags("tagkey='tagvalue'")
3428 * .byPage({ continuationToken: marker, maxPageSize: 10 });
3429 * response = (await iterator.next()).value;
3430 *
3431 * // Prints blob names
3432 * if (response.blobs) {
3433 * for (const blob of response.blobs) {
3434 * console.log(`Blob ${i++}: ${blob.name}`);
3435 * }
3436 * }
3437 * ```
3438 *
3439 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
3440 * The given expression must evaluate to true for a blob to be returned in the results.
3441 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
3442 * however, only a subset of the OData filter syntax is supported in the Blob service.
3443 * @param options - Options to find blobs by tags.
3444 */
3445 findBlobsByTags(tagFilterSqlExpression: string, options?: ServiceFindBlobByTagsOptions): PagedAsyncIterableIterator<FilterBlobItem, ServiceFindBlobsByTagsSegmentResponse>;
3446 /**
3447 * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses
3448 *
3449 * @param marker - A string value that identifies the portion of
3450 * the list of containers to be returned with the next listing operation. The
3451 * operation returns the continuationToken value within the response body if the
3452 * listing operation did not return all containers remaining to be listed
3453 * with the current page. The continuationToken value can be used as the value for
3454 * the marker parameter in a subsequent call to request the next page of list
3455 * items. The marker value is opaque to the client.
3456 * @param options - Options to list containers operation.
3457 */
3458 private listSegments;
3459 /**
3460 * Returns an AsyncIterableIterator for Container Items
3461 *
3462 * @param options - Options to list containers operation.
3463 */
3464 private listItems;
3465 /**
3466 * Returns an async iterable iterator to list all the containers
3467 * under the specified account.
3468 *
3469 * .byPage() returns an async iterable iterator to list the containers in pages.
3470 *
3471 * Example using `for await` syntax:
3472 *
3473 * ```js
3474 * let i = 1;
3475 * for await (const container of blobServiceClient.listContainers()) {
3476 * console.log(`Container ${i++}: ${container.name}`);
3477 * }
3478 * ```
3479 *
3480 * Example using `iter.next()`:
3481 *
3482 * ```js
3483 * let i = 1;
3484 * const iter = blobServiceClient.listContainers();
3485 * let containerItem = await iter.next();
3486 * while (!containerItem.done) {
3487 * console.log(`Container ${i++}: ${containerItem.value.name}`);
3488 * containerItem = await iter.next();
3489 * }
3490 * ```
3491 *
3492 * Example using `byPage()`:
3493 *
3494 * ```js
3495 * // passing optional maxPageSize in the page settings
3496 * let i = 1;
3497 * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {
3498 * if (response.containerItems) {
3499 * for (const container of response.containerItems) {
3500 * console.log(`Container ${i++}: ${container.name}`);
3501 * }
3502 * }
3503 * }
3504 * ```
3505 *
3506 * Example using paging with a marker:
3507 *
3508 * ```js
3509 * let i = 1;
3510 * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });
3511 * let response = (await iterator.next()).value;
3512 *
3513 * // Prints 2 container names
3514 * if (response.containerItems) {
3515 * for (const container of response.containerItems) {
3516 * console.log(`Container ${i++}: ${container.name}`);
3517 * }
3518 * }
3519 *
3520 * // Gets next marker
3521 * let marker = response.continuationToken;
3522 * // Passing next marker as continuationToken
3523 * iterator = blobServiceClient
3524 * .listContainers()
3525 * .byPage({ continuationToken: marker, maxPageSize: 10 });
3526 * response = (await iterator.next()).value;
3527 *
3528 * // Prints 10 container names
3529 * if (response.containerItems) {
3530 * for (const container of response.containerItems) {
3531 * console.log(`Container ${i++}: ${container.name}`);
3532 * }
3533 * }
3534 * ```
3535 *
3536 * @param options - Options to list containers.
3537 * @returns An asyncIterableIterator that supports paging.
3538 */
3539 listContainers(options?: ServiceListContainersOptions): PagedAsyncIterableIterator<ContainerItem, ServiceListContainersSegmentResponse>;
3540 /**
3541 * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).
3542 *
3543 * Retrieves a user delegation key for the Blob service. This is only a valid operation when using
3544 * bearer token authentication.
3545 *
3546 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key
3547 *
3548 * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time
3549 * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time
3550 */
3551 getUserDelegationKey(startsOn: Date, expiresOn: Date, options?: ServiceGetUserDelegationKeyOptions): Promise<ServiceGetUserDelegationKeyResponse>;
3552 /**
3553 * Creates a BlobBatchClient object to conduct batch operations.
3554 *
3555 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch
3556 *
3557 * @returns A new BlobBatchClient object for this service.
3558 */
3559 getBlobBatchClient(): BlobBatchClient;
3560 /**
3561 * Only available for BlobServiceClient constructed with a shared key credential.
3562 *
3563 * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties
3564 * and parameters passed in. The SAS is signed by the shared key credential of the client.
3565 *
3566 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas
3567 *
3568 * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
3569 * @param permissions - Specifies the list of permissions to be associated with the SAS.
3570 * @param resourceTypes - Specifies the resource types associated with the shared access signature.
3571 * @param options - Optional parameters.
3572 * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
3573 */
3574 generateAccountSasUrl(expiresOn?: Date, permissions?: AccountSASPermissions, resourceTypes?: string, options?: ServiceGenerateAccountSasUrlOptions): string;
3575}
3576
3577/** Storage Service Properties. */
3578export declare interface BlobServiceProperties {
3579 /** Azure Analytics Logging settings. */
3580 blobAnalyticsLogging?: Logging;
3581 /** a summary of request statistics grouped by API in hour or minute aggregates for blobs */
3582 hourMetrics?: Metrics;
3583 /** a summary of request statistics grouped by API in hour or minute aggregates for blobs */
3584 minuteMetrics?: Metrics;
3585 /** The set of CORS rules. */
3586 cors?: CorsRule[];
3587 /** The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions */
3588 defaultServiceVersion?: string;
3589 /** the retention policy which determines how long the associated data should persist */
3590 deleteRetentionPolicy?: RetentionPolicy;
3591 /** The properties that enable an account to host a static website */
3592 staticWebsite?: StaticWebsite;
3593}
3594
3595/** Stats for the storage service. */
3596export declare interface BlobServiceStatistics {
3597 /** Geo-Replication information for the Secondary Storage Service */
3598 geoReplication?: GeoReplication;
3599}
3600
3601/** Defines headers for Blob_setHttpHeaders operation. */
3602export declare interface BlobSetHTTPHeadersHeaders {
3603 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
3604 etag?: string;
3605 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
3606 lastModified?: Date;
3607 /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs */
3608 blobSequenceNumber?: number;
3609 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
3610 clientRequestId?: string;
3611 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
3612 requestId?: string;
3613 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
3614 version?: string;
3615 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
3616 date?: Date;
3617 /** Error Code */
3618 errorCode?: string;
3619}
3620
3621/**
3622 * Options to configure the {@link BlobClient.setHTTPHeaders} operation.
3623 */
3624export declare interface BlobSetHTTPHeadersOptions extends CommonOptions {
3625 /**
3626 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3627 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3628 */
3629 abortSignal?: AbortSignalLike;
3630 /**
3631 * Conditions to meet when setting blob HTTP headers.
3632 */
3633 conditions?: BlobRequestConditions;
3634 /**
3635 * Customer Provided Key Info.
3636 */
3637 customerProvidedKey?: CpkInfo;
3638}
3639
3640/** Contains response data for the setHttpHeaders operation. */
3641export declare type BlobSetHTTPHeadersResponse = BlobSetHTTPHeadersHeaders & {
3642 /** The underlying HTTP response. */
3643 _response: coreHttp.HttpResponse & {
3644 /** The parsed HTTP response headers. */
3645 parsedHeaders: BlobSetHTTPHeadersHeaders;
3646 };
3647};
3648
3649/** Defines headers for Blob_setImmutabilityPolicy operation. */
3650export declare interface BlobSetImmutabilityPolicyHeaders {
3651 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
3652 clientRequestId?: string;
3653 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
3654 requestId?: string;
3655 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
3656 version?: string;
3657 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
3658 date?: Date;
3659 /** Indicates the time the immutability policy will expire. */
3660 immutabilityPolicyExpiry?: Date;
3661 /** Indicates immutability policy mode. */
3662 immutabilityPolicyMode?: BlobImmutabilityPolicyMode;
3663}
3664
3665/**
3666 * Options for setting immutability policy {@link BlobClient.setImmutabilityPolicy} operation.
3667 */
3668export declare interface BlobSetImmutabilityPolicyOptions extends CommonOptions {
3669 /**
3670 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3671 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3672 */
3673 abortSignal?: AbortSignalLike;
3674 modifiedAccessCondition?: ModificationConditions;
3675}
3676
3677/** Contains response data for the setImmutabilityPolicy operation. */
3678export declare type BlobSetImmutabilityPolicyResponse = BlobSetImmutabilityPolicyHeaders & {
3679 /** The underlying HTTP response. */
3680 _response: coreHttp.HttpResponse & {
3681 /** The parsed HTTP response headers. */
3682 parsedHeaders: BlobSetImmutabilityPolicyHeaders;
3683 };
3684};
3685
3686/** Defines headers for Blob_setLegalHold operation. */
3687export declare interface BlobSetLegalHoldHeaders {
3688 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
3689 clientRequestId?: string;
3690 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
3691 requestId?: string;
3692 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
3693 version?: string;
3694 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
3695 date?: Date;
3696 /** Indicates if the blob has a legal hold. */
3697 legalHold?: boolean;
3698}
3699
3700/**
3701 * Options for setting legal hold {@link BlobClient.setLegalHold} operation.
3702 */
3703export declare interface BlobSetLegalHoldOptions extends CommonOptions {
3704 /**
3705 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3706 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3707 */
3708 abortSignal?: AbortSignalLike;
3709}
3710
3711/** Contains response data for the setLegalHold operation. */
3712export declare type BlobSetLegalHoldResponse = BlobSetLegalHoldHeaders & {
3713 /** The underlying HTTP response. */
3714 _response: coreHttp.HttpResponse & {
3715 /** The parsed HTTP response headers. */
3716 parsedHeaders: BlobSetLegalHoldHeaders;
3717 };
3718};
3719
3720/** Defines headers for Blob_setMetadata operation. */
3721export declare interface BlobSetMetadataHeaders {
3722 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
3723 etag?: string;
3724 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
3725 lastModified?: Date;
3726 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
3727 clientRequestId?: string;
3728 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
3729 requestId?: string;
3730 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
3731 version?: string;
3732 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
3733 versionId?: string;
3734 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
3735 date?: Date;
3736 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
3737 isServerEncrypted?: boolean;
3738 /** The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the metadata was encrypted with a customer-provided key. */
3739 encryptionKeySha256?: string;
3740 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
3741 encryptionScope?: string;
3742 /** Error Code */
3743 errorCode?: string;
3744}
3745
3746/**
3747 * Options to configure the {@link BlobClient.setMetadata} operation.
3748 */
3749export declare interface BlobSetMetadataOptions extends CommonOptions {
3750 /**
3751 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3752 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3753 */
3754 abortSignal?: AbortSignalLike;
3755 /**
3756 * Conditions to meet when setting blob metadata.
3757 */
3758 conditions?: BlobRequestConditions;
3759 /**
3760 * Customer Provided Key Info.
3761 */
3762 customerProvidedKey?: CpkInfo;
3763 /**
3764 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
3765 * encrypt the data provided in the request. If not specified, encryption is performed with the
3766 * default account encryption scope. For more information, see Encryption at Rest for Azure
3767 * Storage Services.
3768 */
3769 encryptionScope?: string;
3770}
3771
3772/** Contains response data for the setMetadata operation. */
3773export declare type BlobSetMetadataResponse = BlobSetMetadataHeaders & {
3774 /** The underlying HTTP response. */
3775 _response: coreHttp.HttpResponse & {
3776 /** The parsed HTTP response headers. */
3777 parsedHeaders: BlobSetMetadataHeaders;
3778 };
3779};
3780
3781/** Defines headers for Blob_setTags operation. */
3782export declare interface BlobSetTagsHeaders {
3783 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
3784 clientRequestId?: string;
3785 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
3786 requestId?: string;
3787 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
3788 version?: string;
3789 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
3790 date?: Date;
3791 /** Error Code */
3792 errorCode?: string;
3793}
3794
3795/**
3796 * Options to configure the {@link BlobClient.setTags} operation.
3797 */
3798export declare interface BlobSetTagsOptions extends CommonOptions {
3799 /**
3800 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3801 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3802 */
3803 abortSignal?: AbortSignalLike;
3804 /**
3805 * Conditions to meet for the blob to perform this operation.
3806 */
3807 conditions?: TagConditions & LeaseAccessConditions;
3808}
3809
3810/** Contains response data for the setTags operation. */
3811export declare type BlobSetTagsResponse = BlobSetTagsHeaders & {
3812 /** The underlying HTTP response. */
3813 _response: coreHttp.HttpResponse & {
3814 /** The parsed HTTP response headers. */
3815 parsedHeaders: BlobSetTagsHeaders;
3816 };
3817};
3818
3819/** Defines headers for Blob_setTier operation. */
3820export declare interface BlobSetTierHeaders {
3821 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
3822 clientRequestId?: string;
3823 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
3824 requestId?: string;
3825 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and newer. */
3826 version?: string;
3827 /** Error Code */
3828 errorCode?: string;
3829}
3830
3831/**
3832 * Options to configure the {@link BlobClient.setAccessTier} operation.
3833 */
3834export declare interface BlobSetTierOptions extends CommonOptions {
3835 /**
3836 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3837 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3838 */
3839 abortSignal?: AbortSignalLike;
3840 /**
3841 * If specified, contains the lease id that must be matched and lease with this id
3842 * must be active in order for the operation to succeed.
3843 */
3844 conditions?: LeaseAccessConditions & TagConditions;
3845 /**
3846 * Rehydrate Priority - possible values include 'High', 'Standard'.
3847 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier
3848 */
3849 rehydratePriority?: RehydratePriority;
3850}
3851
3852/** Contains response data for the setTier operation. */
3853export declare type BlobSetTierResponse = BlobSetTierHeaders & {
3854 /** The underlying HTTP response. */
3855 _response: coreHttp.HttpResponse & {
3856 /** The parsed HTTP response headers. */
3857 parsedHeaders: BlobSetTierHeaders;
3858 };
3859};
3860
3861/** Defines headers for Blob_startCopyFromURL operation. */
3862export declare interface BlobStartCopyFromURLHeaders {
3863 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
3864 etag?: string;
3865 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
3866 lastModified?: Date;
3867 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
3868 clientRequestId?: string;
3869 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
3870 requestId?: string;
3871 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
3872 version?: string;
3873 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
3874 versionId?: string;
3875 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
3876 date?: Date;
3877 /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */
3878 copyId?: string;
3879 /** State of the copy operation identified by x-ms-copy-id. */
3880 copyStatus?: CopyStatusType;
3881 /** Error Code */
3882 errorCode?: string;
3883}
3884
3885/**
3886 * Options to configure the {@link BlobClient.beginCopyFromURL} operation.
3887 */
3888export declare interface BlobStartCopyFromURLOptions extends CommonOptions {
3889 /**
3890 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3891 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3892 */
3893 abortSignal?: AbortSignalLike;
3894 /**
3895 * A collection of key-value string pair to associate with the blob that are being copied.
3896 */
3897 metadata?: Metadata;
3898 /**
3899 * Conditions to meet for the destination blob when copying from a URL to the blob.
3900 */
3901 conditions?: BlobRequestConditions;
3902 /**
3903 * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.
3904 */
3905 sourceConditions?: ModifiedAccessConditions;
3906 /**
3907 * Access tier.
3908 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
3909 */
3910 tier?: BlockBlobTier | PremiumPageBlobTier | string;
3911 /**
3912 * Rehydrate Priority - possible values include 'High', 'Standard'.
3913 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier
3914 */
3915 rehydratePriority?: RehydratePriority;
3916 /**
3917 * Optional. Specifies immutability policy for a blob.
3918 * Note that is parameter is only applicable to a blob within a container that
3919 * has version level worm enabled.
3920 */
3921 immutabilityPolicy?: BlobImmutabilityPolicy;
3922 /**
3923 * Optional. Indicates if a legal hold should be placed on the blob.
3924 * Note that is parameter is only applicable to a blob within a container that
3925 * has version level worm enabled.
3926 */
3927 legalHold?: boolean;
3928 /**
3929 * Blob tags.
3930 */
3931 tags?: Tags;
3932 /**
3933 * Overrides the sealed state of the destination blob. Default true.
3934 */
3935 sealBlob?: boolean;
3936}
3937
3938/** Contains response data for the startCopyFromURL operation. */
3939export declare type BlobStartCopyFromURLResponse = BlobStartCopyFromURLHeaders & {
3940 /** The underlying HTTP response. */
3941 _response: coreHttp.HttpResponse & {
3942 /** The parsed HTTP response headers. */
3943 parsedHeaders: BlobStartCopyFromURLHeaders;
3944 };
3945};
3946
3947/**
3948 * Options to configure the {@link BlobClient.syncCopyFromURL} operation.
3949 */
3950export declare interface BlobSyncCopyFromURLOptions extends CommonOptions {
3951 /**
3952 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
3953 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
3954 */
3955 abortSignal?: AbortSignalLike;
3956 /**
3957 * A collection of key-value string pair to associate with the snapshot.
3958 */
3959 metadata?: Metadata;
3960 /**
3961 * Conditions to meet for the destination blob when copying from a URL to the blob.
3962 */
3963 conditions?: BlobRequestConditions;
3964 /**
3965 * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.
3966 */
3967 sourceConditions?: MatchConditions & ModificationConditions;
3968 /**
3969 * Specify the md5 calculated for the range of bytes that must be read from the copy source.
3970 */
3971 sourceContentMD5?: Uint8Array;
3972 /**
3973 * Optional. Specifies immutability policy for a blob.
3974 * Note that is parameter is only applicable to a blob within a container that
3975 * has version level worm enabled.
3976 */
3977 immutabilityPolicy?: BlobImmutabilityPolicy;
3978 /**
3979 * Optional. Indicates if a legal hold should be placed on the blob.
3980 * Note that is parameter is only applicable to a blob within a container that
3981 * has version level worm enabled.
3982 */
3983 legalHold?: boolean;
3984 /**
3985 * Blob tags.
3986 */
3987 tags?: Tags;
3988 /**
3989 * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
3990 */
3991 sourceAuthorization?: HttpAuthorization;
3992 /**
3993 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services.
3994 */
3995 encryptionScope?: string;
3996 /**
3997 * Optional. Default 'REPLACE'. Indicates if source tags should be copied or replaced with the tags specified by {@link tags}.
3998 */
3999 copySourceTags?: BlobCopySourceTags;
4000}
4001
4002export declare interface BlobTag {
4003 key: string;
4004 value: string;
4005}
4006
4007/** Blob tags */
4008export declare interface BlobTags {
4009 blobTagSet: BlobTag[];
4010}
4011
4012/** Defines values for BlobType. */
4013export declare type BlobType = "BlockBlob" | "PageBlob" | "AppendBlob";
4014
4015/** Defines headers for Blob_undelete operation. */
4016export declare interface BlobUndeleteHeaders {
4017 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
4018 clientRequestId?: string;
4019 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
4020 requestId?: string;
4021 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
4022 version?: string;
4023 /** UTC date/time value generated by the service that indicates the time at which the response was initiated. */
4024 date?: Date;
4025 /** Error Code */
4026 errorCode?: string;
4027}
4028
4029/**
4030 * Options to configure the {@link BlobClient.undelete} operation.
4031 */
4032export declare interface BlobUndeleteOptions extends CommonOptions {
4033 /**
4034 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4035 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4036 */
4037 abortSignal?: AbortSignalLike;
4038 /**
4039 * Customer Provided Key Info.
4040 */
4041 customerProvidedKey?: CpkInfo;
4042}
4043
4044/** Contains response data for the undelete operation. */
4045export declare type BlobUndeleteResponse = BlobUndeleteHeaders & {
4046 /** The underlying HTTP response. */
4047 _response: coreHttp.HttpResponse & {
4048 /** The parsed HTTP response headers. */
4049 parsedHeaders: BlobUndeleteHeaders;
4050 };
4051};
4052
4053/**
4054 * Response type for {@link BlockBlobClient.uploadFile}, {@link BlockBlobClient.uploadStream}, and
4055 * {@link BlockBlobClient.uploadBrowserDate}.
4056 */
4057export declare type BlobUploadCommonResponse = BlockBlobUploadHeaders & {
4058 /**
4059 * The underlying HTTP response.
4060 */
4061 _response: HttpResponse;
4062};
4063
4064/** Represents a single block in a block blob. It describes the block's ID and size. */
4065export declare interface Block {
4066 /** The base64 encoded block ID. */
4067 name: string;
4068 /** The block size in bytes. */
4069 size: number;
4070}
4071
4072/**
4073 * BlockBlobClient defines a set of operations applicable to block blobs.
4074 */
4075export declare class BlockBlobClient extends BlobClient {
4076 /**
4077 * blobContext provided by protocol layer.
4078 *
4079 * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API
4080 * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient.
4081 */
4082 private _blobContext;
4083 /**
4084 * blockBlobContext provided by protocol layer.
4085 */
4086 private blockBlobContext;
4087 /**
4088 *
4089 * Creates an instance of BlockBlobClient.
4090 *
4091 * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
4092 * [ Note - Account connection string can only be used in NODE.JS runtime. ]
4093 * Account connection string example -
4094 * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
4095 * SAS connection string example -
4096 * `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`
4097 * @param containerName - Container name.
4098 * @param blobName - Blob name.
4099 * @param options - Optional. Options to configure the HTTP pipeline.
4100 */
4101 constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions);
4102 /**
4103 * Creates an instance of BlockBlobClient.
4104 * This method accepts an encoded URL or non-encoded URL pointing to a block blob.
4105 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
4106 * If a blob name includes ? or %, blob name must be encoded in the URL.
4107 *
4108 * @param url - A URL string pointing to Azure Storage block blob, such as
4109 * "https://myaccount.blob.core.windows.net/mycontainer/blockblob". You can
4110 * append a SAS if using AnonymousCredential, such as
4111 * "https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString".
4112 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
4113 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
4114 * However, if a blob name includes ? or %, blob name must be encoded in the URL.
4115 * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25".
4116 * @param credential - 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.
4117 * @param options - Optional. Options to configure the HTTP pipeline.
4118 */
4119 constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
4120 /**
4121 * Creates an instance of BlockBlobClient.
4122 * This method accepts an encoded URL or non-encoded URL pointing to a block blob.
4123 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
4124 * If a blob name includes ? or %, blob name must be encoded in the URL.
4125 *
4126 * @param url - A URL string pointing to Azure Storage block blob, such as
4127 * "https://myaccount.blob.core.windows.net/mycontainer/blockblob". You can
4128 * append a SAS if using AnonymousCredential, such as
4129 * "https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString".
4130 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
4131 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
4132 * However, if a blob name includes ? or %, blob name must be encoded in the URL.
4133 * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25".
4134 * @param pipeline - Call newPipeline() to create a default
4135 * pipeline, or provide a customized pipeline.
4136 */
4137 constructor(url: string, pipeline: PipelineLike);
4138 /**
4139 * Creates a new BlockBlobClient object identical to the source but with the
4140 * specified snapshot timestamp.
4141 * Provide "" will remove the snapshot and return a URL to the base blob.
4142 *
4143 * @param snapshot - The snapshot timestamp.
4144 * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.
4145 */
4146 withSnapshot(snapshot: string): BlockBlobClient;
4147 /**
4148 * ONLY AVAILABLE IN NODE.JS RUNTIME.
4149 *
4150 * Quick query for a JSON or CSV formatted blob.
4151 *
4152 * Example usage (Node.js):
4153 *
4154 * ```js
4155 * // Query and convert a blob to a string
4156 * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage");
4157 * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString();
4158 * console.log("Query blob content:", downloaded);
4159 *
4160 * async function streamToBuffer(readableStream) {
4161 * return new Promise((resolve, reject) => {
4162 * const chunks = [];
4163 * readableStream.on("data", (data) => {
4164 * chunks.push(data instanceof Buffer ? data : Buffer.from(data));
4165 * });
4166 * readableStream.on("end", () => {
4167 * resolve(Buffer.concat(chunks));
4168 * });
4169 * readableStream.on("error", reject);
4170 * });
4171 * }
4172 * ```
4173 *
4174 * @param query -
4175 * @param options -
4176 */
4177 query(query: string, options?: BlockBlobQueryOptions): Promise<BlobDownloadResponseModel>;
4178 /**
4179 * Creates a new block blob, or updates the content of an existing block blob.
4180 * Updating an existing block blob overwrites any existing metadata on the blob.
4181 * Partial updates are not supported; the content of the existing blob is
4182 * overwritten with the new content. To perform a partial update of a block blob's,
4183 * use {@link stageBlock} and {@link commitBlockList}.
4184 *
4185 * This is a non-parallel uploading method, please use {@link uploadFile},
4186 * {@link uploadStream} or {@link uploadBrowserData} for better performance
4187 * with concurrency uploading.
4188 *
4189 * @see https://docs.microsoft.com/rest/api/storageservices/put-blob
4190 *
4191 * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function
4192 * which returns a new Readable stream whose offset is from data source beginning.
4193 * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a
4194 * string including non non-Base64/Hex-encoded characters.
4195 * @param options - Options to the Block Blob Upload operation.
4196 * @returns Response data for the Block Blob Upload operation.
4197 *
4198 * Example usage:
4199 *
4200 * ```js
4201 * const content = "Hello world!";
4202 * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);
4203 * ```
4204 */
4205 upload(body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise<BlockBlobUploadResponse>;
4206 /**
4207 * Creates a new Block Blob where the contents of the blob are read from a given URL.
4208 * This API is supported beginning with the 2020-04-08 version. Partial updates
4209 * are not supported with Put Blob from URL; the content of an existing blob is overwritten with
4210 * the content of the new blob. To perform partial updates to a block blob’s contents using a
4211 * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}.
4212 *
4213 * @param sourceURL - Specifies the URL of the blob. The value
4214 * may be a URL of up to 2 KB in length that specifies a blob.
4215 * The value should be URL-encoded as it would appear
4216 * in a request URI. The source blob must either be public
4217 * or must be authenticated via a shared access signature.
4218 * If the source blob is public, no authentication is required
4219 * to perform the operation. Here are some examples of source object URLs:
4220 * - https://myaccount.blob.core.windows.net/mycontainer/myblob
4221 * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
4222 * @param options - Optional parameters.
4223 */
4224 syncUploadFromURL(sourceURL: string, options?: BlockBlobSyncUploadFromURLOptions): Promise<BlockBlobPutBlobFromUrlResponse>;
4225 /**
4226 * Uploads the specified block to the block blob's "staging area" to be later
4227 * committed by a call to commitBlockList.
4228 * @see https://docs.microsoft.com/rest/api/storageservices/put-block
4229 *
4230 * @param blockId - A 64-byte value that is base64-encoded
4231 * @param body - Data to upload to the staging area.
4232 * @param contentLength - Number of bytes to upload.
4233 * @param options - Options to the Block Blob Stage Block operation.
4234 * @returns Response data for the Block Blob Stage Block operation.
4235 */
4236 stageBlock(blockId: string, body: HttpRequestBody, contentLength: number, options?: BlockBlobStageBlockOptions): Promise<BlockBlobStageBlockResponse>;
4237 /**
4238 * The Stage Block From URL operation creates a new block to be committed as part
4239 * of a blob where the contents are read from a URL.
4240 * This API is available starting in version 2018-03-28.
4241 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url
4242 *
4243 * @param blockId - A 64-byte value that is base64-encoded
4244 * @param sourceURL - Specifies the URL of the blob. The value
4245 * may be a URL of up to 2 KB in length that specifies a blob.
4246 * The value should be URL-encoded as it would appear
4247 * in a request URI. The source blob must either be public
4248 * or must be authenticated via a shared access signature.
4249 * If the source blob is public, no authentication is required
4250 * to perform the operation. Here are some examples of source object URLs:
4251 * - https://myaccount.blob.core.windows.net/mycontainer/myblob
4252 * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
4253 * @param offset - From which position of the blob to download, greater than or equal to 0
4254 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
4255 * @param options - Options to the Block Blob Stage Block From URL operation.
4256 * @returns Response data for the Block Blob Stage Block From URL operation.
4257 */
4258 stageBlockFromURL(blockId: string, sourceURL: string, offset?: number, count?: number, options?: BlockBlobStageBlockFromURLOptions): Promise<BlockBlobStageBlockFromURLResponse>;
4259 /**
4260 * Writes a blob by specifying the list of block IDs that make up the blob.
4261 * In order to be written as part of a blob, a block must have been successfully written
4262 * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to
4263 * update a blob by uploading only those blocks that have changed, then committing the new and existing
4264 * blocks together. Any blocks not specified in the block list and permanently deleted.
4265 * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list
4266 *
4267 * @param blocks - Array of 64-byte value that is base64-encoded
4268 * @param options - Options to the Block Blob Commit Block List operation.
4269 * @returns Response data for the Block Blob Commit Block List operation.
4270 */
4271 commitBlockList(blocks: string[], options?: BlockBlobCommitBlockListOptions): Promise<BlockBlobCommitBlockListResponse>;
4272 /**
4273 * Returns the list of blocks that have been uploaded as part of a block blob
4274 * using the specified block list filter.
4275 * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list
4276 *
4277 * @param listType - Specifies whether to return the list of committed blocks,
4278 * the list of uncommitted blocks, or both lists together.
4279 * @param options - Options to the Block Blob Get Block List operation.
4280 * @returns Response data for the Block Blob Get Block List operation.
4281 */
4282 getBlockList(listType: BlockListType, options?: BlockBlobGetBlockListOptions): Promise<BlockBlobGetBlockListResponse>;
4283 /**
4284 * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.
4285 *
4286 * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
4287 * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
4288 * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
4289 * to commit the block list.
4290 *
4291 * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is
4292 * `blobContentType`, enabling the browser to provide
4293 * functionality based on file type.
4294 *
4295 * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView
4296 * @param options -
4297 */
4298 uploadData(data: Buffer | Blob | ArrayBuffer | ArrayBufferView, options?: BlockBlobParallelUploadOptions): Promise<BlobUploadCommonResponse>;
4299 /**
4300 * ONLY AVAILABLE IN BROWSERS.
4301 *
4302 * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.
4303 *
4304 * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.
4305 * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call
4306 * {@link commitBlockList} to commit the block list.
4307 *
4308 * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is
4309 * `blobContentType`, enabling the browser to provide
4310 * functionality based on file type.
4311 *
4312 * @deprecated Use {@link uploadData} instead.
4313 *
4314 * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView
4315 * @param options - Options to upload browser data.
4316 * @returns Response data for the Blob Upload operation.
4317 */
4318 uploadBrowserData(browserData: Blob | ArrayBuffer | ArrayBufferView, options?: BlockBlobParallelUploadOptions): Promise<BlobUploadCommonResponse>;
4319 /**
4320 *
4321 * Uploads data to block blob. Requires a bodyFactory as the data source,
4322 * which need to return a {@link HttpRequestBody} object with the offset and size provided.
4323 *
4324 * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
4325 * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
4326 * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
4327 * to commit the block list.
4328 *
4329 * @param bodyFactory -
4330 * @param size - size of the data to upload.
4331 * @param options - Options to Upload to Block Blob operation.
4332 * @returns Response data for the Blob Upload operation.
4333 */
4334 private uploadSeekableInternal;
4335 /**
4336 * ONLY AVAILABLE IN NODE.JS RUNTIME.
4337 *
4338 * Uploads a local file in blocks to a block blob.
4339 *
4340 * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.
4341 * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList
4342 * to commit the block list.
4343 *
4344 * @param filePath - Full path of local file
4345 * @param options - Options to Upload to Block Blob operation.
4346 * @returns Response data for the Blob Upload operation.
4347 */
4348 uploadFile(filePath: string, options?: BlockBlobParallelUploadOptions): Promise<BlobUploadCommonResponse>;
4349 /**
4350 * ONLY AVAILABLE IN NODE.JS RUNTIME.
4351 *
4352 * Uploads a Node.js Readable stream into block blob.
4353 *
4354 * PERFORMANCE IMPROVEMENT TIPS:
4355 * * Input stream highWaterMark is better to set a same value with bufferSize
4356 * parameter, which will avoid Buffer.concat() operations.
4357 *
4358 * @param stream - Node.js Readable stream
4359 * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB
4360 * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated,
4361 * positive correlation with max uploading concurrency. Default value is 5
4362 * @param options - Options to Upload Stream to Block Blob operation.
4363 * @returns Response data for the Blob Upload operation.
4364 */
4365 uploadStream(stream: Readable, bufferSize?: number, maxConcurrency?: number, options?: BlockBlobUploadStreamOptions): Promise<BlobUploadCommonResponse>;
4366}
4367
4368/** Defines headers for BlockBlob_commitBlockList operation. */
4369export declare interface BlockBlobCommitBlockListHeaders {
4370 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
4371 etag?: string;
4372 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
4373 lastModified?: Date;
4374 /** This header is returned so that the client can check for message content integrity. This header refers to the content of the request, meaning, in this case, the list of blocks, and not the content of the blob itself. */
4375 contentMD5?: Uint8Array;
4376 /** This header is returned so that the client can check for message content integrity. This header refers to the content of the request, meaning, in this case, the list of blocks, and not the content of the blob itself. */
4377 xMsContentCrc64?: Uint8Array;
4378 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
4379 clientRequestId?: string;
4380 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
4381 requestId?: string;
4382 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
4383 version?: string;
4384 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
4385 versionId?: string;
4386 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
4387 date?: Date;
4388 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
4389 isServerEncrypted?: boolean;
4390 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
4391 encryptionKeySha256?: string;
4392 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
4393 encryptionScope?: string;
4394 /** Error Code */
4395 errorCode?: string;
4396}
4397
4398/**
4399 * Options to configure {@link BlockBlobClient.commitBlockList} operation.
4400 */
4401export declare interface BlockBlobCommitBlockListOptions extends CommonOptions {
4402 /**
4403 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4404 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4405 */
4406 abortSignal?: AbortSignalLike;
4407 /**
4408 * Conditions to meet when committing the block list.
4409 */
4410 conditions?: BlobRequestConditions;
4411 /**
4412 * HTTP headers to set when committing block list.
4413 */
4414 blobHTTPHeaders?: BlobHTTPHeaders;
4415 /**
4416 * A collection of key-value string pair to associate with the blob when committing block list.
4417 */
4418 metadata?: Metadata;
4419 /**
4420 * Customer Provided Key Info.
4421 */
4422 customerProvidedKey?: CpkInfo;
4423 /**
4424 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
4425 * encrypt the data provided in the request. If not specified, encryption is performed with the
4426 * default account encryption scope. For more information, see Encryption at Rest for Azure
4427 * Storage Services.
4428 */
4429 encryptionScope?: string;
4430 /**
4431 * Optional. Specifies immutability policy for a blob.
4432 * Note that is parameter is only applicable to a blob within a container that
4433 * has version level worm enabled.
4434 */
4435 immutabilityPolicy?: BlobImmutabilityPolicy;
4436 /**
4437 * Optional. Indicates if a legal hold should be placed on the blob.
4438 * Note that is parameter is only applicable to a blob within a container that
4439 * has version level worm enabled.
4440 */
4441 legalHold?: boolean;
4442 /**
4443 * Access tier.
4444 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
4445 */
4446 tier?: BlockBlobTier | string;
4447 /**
4448 * Blob tags.
4449 */
4450 tags?: Tags;
4451}
4452
4453/** Contains response data for the commitBlockList operation. */
4454export declare type BlockBlobCommitBlockListResponse = BlockBlobCommitBlockListHeaders & {
4455 /** The underlying HTTP response. */
4456 _response: coreHttp.HttpResponse & {
4457 /** The parsed HTTP response headers. */
4458 parsedHeaders: BlockBlobCommitBlockListHeaders;
4459 };
4460};
4461
4462/** Defines headers for BlockBlob_getBlockList operation. */
4463export declare interface BlockBlobGetBlockListHeaders {
4464 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
4465 lastModified?: Date;
4466 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
4467 etag?: string;
4468 /** The media type of the body of the response. For Get Block List this is 'application/xml' */
4469 contentType?: string;
4470 /** The size of the blob in bytes. */
4471 blobContentLength?: number;
4472 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
4473 clientRequestId?: string;
4474 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
4475 requestId?: string;
4476 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
4477 version?: string;
4478 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
4479 date?: Date;
4480 /** Error Code */
4481 errorCode?: string;
4482}
4483
4484/**
4485 * Options to configure {@link BlockBlobClient.getBlockList} operation.
4486 */
4487export declare interface BlockBlobGetBlockListOptions extends CommonOptions {
4488 /**
4489 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4490 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4491 */
4492 abortSignal?: AbortSignalLike;
4493 /**
4494 * If specified, contains the lease id that must be matched and lease with this id
4495 * must be active in order for the operation to succeed.
4496 */
4497 conditions?: LeaseAccessConditions & TagConditions;
4498}
4499
4500/** Contains response data for the getBlockList operation. */
4501export declare type BlockBlobGetBlockListResponse = BlockBlobGetBlockListHeaders & BlockList & {
4502 /** The underlying HTTP response. */
4503 _response: coreHttp.HttpResponse & {
4504 /** The response body as text (string format) */
4505 bodyAsText: string;
4506 /** The response body as parsed JSON or XML */
4507 parsedBody: BlockList;
4508 /** The parsed HTTP response headers. */
4509 parsedHeaders: BlockBlobGetBlockListHeaders;
4510 };
4511};
4512
4513/**
4514 * Option interface for {@link BlockBlobClient.uploadFile} and {@link BlockBlobClient.uploadSeekableStream}.
4515 */
4516export declare interface BlockBlobParallelUploadOptions extends CommonOptions {
4517 /**
4518 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4519 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4520 */
4521 abortSignal?: AbortSignalLike;
4522 /**
4523 * Destination block blob size in bytes.
4524 */
4525 blockSize?: number;
4526 /**
4527 * Blob size threshold in bytes to start concurrency uploading.
4528 * Default value is 256MB, blob size less than this option will
4529 * be uploaded via one I/O operation without concurrency.
4530 * You can customize a value less equal than the default value.
4531 */
4532 maxSingleShotSize?: number;
4533 /**
4534 * Progress updater.
4535 */
4536 onProgress?: (progress: TransferProgressEvent) => void;
4537 /**
4538 * Blob HTTP Headers. A common header to set is
4539 * `blobContentType`, enabling the browser to provide
4540 * functionality based on file type.
4541 *
4542 */
4543 blobHTTPHeaders?: BlobHTTPHeaders;
4544 /**
4545 * Metadata of block blob.
4546 */
4547 metadata?: {
4548 [propertyName: string]: string;
4549 };
4550 /**
4551 * Access conditions headers.
4552 */
4553 conditions?: BlobRequestConditions;
4554 /**
4555 * Concurrency of parallel uploading. Must be greater than or equal to 0.
4556 */
4557 concurrency?: number;
4558 /**
4559 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
4560 * encrypt the data provided in the request. If not specified, encryption is performed with the
4561 * default account encryption scope. For more information, see Encryption at Rest for Azure
4562 * Storage Services.
4563 */
4564 encryptionScope?: string;
4565 /**
4566 * Blob tags.
4567 */
4568 tags?: Tags;
4569 /**
4570 * Access tier.
4571 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
4572 */
4573 tier?: BlockBlobTier | string;
4574}
4575
4576/** Defines headers for BlockBlob_putBlobFromUrl operation. */
4577export declare interface BlockBlobPutBlobFromUrlHeaders {
4578 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
4579 etag?: string;
4580 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
4581 lastModified?: Date;
4582 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
4583 contentMD5?: Uint8Array;
4584 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
4585 clientRequestId?: string;
4586 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
4587 requestId?: string;
4588 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
4589 version?: string;
4590 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
4591 versionId?: string;
4592 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
4593 date?: Date;
4594 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
4595 isServerEncrypted?: boolean;
4596 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
4597 encryptionKeySha256?: string;
4598 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
4599 encryptionScope?: string;
4600 /** Error Code */
4601 errorCode?: string;
4602}
4603
4604/** Contains response data for the putBlobFromUrl operation. */
4605export declare type BlockBlobPutBlobFromUrlResponse = BlockBlobPutBlobFromUrlHeaders & {
4606 /** The underlying HTTP response. */
4607 _response: coreHttp.HttpResponse & {
4608 /** The parsed HTTP response headers. */
4609 parsedHeaders: BlockBlobPutBlobFromUrlHeaders;
4610 };
4611};
4612
4613/**
4614 * Options to configure {@link BlockBlobClient.query} operation.
4615 */
4616export declare interface BlockBlobQueryOptions extends CommonOptions {
4617 /**
4618 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4619 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4620 */
4621 abortSignal?: AbortSignalLike;
4622 /**
4623 * Configurations for the query input.
4624 */
4625 inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryParquetConfiguration;
4626 /**
4627 * Configurations for the query output.
4628 */
4629 outputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryArrowConfiguration;
4630 /**
4631 * Callback to receive events on the progress of query operation.
4632 */
4633 onProgress?: (progress: TransferProgressEvent) => void;
4634 /**
4635 * Callback to receive error events during the query operaiton.
4636 */
4637 onError?: (error: BlobQueryError) => void;
4638 /**
4639 * Conditions to meet when uploading to the block blob.
4640 */
4641 conditions?: BlobRequestConditions;
4642 /**
4643 * Customer Provided Key Info.
4644 */
4645 customerProvidedKey?: CpkInfo;
4646}
4647
4648/** Defines headers for BlockBlob_stageBlockFromURL operation. */
4649export declare interface BlockBlobStageBlockFromURLHeaders {
4650 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
4651 contentMD5?: Uint8Array;
4652 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
4653 xMsContentCrc64?: Uint8Array;
4654 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
4655 clientRequestId?: string;
4656 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
4657 requestId?: string;
4658 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
4659 version?: string;
4660 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
4661 date?: Date;
4662 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
4663 isServerEncrypted?: boolean;
4664 /** The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key. */
4665 encryptionKeySha256?: string;
4666 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
4667 encryptionScope?: string;
4668 /** Error Code */
4669 errorCode?: string;
4670}
4671
4672/**
4673 * Options to configure {@link BlockBlobClient.stageBlockFromURL} operation.
4674 */
4675export declare interface BlockBlobStageBlockFromURLOptions extends CommonOptions {
4676 /**
4677 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4678 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4679 */
4680 abortSignal?: AbortSignalLike;
4681 /**
4682 * Specifies the bytes of the source Blob/File to upload.
4683 * If not specified, the entire content is uploaded as a single block.
4684 */
4685 range?: Range_2;
4686 /**
4687 * If specified, contains the lease id that must be matched and lease with this id
4688 * must be active in order for the operation to succeed.
4689 */
4690 conditions?: LeaseAccessConditions;
4691 /**
4692 * An MD5 hash of the content from the URI.
4693 * This hash is used to verify the integrity of the content during transport of the data from the URI.
4694 * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.
4695 *
4696 * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.
4697 */
4698 sourceContentMD5?: Uint8Array;
4699 /**
4700 * A CRC64 hash of the content from the URI.
4701 * This hash is used to verify the integrity of the content during transport of the data from the URI.
4702 * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.
4703 *
4704 * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.
4705 */
4706 sourceContentCrc64?: Uint8Array;
4707 /**
4708 * Customer Provided Key Info.
4709 */
4710 customerProvidedKey?: CpkInfo;
4711 /**
4712 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
4713 * encrypt the data provided in the request. If not specified, encryption is performed with the
4714 * default account encryption scope. For more information, see Encryption at Rest for Azure
4715 * Storage Services.
4716 */
4717 encryptionScope?: string;
4718 /**
4719 * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
4720 */
4721 sourceAuthorization?: HttpAuthorization;
4722}
4723
4724/** Contains response data for the stageBlockFromURL operation. */
4725export declare type BlockBlobStageBlockFromURLResponse = BlockBlobStageBlockFromURLHeaders & {
4726 /** The underlying HTTP response. */
4727 _response: coreHttp.HttpResponse & {
4728 /** The parsed HTTP response headers. */
4729 parsedHeaders: BlockBlobStageBlockFromURLHeaders;
4730 };
4731};
4732
4733/** Defines headers for BlockBlob_stageBlock operation. */
4734export declare interface BlockBlobStageBlockHeaders {
4735 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
4736 contentMD5?: Uint8Array;
4737 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
4738 clientRequestId?: string;
4739 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
4740 requestId?: string;
4741 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
4742 version?: string;
4743 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
4744 date?: Date;
4745 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
4746 xMsContentCrc64?: Uint8Array;
4747 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
4748 isServerEncrypted?: boolean;
4749 /** The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the block was encrypted with a customer-provided key. */
4750 encryptionKeySha256?: string;
4751 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
4752 encryptionScope?: string;
4753 /** Error Code */
4754 errorCode?: string;
4755}
4756
4757/**
4758 * Options to configure {@link BlockBlobClient.stageBlock} operation.
4759 */
4760export declare interface BlockBlobStageBlockOptions extends CommonOptions {
4761 /**
4762 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4763 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4764 */
4765 abortSignal?: AbortSignalLike;
4766 /**
4767 * If specified, contains the lease id that must be matched and lease with this id
4768 * must be active in order for the operation to succeed.
4769 */
4770 conditions?: LeaseAccessConditions;
4771 /**
4772 * Callback to receive events on the progress of stage block operation.
4773 */
4774 onProgress?: (progress: TransferProgressEvent) => void;
4775 /**
4776 * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.
4777 * When this is specified, the storage service compares the hash of the content that has arrived with this value.
4778 *
4779 * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.
4780 */
4781 transactionalContentMD5?: Uint8Array;
4782 /**
4783 * A CRC64 hash of the block content. This hash is used to verify the integrity of the block during transport.
4784 * When this is specified, the storage service compares the hash of the content that has arrived with this value.
4785 *
4786 * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.
4787 */
4788 transactionalContentCrc64?: Uint8Array;
4789 /**
4790 * Customer Provided Key Info.
4791 */
4792 customerProvidedKey?: CpkInfo;
4793 /**
4794 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
4795 * encrypt the data provided in the request. If not specified, encryption is performed with the
4796 * default account encryption scope. For more information, see Encryption at Rest for Azure
4797 * Storage Services.
4798 */
4799 encryptionScope?: string;
4800}
4801
4802/** Contains response data for the stageBlock operation. */
4803export declare type BlockBlobStageBlockResponse = BlockBlobStageBlockHeaders & {
4804 /** The underlying HTTP response. */
4805 _response: coreHttp.HttpResponse & {
4806 /** The parsed HTTP response headers. */
4807 parsedHeaders: BlockBlobStageBlockHeaders;
4808 };
4809};
4810
4811/**
4812 * Options to configure {@link BlockBlobClient.syncUploadFromURL} operation.
4813 */
4814export declare interface BlockBlobSyncUploadFromURLOptions extends CommonOptions {
4815 /**
4816 * Server timeout in seconds.
4817 * For more information, @see https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations
4818 */
4819 timeoutInSeconds?: number;
4820 /**
4821 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4822 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4823 */
4824 abortSignal?: AbortSignalLike;
4825 /**
4826 * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
4827 * pairs are specified, the operation will copy the metadata from the source blob or file to the
4828 * destination blob. If one or more name-value pairs are specified, the destination blob is
4829 * created with the specified metadata, and metadata is not copied from the source blob or file.
4830 * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules
4831 * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more
4832 * information.
4833 */
4834 metadata?: Metadata;
4835 /**
4836 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
4837 * encrypt the data provided in the request. If not specified, encryption is performed with the
4838 * default account encryption scope. For more information, see Encryption at Rest for Azure
4839 * Storage Services.
4840 */
4841 encryptionScope?: string;
4842 /**
4843 * Access tier.
4844 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
4845 */
4846 tier?: BlockBlobTier | string;
4847 /**
4848 * Specify the md5 calculated for the range of bytes that must be read from the copy source.
4849 */
4850 sourceContentMD5?: Uint8Array;
4851 /**
4852 * Blob tags.
4853 */
4854 tags?: Tags;
4855 /**
4856 * Optional, default is true. Indicates if properties from the source blob should be copied.
4857 */
4858 copySourceBlobProperties?: boolean;
4859 /**
4860 * HTTP headers to set when uploading to a block blob.
4861 *
4862 * A common header to set is `blobContentType`, enabling the browser to provide functionality
4863 * based on file type.
4864 *
4865 */
4866 blobHTTPHeaders?: BlobHTTPHeaders;
4867 /**
4868 * Conditions to meet for the destination Azure Blob.
4869 */
4870 conditions?: BlobRequestConditions;
4871 /**
4872 * Customer Provided Key Info.
4873 */
4874 customerProvidedKey?: CpkInfo;
4875 /**
4876 * Optional. Conditions to meet for the source Azure Blob.
4877 */
4878 sourceConditions?: ModifiedAccessConditions;
4879 /**
4880 * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
4881 */
4882 sourceAuthorization?: HttpAuthorization;
4883 /**
4884 * Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by {@link tags}.
4885 */
4886 copySourceTags?: BlobCopySourceTags;
4887}
4888
4889/**
4890 * Represents the access tier on a blob.
4891 * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}
4892 */
4893export declare enum BlockBlobTier {
4894 /**
4895 * Optimized for storing data that is accessed frequently.
4896 */
4897 Hot = "Hot",
4898 /**
4899 * Optimized for storing data that is infrequently accessed and stored for at least 30 days.
4900 */
4901 Cool = "Cool",
4902 /**
4903 * Optimized for storing data that is rarely accessed and stored for at least 180 days
4904 * with flexible latency requirements (on the order of hours).
4905 */
4906 Archive = "Archive"
4907}
4908
4909/** Defines headers for BlockBlob_upload operation. */
4910export declare interface BlockBlobUploadHeaders {
4911 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
4912 etag?: string;
4913 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
4914 lastModified?: Date;
4915 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
4916 contentMD5?: Uint8Array;
4917 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
4918 clientRequestId?: string;
4919 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
4920 requestId?: string;
4921 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
4922 version?: string;
4923 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
4924 versionId?: string;
4925 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
4926 date?: Date;
4927 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
4928 isServerEncrypted?: boolean;
4929 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
4930 encryptionKeySha256?: string;
4931 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
4932 encryptionScope?: string;
4933 /** Error Code */
4934 errorCode?: string;
4935}
4936
4937/**
4938 * Options to configure {@link BlockBlobClient.upload} operation.
4939 */
4940export declare interface BlockBlobUploadOptions extends CommonOptions {
4941 /**
4942 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
4943 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
4944 */
4945 abortSignal?: AbortSignalLike;
4946 /**
4947 * Conditions to meet when uploading to the block blob.
4948 */
4949 conditions?: BlobRequestConditions;
4950 /**
4951 * HTTP headers to set when uploading to a block blob. A common header to set is
4952 * `blobContentType`, enabling the browser to provide functionality
4953 * based on file type.
4954 *
4955 */
4956 blobHTTPHeaders?: BlobHTTPHeaders;
4957 /**
4958 * A collection of key-value string pair to associate with the blob when uploading to a block blob.
4959 */
4960 metadata?: Metadata;
4961 /**
4962 * Callback to receive events on the progress of upload operation.
4963 */
4964 onProgress?: (progress: TransferProgressEvent) => void;
4965 /**
4966 * Customer Provided Key Info.
4967 */
4968 customerProvidedKey?: CpkInfo;
4969 /**
4970 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
4971 * encrypt the data provided in the request. If not specified, encryption is performed with the
4972 * default account encryption scope. For more information, see Encryption at Rest for Azure
4973 * Storage Services.
4974 */
4975 encryptionScope?: string;
4976 /**
4977 * Access tier.
4978 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
4979 */
4980 tier?: BlockBlobTier | string;
4981 /**
4982 * Optional. Specifies immutability policy for a blob.
4983 * Note that is parameter is only applicable to a blob within a container that
4984 * has version level worm enabled.
4985 */
4986 immutabilityPolicy?: BlobImmutabilityPolicy;
4987 /**
4988 * Optional. Indicates if a legal hold should be placed on the blob.
4989 * Note that is parameter is only applicable to a blob within a container that
4990 * has version level worm enabled.
4991 */
4992 legalHold?: boolean;
4993 /**
4994 * Blob tags.
4995 */
4996 tags?: Tags;
4997}
4998
4999/** Contains response data for the upload operation. */
5000export declare type BlockBlobUploadResponse = BlockBlobUploadHeaders & {
5001 /** The underlying HTTP response. */
5002 _response: coreHttp.HttpResponse & {
5003 /** The parsed HTTP response headers. */
5004 parsedHeaders: BlockBlobUploadHeaders;
5005 };
5006};
5007
5008/**
5009 * Option interface for the {@link BlockBlobClient.uploadStream} operation.
5010 */
5011export declare interface BlockBlobUploadStreamOptions extends CommonOptions {
5012 /**
5013 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5014 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5015 */
5016 abortSignal?: AbortSignalLike;
5017 /**
5018 * Blob HTTP Headers.
5019 *
5020 * A common header to set is `blobContentType`, enabling the
5021 * browser to provide functionality based on file type.
5022 *
5023 */
5024 blobHTTPHeaders?: BlobHTTPHeaders;
5025 /**
5026 * Metadata of block blob.
5027 */
5028 metadata?: {
5029 [propertyName: string]: string;
5030 };
5031 /**
5032 * Access conditions headers.
5033 */
5034 conditions?: BlobRequestConditions;
5035 /**
5036 * Progress updater.
5037 */
5038 onProgress?: (progress: TransferProgressEvent) => void;
5039 /**
5040 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
5041 * encrypt the data provided in the request. If not specified, encryption is performed with the
5042 * default account encryption scope. For more information, see Encryption at Rest for Azure
5043 * Storage Services.
5044 */
5045 encryptionScope?: string;
5046 /**
5047 * Blob tags.
5048 */
5049 tags?: Tags;
5050 /**
5051 * Access tier.
5052 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
5053 */
5054 tier?: BlockBlobTier | string;
5055}
5056
5057export declare interface BlockList {
5058 committedBlocks?: Block[];
5059 uncommittedBlocks?: Block[];
5060}
5061
5062/** Defines values for BlockListType. */
5063export declare type BlockListType = "committed" | "uncommitted" | "all";
5064
5065declare interface ClearRange {
5066 start: number;
5067 end: number;
5068}
5069
5070/**
5071 * Common options of {@link BlobGenerateSasUrlOptions} and {@link ContainerGenerateSasUrlOptions}.
5072 */
5073export declare interface CommonGenerateSasUrlOptions {
5074 /**
5075 * The version of the service this SAS will target. If not specified, it will default to the version targeted by the
5076 * library.
5077 */
5078 version?: string;
5079 /**
5080 * Optional. SAS protocols, HTTPS only or HTTPSandHTTP
5081 */
5082 protocol?: SASProtocol;
5083 /**
5084 * Optional. When the SAS will take effect.
5085 */
5086 startsOn?: Date;
5087 /**
5088 * Optional only when identifier is provided. The time after which the SAS will no longer work.
5089 */
5090 expiresOn?: Date;
5091 /**
5092 * Optional. IP ranges allowed in this SAS.
5093 */
5094 ipRange?: SasIPRange;
5095 /**
5096 * Optional. The name of the access policy on the container this SAS references if any.
5097 *
5098 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy
5099 */
5100 identifier?: string;
5101 /**
5102 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.
5103 */
5104 encryptionScope?: string;
5105 /**
5106 * Optional. The cache-control header for the SAS.
5107 */
5108 cacheControl?: string;
5109 /**
5110 * Optional. The content-disposition header for the SAS.
5111 */
5112 contentDisposition?: string;
5113 /**
5114 * Optional. The content-encoding header for the SAS.
5115 */
5116 contentEncoding?: string;
5117 /**
5118 * Optional. The content-language header for the SAS.
5119 */
5120 contentLanguage?: string;
5121 /**
5122 * Optional. The content-type header for the SAS.
5123 */
5124 contentType?: string;
5125}
5126
5127/**
5128 * An interface for options common to every remote operation.
5129 */
5130export declare interface CommonOptions {
5131 /**
5132 * Options to configure spans created when tracing is enabled.
5133 */
5134 tracingOptions?: OperationTracingOptions;
5135}
5136
5137/**
5138 * Options to configure Container - Acquire Lease operation.
5139 */
5140export declare interface ContainerAcquireLeaseOptions extends CommonOptions {
5141 /**
5142 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5143 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5144 */
5145 abortSignal?: AbortSignalLike;
5146 /**
5147 * Conditions to meet when acquiring the lease.
5148 */
5149 conditions?: ModifiedAccessConditions;
5150}
5151
5152/** Optional parameters. */
5153export declare interface ContainerBreakLeaseOptionalParams extends coreHttp.OperationOptions {
5154 /** Parameter group */
5155 modifiedAccessConditions?: ModifiedAccessConditionsModel;
5156 /** The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a> */
5157 timeoutInSeconds?: number;
5158 /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
5159 requestId?: string;
5160 /** For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. */
5161 breakPeriod?: number;
5162}
5163
5164/**
5165 * Options to configure Container - Break Lease operation.
5166 */
5167export declare interface ContainerBreakLeaseOptions extends CommonOptions {
5168 /**
5169 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5170 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5171 */
5172 abortSignal?: AbortSignalLike;
5173 /**
5174 * Conditions to meet when breaking the lease.
5175 */
5176 conditions?: ModifiedAccessConditions;
5177}
5178
5179/**
5180 * Options to configure Container - Change Lease operation.
5181 */
5182export declare interface ContainerChangeLeaseOptions extends CommonOptions {
5183 /**
5184 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5185 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5186 */
5187 abortSignal?: AbortSignalLike;
5188 /**
5189 * Conditions to meet when changing the lease.
5190 */
5191 conditions?: ModifiedAccessConditions;
5192}
5193
5194/**
5195 * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
5196 */
5197export declare class ContainerClient extends StorageClient {
5198 /**
5199 * containerContext provided by protocol layer.
5200 */
5201 private containerContext;
5202 private _containerName;
5203 /**
5204 * The name of the container.
5205 */
5206 get containerName(): string;
5207 /**
5208 *
5209 * Creates an instance of ContainerClient.
5210 *
5211 * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
5212 * [ Note - Account connection string can only be used in NODE.JS runtime. ]
5213 * Account connection string example -
5214 * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
5215 * SAS connection string example -
5216 * `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`
5217 * @param containerName - Container name.
5218 * @param options - Optional. Options to configure the HTTP pipeline.
5219 */
5220 constructor(connectionString: string, containerName: string, options?: StoragePipelineOptions);
5221 /**
5222 * Creates an instance of ContainerClient.
5223 * This method accepts an URL pointing to a container.
5224 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
5225 * If a blob name includes ? or %, blob name must be encoded in the URL.
5226 *
5227 * @param url - A URL string pointing to Azure Storage container, such as
5228 * "https://myaccount.blob.core.windows.net/mycontainer". You can
5229 * append a SAS if using AnonymousCredential, such as
5230 * "https://myaccount.blob.core.windows.net/mycontainer?sasString".
5231 * @param credential - 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.
5232 * @param options - Optional. Options to configure the HTTP pipeline.
5233 */
5234 constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
5235 /**
5236 * Creates an instance of ContainerClient.
5237 * This method accepts an URL pointing to a container.
5238 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
5239 * If a blob name includes ? or %, blob name must be encoded in the URL.
5240 *
5241 * @param url - A URL string pointing to Azure Storage container, such as
5242 * "https://myaccount.blob.core.windows.net/mycontainer". You can
5243 * append a SAS if using AnonymousCredential, such as
5244 * "https://myaccount.blob.core.windows.net/mycontainer?sasString".
5245 * @param pipeline - Call newPipeline() to create a default
5246 * pipeline, or provide a customized pipeline.
5247 */
5248 constructor(url: string, pipeline: PipelineLike);
5249 /**
5250 * Creates a new container under the specified account. If the container with
5251 * the same name already exists, the operation fails.
5252 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container
5253 *
5254 * @param options - Options to Container Create operation.
5255 *
5256 *
5257 * Example usage:
5258 *
5259 * ```js
5260 * const containerClient = blobServiceClient.getContainerClient("<container name>");
5261 * const createContainerResponse = await containerClient.create();
5262 * console.log("Container was created successfully", createContainerResponse.requestId);
5263 * ```
5264 */
5265 create(options?: ContainerCreateOptions): Promise<ContainerCreateResponse>;
5266 /**
5267 * Creates a new container under the specified account. If the container with
5268 * the same name already exists, it is not changed.
5269 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container
5270 *
5271 * @param options -
5272 */
5273 createIfNotExists(options?: ContainerCreateOptions): Promise<ContainerCreateIfNotExistsResponse>;
5274 /**
5275 * Returns true if the Azure container resource represented by this client exists; false otherwise.
5276 *
5277 * NOTE: use this function with care since an existing container might be deleted by other clients or
5278 * applications. Vice versa new containers with the same name might be added by other clients or
5279 * applications after this function completes.
5280 *
5281 * @param options -
5282 */
5283 exists(options?: ContainerExistsOptions): Promise<boolean>;
5284 /**
5285 * Creates a {@link BlobClient}
5286 *
5287 * @param blobName - A blob name
5288 * @returns A new BlobClient object for the given blob name.
5289 */
5290 getBlobClient(blobName: string): BlobClient;
5291 /**
5292 * Creates an {@link AppendBlobClient}
5293 *
5294 * @param blobName - An append blob name
5295 */
5296 getAppendBlobClient(blobName: string): AppendBlobClient;
5297 /**
5298 * Creates a {@link BlockBlobClient}
5299 *
5300 * @param blobName - A block blob name
5301 *
5302 *
5303 * Example usage:
5304 *
5305 * ```js
5306 * const content = "Hello world!";
5307 *
5308 * const blockBlobClient = containerClient.getBlockBlobClient("<blob name>");
5309 * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);
5310 * ```
5311 */
5312 getBlockBlobClient(blobName: string): BlockBlobClient;
5313 /**
5314 * Creates a {@link PageBlobClient}
5315 *
5316 * @param blobName - A page blob name
5317 */
5318 getPageBlobClient(blobName: string): PageBlobClient;
5319 /**
5320 * Returns all user-defined metadata and system properties for the specified
5321 * container. The data returned does not include the container's list of blobs.
5322 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties
5323 *
5324 * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
5325 * they originally contained uppercase characters. This differs from the metadata keys returned by
5326 * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which
5327 * will retain their original casing.
5328 *
5329 * @param options - Options to Container Get Properties operation.
5330 */
5331 getProperties(options?: ContainerGetPropertiesOptions): Promise<ContainerGetPropertiesResponse>;
5332 /**
5333 * Marks the specified container for deletion. The container and any blobs
5334 * contained within it are later deleted during garbage collection.
5335 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container
5336 *
5337 * @param options - Options to Container Delete operation.
5338 */
5339 delete(options?: ContainerDeleteMethodOptions): Promise<ContainerDeleteResponse>;
5340 /**
5341 * Marks the specified container for deletion if it exists. The container and any blobs
5342 * contained within it are later deleted during garbage collection.
5343 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container
5344 *
5345 * @param options - Options to Container Delete operation.
5346 */
5347 deleteIfExists(options?: ContainerDeleteMethodOptions): Promise<ContainerDeleteIfExistsResponse>;
5348 /**
5349 * Sets one or more user-defined name-value pairs for the specified container.
5350 *
5351 * If no option provided, or no metadata defined in the parameter, the container
5352 * metadata will be removed.
5353 *
5354 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata
5355 *
5356 * @param metadata - Replace existing metadata with this value.
5357 * If no value provided the existing metadata will be removed.
5358 * @param options - Options to Container Set Metadata operation.
5359 */
5360 setMetadata(metadata?: Metadata, options?: ContainerSetMetadataOptions): Promise<ContainerSetMetadataResponse>;
5361 /**
5362 * Gets the permissions for the specified container. The permissions indicate
5363 * whether container data may be accessed publicly.
5364 *
5365 * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.
5366 * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z".
5367 *
5368 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl
5369 *
5370 * @param options - Options to Container Get Access Policy operation.
5371 */
5372 getAccessPolicy(options?: ContainerGetAccessPolicyOptions): Promise<ContainerGetAccessPolicyResponse>;
5373 /**
5374 * Sets the permissions for the specified container. The permissions indicate
5375 * whether blobs in a container may be accessed publicly.
5376 *
5377 * When you set permissions for a container, the existing permissions are replaced.
5378 * If no access or containerAcl provided, the existing container ACL will be
5379 * removed.
5380 *
5381 * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect.
5382 * During this interval, a shared access signature that is associated with the stored access policy will
5383 * fail with status code 403 (Forbidden), until the access policy becomes active.
5384 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl
5385 *
5386 * @param access - The level of public access to data in the container.
5387 * @param containerAcl - Array of elements each having a unique Id and details of the access policy.
5388 * @param options - Options to Container Set Access Policy operation.
5389 */
5390 setAccessPolicy(access?: PublicAccessType, containerAcl?: SignedIdentifier[], options?: ContainerSetAccessPolicyOptions): Promise<ContainerSetAccessPolicyResponse>;
5391 /**
5392 * Get a {@link BlobLeaseClient} that manages leases on the container.
5393 *
5394 * @param proposeLeaseId - Initial proposed lease Id.
5395 * @returns A new BlobLeaseClient object for managing leases on the container.
5396 */
5397 getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient;
5398 /**
5399 * Creates a new block blob, or updates the content of an existing block blob.
5400 *
5401 * Updating an existing block blob overwrites any existing metadata on the blob.
5402 * Partial updates are not supported; the content of the existing blob is
5403 * overwritten with the new content. To perform a partial update of a block blob's,
5404 * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}.
5405 *
5406 * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile},
5407 * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better
5408 * performance with concurrency uploading.
5409 *
5410 * @see https://docs.microsoft.com/rest/api/storageservices/put-blob
5411 *
5412 * @param blobName - Name of the block blob to create or update.
5413 * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function
5414 * which returns a new Readable stream whose offset is from data source beginning.
5415 * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a
5416 * string including non non-Base64/Hex-encoded characters.
5417 * @param options - Options to configure the Block Blob Upload operation.
5418 * @returns Block Blob upload response data and the corresponding BlockBlobClient instance.
5419 */
5420 uploadBlockBlob(blobName: string, body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise<{
5421 blockBlobClient: BlockBlobClient;
5422 response: BlockBlobUploadResponse;
5423 }>;
5424 /**
5425 * Marks the specified blob or snapshot for deletion. The blob is later deleted
5426 * during garbage collection. Note that in order to delete a blob, you must delete
5427 * all of its snapshots. You can delete both at the same time with the Delete
5428 * Blob operation.
5429 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob
5430 *
5431 * @param blobName -
5432 * @param options - Options to Blob Delete operation.
5433 * @returns Block blob deletion response data.
5434 */
5435 deleteBlob(blobName: string, options?: ContainerDeleteBlobOptions): Promise<BlobDeleteResponse>;
5436 /**
5437 * listBlobFlatSegment returns a single segment of blobs starting from the
5438 * specified Marker. Use an empty Marker to start enumeration from the beginning.
5439 * After getting a segment, process it, and then call listBlobsFlatSegment again
5440 * (passing the the previously-returned Marker) to get the next segment.
5441 * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs
5442 *
5443 * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
5444 * @param options - Options to Container List Blob Flat Segment operation.
5445 */
5446 private listBlobFlatSegment;
5447 /**
5448 * listBlobHierarchySegment returns a single segment of blobs starting from
5449 * the specified Marker. Use an empty Marker to start enumeration from the
5450 * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment
5451 * again (passing the the previously-returned Marker) to get the next segment.
5452 * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs
5453 *
5454 * @param delimiter - The character or string used to define the virtual hierarchy
5455 * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
5456 * @param options - Options to Container List Blob Hierarchy Segment operation.
5457 */
5458 private listBlobHierarchySegment;
5459 /**
5460 * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse
5461 *
5462 * @param marker - A string value that identifies the portion of
5463 * the list of blobs to be returned with the next listing operation. The
5464 * operation returns the ContinuationToken value within the response body if the
5465 * listing operation did not return all blobs remaining to be listed
5466 * with the current page. The ContinuationToken value can be used as the value for
5467 * the marker parameter in a subsequent call to request the next page of list
5468 * items. The marker value is opaque to the client.
5469 * @param options - Options to list blobs operation.
5470 */
5471 private listSegments;
5472 /**
5473 * Returns an AsyncIterableIterator of {@link BlobItem} objects
5474 *
5475 * @param options - Options to list blobs operation.
5476 */
5477 private listItems;
5478 /**
5479 * Returns an async iterable iterator to list all the blobs
5480 * under the specified account.
5481 *
5482 * .byPage() returns an async iterable iterator to list the blobs in pages.
5483 *
5484 * Example using `for await` syntax:
5485 *
5486 * ```js
5487 * // Get the containerClient before you run these snippets,
5488 * // Can be obtained from `blobServiceClient.getContainerClient("<your-container-name>");`
5489 * let i = 1;
5490 * for await (const blob of containerClient.listBlobsFlat()) {
5491 * console.log(`Blob ${i++}: ${blob.name}`);
5492 * }
5493 * ```
5494 *
5495 * Example using `iter.next()`:
5496 *
5497 * ```js
5498 * let i = 1;
5499 * let iter = containerClient.listBlobsFlat();
5500 * let blobItem = await iter.next();
5501 * while (!blobItem.done) {
5502 * console.log(`Blob ${i++}: ${blobItem.value.name}`);
5503 * blobItem = await iter.next();
5504 * }
5505 * ```
5506 *
5507 * Example using `byPage()`:
5508 *
5509 * ```js
5510 * // passing optional maxPageSize in the page settings
5511 * let i = 1;
5512 * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) {
5513 * for (const blob of response.segment.blobItems) {
5514 * console.log(`Blob ${i++}: ${blob.name}`);
5515 * }
5516 * }
5517 * ```
5518 *
5519 * Example using paging with a marker:
5520 *
5521 * ```js
5522 * let i = 1;
5523 * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 });
5524 * let response = (await iterator.next()).value;
5525 *
5526 * // Prints 2 blob names
5527 * for (const blob of response.segment.blobItems) {
5528 * console.log(`Blob ${i++}: ${blob.name}`);
5529 * }
5530 *
5531 * // Gets next marker
5532 * let marker = response.continuationToken;
5533 *
5534 * // Passing next marker as continuationToken
5535 *
5536 * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 });
5537 * response = (await iterator.next()).value;
5538 *
5539 * // Prints 10 blob names
5540 * for (const blob of response.segment.blobItems) {
5541 * console.log(`Blob ${i++}: ${blob.name}`);
5542 * }
5543 * ```
5544 *
5545 * @param options - Options to list blobs.
5546 * @returns An asyncIterableIterator that supports paging.
5547 */
5548 listBlobsFlat(options?: ContainerListBlobsOptions): PagedAsyncIterableIterator<BlobItem, ContainerListBlobFlatSegmentResponse>;
5549 /**
5550 * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse
5551 *
5552 * @param delimiter - The character or string used to define the virtual hierarchy
5553 * @param marker - A string value that identifies the portion of
5554 * the list of blobs to be returned with the next listing operation. The
5555 * operation returns the ContinuationToken value within the response body if the
5556 * listing operation did not return all blobs remaining to be listed
5557 * with the current page. The ContinuationToken value can be used as the value for
5558 * the marker parameter in a subsequent call to request the next page of list
5559 * items. The marker value is opaque to the client.
5560 * @param options - Options to list blobs operation.
5561 */
5562 private listHierarchySegments;
5563 /**
5564 * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.
5565 *
5566 * @param delimiter - The character or string used to define the virtual hierarchy
5567 * @param options - Options to list blobs operation.
5568 */
5569 private listItemsByHierarchy;
5570 /**
5571 * Returns an async iterable iterator to list all the blobs by hierarchy.
5572 * under the specified account.
5573 *
5574 * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages.
5575 *
5576 * Example using `for await` syntax:
5577 *
5578 * ```js
5579 * for await (const item of containerClient.listBlobsByHierarchy("/")) {
5580 * if (item.kind === "prefix") {
5581 * console.log(`\tBlobPrefix: ${item.name}`);
5582 * } else {
5583 * console.log(`\tBlobItem: name - ${item.name}`);
5584 * }
5585 * }
5586 * ```
5587 *
5588 * Example using `iter.next()`:
5589 *
5590 * ```js
5591 * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" });
5592 * let entity = await iter.next();
5593 * while (!entity.done) {
5594 * let item = entity.value;
5595 * if (item.kind === "prefix") {
5596 * console.log(`\tBlobPrefix: ${item.name}`);
5597 * } else {
5598 * console.log(`\tBlobItem: name - ${item.name}`);
5599 * }
5600 * entity = await iter.next();
5601 * }
5602 * ```
5603 *
5604 * Example using `byPage()`:
5605 *
5606 * ```js
5607 * console.log("Listing blobs by hierarchy by page");
5608 * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) {
5609 * const segment = response.segment;
5610 * if (segment.blobPrefixes) {
5611 * for (const prefix of segment.blobPrefixes) {
5612 * console.log(`\tBlobPrefix: ${prefix.name}`);
5613 * }
5614 * }
5615 * for (const blob of response.segment.blobItems) {
5616 * console.log(`\tBlobItem: name - ${blob.name}`);
5617 * }
5618 * }
5619 * ```
5620 *
5621 * Example using paging with a max page size:
5622 *
5623 * ```js
5624 * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
5625 *
5626 * let i = 1;
5627 * for await (const response of containerClient
5628 * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
5629 * .byPage({ maxPageSize: 2 })) {
5630 * console.log(`Page ${i++}`);
5631 * const segment = response.segment;
5632 *
5633 * if (segment.blobPrefixes) {
5634 * for (const prefix of segment.blobPrefixes) {
5635 * console.log(`\tBlobPrefix: ${prefix.name}`);
5636 * }
5637 * }
5638 *
5639 * for (const blob of response.segment.blobItems) {
5640 * console.log(`\tBlobItem: name - ${blob.name}`);
5641 * }
5642 * }
5643 * ```
5644 *
5645 * @param delimiter - The character or string used to define the virtual hierarchy
5646 * @param options - Options to list blobs operation.
5647 */
5648 listBlobsByHierarchy(delimiter: string, options?: ContainerListBlobsOptions): PagedAsyncIterableIterator<({
5649 kind: "prefix";
5650 } & BlobPrefix) | ({
5651 kind: "blob";
5652 } & BlobItem), ContainerListBlobHierarchySegmentResponse>;
5653 /**
5654 * The Filter Blobs operation enables callers to list blobs in the container whose tags
5655 * match a given search expression.
5656 *
5657 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
5658 * The given expression must evaluate to true for a blob to be returned in the results.
5659 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
5660 * however, only a subset of the OData filter syntax is supported in the Blob service.
5661 * @param marker - A string value that identifies the portion of
5662 * the list of blobs to be returned with the next listing operation. The
5663 * operation returns the continuationToken value within the response body if the
5664 * listing operation did not return all blobs remaining to be listed
5665 * with the current page. The continuationToken value can be used as the value for
5666 * the marker parameter in a subsequent call to request the next page of list
5667 * items. The marker value is opaque to the client.
5668 * @param options - Options to find blobs by tags.
5669 */
5670 private findBlobsByTagsSegment;
5671 /**
5672 * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.
5673 *
5674 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
5675 * The given expression must evaluate to true for a blob to be returned in the results.
5676 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
5677 * however, only a subset of the OData filter syntax is supported in the Blob service.
5678 * @param marker - A string value that identifies the portion of
5679 * the list of blobs to be returned with the next listing operation. The
5680 * operation returns the continuationToken value within the response body if the
5681 * listing operation did not return all blobs remaining to be listed
5682 * with the current page. The continuationToken value can be used as the value for
5683 * the marker parameter in a subsequent call to request the next page of list
5684 * items. The marker value is opaque to the client.
5685 * @param options - Options to find blobs by tags.
5686 */
5687 private findBlobsByTagsSegments;
5688 /**
5689 * Returns an AsyncIterableIterator for blobs.
5690 *
5691 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
5692 * The given expression must evaluate to true for a blob to be returned in the results.
5693 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
5694 * however, only a subset of the OData filter syntax is supported in the Blob service.
5695 * @param options - Options to findBlobsByTagsItems.
5696 */
5697 private findBlobsByTagsItems;
5698 /**
5699 * Returns an async iterable iterator to find all blobs with specified tag
5700 * under the specified container.
5701 *
5702 * .byPage() returns an async iterable iterator to list the blobs in pages.
5703 *
5704 * Example using `for await` syntax:
5705 *
5706 * ```js
5707 * let i = 1;
5708 * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) {
5709 * console.log(`Blob ${i++}: ${blob.name}`);
5710 * }
5711 * ```
5712 *
5713 * Example using `iter.next()`:
5714 *
5715 * ```js
5716 * let i = 1;
5717 * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'");
5718 * let blobItem = await iter.next();
5719 * while (!blobItem.done) {
5720 * console.log(`Blob ${i++}: ${blobItem.value.name}`);
5721 * blobItem = await iter.next();
5722 * }
5723 * ```
5724 *
5725 * Example using `byPage()`:
5726 *
5727 * ```js
5728 * // passing optional maxPageSize in the page settings
5729 * let i = 1;
5730 * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
5731 * if (response.blobs) {
5732 * for (const blob of response.blobs) {
5733 * console.log(`Blob ${i++}: ${blob.name}`);
5734 * }
5735 * }
5736 * }
5737 * ```
5738 *
5739 * Example using paging with a marker:
5740 *
5741 * ```js
5742 * let i = 1;
5743 * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
5744 * let response = (await iterator.next()).value;
5745 *
5746 * // Prints 2 blob names
5747 * if (response.blobs) {
5748 * for (const blob of response.blobs) {
5749 * console.log(`Blob ${i++}: ${blob.name}`);
5750 * }
5751 * }
5752 *
5753 * // Gets next marker
5754 * let marker = response.continuationToken;
5755 * // Passing next marker as continuationToken
5756 * iterator = containerClient
5757 * .findBlobsByTags("tagkey='tagvalue'")
5758 * .byPage({ continuationToken: marker, maxPageSize: 10 });
5759 * response = (await iterator.next()).value;
5760 *
5761 * // Prints blob names
5762 * if (response.blobs) {
5763 * for (const blob of response.blobs) {
5764 * console.log(`Blob ${i++}: ${blob.name}`);
5765 * }
5766 * }
5767 * ```
5768 *
5769 * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
5770 * The given expression must evaluate to true for a blob to be returned in the results.
5771 * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
5772 * however, only a subset of the OData filter syntax is supported in the Blob service.
5773 * @param options - Options to find blobs by tags.
5774 */
5775 findBlobsByTags(tagFilterSqlExpression: string, options?: ContainerFindBlobByTagsOptions): PagedAsyncIterableIterator<FilterBlobItem, ContainerFindBlobsByTagsSegmentResponse>;
5776 private getContainerNameFromUrl;
5777 /**
5778 * Only available for ContainerClient constructed with a shared key credential.
5779 *
5780 * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties
5781 * and parameters passed in. The SAS is signed by the shared key credential of the client.
5782 *
5783 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
5784 *
5785 * @param options - Optional parameters.
5786 * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
5787 */
5788 generateSasUrl(options: ContainerGenerateSasUrlOptions): Promise<string>;
5789 /**
5790 * Creates a BlobBatchClient object to conduct batch operations.
5791 *
5792 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch
5793 *
5794 * @returns A new BlobBatchClient object for this container.
5795 */
5796 getBlobBatchClient(): BlobBatchClient;
5797}
5798
5799/** Defines headers for Container_create operation. */
5800export declare interface ContainerCreateHeaders {
5801 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
5802 etag?: string;
5803 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
5804 lastModified?: Date;
5805 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
5806 clientRequestId?: string;
5807 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
5808 requestId?: string;
5809 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
5810 version?: string;
5811 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
5812 date?: Date;
5813 /** Error Code */
5814 errorCode?: string;
5815}
5816
5817/**
5818 * Contains response data for the {@link ContainerClient.createIfNotExists} operation.
5819 */
5820export declare interface ContainerCreateIfNotExistsResponse extends ContainerCreateResponse {
5821 /**
5822 * Indicate whether the container is successfully created. Is false when the container is not changed as it already exists.
5823 */
5824 succeeded: boolean;
5825}
5826
5827/**
5828 * Options to configure {@link ContainerClient.create} operation.
5829 */
5830export declare interface ContainerCreateOptions extends CommonOptions {
5831 /**
5832 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5833 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5834 */
5835 abortSignal?: AbortSignalLike;
5836 /**
5837 * A collection of key-value string pair to associate with the container.
5838 */
5839 metadata?: Metadata;
5840 /**
5841 * Specifies whether data in the container may be accessed publicly and the level of access. Possible values include:
5842 * - `container`: Specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account.
5843 * - `blob`: Specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request.
5844 */
5845 access?: PublicAccessType;
5846 /**
5847 * Container encryption scope info.
5848 */
5849 containerEncryptionScope?: ContainerEncryptionScope;
5850}
5851
5852/** Contains response data for the create operation. */
5853export declare type ContainerCreateResponse = ContainerCreateHeaders & {
5854 /** The underlying HTTP response. */
5855 _response: coreHttp.HttpResponse & {
5856 /** The parsed HTTP response headers. */
5857 parsedHeaders: ContainerCreateHeaders;
5858 };
5859};
5860
5861/**
5862 * Options to configure the {@link ContainerClient.deleteBlob} operation.
5863 */
5864export declare interface ContainerDeleteBlobOptions extends BlobDeleteOptions {
5865 /**
5866 * An opaque DateTime value that, when present, specifies the version
5867 * of the blob to delete. It's for service version 2019-10-10 and newer.
5868 */
5869 versionId?: string;
5870}
5871
5872/** Defines headers for Container_delete operation. */
5873export declare interface ContainerDeleteHeaders {
5874 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
5875 clientRequestId?: string;
5876 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
5877 requestId?: string;
5878 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
5879 version?: string;
5880 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
5881 date?: Date;
5882 /** Error Code */
5883 errorCode?: string;
5884}
5885
5886/**
5887 * Contains response data for the {@link ContainerClient.deleteIfExists} operation.
5888 */
5889export declare interface ContainerDeleteIfExistsResponse extends ContainerDeleteResponse {
5890 /**
5891 * Indicate whether the container is successfully deleted. Is false if the container does not exist in the first place.
5892 */
5893 succeeded: boolean;
5894}
5895
5896/**
5897 * Options to configure {@link ContainerClient.delete} operation.
5898 */
5899export declare interface ContainerDeleteMethodOptions extends CommonOptions {
5900 /**
5901 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5902 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5903 */
5904 abortSignal?: AbortSignalLike;
5905 /**
5906 * Conditions to meet when deleting the container.
5907 */
5908 conditions?: ContainerRequestConditions;
5909}
5910
5911/** Contains response data for the delete operation. */
5912export declare type ContainerDeleteResponse = ContainerDeleteHeaders & {
5913 /** The underlying HTTP response. */
5914 _response: coreHttp.HttpResponse & {
5915 /** The parsed HTTP response headers. */
5916 parsedHeaders: ContainerDeleteHeaders;
5917 };
5918};
5919
5920/** Parameter group */
5921export declare interface ContainerEncryptionScope {
5922 /** Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use for all future writes. */
5923 defaultEncryptionScope?: string;
5924 /** Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a different encryption scope than the scope set on the container. */
5925 preventEncryptionScopeOverride?: boolean;
5926}
5927
5928/**
5929 * Options to configure {@link ContainerClient.exists} operation.
5930 */
5931export declare interface ContainerExistsOptions extends CommonOptions {
5932 /**
5933 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5934 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5935 */
5936 abortSignal?: AbortSignalLike;
5937}
5938
5939/** Defines headers for Container_filterBlobs operation. */
5940export declare interface ContainerFilterBlobsHeaders {
5941 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
5942 clientRequestId?: string;
5943 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
5944 requestId?: string;
5945 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
5946 version?: string;
5947 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
5948 date?: Date;
5949}
5950
5951/**
5952 * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation.
5953 */
5954export declare interface ContainerFindBlobByTagsOptions extends CommonOptions {
5955 /**
5956 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
5957 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
5958 */
5959 abortSignal?: AbortSignalLike;
5960}
5961
5962/**
5963 * The response of {@link BlobServiceClient.findBlobsByTags} operation.
5964 */
5965export declare type ContainerFindBlobsByTagsSegmentResponse = FilterBlobSegment & ContainerFilterBlobsHeaders & {
5966 /**
5967 * The underlying HTTP response.
5968 */
5969 _response: HttpResponse & {
5970 /**
5971 * The parsed HTTP response headers.
5972 */
5973 parsedHeaders: ContainerFilterBlobsHeaders;
5974 /**
5975 * The response body as text (string format)
5976 */
5977 bodyAsText: string;
5978 /**
5979 * The response body as parsed JSON or XML
5980 */
5981 parsedBody: FilterBlobSegmentModel;
5982 };
5983};
5984
5985/**
5986 * Options to configure {@link ContainerClient.generateSasUrl} operation.
5987 */
5988export declare interface ContainerGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {
5989 /**
5990 * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.
5991 */
5992 permissions?: ContainerSASPermissions;
5993}
5994
5995/** Defines headers for Container_getAccessPolicy operation. */
5996export declare interface ContainerGetAccessPolicyHeaders {
5997 /** Indicated whether data in the container may be accessed publicly and the level of access */
5998 blobPublicAccess?: PublicAccessType;
5999 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
6000 etag?: string;
6001 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
6002 lastModified?: Date;
6003 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6004 clientRequestId?: string;
6005 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6006 requestId?: string;
6007 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6008 version?: string;
6009 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6010 date?: Date;
6011 /** Error Code */
6012 errorCode?: string;
6013}
6014
6015/**
6016 * Options to configure {@link ContainerClient.getAccessPolicy} operation.
6017 */
6018export declare interface ContainerGetAccessPolicyOptions extends CommonOptions {
6019 /**
6020 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6021 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6022 */
6023 abortSignal?: AbortSignalLike;
6024 /**
6025 * If specified, contains the lease id that must be matched and lease with this id
6026 * must be active in order for the operation to succeed.
6027 */
6028 conditions?: LeaseAccessConditions;
6029}
6030
6031/**
6032 * Contains response data for the {@link ContainerClient.getAccessPolicy} operation.
6033 */
6034export declare type ContainerGetAccessPolicyResponse = {
6035 signedIdentifiers: SignedIdentifier[];
6036} & ContainerGetAccessPolicyHeaders & {
6037 /**
6038 * The underlying HTTP response.
6039 */
6040 _response: HttpResponse & {
6041 /**
6042 * The parsed HTTP response headers.
6043 */
6044 parsedHeaders: ContainerGetAccessPolicyHeaders;
6045 /**
6046 * The response body as text (string format)
6047 */
6048 bodyAsText: string;
6049 /**
6050 * The response body as parsed JSON or XML
6051 */
6052 parsedBody: SignedIdentifierModel[];
6053 };
6054};
6055
6056/** Defines headers for Container_getProperties operation. */
6057export declare interface ContainerGetPropertiesHeaders {
6058 metadata?: {
6059 [propertyName: string]: string;
6060 };
6061 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
6062 etag?: string;
6063 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
6064 lastModified?: Date;
6065 /** When a blob is leased, specifies whether the lease is of infinite or fixed duration. */
6066 leaseDuration?: LeaseDurationType;
6067 /** Lease state of the blob. */
6068 leaseState?: LeaseStateType;
6069 /** The current lease status of the blob. */
6070 leaseStatus?: LeaseStatusType;
6071 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6072 clientRequestId?: string;
6073 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6074 requestId?: string;
6075 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6076 version?: string;
6077 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6078 date?: Date;
6079 /** Indicated whether data in the container may be accessed publicly and the level of access */
6080 blobPublicAccess?: PublicAccessType;
6081 /** Indicates whether the container has an immutability policy set on it. */
6082 hasImmutabilityPolicy?: boolean;
6083 /** Indicates whether the container has a legal hold. */
6084 hasLegalHold?: boolean;
6085 /** The default encryption scope for the container. */
6086 defaultEncryptionScope?: string;
6087 /** Indicates whether the container's default encryption scope can be overriden. */
6088 denyEncryptionScopeOverride?: boolean;
6089 /** Indicates whether version level worm is enabled on a container. */
6090 isImmutableStorageWithVersioningEnabled?: boolean;
6091 /** Error Code */
6092 errorCode?: string;
6093}
6094
6095/**
6096 * Options to configure {@link ContainerClient.getProperties} operation.
6097 */
6098export declare interface ContainerGetPropertiesOptions extends CommonOptions {
6099 /**
6100 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6101 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6102 */
6103 abortSignal?: AbortSignalLike;
6104 /**
6105 * If specified, contains the lease id that must be matched and lease with this id
6106 * must be active in order for the operation to succeed.
6107 */
6108 conditions?: LeaseAccessConditions;
6109}
6110
6111/** Contains response data for the getProperties operation. */
6112export declare type ContainerGetPropertiesResponse = ContainerGetPropertiesHeaders & {
6113 /** The underlying HTTP response. */
6114 _response: coreHttp.HttpResponse & {
6115 /** The parsed HTTP response headers. */
6116 parsedHeaders: ContainerGetPropertiesHeaders;
6117 };
6118};
6119
6120/** An Azure Storage container */
6121export declare interface ContainerItem {
6122 name: string;
6123 deleted?: boolean;
6124 version?: string;
6125 /** Properties of a container */
6126 properties: ContainerProperties;
6127 /** Dictionary of <string> */
6128 metadata?: {
6129 [propertyName: string]: string;
6130 };
6131}
6132
6133/** Defines headers for Container_listBlobFlatSegment operation. */
6134export declare interface ContainerListBlobFlatSegmentHeaders {
6135 /** The media type of the body of the response. For List Blobs this is 'application/xml' */
6136 contentType?: string;
6137 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6138 clientRequestId?: string;
6139 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6140 requestId?: string;
6141 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6142 version?: string;
6143 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6144 date?: Date;
6145 /** Error Code */
6146 errorCode?: string;
6147}
6148
6149/**
6150 * Contains response data for the listBlobFlatSegment operation.
6151 */
6152export declare type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse & ContainerListBlobFlatSegmentHeaders & {
6153 /**
6154 * The underlying HTTP response.
6155 */
6156 _response: HttpResponse & {
6157 /**
6158 * The parsed HTTP response headers.
6159 */
6160 parsedHeaders: ContainerListBlobFlatSegmentHeaders;
6161 /**
6162 * The response body as text (string format)
6163 */
6164 bodyAsText: string;
6165 /**
6166 * The response body as parsed JSON or XML
6167 */
6168 parsedBody: ListBlobsFlatSegmentResponseModel;
6169 };
6170};
6171
6172/** Defines headers for Container_listBlobHierarchySegment operation. */
6173export declare interface ContainerListBlobHierarchySegmentHeaders {
6174 /** The media type of the body of the response. For List Blobs this is 'application/xml' */
6175 contentType?: string;
6176 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6177 clientRequestId?: string;
6178 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6179 requestId?: string;
6180 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6181 version?: string;
6182 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6183 date?: Date;
6184 /** Error Code */
6185 errorCode?: string;
6186}
6187
6188/**
6189 * Contains response data for the listBlobHierarchySegment operation.
6190 */
6191export declare type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse & ContainerListBlobHierarchySegmentHeaders & {
6192 /**
6193 * The underlying HTTP response.
6194 */
6195 _response: HttpResponse & {
6196 /**
6197 * The parsed HTTP response headers.
6198 */
6199 parsedHeaders: ContainerListBlobHierarchySegmentHeaders;
6200 /**
6201 * The response body as text (string format)
6202 */
6203 bodyAsText: string;
6204 /**
6205 * The response body as parsed JSON or XML
6206 */
6207 parsedBody: ListBlobsHierarchySegmentResponseModel;
6208 };
6209};
6210
6211/**
6212 * Options to configure Container - List Blobs operations.
6213 *
6214 * See:
6215 * - {@link ContainerClient.listBlobsFlat}
6216 * - {@link ContainerClient.listBlobsByHierarchy}
6217 */
6218export declare interface ContainerListBlobsOptions extends CommonOptions {
6219 /**
6220 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6221 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6222 */
6223 abortSignal?: AbortSignalLike;
6224 /**
6225 * Filters the results to return only containers
6226 * whose name begins with the specified prefix.
6227 */
6228 prefix?: string;
6229 /**
6230 * Specifies whether metadata related to any current or previous Copy Blob operation should be included in the response.
6231 */
6232 includeCopy?: boolean;
6233 /**
6234 * Specifies whether soft deleted blobs should be included in the response.
6235 */
6236 includeDeleted?: boolean;
6237 /**
6238 * Specifies whether blob metadata be returned in the response.
6239 */
6240 includeMetadata?: boolean;
6241 /**
6242 * Specifies whether snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response.
6243 */
6244 includeSnapshots?: boolean;
6245 /**
6246 * Specifies whether versions should be included in the enumeration. Versions are listed from oldest to newest in the response.
6247 */
6248 includeVersions?: boolean;
6249 /**
6250 * Specifies whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, be included in the response.
6251 */
6252 includeUncommitedBlobs?: boolean;
6253 /**
6254 * Specifies whether blob tags be returned in the response.
6255 */
6256 includeTags?: boolean;
6257 /**
6258 * Specifies whether deleted blob with versions be returned in the response.
6259 */
6260 includeDeletedWithVersions?: boolean;
6261 /**
6262 * Specifies whether blob immutability policy be returned in the response.
6263 */
6264 includeImmutabilityPolicy?: boolean;
6265 /**
6266 * Specifies whether blob legal hold be returned in the response.
6267 */
6268 includeLegalHold?: boolean;
6269}
6270
6271/** Properties of a container */
6272export declare interface ContainerProperties {
6273 lastModified: Date;
6274 etag: string;
6275 leaseStatus?: LeaseStatusType;
6276 leaseState?: LeaseStateType;
6277 leaseDuration?: LeaseDurationType;
6278 publicAccess?: PublicAccessType;
6279 hasImmutabilityPolicy?: boolean;
6280 hasLegalHold?: boolean;
6281 defaultEncryptionScope?: string;
6282 preventEncryptionScopeOverride?: boolean;
6283 deletedOn?: Date;
6284 remainingRetentionDays?: number;
6285 /** Indicates if version level worm is enabled on this container. */
6286 isImmutableStorageWithVersioningEnabled?: boolean;
6287}
6288
6289/**
6290 * Options to configure Container - Release Lease operation.
6291 */
6292export declare interface ContainerReleaseLeaseOptions extends CommonOptions {
6293 /**
6294 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6295 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6296 */
6297 abortSignal?: AbortSignalLike;
6298 /**
6299 * Conditions to meet when releasing the lease.
6300 */
6301 conditions?: ModifiedAccessConditions;
6302}
6303
6304/** Defines headers for Container_rename operation. */
6305export declare interface ContainerRenameHeaders {
6306 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6307 clientRequestId?: string;
6308 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6309 requestId?: string;
6310 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6311 version?: string;
6312 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6313 date?: Date;
6314 /** Error Code */
6315 errorCode?: string;
6316}
6317
6318/** Contains response data for the rename operation. */
6319export declare type ContainerRenameResponse = ContainerRenameHeaders & {
6320 /** The underlying HTTP response. */
6321 _response: coreHttp.HttpResponse & {
6322 /** The parsed HTTP response headers. */
6323 parsedHeaders: ContainerRenameHeaders;
6324 };
6325};
6326
6327/**
6328 * Options to configure Container - Renew Lease operation.
6329 */
6330export declare interface ContainerRenewLeaseOptions extends CommonOptions {
6331 /**
6332 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6333 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6334 */
6335 abortSignal?: AbortSignalLike;
6336 /**
6337 * Conditions to meet when renewing the lease.
6338 */
6339 conditions?: ModifiedAccessConditions;
6340}
6341
6342/**
6343 * Conditions to meet for the container.
6344 */
6345export declare interface ContainerRequestConditions extends LeaseAccessConditions, ModificationConditions {
6346}
6347
6348/**
6349 * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.
6350 * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.
6351 * Once all the values are set, this should be serialized with toString and set as the permissions field on a
6352 * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but
6353 * the order of the permissions is particular and this class guarantees correctness.
6354 */
6355export declare class ContainerSASPermissions {
6356 /**
6357 * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
6358 * Error if it encounters a character that does not correspond to a valid permission.
6359 *
6360 * @param permissions -
6361 */
6362 static parse(permissions: string): ContainerSASPermissions;
6363 /**
6364 * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it
6365 * and boolean values for them.
6366 *
6367 * @param permissionLike -
6368 */
6369 static from(permissionLike: ContainerSASPermissionsLike): ContainerSASPermissions;
6370 /**
6371 * Specifies Read access granted.
6372 */
6373 read: boolean;
6374 /**
6375 * Specifies Add access granted.
6376 */
6377 add: boolean;
6378 /**
6379 * Specifies Create access granted.
6380 */
6381 create: boolean;
6382 /**
6383 * Specifies Write access granted.
6384 */
6385 write: boolean;
6386 /**
6387 * Specifies Delete access granted.
6388 */
6389 delete: boolean;
6390 /**
6391 * Specifies Delete version access granted.
6392 */
6393 deleteVersion: boolean;
6394 /**
6395 * Specifies List access granted.
6396 */
6397 list: boolean;
6398 /**
6399 * Specfies Tag access granted.
6400 */
6401 tag: boolean;
6402 /**
6403 * Specifies Move access granted.
6404 */
6405 move: boolean;
6406 /**
6407 * Specifies Execute access granted.
6408 */
6409 execute: boolean;
6410 /**
6411 * Specifies SetImmutabilityPolicy access granted.
6412 */
6413 setImmutabilityPolicy: boolean;
6414 /**
6415 * Specifies that Permanent Delete is permitted.
6416 */
6417 permanentDelete: boolean;
6418 /**
6419 * Specifies that Filter Blobs by Tags is permitted.
6420 */
6421 filterByTags: boolean;
6422 /**
6423 * Converts the given permissions to a string. Using this method will guarantee the permissions are in an
6424 * order accepted by the service.
6425 *
6426 * The order of the characters should be as specified here to ensure correctness.
6427 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
6428 *
6429 */
6430 toString(): string;
6431}
6432
6433/**
6434 * A type that looks like a Container SAS permission.
6435 * Used in {@link ContainerSASPermissions} to parse SAS permissions from raw objects.
6436 */
6437export declare interface ContainerSASPermissionsLike {
6438 /**
6439 * Specifies Read access granted.
6440 */
6441 read?: boolean;
6442 /**
6443 * Specifies Add access granted.
6444 */
6445 add?: boolean;
6446 /**
6447 * Specifies Create access granted.
6448 */
6449 create?: boolean;
6450 /**
6451 * Specifies Write access granted.
6452 */
6453 write?: boolean;
6454 /**
6455 * Specifies Delete access granted.
6456 */
6457 delete?: boolean;
6458 /**
6459 * Specifies Delete version access granted.
6460 */
6461 deleteVersion?: boolean;
6462 /**
6463 * Specifies List access granted.
6464 */
6465 list?: boolean;
6466 /**
6467 * Specfies Tag access granted.
6468 */
6469 tag?: boolean;
6470 /**
6471 * Specifies Move access granted.
6472 */
6473 move?: boolean;
6474 /**
6475 * Specifies Execute access granted.
6476 */
6477 execute?: boolean;
6478 /**
6479 * Specifies SetImmutabilityPolicy access granted.
6480 */
6481 setImmutabilityPolicy?: boolean;
6482 /**
6483 * Specifies that Permanent Delete is permitted.
6484 */
6485 permanentDelete?: boolean;
6486 /**
6487 * Specifies that Filter Blobs by Tags is permitted.
6488 */
6489 filterByTags?: boolean;
6490}
6491
6492/** Defines headers for Container_setAccessPolicy operation. */
6493export declare interface ContainerSetAccessPolicyHeaders {
6494 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
6495 etag?: string;
6496 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
6497 lastModified?: Date;
6498 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6499 clientRequestId?: string;
6500 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6501 requestId?: string;
6502 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6503 version?: string;
6504 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6505 date?: Date;
6506 /** Error Code */
6507 errorCode?: string;
6508}
6509
6510/**
6511 * Options to configure {@link ContainerClient.setAccessPolicy} operation.
6512 */
6513export declare interface ContainerSetAccessPolicyOptions extends CommonOptions {
6514 /**
6515 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6516 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6517 */
6518 abortSignal?: AbortSignalLike;
6519 /**
6520 * Conditions to meet when setting the access policy.
6521 */
6522 conditions?: ContainerRequestConditions;
6523}
6524
6525/** Contains response data for the setAccessPolicy operation. */
6526export declare type ContainerSetAccessPolicyResponse = ContainerSetAccessPolicyHeaders & {
6527 /** The underlying HTTP response. */
6528 _response: coreHttp.HttpResponse & {
6529 /** The parsed HTTP response headers. */
6530 parsedHeaders: ContainerSetAccessPolicyHeaders;
6531 };
6532};
6533
6534/** Defines headers for Container_setMetadata operation. */
6535export declare interface ContainerSetMetadataHeaders {
6536 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
6537 etag?: string;
6538 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
6539 lastModified?: Date;
6540 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6541 clientRequestId?: string;
6542 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6543 requestId?: string;
6544 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6545 version?: string;
6546 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6547 date?: Date;
6548 /** Error Code */
6549 errorCode?: string;
6550}
6551
6552/**
6553 * Options to configure {@link ContainerClient.setMetadata} operation.
6554 */
6555export declare interface ContainerSetMetadataOptions extends CommonOptions {
6556 /**
6557 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6558 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6559 */
6560 abortSignal?: AbortSignalLike;
6561 /**
6562 * If specified, contains the lease id that must be matched and lease with this id
6563 * must be active in order for the operation to succeed.
6564 */
6565 conditions?: ContainerRequestConditions;
6566}
6567
6568/** Contains response data for the setMetadata operation. */
6569export declare type ContainerSetMetadataResponse = ContainerSetMetadataHeaders & {
6570 /** The underlying HTTP response. */
6571 _response: coreHttp.HttpResponse & {
6572 /** The parsed HTTP response headers. */
6573 parsedHeaders: ContainerSetMetadataHeaders;
6574 };
6575};
6576
6577/** Defines headers for Container_restore operation. */
6578export declare interface ContainerUndeleteHeaders {
6579 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
6580 clientRequestId?: string;
6581 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
6582 requestId?: string;
6583 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
6584 version?: string;
6585 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
6586 date?: Date;
6587 /** Error Code */
6588 errorCode?: string;
6589}
6590
6591/** Contains response data for the restore operation. */
6592export declare type ContainerUndeleteResponse = ContainerUndeleteHeaders & {
6593 /** The underlying HTTP response. */
6594 _response: coreHttp.HttpResponse & {
6595 /** The parsed HTTP response headers. */
6596 parsedHeaders: ContainerUndeleteHeaders;
6597 };
6598};
6599
6600/**
6601 * Defines the operations from a {@link BlobClient} that are needed for the poller
6602 * returned by {@link BlobClient.beginCopyFromURL} to work.
6603 */
6604export declare type CopyPollerBlobClient = Pick<BlobClient, "abortCopyFromURL" | "getProperties"> & {
6605 startCopyFromURL(copySource: string, options?: BlobStartCopyFromURLOptions): Promise<BlobBeginCopyFromURLResponse>;
6606};
6607
6608/** Defines values for CopyStatusType. */
6609export declare type CopyStatusType = "pending" | "success" | "aborted" | "failed";
6610
6611/** CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain */
6612export declare interface CorsRule {
6613 /** The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS. */
6614 allowedOrigins: string;
6615 /** The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) */
6616 allowedMethods: string;
6617 /** the request headers that the origin domain may specify on the CORS request. */
6618 allowedHeaders: string;
6619 /** The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer */
6620 exposedHeaders: string;
6621 /** The maximum amount time that a browser should cache the preflight OPTIONS request. */
6622 maxAgeInSeconds: number;
6623}
6624
6625/** Parameter group */
6626export declare interface CpkInfo {
6627 /** Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, encryption is performed with the root account encryption key. For more information, see Encryption at Rest for Azure Storage Services. */
6628 encryptionKey?: string;
6629 /** The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key header is provided. */
6630 encryptionKeySha256?: string;
6631 /** 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. */
6632 encryptionAlgorithm?: EncryptionAlgorithmType;
6633}
6634
6635/**
6636 * Credential is an abstract class for Azure Storage HTTP requests signing. This
6637 * class will host an credentialPolicyCreator factory which generates CredentialPolicy.
6638 */
6639declare abstract class Credential_2 implements RequestPolicyFactory {
6640 /**
6641 * Creates a RequestPolicy object.
6642 *
6643 * @param _nextPolicy -
6644 * @param _options -
6645 */
6646 create(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions): RequestPolicy;
6647}
6648export { Credential_2 as Credential }
6649
6650/**
6651 * Credential policy used to sign HTTP(S) requests before sending. This is an
6652 * abstract class.
6653 */
6654export declare abstract class CredentialPolicy extends BaseRequestPolicy {
6655 /**
6656 * Sends out request.
6657 *
6658 * @param request -
6659 */
6660 sendRequest(request: WebResource): Promise<HttpOperationResponse>;
6661 /**
6662 * Child classes must implement this method with request signing. This method
6663 * will be executed in {@link sendRequest}.
6664 *
6665 * @param request -
6666 */
6667 protected signRequest(request: WebResource): WebResource;
6668}
6669
6670/**
6671 * A factory function that creates a new CredentialPolicy that uses the provided nextPolicy.
6672 */
6673export declare type CredentialPolicyCreator = (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => CredentialPolicy;
6674
6675/** Defines values for DeleteSnapshotsOptionType. */
6676export declare type DeleteSnapshotsOptionType = "include" | "only";
6677
6678export { deserializationPolicy }
6679
6680/** Defines values for EncryptionAlgorithmType. */
6681export declare type EncryptionAlgorithmType = "AES256";
6682
6683/**
6684 * Blob info from a {@link BlobServiceClient.findBlobsByTags}
6685 */
6686export declare interface FilterBlobItem {
6687 /**
6688 * Blob Name.
6689 */
6690 name: string;
6691 /**
6692 * Container Name.
6693 */
6694 containerName: string;
6695 /**
6696 * Blob Tags.
6697 */
6698 tags?: Tags;
6699 /**
6700 * Tag value.
6701 *
6702 * @deprecated The service no longer returns this value. Use {@link tags} to fetch all matching Blob Tags.
6703 */
6704 tagValue: string;
6705}
6706
6707/** Blob info from a Filter Blobs API call */
6708export declare interface FilterBlobItemModel {
6709 name: string;
6710 containerName: string;
6711 /** Blob tags */
6712 tags?: BlobTags;
6713}
6714
6715/**
6716 * Segment response of {@link BlobServiceClient.findBlobsByTags} operation.
6717 */
6718export declare interface FilterBlobSegment {
6719 serviceEndpoint: string;
6720 where: string;
6721 blobs: FilterBlobItem[];
6722 continuationToken?: string;
6723}
6724
6725/** The result of a Filter Blobs API call */
6726export declare interface FilterBlobSegmentModel {
6727 serviceEndpoint: string;
6728 where: string;
6729 blobs: FilterBlobItemModel[];
6730 continuationToken?: string;
6731}
6732
6733/**
6734 * ONLY AVAILABLE IN NODE.JS RUNTIME.
6735 *
6736 * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual
6737 * REST request.
6738 *
6739 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
6740 *
6741 * @param accountSASSignatureValues -
6742 * @param sharedKeyCredential -
6743 */
6744export declare function generateAccountSASQueryParameters(accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters;
6745
6746/**
6747 * ONLY AVAILABLE IN NODE.JS RUNTIME.
6748 *
6749 * Creates an instance of SASQueryParameters.
6750 *
6751 * Only accepts required settings needed to create a SAS. For optional settings please
6752 * set corresponding properties directly, such as permissions, startsOn and identifier.
6753 *
6754 * WARNING: When identifier is not provided, permissions and expiresOn are required.
6755 * You MUST assign value to identifier or expiresOn & permissions manually if you initial with
6756 * this constructor.
6757 *
6758 * Fill in the required details before running the following snippets.
6759 *
6760 * Example usage:
6761 *
6762 * ```js
6763 * // Generate service level SAS for a container
6764 * const containerSAS = generateBlobSASQueryParameters({
6765 * containerName, // Required
6766 * permissions: ContainerSASPermissions.parse("racwdl"), // Required
6767 * startsOn: new Date(), // Optional
6768 * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type
6769 * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional
6770 * protocol: SASProtocol.HttpsAndHttp, // Optional
6771 * version: "2016-05-31" // Optional
6772 * },
6773 * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`
6774 * ).toString();
6775 * ```
6776 *
6777 * Example using an identifier:
6778 *
6779 * ```js
6780 * // Generate service level SAS for a container with identifier
6781 * // startsOn & permissions are optional when identifier is provided
6782 * const identifier = "unique-id";
6783 * await containerClient.setAccessPolicy(undefined, [
6784 * {
6785 * accessPolicy: {
6786 * expiresOn: new Date(new Date().valueOf() + 86400), // Date type
6787 * permissions: ContainerSASPermissions.parse("racwdl").toString(),
6788 * startsOn: new Date() // Date type
6789 * },
6790 * id: identifier
6791 * }
6792 * ]);
6793 *
6794 * const containerSAS = generateBlobSASQueryParameters(
6795 * {
6796 * containerName, // Required
6797 * identifier // Required
6798 * },
6799 * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`
6800 * ).toString();
6801 * ```
6802 *
6803 * Example using a blob name:
6804 *
6805 * ```js
6806 * // Generate service level SAS for a blob
6807 * const blobSAS = generateBlobSASQueryParameters({
6808 * containerName, // Required
6809 * blobName, // Required
6810 * permissions: BlobSASPermissions.parse("racwd"), // Required
6811 * startsOn: new Date(), // Optional
6812 * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type
6813 * cacheControl: "cache-control-override", // Optional
6814 * contentDisposition: "content-disposition-override", // Optional
6815 * contentEncoding: "content-encoding-override", // Optional
6816 * contentLanguage: "content-language-override", // Optional
6817 * contentType: "content-type-override", // Optional
6818 * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional
6819 * protocol: SASProtocol.HttpsAndHttp, // Optional
6820 * version: "2016-05-31" // Optional
6821 * },
6822 * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`
6823 * ).toString();
6824 * ```
6825 *
6826 * @param blobSASSignatureValues -
6827 * @param sharedKeyCredential -
6828 */
6829export declare function generateBlobSASQueryParameters(blobSASSignatureValues: BlobSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters;
6830
6831/**
6832 * ONLY AVAILABLE IN NODE.JS RUNTIME.
6833 *
6834 * Creates an instance of SASQueryParameters.
6835 * WARNING: identifier will be ignored when generating user delegation SAS, permissions and expiresOn are required.
6836 *
6837 * Example usage:
6838 *
6839 * ```js
6840 * // Generate user delegation SAS for a container
6841 * const userDelegationKey = await blobServiceClient.getUserDelegationKey(startsOn, expiresOn);
6842 * const containerSAS = generateBlobSASQueryParameters({
6843 * containerName, // Required
6844 * permissions: ContainerSASPermissions.parse("racwdl"), // Required
6845 * startsOn, // Optional. Date type
6846 * expiresOn, // Required. Date type
6847 * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional
6848 * protocol: SASProtocol.HttpsAndHttp, // Optional
6849 * version: "2018-11-09" // Must greater than or equal to 2018-11-09 to generate user delegation SAS
6850 * },
6851 * userDelegationKey, // UserDelegationKey
6852 * accountName
6853 * ).toString();
6854 * ```
6855 *
6856 * @param blobSASSignatureValues -
6857 * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
6858 * @param accountName -
6859 */
6860export declare function generateBlobSASQueryParameters(blobSASSignatureValues: BlobSASSignatureValues, userDelegationKey: UserDelegationKey, accountName: string): SASQueryParameters;
6861
6862/** Geo-Replication information for the Secondary Storage Service */
6863export declare interface GeoReplication {
6864 /** The status of the secondary location */
6865 status: GeoReplicationStatusType;
6866 /** A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads. */
6867 lastSyncOn: Date;
6868}
6869
6870/** Defines values for GeoReplicationStatusType. */
6871export declare type GeoReplicationStatusType = "live" | "bootstrap" | "unavailable";
6872
6873/**
6874 * Represents authentication information in Authorization, ProxyAuthorization,
6875 * WWW-Authenticate, and Proxy-Authenticate header values.
6876 */
6877export declare interface HttpAuthorization {
6878 /**
6879 * The scheme to use for authorization.
6880 */
6881 scheme: string;
6882 /**
6883 * the credentials containing the authentication information of the user agent for the resource being requested.
6884 */
6885 value: string;
6886}
6887
6888export { HttpHeaders }
6889
6890export { HttpOperationResponse }
6891
6892export { HttpRequestBody }
6893
6894export { IHttpClient }
6895
6896/**
6897 * A helper to decide if a given argument satisfies the Pipeline contract
6898 * @param pipeline - An argument that may be a Pipeline
6899 * @returns true when the argument satisfies the Pipeline contract
6900 */
6901export declare function isPipelineLike(pipeline: unknown): pipeline is PipelineLike;
6902
6903/**
6904 * The details for a specific lease.
6905 */
6906export declare interface Lease {
6907 /**
6908 * The ETag contains a value that you can use to
6909 * perform operations conditionally. If the request version is 2011-08-18 or
6910 * newer, the ETag value will be in quotes.
6911 */
6912 etag?: string;
6913 /**
6914 * Returns the date and time the container was
6915 * last modified. Any operation that modifies the blob, including an update
6916 * of the blob's metadata or properties, changes the last-modified time of
6917 * the blob.
6918 */
6919 lastModified?: Date;
6920 /**
6921 * Uniquely identifies a container's lease
6922 */
6923 leaseId?: string;
6924 /**
6925 * Approximate time remaining in the lease
6926 * period, in seconds.
6927 */
6928 leaseTime?: number;
6929 /**
6930 * This header uniquely identifies the request
6931 * that was made and can be used for troubleshooting the request.
6932 */
6933 requestId?: string;
6934 /**
6935 * Indicates the version of the Blob service used
6936 * to execute the request. This header is returned for requests made against
6937 * version 2009-09-19 and above.
6938 */
6939 version?: string;
6940 /**
6941 * UTC date/time value generated by the service that
6942 * indicates the time at which the response was initiated
6943 */
6944 date?: Date;
6945 /**
6946 * Error code if any associated with the response that returned
6947 * the Lease information.
6948 */
6949 errorCode?: string;
6950}
6951
6952/** Parameter group */
6953export declare interface LeaseAccessConditions {
6954 /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */
6955 leaseId?: string;
6956}
6957
6958/** Defines values for LeaseDurationType. */
6959export declare type LeaseDurationType = "infinite" | "fixed";
6960
6961/**
6962 * Configures lease operations.
6963 */
6964export declare interface LeaseOperationOptions extends CommonOptions {
6965 /**
6966 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
6967 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
6968 */
6969 abortSignal?: AbortSignalLike;
6970 /**
6971 * Conditions to meet when changing the lease.
6972 */
6973 conditions?: ModifiedAccessConditions;
6974}
6975
6976/**
6977 * Contains the response data for operations that create, modify, or delete a lease.
6978 *
6979 * See {@link BlobLeaseClient}.
6980 */
6981export declare type LeaseOperationResponse = Lease & {
6982 /**
6983 * The underlying HTTP response.
6984 */
6985 _response: HttpResponse & {
6986 /**
6987 * The parsed HTTP response headers.
6988 */
6989 parsedHeaders: Lease;
6990 };
6991};
6992
6993/** Defines values for LeaseStateType. */
6994export declare type LeaseStateType = "available" | "leased" | "expired" | "breaking" | "broken";
6995
6996/** Defines values for LeaseStatusType. */
6997export declare type LeaseStatusType = "locked" | "unlocked";
6998
6999/**
7000 * An enumeration of blobs
7001 */
7002export declare interface ListBlobsFlatSegmentResponse {
7003 serviceEndpoint: string;
7004 containerName: string;
7005 prefix?: string;
7006 marker?: string;
7007 maxPageSize?: number;
7008 segment: BlobFlatListSegment;
7009 continuationToken?: string;
7010}
7011
7012/** An enumeration of blobs */
7013export declare interface ListBlobsFlatSegmentResponseModel {
7014 serviceEndpoint: string;
7015 containerName: string;
7016 prefix?: string;
7017 marker?: string;
7018 maxPageSize?: number;
7019 segment: BlobFlatListSegmentModel;
7020 continuationToken?: string;
7021}
7022
7023/**
7024 * An enumeration of blobs
7025 */
7026export declare interface ListBlobsHierarchySegmentResponse {
7027 serviceEndpoint: string;
7028 containerName: string;
7029 prefix?: string;
7030 marker?: string;
7031 maxPageSize?: number;
7032 delimiter?: string;
7033 segment: BlobHierarchyListSegment;
7034 continuationToken?: string;
7035}
7036
7037/** An enumeration of blobs */
7038export declare interface ListBlobsHierarchySegmentResponseModel {
7039 serviceEndpoint: string;
7040 containerName: string;
7041 prefix?: string;
7042 marker?: string;
7043 maxPageSize?: number;
7044 delimiter?: string;
7045 segment: BlobHierarchyListSegmentModel;
7046 continuationToken?: string;
7047}
7048
7049/** An enumeration of containers */
7050export declare interface ListContainersSegmentResponse {
7051 serviceEndpoint: string;
7052 prefix?: string;
7053 marker?: string;
7054 maxPageSize?: number;
7055 containerItems: ContainerItem[];
7056 continuationToken?: string;
7057}
7058
7059/**
7060 * The `@azure/logger` configuration for this package.
7061 */
7062export declare const logger: AzureLogger;
7063
7064/** Azure Analytics Logging settings. */
7065export declare interface Logging {
7066 /** The version of Storage Analytics to configure. */
7067 version: string;
7068 /** Indicates whether all delete requests should be logged. */
7069 deleteProperty: boolean;
7070 /** Indicates whether all read requests should be logged. */
7071 read: boolean;
7072 /** Indicates whether all write requests should be logged. */
7073 write: boolean;
7074 /** the retention policy which determines how long the associated data should persist */
7075 retentionPolicy: RetentionPolicy;
7076}
7077
7078/**
7079 * Specifies HTTP options for conditional requests based on ETag matching.
7080 */
7081export declare interface MatchConditions {
7082 /**
7083 * Specify an ETag value to operate only on blobs with a matching value.
7084 */
7085 ifMatch?: string;
7086 /**
7087 * Specify an ETag value to operate only on blobs without a matching value.
7088 */
7089 ifNoneMatch?: string;
7090}
7091
7092/**
7093 * A map of name-value pairs to associate with the resource.
7094 */
7095export declare interface Metadata {
7096 /**
7097 * A name-value pair.
7098 */
7099 [propertyName: string]: string;
7100}
7101
7102/** a summary of request statistics grouped by API in hour or minute aggregates for blobs */
7103export declare interface Metrics {
7104 /** The version of Storage Analytics to configure. */
7105 version?: string;
7106 /** Indicates whether metrics are enabled for the Blob service. */
7107 enabled: boolean;
7108 /** Indicates whether metrics should generate summary statistics for called API operations. */
7109 includeAPIs?: boolean;
7110 /** the retention policy which determines how long the associated data should persist */
7111 retentionPolicy?: RetentionPolicy;
7112}
7113
7114/**
7115 * Specifies HTTP options for conditional requests based on modification time.
7116 */
7117export declare interface ModificationConditions {
7118 /**
7119 * Specify this header value to operate only on a blob if it has been modified since the
7120 * specified date/time.
7121 */
7122 ifModifiedSince?: Date;
7123 /**
7124 * Specify this header value to operate only on a blob if it has not been modified since the
7125 * specified date/time.
7126 */
7127 ifUnmodifiedSince?: Date;
7128}
7129
7130/**
7131 * standard HTTP conditional headers and tags condition.
7132 */
7133export declare interface ModifiedAccessConditions extends MatchConditions, ModificationConditions, TagConditions {
7134}
7135
7136/** Parameter group */
7137export declare interface ModifiedAccessConditionsModel {
7138 /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */
7139 ifModifiedSince?: Date;
7140 /** Specify this header value to operate only on a blob if it has not been modified since the specified date/time. */
7141 ifUnmodifiedSince?: Date;
7142 /** Specify an ETag value to operate only on blobs with a matching value. */
7143 ifMatch?: string;
7144 /** Specify an ETag value to operate only on blobs without a matching value. */
7145 ifNoneMatch?: string;
7146 /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */
7147 ifTags?: string;
7148}
7149
7150/**
7151 * Creates a new Pipeline object with Credential provided.
7152 *
7153 * @param credential - 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.
7154 * @param pipelineOptions - Optional. Options.
7155 * @returns A new Pipeline object.
7156 */
7157export declare function newPipeline(credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline;
7158
7159/**
7160 * Contains Object Replication Policy ID and the respective list of {@link ObjectReplicationRule}.
7161 * This is used when retrieving the Object Replication Properties on the source blob. The policy id for the
7162 * destination blob is set in ObjectReplicationDestinationPolicyId of the respective method responses
7163 * (e.g. {@link BlobProperties.ObjectReplicationDestinationPolicyId}.
7164 */
7165export declare interface ObjectReplicationPolicy {
7166 /**
7167 * The Object Replication Policy ID.
7168 */
7169 policyId: string;
7170 /**
7171 * The Rule ID(s) and respective Replication Status(s) that are under the Policy ID.
7172 */
7173 rules: ObjectReplicationRule[];
7174}
7175
7176/**
7177 * Contains the Object Replication Rule ID and {@link ObjectReplicationStatus} of a blob.
7178 * There can be more than one {@link ObjectReplicationRule} under a {@link ObjectReplicationPolicy}.
7179 */
7180export declare interface ObjectReplicationRule {
7181 /**
7182 * The Object Replication Rule ID.
7183 */
7184 ruleId: string;
7185 /**
7186 * The Replication Status
7187 */
7188 replicationStatus: ObjectReplicationStatus;
7189}
7190
7191/**
7192 * Specifies the Replication Status of a blob. This is used when a storage account has
7193 * Object Replication Policy(s) applied. See {@link ObjectReplicationPolicy} and {@link ObjectReplicationRule}.
7194 */
7195export declare type ObjectReplicationStatus = "complete" | "failed";
7196
7197/** Defines headers for PageBlob_clearPages operation. */
7198export declare interface PageBlobClearPagesHeaders {
7199 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
7200 etag?: string;
7201 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
7202 lastModified?: Date;
7203 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
7204 contentMD5?: Uint8Array;
7205 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
7206 xMsContentCrc64?: Uint8Array;
7207 /** The current sequence number for the page blob. */
7208 blobSequenceNumber?: number;
7209 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
7210 clientRequestId?: string;
7211 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
7212 requestId?: string;
7213 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
7214 version?: string;
7215 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
7216 date?: Date;
7217 /** Error Code */
7218 errorCode?: string;
7219}
7220
7221/**
7222 * Options to configure the {@link PageBlobClient.clearPages} operation.
7223 */
7224export declare interface PageBlobClearPagesOptions extends CommonOptions {
7225 /**
7226 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
7227 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
7228 */
7229 abortSignal?: AbortSignalLike;
7230 /**
7231 * Conditions to meet when clearing pages.
7232 */
7233 conditions?: PageBlobRequestConditions;
7234 /**
7235 * Customer Provided Key Info.
7236 */
7237 customerProvidedKey?: CpkInfo;
7238 /**
7239 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
7240 * encrypt the data provided in the request. If not specified, encryption is performed with the
7241 * default account encryption scope. For more information, see Encryption at Rest for Azure
7242 * Storage Services.
7243 */
7244 encryptionScope?: string;
7245}
7246
7247/** Contains response data for the clearPages operation. */
7248export declare type PageBlobClearPagesResponse = PageBlobClearPagesHeaders & {
7249 /** The underlying HTTP response. */
7250 _response: coreHttp.HttpResponse & {
7251 /** The parsed HTTP response headers. */
7252 parsedHeaders: PageBlobClearPagesHeaders;
7253 };
7254};
7255
7256/**
7257 * PageBlobClient defines a set of operations applicable to page blobs.
7258 */
7259export declare class PageBlobClient extends BlobClient {
7260 /**
7261 * pageBlobsContext provided by protocol layer.
7262 */
7263 private pageBlobContext;
7264 /**
7265 *
7266 * Creates an instance of PageBlobClient.
7267 *
7268 * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
7269 * [ Note - Account connection string can only be used in NODE.JS runtime. ]
7270 * Account connection string example -
7271 * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
7272 * SAS connection string example -
7273 * `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`
7274 * @param containerName - Container name.
7275 * @param blobName - Blob name.
7276 * @param options - Optional. Options to configure the HTTP pipeline.
7277 */
7278 constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions);
7279 /**
7280 * Creates an instance of PageBlobClient.
7281 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
7282 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
7283 * If a blob name includes ? or %, blob name must be encoded in the URL.
7284 *
7285 * @param url - A Client string pointing to Azure Storage page blob, such as
7286 * "https://myaccount.blob.core.windows.net/mycontainer/pageblob". You can append a SAS
7287 * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString".
7288 * @param credential - 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.
7289 * @param options - Optional. Options to configure the HTTP pipeline.
7290 */
7291 constructor(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions);
7292 /**
7293 * Creates an instance of PageBlobClient.
7294 *
7295 * @param url - A URL string pointing to Azure Storage page blob, such as
7296 * "https://myaccount.blob.core.windows.net/mycontainer/pageblob".
7297 * You can append a SAS if using AnonymousCredential, such as
7298 * "https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString".
7299 * This method accepts an encoded URL or non-encoded URL pointing to a blob.
7300 * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
7301 * However, if a blob name includes ? or %, blob name must be encoded in the URL.
7302 * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25".
7303 * @param pipeline - Call newPipeline() to create a default
7304 * pipeline, or provide a customized pipeline.
7305 */
7306 constructor(url: string, pipeline: PipelineLike);
7307 /**
7308 * Creates a new PageBlobClient object identical to the source but with the
7309 * specified snapshot timestamp.
7310 * Provide "" will remove the snapshot and return a Client to the base blob.
7311 *
7312 * @param snapshot - The snapshot timestamp.
7313 * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp.
7314 */
7315 withSnapshot(snapshot: string): PageBlobClient;
7316 /**
7317 * Creates a page blob of the specified length. Call uploadPages to upload data
7318 * data to a page blob.
7319 * @see https://docs.microsoft.com/rest/api/storageservices/put-blob
7320 *
7321 * @param size - size of the page blob.
7322 * @param options - Options to the Page Blob Create operation.
7323 * @returns Response data for the Page Blob Create operation.
7324 */
7325 create(size: number, options?: PageBlobCreateOptions): Promise<PageBlobCreateResponse>;
7326 /**
7327 * Creates a page blob of the specified length. Call uploadPages to upload data
7328 * data to a page blob. If the blob with the same name already exists, the content
7329 * of the existing blob will remain unchanged.
7330 * @see https://docs.microsoft.com/rest/api/storageservices/put-blob
7331 *
7332 * @param size - size of the page blob.
7333 * @param options -
7334 */
7335 createIfNotExists(size: number, options?: PageBlobCreateIfNotExistsOptions): Promise<PageBlobCreateIfNotExistsResponse>;
7336 /**
7337 * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.
7338 * @see https://docs.microsoft.com/rest/api/storageservices/put-page
7339 *
7340 * @param body - Data to upload
7341 * @param offset - Offset of destination page blob
7342 * @param count - Content length of the body, also number of bytes to be uploaded
7343 * @param options - Options to the Page Blob Upload Pages operation.
7344 * @returns Response data for the Page Blob Upload Pages operation.
7345 */
7346 uploadPages(body: HttpRequestBody, offset: number, count: number, options?: PageBlobUploadPagesOptions): Promise<PageBlobUploadPagesResponse>;
7347 /**
7348 * The Upload Pages operation writes a range of pages to a page blob where the
7349 * contents are read from a URL.
7350 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url
7351 *
7352 * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication
7353 * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob
7354 * @param destOffset - Offset of destination page blob
7355 * @param count - Number of bytes to be uploaded from source page blob
7356 * @param options -
7357 */
7358 uploadPagesFromURL(sourceURL: string, sourceOffset: number, destOffset: number, count: number, options?: PageBlobUploadPagesFromURLOptions): Promise<PageBlobUploadPagesFromURLResponse>;
7359 /**
7360 * Frees the specified pages from the page blob.
7361 * @see https://docs.microsoft.com/rest/api/storageservices/put-page
7362 *
7363 * @param offset - Starting byte position of the pages to clear.
7364 * @param count - Number of bytes to clear.
7365 * @param options - Options to the Page Blob Clear Pages operation.
7366 * @returns Response data for the Page Blob Clear Pages operation.
7367 */
7368 clearPages(offset?: number, count?: number, options?: PageBlobClearPagesOptions): Promise<PageBlobClearPagesResponse>;
7369 /**
7370 * Returns the list of valid page ranges for a page blob or snapshot of a page blob.
7371 * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges
7372 *
7373 * @param offset - Starting byte position of the page ranges.
7374 * @param count - Number of bytes to get.
7375 * @param options - Options to the Page Blob Get Ranges operation.
7376 * @returns Response data for the Page Blob Get Ranges operation.
7377 */
7378 getPageRanges(offset?: number, count?: number, options?: PageBlobGetPageRangesOptions): Promise<PageBlobGetPageRangesResponse>;
7379 /**
7380 * getPageRangesSegment returns a single segment of page ranges starting from the
7381 * specified Marker. Use an empty Marker to start enumeration from the beginning.
7382 * After getting a segment, process it, and then call getPageRangesSegment again
7383 * (passing the the previously-returned Marker) to get the next segment.
7384 * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges
7385 *
7386 * @param offset - Starting byte position of the page ranges.
7387 * @param count - Number of bytes to get.
7388 * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
7389 * @param options - Options to PageBlob Get Page Ranges Segment operation.
7390 */
7391 private listPageRangesSegment;
7392 /**
7393 * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel}
7394 *
7395 * @param offset - Starting byte position of the page ranges.
7396 * @param count - Number of bytes to get.
7397 * @param marker - A string value that identifies the portion of
7398 * the get of page ranges to be returned with the next getting operation. The
7399 * operation returns the ContinuationToken value within the response body if the
7400 * getting operation did not return all page ranges remaining within the current page.
7401 * The ContinuationToken value can be used as the value for
7402 * the marker parameter in a subsequent call to request the next page of get
7403 * items. The marker value is opaque to the client.
7404 * @param options - Options to List Page Ranges operation.
7405 */
7406 private listPageRangeItemSegments;
7407 /**
7408 * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
7409 *
7410 * @param offset - Starting byte position of the page ranges.
7411 * @param count - Number of bytes to get.
7412 * @param options - Options to List Page Ranges operation.
7413 */
7414 private listPageRangeItems;
7415 /**
7416 * Returns an async iterable iterator to list of page ranges for a page blob.
7417 * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges
7418 *
7419 * .byPage() returns an async iterable iterator to list of page ranges for a page blob.
7420 *
7421 * Example using `for await` syntax:
7422 *
7423 * ```js
7424 * // Get the pageBlobClient before you run these snippets,
7425 * // Can be obtained from `blobServiceClient.getContainerClient("<your-container-name>").getPageBlobClient("<your-blob-name>");`
7426 * let i = 1;
7427 * for await (const pageRange of pageBlobClient.listPageRanges()) {
7428 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7429 * }
7430 * ```
7431 *
7432 * Example using `iter.next()`:
7433 *
7434 * ```js
7435 * let i = 1;
7436 * let iter = pageBlobClient.listPageRanges();
7437 * let pageRangeItem = await iter.next();
7438 * while (!pageRangeItem.done) {
7439 * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);
7440 * pageRangeItem = await iter.next();
7441 * }
7442 * ```
7443 *
7444 * Example using `byPage()`:
7445 *
7446 * ```js
7447 * // passing optional maxPageSize in the page settings
7448 * let i = 1;
7449 * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) {
7450 * for (const pageRange of response) {
7451 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7452 * }
7453 * }
7454 * ```
7455 *
7456 * Example using paging with a marker:
7457 *
7458 * ```js
7459 * let i = 1;
7460 * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 });
7461 * let response = (await iterator.next()).value;
7462 *
7463 * // Prints 2 page ranges
7464 * for (const pageRange of response) {
7465 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7466 * }
7467 *
7468 * // Gets next marker
7469 * let marker = response.continuationToken;
7470 *
7471 * // Passing next marker as continuationToken
7472 *
7473 * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 });
7474 * response = (await iterator.next()).value;
7475 *
7476 * // Prints 10 page ranges
7477 * for (const blob of response) {
7478 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7479 * }
7480 * ```
7481 * @param offset - Starting byte position of the page ranges.
7482 * @param count - Number of bytes to get.
7483 * @param options - Options to the Page Blob Get Ranges operation.
7484 * @returns An asyncIterableIterator that supports paging.
7485 */
7486 listPageRanges(offset?: number, count?: number, options?: PageBlobListPageRangesOptions): PagedAsyncIterableIterator<PageRangeInfo, PageBlobGetPageRangesResponseModel>;
7487 /**
7488 * Gets the collection of page ranges that differ between a specified snapshot and this page blob.
7489 * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges
7490 *
7491 * @param offset - Starting byte position of the page blob
7492 * @param count - Number of bytes to get ranges diff.
7493 * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.
7494 * @param options - Options to the Page Blob Get Page Ranges Diff operation.
7495 * @returns Response data for the Page Blob Get Page Range Diff operation.
7496 */
7497 getPageRangesDiff(offset: number, count: number, prevSnapshot: string, options?: PageBlobGetPageRangesDiffOptions): Promise<PageBlobGetPageRangesDiffResponse>;
7498 /**
7499 * getPageRangesDiffSegment returns a single segment of page ranges starting from the
7500 * specified Marker for difference between previous snapshot and the target page blob.
7501 * Use an empty Marker to start enumeration from the beginning.
7502 * After getting a segment, process it, and then call getPageRangesDiffSegment again
7503 * (passing the the previously-returned Marker) to get the next segment.
7504 * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges
7505 *
7506 * @param offset - Starting byte position of the page ranges.
7507 * @param count - Number of bytes to get.
7508 * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
7509 * @param marker - A string value that identifies the portion of the get to be returned with the next get operation.
7510 * @param options - Options to the Page Blob Get Page Ranges Diff operation.
7511 */
7512 private listPageRangesDiffSegment;
7513 /**
7514 * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel}
7515 *
7516 *
7517 * @param offset - Starting byte position of the page ranges.
7518 * @param count - Number of bytes to get.
7519 * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
7520 * @param marker - A string value that identifies the portion of
7521 * the get of page ranges to be returned with the next getting operation. The
7522 * operation returns the ContinuationToken value within the response body if the
7523 * getting operation did not return all page ranges remaining within the current page.
7524 * The ContinuationToken value can be used as the value for
7525 * the marker parameter in a subsequent call to request the next page of get
7526 * items. The marker value is opaque to the client.
7527 * @param options - Options to the Page Blob Get Page Ranges Diff operation.
7528 */
7529 private listPageRangeDiffItemSegments;
7530 /**
7531 * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
7532 *
7533 * @param offset - Starting byte position of the page ranges.
7534 * @param count - Number of bytes to get.
7535 * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
7536 * @param options - Options to the Page Blob Get Page Ranges Diff operation.
7537 */
7538 private listPageRangeDiffItems;
7539 /**
7540 * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.
7541 * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges
7542 *
7543 * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.
7544 *
7545 * Example using `for await` syntax:
7546 *
7547 * ```js
7548 * // Get the pageBlobClient before you run these snippets,
7549 * // Can be obtained from `blobServiceClient.getContainerClient("<your-container-name>").getPageBlobClient("<your-blob-name>");`
7550 * let i = 1;
7551 * for await (const pageRange of pageBlobClient.listPageRangesDiff()) {
7552 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7553 * }
7554 * ```
7555 *
7556 * Example using `iter.next()`:
7557 *
7558 * ```js
7559 * let i = 1;
7560 * let iter = pageBlobClient.listPageRangesDiff();
7561 * let pageRangeItem = await iter.next();
7562 * while (!pageRangeItem.done) {
7563 * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);
7564 * pageRangeItem = await iter.next();
7565 * }
7566 * ```
7567 *
7568 * Example using `byPage()`:
7569 *
7570 * ```js
7571 * // passing optional maxPageSize in the page settings
7572 * let i = 1;
7573 * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) {
7574 * for (const pageRange of response) {
7575 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7576 * }
7577 * }
7578 * ```
7579 *
7580 * Example using paging with a marker:
7581 *
7582 * ```js
7583 * let i = 1;
7584 * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 });
7585 * let response = (await iterator.next()).value;
7586 *
7587 * // Prints 2 page ranges
7588 * for (const pageRange of response) {
7589 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7590 * }
7591 *
7592 * // Gets next marker
7593 * let marker = response.continuationToken;
7594 *
7595 * // Passing next marker as continuationToken
7596 *
7597 * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 });
7598 * response = (await iterator.next()).value;
7599 *
7600 * // Prints 10 page ranges
7601 * for (const blob of response) {
7602 * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
7603 * }
7604 * ```
7605 * @param offset - Starting byte position of the page ranges.
7606 * @param count - Number of bytes to get.
7607 * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.
7608 * @param options - Options to the Page Blob Get Ranges operation.
7609 * @returns An asyncIterableIterator that supports paging.
7610 */
7611 listPageRangesDiff(offset: number, count: number, prevSnapshot: string, options?: PageBlobListPageRangesDiffOptions): PagedAsyncIterableIterator<PageRangeInfo, PageBlobGetPageRangesDiffResponseModel>;
7612 /**
7613 * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.
7614 * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges
7615 *
7616 * @param offset - Starting byte position of the page blob
7617 * @param count - Number of bytes to get ranges diff.
7618 * @param prevSnapshotUrl - URL of snapshot to retrieve the difference.
7619 * @param options - Options to the Page Blob Get Page Ranges Diff operation.
7620 * @returns Response data for the Page Blob Get Page Range Diff operation.
7621 */
7622 getPageRangesDiffForManagedDisks(offset: number, count: number, prevSnapshotUrl: string, options?: PageBlobGetPageRangesDiffOptions): Promise<PageBlobGetPageRangesDiffResponse>;
7623 /**
7624 * Resizes the page blob to the specified size (which must be a multiple of 512).
7625 * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties
7626 *
7627 * @param size - Target size
7628 * @param options - Options to the Page Blob Resize operation.
7629 * @returns Response data for the Page Blob Resize operation.
7630 */
7631 resize(size: number, options?: PageBlobResizeOptions): Promise<PageBlobResizeResponse>;
7632 /**
7633 * Sets a page blob's sequence number.
7634 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
7635 *
7636 * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number.
7637 * @param sequenceNumber - Required if sequenceNumberAction is max or update
7638 * @param options - Options to the Page Blob Update Sequence Number operation.
7639 * @returns Response data for the Page Blob Update Sequence Number operation.
7640 */
7641 updateSequenceNumber(sequenceNumberAction: SequenceNumberActionType, sequenceNumber?: number, options?: PageBlobUpdateSequenceNumberOptions): Promise<PageBlobUpdateSequenceNumberResponse>;
7642 /**
7643 * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.
7644 * The snapshot is copied such that only the differential changes between the previously
7645 * copied snapshot are transferred to the destination.
7646 * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.
7647 * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob
7648 * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots
7649 *
7650 * @param copySource - Specifies the name of the source page blob snapshot. For example,
7651 * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
7652 * @param options - Options to the Page Blob Copy Incremental operation.
7653 * @returns Response data for the Page Blob Copy Incremental operation.
7654 */
7655 startCopyIncremental(copySource: string, options?: PageBlobStartCopyIncrementalOptions): Promise<PageBlobCopyIncrementalResponse>;
7656}
7657
7658/** Defines headers for PageBlob_copyIncremental operation. */
7659export declare interface PageBlobCopyIncrementalHeaders {
7660 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
7661 etag?: string;
7662 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
7663 lastModified?: Date;
7664 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
7665 clientRequestId?: string;
7666 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
7667 requestId?: string;
7668 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
7669 version?: string;
7670 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
7671 date?: Date;
7672 /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */
7673 copyId?: string;
7674 /** State of the copy operation identified by x-ms-copy-id. */
7675 copyStatus?: CopyStatusType;
7676 /** Error Code */
7677 errorCode?: string;
7678}
7679
7680/** Contains response data for the copyIncremental operation. */
7681export declare type PageBlobCopyIncrementalResponse = PageBlobCopyIncrementalHeaders & {
7682 /** The underlying HTTP response. */
7683 _response: coreHttp.HttpResponse & {
7684 /** The parsed HTTP response headers. */
7685 parsedHeaders: PageBlobCopyIncrementalHeaders;
7686 };
7687};
7688
7689/** Defines headers for PageBlob_create operation. */
7690export declare interface PageBlobCreateHeaders {
7691 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
7692 etag?: string;
7693 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
7694 lastModified?: Date;
7695 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
7696 contentMD5?: Uint8Array;
7697 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
7698 clientRequestId?: string;
7699 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
7700 requestId?: string;
7701 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
7702 version?: string;
7703 /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */
7704 versionId?: string;
7705 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
7706 date?: Date;
7707 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
7708 isServerEncrypted?: boolean;
7709 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
7710 encryptionKeySha256?: string;
7711 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
7712 encryptionScope?: string;
7713 /** Error Code */
7714 errorCode?: string;
7715}
7716
7717/**
7718 * Options to configure the {@link PageBlobClient.createIfNotExists} operation.
7719 */
7720export declare interface PageBlobCreateIfNotExistsOptions extends CommonOptions {
7721 /**
7722 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
7723 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
7724 */
7725 abortSignal?: AbortSignalLike;
7726 /**
7727 * A user-controlled value that can be used to track requests.
7728 * The value must be between 0 and 2^63 - 1. The default value is 0.
7729 */
7730 blobSequenceNumber?: number;
7731 /**
7732 * HTTP headers to set when creating a page blob.
7733 */
7734 blobHTTPHeaders?: BlobHTTPHeaders;
7735 /**
7736 * A collection of key-value string pair to associate with the blob when creating append blobs.
7737 */
7738 metadata?: Metadata;
7739 /**
7740 * Customer Provided Key Info.
7741 */
7742 customerProvidedKey?: CpkInfo;
7743 /**
7744 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
7745 * encrypt the data provided in the request. If not specified, encryption is performed with the
7746 * default account encryption scope. For more information, see Encryption at Rest for Azure
7747 * Storage Services.
7748 */
7749 encryptionScope?: string;
7750 /**
7751 * Optional. Specifies immutability policy for a blob.
7752 * Note that is parameter is only applicable to a blob within a container that
7753 * has version level worm enabled.
7754 */
7755 immutabilityPolicy?: BlobImmutabilityPolicy;
7756 /**
7757 * Optional. Indicates if a legal hold should be placed on the blob.
7758 * Note that is parameter is only applicable to a blob within a container that
7759 * has version level worm enabled.
7760 */
7761 legalHold?: boolean;
7762 /**
7763 * Access tier.
7764 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
7765 */
7766 tier?: PremiumPageBlobTier | string;
7767}
7768
7769/**
7770 * Contains response data for the {@link PageBlobClient.createIfNotExists} operation.
7771 */
7772export declare interface PageBlobCreateIfNotExistsResponse extends PageBlobCreateResponse {
7773 /**
7774 * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.
7775 */
7776 succeeded: boolean;
7777}
7778
7779/**
7780 * Options to configure the {@link PageBlobClient.create} operation.
7781 */
7782export declare interface PageBlobCreateOptions extends CommonOptions {
7783 /**
7784 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
7785 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
7786 */
7787 abortSignal?: AbortSignalLike;
7788 /**
7789 * Conditions to meet when creating a page blob.
7790 */
7791 conditions?: BlobRequestConditions;
7792 /**
7793 * A user-controlled value that can be used to track requests.
7794 * The value must be between 0 and 2^63 - 1. The default value is 0.
7795 */
7796 blobSequenceNumber?: number;
7797 /**
7798 * HTTP headers to set when creating a page blob.
7799 */
7800 blobHTTPHeaders?: BlobHTTPHeaders;
7801 /**
7802 * A collection of key-value string pair to associate with the blob when creating append blobs.
7803 */
7804 metadata?: Metadata;
7805 /**
7806 * Customer Provided Key Info.
7807 */
7808 customerProvidedKey?: CpkInfo;
7809 /**
7810 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
7811 * encrypt the data provided in the request. If not specified, encryption is performed with the
7812 * default account encryption scope. For more information, see Encryption at Rest for Azure
7813 * Storage Services.
7814 */
7815 encryptionScope?: string;
7816 /**
7817 * Optional. Specifies immutability policy for a blob.
7818 * Note that is parameter is only applicable to a blob within a container that
7819 * has version level worm enabled.
7820 */
7821 immutabilityPolicy?: BlobImmutabilityPolicy;
7822 /**
7823 * Optional. Indicates if a legal hold should be placed on the blob.
7824 * Note that is parameter is only applicable to a blob within a container that
7825 * has version level worm enabled.
7826 */
7827 legalHold?: boolean;
7828 /**
7829 * Access tier.
7830 * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers
7831 */
7832 tier?: PremiumPageBlobTier | string;
7833 /**
7834 * Blob tags.
7835 */
7836 tags?: Tags;
7837}
7838
7839/** Contains response data for the create operation. */
7840export declare type PageBlobCreateResponse = PageBlobCreateHeaders & {
7841 /** The underlying HTTP response. */
7842 _response: coreHttp.HttpResponse & {
7843 /** The parsed HTTP response headers. */
7844 parsedHeaders: PageBlobCreateHeaders;
7845 };
7846};
7847
7848/** Defines headers for PageBlob_getPageRangesDiff operation. */
7849export declare interface PageBlobGetPageRangesDiffHeaders {
7850 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
7851 lastModified?: Date;
7852 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
7853 etag?: string;
7854 /** The size of the blob in bytes. */
7855 blobContentLength?: number;
7856 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
7857 clientRequestId?: string;
7858 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
7859 requestId?: string;
7860 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
7861 version?: string;
7862 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
7863 date?: Date;
7864 /** Error Code */
7865 errorCode?: string;
7866}
7867
7868/**
7869 * Options to configure the {@link PageBlobClient.getRangesDiff} operation.
7870 */
7871export declare interface PageBlobGetPageRangesDiffOptions extends CommonOptions {
7872 /**
7873 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
7874 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
7875 */
7876 abortSignal?: AbortSignalLike;
7877 /**
7878 * Conditions to meet when getting page ranges diff.
7879 */
7880 conditions?: BlobRequestConditions;
7881 /**
7882 * (unused)
7883 */
7884 range?: string;
7885}
7886
7887/**
7888 * Contains response data for the {@link BlobClient.getPageRangesDiff} operation.
7889 */
7890export declare interface PageBlobGetPageRangesDiffResponse extends PageList, PageBlobGetPageRangesDiffHeaders {
7891 /**
7892 * The underlying HTTP response.
7893 */
7894 _response: HttpResponse & {
7895 /**
7896 * The parsed HTTP response headers.
7897 */
7898 parsedHeaders: PageBlobGetPageRangesDiffHeaders;
7899 /**
7900 * The response body as text (string format)
7901 */
7902 bodyAsText: string;
7903 /**
7904 * The response body as parsed JSON or XML
7905 */
7906 parsedBody: PageList;
7907 };
7908}
7909
7910/** Contains response data for the getPageRangesDiff operation. */
7911export declare type PageBlobGetPageRangesDiffResponseModel = PageBlobGetPageRangesDiffHeaders & PageList_2 & {
7912 /** The underlying HTTP response. */
7913 _response: coreHttp.HttpResponse & {
7914 /** The response body as text (string format) */
7915 bodyAsText: string;
7916 /** The response body as parsed JSON or XML */
7917 parsedBody: PageList_2;
7918 /** The parsed HTTP response headers. */
7919 parsedHeaders: PageBlobGetPageRangesDiffHeaders;
7920 };
7921};
7922
7923/** Defines headers for PageBlob_getPageRanges operation. */
7924export declare interface PageBlobGetPageRangesHeaders {
7925 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
7926 lastModified?: Date;
7927 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
7928 etag?: string;
7929 /** The size of the blob in bytes. */
7930 blobContentLength?: number;
7931 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
7932 clientRequestId?: string;
7933 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
7934 requestId?: string;
7935 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
7936 version?: string;
7937 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
7938 date?: Date;
7939 /** Error Code */
7940 errorCode?: string;
7941}
7942
7943/**
7944 * Options to configure the {@link PageBlobClient.getPageRanges} operation.
7945 */
7946export declare interface PageBlobGetPageRangesOptions extends CommonOptions {
7947 /**
7948 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
7949 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
7950 */
7951 abortSignal?: AbortSignalLike;
7952 /**
7953 * Conditions to meet when getting page ranges.
7954 */
7955 conditions?: BlobRequestConditions;
7956}
7957
7958/**
7959 * Contains response data for the {@link BlobClient.getPageRanges} operation.
7960 */
7961export declare interface PageBlobGetPageRangesResponse extends PageList, PageBlobGetPageRangesHeaders {
7962 /**
7963 * The underlying HTTP response.
7964 */
7965 _response: HttpResponse & {
7966 /**
7967 * The parsed HTTP response headers.
7968 */
7969 parsedHeaders: PageBlobGetPageRangesHeaders;
7970 /**
7971 * The response body as text (string format)
7972 */
7973 bodyAsText: string;
7974 /**
7975 * The response body as parsed JSON or XML
7976 */
7977 parsedBody: PageList;
7978 };
7979}
7980
7981/** Contains response data for the getPageRanges operation. */
7982export declare type PageBlobGetPageRangesResponseModel = PageBlobGetPageRangesHeaders & PageList_2 & {
7983 /** The underlying HTTP response. */
7984 _response: coreHttp.HttpResponse & {
7985 /** The response body as text (string format) */
7986 bodyAsText: string;
7987 /** The response body as parsed JSON or XML */
7988 parsedBody: PageList_2;
7989 /** The parsed HTTP response headers. */
7990 parsedHeaders: PageBlobGetPageRangesHeaders;
7991 };
7992};
7993
7994/**
7995 * Options to configure the {@link PageBlobClient.listPageRangesDiff} operation.
7996 */
7997export declare interface PageBlobListPageRangesDiffOptions extends CommonOptions {
7998 /**
7999 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8000 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8001 */
8002 abortSignal?: AbortSignalLike;
8003 /**
8004 * Conditions to meet when getting page ranges diff.
8005 */
8006 conditions?: BlobRequestConditions;
8007}
8008
8009/**
8010 * Options to configure the {@link PageBlobClient.listPageRanges} operation.
8011 */
8012export declare interface PageBlobListPageRangesOptions extends CommonOptions {
8013 /**
8014 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8015 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8016 */
8017 abortSignal?: AbortSignalLike;
8018 /**
8019 * Conditions to meet when getting page ranges.
8020 */
8021 conditions?: BlobRequestConditions;
8022}
8023
8024/**
8025 * Conditions to add to the creation of this page blob.
8026 */
8027export declare interface PageBlobRequestConditions extends BlobRequestConditions, SequenceNumberAccessConditions {
8028}
8029
8030/** Defines headers for PageBlob_resize operation. */
8031export declare interface PageBlobResizeHeaders {
8032 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
8033 etag?: string;
8034 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
8035 lastModified?: Date;
8036 /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs */
8037 blobSequenceNumber?: number;
8038 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
8039 clientRequestId?: string;
8040 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8041 requestId?: string;
8042 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8043 version?: string;
8044 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
8045 date?: Date;
8046 /** Error Code */
8047 errorCode?: string;
8048}
8049
8050/**
8051 * Options to configure {@link PageBlobClient.resize} operation.
8052 */
8053export declare interface PageBlobResizeOptions extends CommonOptions {
8054 /**
8055 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8056 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8057 */
8058 abortSignal?: AbortSignalLike;
8059 /**
8060 * Conditions to meet when resizing a page blob.
8061 */
8062 conditions?: BlobRequestConditions;
8063 /**
8064 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
8065 * encrypt the data provided in the request. If not specified, encryption is performed with the
8066 * default account encryption scope. For more information, see Encryption at Rest for Azure
8067 * Storage Services.
8068 */
8069 encryptionScope?: string;
8070}
8071
8072/** Contains response data for the resize operation. */
8073export declare type PageBlobResizeResponse = PageBlobResizeHeaders & {
8074 /** The underlying HTTP response. */
8075 _response: coreHttp.HttpResponse & {
8076 /** The parsed HTTP response headers. */
8077 parsedHeaders: PageBlobResizeHeaders;
8078 };
8079};
8080
8081/**
8082 * Options to configure {@link PageBlobClient.startCopyIncremental} operation.
8083 */
8084export declare interface PageBlobStartCopyIncrementalOptions extends CommonOptions {
8085 /**
8086 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8087 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8088 */
8089 abortSignal?: AbortSignalLike;
8090 /**
8091 * Conditions to meet when starting a copy incremental operation.
8092 */
8093 conditions?: ModifiedAccessConditions;
8094}
8095
8096/** Defines headers for PageBlob_updateSequenceNumber operation. */
8097export declare interface PageBlobUpdateSequenceNumberHeaders {
8098 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
8099 etag?: string;
8100 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
8101 lastModified?: Date;
8102 /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs */
8103 blobSequenceNumber?: number;
8104 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
8105 clientRequestId?: string;
8106 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8107 requestId?: string;
8108 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8109 version?: string;
8110 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
8111 date?: Date;
8112 /** Error Code */
8113 errorCode?: string;
8114}
8115
8116/**
8117 * Options to configure {@link PageBlobClient.updateSequenceNumber} operation.
8118 */
8119export declare interface PageBlobUpdateSequenceNumberOptions extends CommonOptions {
8120 /**
8121 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8122 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8123 */
8124 abortSignal?: AbortSignalLike;
8125 /**
8126 * Conditions to meet when updating sequence number.
8127 */
8128 conditions?: BlobRequestConditions;
8129}
8130
8131/** Contains response data for the updateSequenceNumber operation. */
8132export declare type PageBlobUpdateSequenceNumberResponse = PageBlobUpdateSequenceNumberHeaders & {
8133 /** The underlying HTTP response. */
8134 _response: coreHttp.HttpResponse & {
8135 /** The parsed HTTP response headers. */
8136 parsedHeaders: PageBlobUpdateSequenceNumberHeaders;
8137 };
8138};
8139
8140/** Defines headers for PageBlob_uploadPagesFromURL operation. */
8141export declare interface PageBlobUploadPagesFromURLHeaders {
8142 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
8143 etag?: string;
8144 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
8145 lastModified?: Date;
8146 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
8147 contentMD5?: Uint8Array;
8148 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
8149 xMsContentCrc64?: Uint8Array;
8150 /** The current sequence number for the page blob. */
8151 blobSequenceNumber?: number;
8152 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8153 requestId?: string;
8154 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8155 version?: string;
8156 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
8157 date?: Date;
8158 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
8159 isServerEncrypted?: boolean;
8160 /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */
8161 encryptionKeySha256?: string;
8162 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
8163 encryptionScope?: string;
8164 /** Error Code */
8165 errorCode?: string;
8166}
8167
8168/**
8169 * Options to configure {@link PageBlobClient.uploadPagesFromURL} operation.
8170 */
8171export declare interface PageBlobUploadPagesFromURLOptions extends CommonOptions {
8172 /**
8173 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8174 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8175 */
8176 abortSignal?: AbortSignalLike;
8177 /**
8178 * Conditions to meet when updating sequence number.
8179 */
8180 conditions?: PageBlobRequestConditions;
8181 /**
8182 * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.
8183 */
8184 sourceConditions?: MatchConditions & ModificationConditions;
8185 /**
8186 * An MD5 hash of the content from the URI.
8187 * This hash is used to verify the integrity of the content during transport of the data from the URI.
8188 * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.
8189 *
8190 * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.
8191 */
8192 sourceContentMD5?: Uint8Array;
8193 /**
8194 * A CRC64 hash of the content from the URI.
8195 * This hash is used to verify the integrity of the content during transport of the data from the URI.
8196 * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.
8197 *
8198 * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.
8199 */
8200 sourceContentCrc64?: Uint8Array;
8201 /**
8202 * Customer Provided Key Info.
8203 */
8204 customerProvidedKey?: CpkInfo;
8205 /**
8206 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
8207 * encrypt the data provided in the request. If not specified, encryption is performed with the
8208 * default account encryption scope. For more information, see Encryption at Rest for Azure
8209 * Storage Services.
8210 */
8211 encryptionScope?: string;
8212 /**
8213 * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
8214 */
8215 sourceAuthorization?: HttpAuthorization;
8216}
8217
8218/** Contains response data for the uploadPagesFromURL operation. */
8219export declare type PageBlobUploadPagesFromURLResponse = PageBlobUploadPagesFromURLHeaders & {
8220 /** The underlying HTTP response. */
8221 _response: coreHttp.HttpResponse & {
8222 /** The parsed HTTP response headers. */
8223 parsedHeaders: PageBlobUploadPagesFromURLHeaders;
8224 };
8225};
8226
8227/** Defines headers for PageBlob_uploadPages operation. */
8228export declare interface PageBlobUploadPagesHeaders {
8229 /** The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes. */
8230 etag?: string;
8231 /** Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob. */
8232 lastModified?: Date;
8233 /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */
8234 contentMD5?: Uint8Array;
8235 /** This header is returned so that the client can check for message content integrity. The value of this header is computed by the Blob service; it is not necessarily the same value specified in the request headers. */
8236 xMsContentCrc64?: Uint8Array;
8237 /** The current sequence number for the page blob. */
8238 blobSequenceNumber?: number;
8239 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
8240 clientRequestId?: string;
8241 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8242 requestId?: string;
8243 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8244 version?: string;
8245 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
8246 date?: Date;
8247 /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */
8248 isServerEncrypted?: boolean;
8249 /** The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned when the pages were encrypted with a customer-provided key. */
8250 encryptionKeySha256?: string;
8251 /** Returns the name of the encryption scope used to encrypt the blob contents and application metadata. Note that the absence of this header implies use of the default account encryption scope. */
8252 encryptionScope?: string;
8253 /** Error Code */
8254 errorCode?: string;
8255}
8256
8257/**
8258 * Options to configure the {@link PageBlobClient.uploadPages} operation.
8259 */
8260export declare interface PageBlobUploadPagesOptions extends CommonOptions {
8261 /**
8262 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8263 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8264 */
8265 abortSignal?: AbortSignalLike;
8266 /**
8267 * Conditions to meet when uploading pages.
8268 */
8269 conditions?: PageBlobRequestConditions;
8270 /**
8271 * Callback to receive events on the progress of upload pages operation.
8272 */
8273 onProgress?: (progress: TransferProgressEvent) => void;
8274 /**
8275 * An MD5 hash of the content. This hash is used to verify the integrity of the content during transport.
8276 * When this is specified, the storage service compares the hash of the content that has arrived with this value.
8277 *
8278 * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.
8279 */
8280 transactionalContentMD5?: Uint8Array;
8281 /**
8282 * A CRC64 hash of the content. This hash is used to verify the integrity of the content during transport.
8283 * When this is specified, the storage service compares the hash of the content that has arrived with this value.
8284 *
8285 * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.
8286 */
8287 transactionalContentCrc64?: Uint8Array;
8288 /**
8289 * Customer Provided Key Info.
8290 */
8291 customerProvidedKey?: CpkInfo;
8292 /**
8293 * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to
8294 * encrypt the data provided in the request. If not specified, encryption is performed with the
8295 * default account encryption scope. For more information, see Encryption at Rest for Azure
8296 * Storage Services.
8297 */
8298 encryptionScope?: string;
8299}
8300
8301/** Contains response data for the uploadPages operation. */
8302export declare type PageBlobUploadPagesResponse = PageBlobUploadPagesHeaders & {
8303 /** The underlying HTTP response. */
8304 _response: coreHttp.HttpResponse & {
8305 /** The parsed HTTP response headers. */
8306 parsedHeaders: PageBlobUploadPagesHeaders;
8307 };
8308};
8309
8310/**
8311 * List of page ranges for a blob.
8312 */
8313export declare interface PageList {
8314 /**
8315 * Valid non-overlapping page ranges.
8316 */
8317 pageRange?: Range_2[];
8318 /**
8319 * Present if the prevSnapshot parameter was specified and there were cleared
8320 * pages between the previous snapshot and the target snapshot.
8321 */
8322 clearRange?: Range_2[];
8323}
8324
8325/** the list of pages */
8326declare interface PageList_2 {
8327 pageRange?: PageRange[];
8328 clearRange?: ClearRange[];
8329 continuationToken?: string;
8330}
8331
8332declare interface PageRange {
8333 start: number;
8334 end: number;
8335}
8336
8337export declare interface PageRangeInfo {
8338 start: number;
8339 end: number;
8340 isClear: boolean;
8341}
8342
8343/**
8344 * The multipart/mixed response which contains the response for each subrequest.
8345 */
8346export declare interface ParsedBatchResponse {
8347 /**
8348 * The parsed sub responses.
8349 */
8350 subResponses: BatchSubResponse[];
8351 /**
8352 * The succeeded executed sub responses' count;
8353 */
8354 subResponsesSucceededCount: number;
8355 /**
8356 * The failed executed sub responses' count;
8357 */
8358 subResponsesFailedCount: number;
8359}
8360
8361/**
8362 * A Pipeline class containing HTTP request policies.
8363 * You can create a default Pipeline by calling {@link newPipeline}.
8364 * Or you can create a Pipeline with your own policies by the constructor of Pipeline.
8365 *
8366 * Refer to {@link newPipeline} and provided policies before implementing your
8367 * customized Pipeline.
8368 */
8369export declare class Pipeline implements PipelineLike {
8370 /**
8371 * A list of chained request policy factories.
8372 */
8373 readonly factories: RequestPolicyFactory[];
8374 /**
8375 * Configures pipeline logger and HTTP client.
8376 */
8377 readonly options: PipelineOptions;
8378 /**
8379 * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.
8380 *
8381 * @param factories -
8382 * @param options -
8383 */
8384 constructor(factories: RequestPolicyFactory[], options?: PipelineOptions);
8385 /**
8386 * Transfer Pipeline object to ServiceClientOptions object which is required by
8387 * ServiceClient constructor.
8388 *
8389 * @returns The ServiceClientOptions object from this Pipeline.
8390 */
8391 toServiceClientOptions(): ServiceClientOptions;
8392}
8393
8394/**
8395 * An interface for the {@link Pipeline} class containing HTTP request policies.
8396 * You can create a default Pipeline by calling {@link newPipeline}.
8397 * Or you can create a Pipeline with your own policies by the constructor of Pipeline.
8398 *
8399 * Refer to {@link newPipeline} and provided policies before implementing your
8400 * customized Pipeline.
8401 */
8402export declare interface PipelineLike {
8403 /**
8404 * A list of chained request policy factories.
8405 */
8406 readonly factories: RequestPolicyFactory[];
8407 /**
8408 * Configures pipeline logger and HTTP client.
8409 */
8410 readonly options: PipelineOptions;
8411 /**
8412 * Transfer Pipeline object to ServiceClientOptions object which is required by
8413 * ServiceClient constructor.
8414 *
8415 * @returns The ServiceClientOptions object from this Pipeline.
8416 */
8417 toServiceClientOptions(): ServiceClientOptions;
8418}
8419
8420/**
8421 * Option interface for Pipeline constructor.
8422 */
8423export declare interface PipelineOptions {
8424 /**
8425 * Optional. Configures the HTTP client to send requests and receive responses.
8426 */
8427 httpClient?: IHttpClient;
8428}
8429
8430export { PollerLike }
8431
8432export { PollOperationState }
8433
8434/**
8435 * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.
8436 * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}
8437 * for detailed information on the corresponding IOPS and throughput per PageBlobTier.
8438 */
8439export declare enum PremiumPageBlobTier {
8440 /**
8441 * P4 Tier.
8442 */
8443 P4 = "P4",
8444 /**
8445 * P6 Tier.
8446 */
8447 P6 = "P6",
8448 /**
8449 * P10 Tier.
8450 */
8451 P10 = "P10",
8452 /**
8453 * P15 Tier.
8454 */
8455 P15 = "P15",
8456 /**
8457 * P20 Tier.
8458 */
8459 P20 = "P20",
8460 /**
8461 * P30 Tier.
8462 */
8463 P30 = "P30",
8464 /**
8465 * P40 Tier.
8466 */
8467 P40 = "P40",
8468 /**
8469 * P50 Tier.
8470 */
8471 P50 = "P50",
8472 /**
8473 * P60 Tier.
8474 */
8475 P60 = "P60",
8476 /**
8477 * P70 Tier.
8478 */
8479 P70 = "P70",
8480 /**
8481 * P80 Tier.
8482 */
8483 P80 = "P80"
8484}
8485
8486/** Defines values for PublicAccessType. */
8487export declare type PublicAccessType = "container" | "blob";
8488
8489/**
8490 * Range for Blob Service Operations.
8491 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations
8492 */
8493declare interface Range_2 {
8494 /**
8495 * StartByte, larger than or equal 0.
8496 */
8497 offset: number;
8498 /**
8499 * Optional. Count of bytes, larger than 0.
8500 * If not provided, will return bytes from offset to the end.
8501 */
8502 count?: number;
8503}
8504export { Range_2 as Range }
8505
8506/** Defines values for RehydratePriority. */
8507export declare type RehydratePriority = "High" | "Standard";
8508
8509export { RequestPolicy }
8510
8511export { RequestPolicyFactory }
8512
8513export { RequestPolicyOptions }
8514
8515export { RestError }
8516
8517/** the retention policy which determines how long the associated data should persist */
8518export declare interface RetentionPolicy {
8519 /** Indicates whether a retention policy is enabled for the storage service */
8520 enabled: boolean;
8521 /** Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted */
8522 days?: number;
8523}
8524
8525/**
8526 * Allowed IP range for a SAS.
8527 */
8528export declare interface SasIPRange {
8529 /**
8530 * Starting IP address in the IP range.
8531 * If end IP doesn't provide, start IP will the only IP allowed.
8532 */
8533 start: string;
8534 /**
8535 * Optional. IP address that ends the IP range.
8536 * If not provided, start IP will the only IP allowed.
8537 */
8538 end?: string;
8539}
8540
8541/**
8542 * Protocols for generated SAS.
8543 */
8544export declare enum SASProtocol {
8545 /**
8546 * Protocol that allows HTTPS only
8547 */
8548 Https = "https",
8549 /**
8550 * Protocol that allows both HTTPS and HTTP
8551 */
8552 HttpsAndHttp = "https,http"
8553}
8554
8555/**
8556 * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly
8557 * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}
8558 * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should
8559 * be taken here in case there are existing query parameters, which might affect the appropriate means of appending
8560 * these query parameters).
8561 *
8562 * NOTE: Instances of this class are immutable.
8563 */
8564export declare class SASQueryParameters {
8565 /**
8566 * The storage API version.
8567 */
8568 readonly version: string;
8569 /**
8570 * Optional. The allowed HTTP protocol(s).
8571 */
8572 readonly protocol?: SASProtocol;
8573 /**
8574 * Optional. The start time for this SAS token.
8575 */
8576 readonly startsOn?: Date;
8577 /**
8578 * Optional only when identifier is provided. The expiry time for this SAS token.
8579 */
8580 readonly expiresOn?: Date;
8581 /**
8582 * Optional only when identifier is provided.
8583 * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for
8584 * more details.
8585 */
8586 readonly permissions?: string;
8587 /**
8588 * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}
8589 * for more details.
8590 */
8591 readonly services?: string;
8592 /**
8593 * Optional. The storage resource types being accessed (only for Account SAS). Please refer to
8594 * {@link AccountSASResourceTypes} for more details.
8595 */
8596 readonly resourceTypes?: string;
8597 /**
8598 * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).
8599 *
8600 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy
8601 */
8602 readonly identifier?: string;
8603 /**
8604 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.
8605 */
8606 readonly encryptionScope?: string;
8607 /**
8608 * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).
8609 * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only
8610 */
8611 readonly resource?: string;
8612 /**
8613 * The signature for the SAS token.
8614 */
8615 readonly signature: string;
8616 /**
8617 * Value for cache-control header in Blob/File Service SAS.
8618 */
8619 readonly cacheControl?: string;
8620 /**
8621 * Value for content-disposition header in Blob/File Service SAS.
8622 */
8623 readonly contentDisposition?: string;
8624 /**
8625 * Value for content-encoding header in Blob/File Service SAS.
8626 */
8627 readonly contentEncoding?: string;
8628 /**
8629 * Value for content-length header in Blob/File Service SAS.
8630 */
8631 readonly contentLanguage?: string;
8632 /**
8633 * Value for content-type header in Blob/File Service SAS.
8634 */
8635 readonly contentType?: string;
8636 /**
8637 * Inner value of getter ipRange.
8638 */
8639 private readonly ipRangeInner?;
8640 /**
8641 * The Azure Active Directory object ID in GUID format.
8642 * Property of user delegation key.
8643 */
8644 private readonly signedOid?;
8645 /**
8646 * The Azure Active Directory tenant ID in GUID format.
8647 * Property of user delegation key.
8648 */
8649 private readonly signedTenantId?;
8650 /**
8651 * The date-time the key is active.
8652 * Property of user delegation key.
8653 */
8654 private readonly signedStartsOn?;
8655 /**
8656 * The date-time the key expires.
8657 * Property of user delegation key.
8658 */
8659 private readonly signedExpiresOn?;
8660 /**
8661 * Abbreviation of the Azure Storage service that accepts the user delegation key.
8662 * Property of user delegation key.
8663 */
8664 private readonly signedService?;
8665 /**
8666 * The service version that created the user delegation key.
8667 * Property of user delegation key.
8668 */
8669 private readonly signedVersion?;
8670 /**
8671 * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key
8672 * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key
8673 * has the required permissions before granting access but no additional permission check for the user specified in
8674 * this value will be performed. This is only used for User Delegation SAS.
8675 */
8676 readonly preauthorizedAgentObjectId?: string;
8677 /**
8678 * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.
8679 * This is only used for User Delegation SAS.
8680 */
8681 readonly correlationId?: string;
8682 /**
8683 * Optional. IP range allowed for this SAS.
8684 *
8685 * @readonly
8686 */
8687 get ipRange(): SasIPRange | undefined;
8688 /**
8689 * Creates an instance of SASQueryParameters.
8690 *
8691 * @param version - Representing the storage version
8692 * @param signature - Representing the signature for the SAS token
8693 * @param permissions - Representing the storage permissions
8694 * @param services - Representing the storage services being accessed (only for Account SAS)
8695 * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)
8696 * @param protocol - Representing the allowed HTTP protocol(s)
8697 * @param startsOn - Representing the start time for this SAS token
8698 * @param expiresOn - Representing the expiry time for this SAS token
8699 * @param ipRange - Representing the range of valid IP addresses for this SAS token
8700 * @param identifier - Representing the signed identifier (only for Service SAS)
8701 * @param resource - Representing the storage container or blob (only for Service SAS)
8702 * @param cacheControl - Representing the cache-control header (only for Blob/File Service SAS)
8703 * @param contentDisposition - Representing the content-disposition header (only for Blob/File Service SAS)
8704 * @param contentEncoding - Representing the content-encoding header (only for Blob/File Service SAS)
8705 * @param contentLanguage - Representing the content-language header (only for Blob/File Service SAS)
8706 * @param contentType - Representing the content-type header (only for Blob/File Service SAS)
8707 * @param userDelegationKey - Representing the user delegation key properties
8708 * @param preauthorizedAgentObjectId - Representing the authorized AAD Object ID (only for User Delegation SAS)
8709 * @param correlationId - Representing the correlation ID (only for User Delegation SAS)
8710 * @param encryptionScope -
8711 */
8712 constructor(version: string, signature: string, permissions?: string, services?: string, resourceTypes?: string, protocol?: SASProtocol, startsOn?: Date, expiresOn?: Date, ipRange?: SasIPRange, identifier?: string, resource?: string, cacheControl?: string, contentDisposition?: string, contentEncoding?: string, contentLanguage?: string, contentType?: string, userDelegationKey?: UserDelegationKey, preauthorizedAgentObjectId?: string, correlationId?: string, encryptionScope?: string);
8713 /**
8714 * Creates an instance of SASQueryParameters.
8715 *
8716 * @param version - Representing the storage version
8717 * @param signature - Representing the signature for the SAS token
8718 * @param options - Optional. Options to construct the SASQueryParameters.
8719 */
8720 constructor(version: string, signature: string, options?: SASQueryParametersOptions);
8721 /**
8722 * Encodes all SAS query parameters into a string that can be appended to a URL.
8723 *
8724 */
8725 toString(): string;
8726 /**
8727 * A private helper method used to filter and append query key/value pairs into an array.
8728 *
8729 * @param queries -
8730 * @param key -
8731 * @param value -
8732 */
8733 private tryAppendQueryParameter;
8734}
8735
8736/**
8737 * Options to construct {@link SASQueryParameters}.
8738 */
8739export declare interface SASQueryParametersOptions {
8740 /**
8741 * Optional only when identifier is provided.
8742 * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for
8743 * more details.
8744 */
8745 permissions?: string;
8746 /**
8747 * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}
8748 * for more details.
8749 */
8750 services?: string;
8751 /**
8752 * Optional. The storage resource types being accessed (only for Account SAS). Please refer to
8753 * {@link AccountSASResourceTypes} for more details.
8754 */
8755 resourceTypes?: string;
8756 /**
8757 * Optional. The allowed HTTP protocol(s).
8758 */
8759 protocol?: SASProtocol;
8760 /**
8761 * Optional. The start time for this SAS token.
8762 */
8763 startsOn?: Date;
8764 /**
8765 * Optional only when identifier is provided. The expiry time for this SAS token.
8766 */
8767 expiresOn?: Date;
8768 /**
8769 * Optional. IP ranges allowed in this SAS.
8770 */
8771 ipRange?: SasIPRange;
8772 /**
8773 * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).
8774 *
8775 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy
8776 */
8777 identifier?: string;
8778 /**
8779 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.
8780 */
8781 encryptionScope?: string;
8782 /**
8783 * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).
8784 * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only
8785 */
8786 resource?: string;
8787 /**
8788 * Value for cache-control header in Blob/File Service SAS.
8789 */
8790 cacheControl?: string;
8791 /**
8792 * Value for content-disposition header in Blob/File Service SAS.
8793 */
8794 contentDisposition?: string;
8795 /**
8796 * Value for content-encoding header in Blob/File Service SAS.
8797 */
8798 contentEncoding?: string;
8799 /**
8800 * Value for content-length header in Blob/File Service SAS.
8801 */
8802 contentLanguage?: string;
8803 /**
8804 * Value for content-type header in Blob/File Service SAS.
8805 */
8806 contentType?: string;
8807 /**
8808 * User delegation key properties.
8809 */
8810 userDelegationKey?: UserDelegationKey;
8811 /**
8812 * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key
8813 * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key
8814 * has the required permissions before granting access but no additional permission check for the user specified in
8815 * this value will be performed. This cannot be used in conjuction with {@link signedUnauthorizedUserObjectId}.
8816 * This is only used for User Delegation SAS.
8817 */
8818 preauthorizedAgentObjectId?: string;
8819 /**
8820 * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.
8821 * This is only used for User Delegation SAS.
8822 */
8823 correlationId?: string;
8824}
8825
8826/** Parameter group */
8827export declare interface SequenceNumberAccessConditions {
8828 /** Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified. */
8829 ifSequenceNumberLessThanOrEqualTo?: number;
8830 /** Specify this header value to operate only on a blob if it has a sequence number less than the specified. */
8831 ifSequenceNumberLessThan?: number;
8832 /** Specify this header value to operate only on a blob if it has the specified sequence number. */
8833 ifSequenceNumberEqualTo?: number;
8834}
8835
8836/** Defines values for SequenceNumberActionType. */
8837export declare type SequenceNumberActionType = "max" | "update" | "increment";
8838
8839/** Defines headers for Service_filterBlobs operation. */
8840export declare interface ServiceFilterBlobsHeaders {
8841 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
8842 clientRequestId?: string;
8843 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8844 requestId?: string;
8845 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8846 version?: string;
8847 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
8848 date?: Date;
8849 /** Error Code */
8850 errorCode?: string;
8851}
8852
8853/**
8854 * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation.
8855 */
8856export declare interface ServiceFindBlobByTagsOptions extends CommonOptions {
8857 /**
8858 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8859 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8860 */
8861 abortSignal?: AbortSignalLike;
8862}
8863
8864/**
8865 * The response of {@link BlobServiceClient.findBlobsByTags} operation.
8866 */
8867export declare type ServiceFindBlobsByTagsSegmentResponse = FilterBlobSegment & ServiceFilterBlobsHeaders & {
8868 /**
8869 * The underlying HTTP response.
8870 */
8871 _response: HttpResponse & {
8872 /**
8873 * The parsed HTTP response headers.
8874 */
8875 parsedHeaders: ServiceFilterBlobsHeaders;
8876 /**
8877 * The response body as text (string format)
8878 */
8879 bodyAsText: string;
8880 /**
8881 * The response body as parsed JSON or XML
8882 */
8883 parsedBody: FilterBlobSegmentModel;
8884 };
8885};
8886
8887/**
8888 * Options to configure {@link BlobServiceClient.generateAccountSasUrl} operation.
8889 */
8890export declare interface ServiceGenerateAccountSasUrlOptions {
8891 /**
8892 * The version of the service this SAS will target. If not specified, it will default to the version targeted by the
8893 * library.
8894 */
8895 version?: string;
8896 /**
8897 * Optional. SAS protocols allowed.
8898 */
8899 protocol?: SASProtocol;
8900 /**
8901 * Optional. When the SAS will take effect.
8902 */
8903 startsOn?: Date;
8904 /**
8905 * Optional. IP range allowed.
8906 */
8907 ipRange?: SasIPRange;
8908 /**
8909 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.
8910 */
8911 encryptionScope?: string;
8912}
8913
8914/** Defines headers for Service_getAccountInfo operation. */
8915export declare interface ServiceGetAccountInfoHeaders {
8916 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
8917 clientRequestId?: string;
8918 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8919 requestId?: string;
8920 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8921 version?: string;
8922 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
8923 date?: Date;
8924 /** Identifies the sku name of the account */
8925 skuName?: SkuName;
8926 /** Identifies the account kind */
8927 accountKind?: AccountKind;
8928 /** Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. */
8929 isHierarchicalNamespaceEnabled?: boolean;
8930 /** Error Code */
8931 errorCode?: string;
8932}
8933
8934/**
8935 * Options to configure the {@link BlobServiceClient.getAccountInfo} operation.
8936 */
8937export declare interface ServiceGetAccountInfoOptions extends CommonOptions {
8938 /**
8939 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8940 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8941 */
8942 abortSignal?: AbortSignalLike;
8943}
8944
8945/** Contains response data for the getAccountInfo operation. */
8946export declare type ServiceGetAccountInfoResponse = ServiceGetAccountInfoHeaders & {
8947 /** The underlying HTTP response. */
8948 _response: coreHttp.HttpResponse & {
8949 /** The parsed HTTP response headers. */
8950 parsedHeaders: ServiceGetAccountInfoHeaders;
8951 };
8952};
8953
8954/** Defines headers for Service_getProperties operation. */
8955export declare interface ServiceGetPropertiesHeaders {
8956 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
8957 clientRequestId?: string;
8958 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8959 requestId?: string;
8960 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8961 version?: string;
8962 /** Error Code */
8963 errorCode?: string;
8964}
8965
8966/**
8967 * Options to configure the {@link BlobServiceClient.getProperties} operation.
8968 */
8969export declare interface ServiceGetPropertiesOptions extends CommonOptions {
8970 /**
8971 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
8972 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
8973 */
8974 abortSignal?: AbortSignalLike;
8975}
8976
8977/** Contains response data for the getProperties operation. */
8978export declare type ServiceGetPropertiesResponse = ServiceGetPropertiesHeaders & BlobServiceProperties & {
8979 /** The underlying HTTP response. */
8980 _response: coreHttp.HttpResponse & {
8981 /** The response body as text (string format) */
8982 bodyAsText: string;
8983 /** The response body as parsed JSON or XML */
8984 parsedBody: BlobServiceProperties;
8985 /** The parsed HTTP response headers. */
8986 parsedHeaders: ServiceGetPropertiesHeaders;
8987 };
8988};
8989
8990/** Defines headers for Service_getStatistics operation. */
8991export declare interface ServiceGetStatisticsHeaders {
8992 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
8993 clientRequestId?: string;
8994 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
8995 requestId?: string;
8996 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
8997 version?: string;
8998 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
8999 date?: Date;
9000 /** Error Code */
9001 errorCode?: string;
9002}
9003
9004/**
9005 * Options to configure the {@link BlobServiceClient.getStatistics} operation.
9006 */
9007export declare interface ServiceGetStatisticsOptions extends CommonOptions {
9008 /**
9009 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
9010 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
9011 */
9012 abortSignal?: AbortSignalLike;
9013}
9014
9015/** Contains response data for the getStatistics operation. */
9016export declare type ServiceGetStatisticsResponse = ServiceGetStatisticsHeaders & BlobServiceStatistics & {
9017 /** The underlying HTTP response. */
9018 _response: coreHttp.HttpResponse & {
9019 /** The response body as text (string format) */
9020 bodyAsText: string;
9021 /** The response body as parsed JSON or XML */
9022 parsedBody: BlobServiceStatistics;
9023 /** The parsed HTTP response headers. */
9024 parsedHeaders: ServiceGetStatisticsHeaders;
9025 };
9026};
9027
9028/** Defines headers for Service_getUserDelegationKey operation. */
9029export declare interface ServiceGetUserDelegationKeyHeaders {
9030 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
9031 clientRequestId?: string;
9032 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
9033 requestId?: string;
9034 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
9035 version?: string;
9036 /** UTC date/time value generated by the service that indicates the time at which the response was initiated */
9037 date?: Date;
9038 /** Error Code */
9039 errorCode?: string;
9040}
9041
9042/**
9043 * Options to configure the Service - Get User Delegation Key.
9044 */
9045export declare interface ServiceGetUserDelegationKeyOptions extends CommonOptions {
9046 /**
9047 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
9048 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
9049 */
9050 abortSignal?: AbortSignalLike;
9051}
9052
9053/**
9054 * Contains response data for the {@link getUserDelegationKey} operation.
9055 */
9056export declare type ServiceGetUserDelegationKeyResponse = UserDelegationKey & ServiceGetUserDelegationKeyHeaders & {
9057 /**
9058 * The underlying HTTP response.
9059 */
9060 _response: HttpResponse & {
9061 /**
9062 * The parsed HTTP response headers.
9063 */
9064 parsedHeaders: ServiceGetUserDelegationKeyHeaders;
9065 /**
9066 * The response body as text (string format)
9067 */
9068 bodyAsText: string;
9069 /**
9070 * The response body as parsed JSON or XML
9071 */
9072 parsedBody: UserDelegationKeyModel;
9073 };
9074};
9075
9076/**
9077 * Options to configure the {@link BlobServiceClient.listContainers} operation.
9078 */
9079export declare interface ServiceListContainersOptions extends CommonOptions {
9080 /**
9081 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
9082 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
9083 */
9084 abortSignal?: AbortSignalLike;
9085 /**
9086 * Filters the results to return only containers
9087 * whose name begins with the specified prefix.
9088 */
9089 prefix?: string;
9090 /**
9091 * Specifies whether the container's metadata
9092 * should be returned as part of the response body.
9093 */
9094 includeMetadata?: boolean;
9095 /**
9096 * Specifies whether soft deleted containers should be included in the response.
9097 */
9098 includeDeleted?: boolean;
9099 /**
9100 * Specifies whether system containers should be included in the response.
9101 */
9102 includeSystem?: boolean;
9103}
9104
9105/** Defines headers for Service_listContainersSegment operation. */
9106export declare interface ServiceListContainersSegmentHeaders {
9107 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
9108 clientRequestId?: string;
9109 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
9110 requestId?: string;
9111 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
9112 version?: string;
9113 /** Error Code */
9114 errorCode?: string;
9115}
9116
9117/** Contains response data for the listContainersSegment operation. */
9118export declare type ServiceListContainersSegmentResponse = ServiceListContainersSegmentHeaders & ListContainersSegmentResponse & {
9119 /** The underlying HTTP response. */
9120 _response: coreHttp.HttpResponse & {
9121 /** The response body as text (string format) */
9122 bodyAsText: string;
9123 /** The response body as parsed JSON or XML */
9124 parsedBody: ListContainersSegmentResponse;
9125 /** The parsed HTTP response headers. */
9126 parsedHeaders: ServiceListContainersSegmentHeaders;
9127 };
9128};
9129
9130/**
9131 * Options to configure {@link BlobServiceClient.renameContainer} operation.
9132 */
9133export declare interface ServiceRenameContainerOptions extends CommonOptions {
9134 /**
9135 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
9136 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
9137 */
9138 abortSignal?: AbortSignalLike;
9139 /**
9140 * Condition to meet for the source container.
9141 */
9142 sourceCondition?: LeaseAccessConditions;
9143}
9144
9145/** Defines headers for Service_setProperties operation. */
9146export declare interface ServiceSetPropertiesHeaders {
9147 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
9148 clientRequestId?: string;
9149 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
9150 requestId?: string;
9151 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
9152 version?: string;
9153 /** Error Code */
9154 errorCode?: string;
9155}
9156
9157/**
9158 * Options to configure the {@link BlobServiceClient.setProperties} operation.
9159 */
9160export declare interface ServiceSetPropertiesOptions extends CommonOptions {
9161 /**
9162 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
9163 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
9164 */
9165 abortSignal?: AbortSignalLike;
9166}
9167
9168/** Contains response data for the setProperties operation. */
9169export declare type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders & {
9170 /** The underlying HTTP response. */
9171 _response: coreHttp.HttpResponse & {
9172 /** The parsed HTTP response headers. */
9173 parsedHeaders: ServiceSetPropertiesHeaders;
9174 };
9175};
9176
9177/** Defines headers for Service_submitBatch operation. */
9178export declare interface ServiceSubmitBatchHeaders {
9179 /** The media type of the body of the response. For batch requests, this is multipart/mixed; boundary=batchresponse_GUID */
9180 contentType?: string;
9181 /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
9182 requestId?: string;
9183 /** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
9184 version?: string;
9185 /** If a client request id header is sent in the request, this header will be present in the response with the same value. */
9186 clientRequestId?: string;
9187 /** Error Code */
9188 errorCode?: string;
9189}
9190
9191/** Optional parameters. */
9192export declare interface ServiceSubmitBatchOptionalParamsModel extends coreHttp.OperationOptions {
9193 /** The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a> */
9194 timeoutInSeconds?: number;
9195 /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
9196 requestId?: string;
9197}
9198
9199/** Contains response data for the submitBatch operation. */
9200export declare type ServiceSubmitBatchResponseModel = ServiceSubmitBatchHeaders & {
9201 /**
9202 * BROWSER ONLY
9203 *
9204 * The response body as a browser Blob.
9205 * Always `undefined` in node.js.
9206 */
9207 blobBody?: Promise<Blob>;
9208 /**
9209 * NODEJS ONLY
9210 *
9211 * The response body as a node.js Readable stream.
9212 * Always `undefined` in the browser.
9213 */
9214 readableStreamBody?: NodeJS.ReadableStream;
9215 /** The underlying HTTP response. */
9216 _response: coreHttp.HttpResponse & {
9217 /** The parsed HTTP response headers. */
9218 parsedHeaders: ServiceSubmitBatchHeaders;
9219 };
9220};
9221
9222/**
9223 * Options to configure {@link BlobServiceClient.undeleteContainer} operation.
9224 */
9225export declare interface ServiceUndeleteContainerOptions extends CommonOptions {
9226 /**
9227 * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
9228 * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
9229 */
9230 abortSignal?: AbortSignalLike;
9231 /**
9232 * Optional. Specifies the new name of the restored container.
9233 * Will use its original name if this is not specified.
9234 * @deprecated Restore container to a different name is not supported by service anymore.
9235 */
9236 destinationContainerName?: string;
9237}
9238
9239/**
9240 * Signed identifier.
9241 */
9242export declare interface SignedIdentifier {
9243 /**
9244 * a unique id
9245 */
9246 id: string;
9247 /**
9248 * Access Policy
9249 */
9250 accessPolicy: {
9251 /**
9252 * Optional. The date-time the policy is active
9253 */
9254 startsOn?: Date;
9255 /**
9256 * Optional. The date-time the policy expires
9257 */
9258 expiresOn?: Date;
9259 /**
9260 * The permissions for the acl policy
9261 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl
9262 */
9263 permissions?: string;
9264 };
9265}
9266
9267/** signed identifier */
9268export declare interface SignedIdentifierModel {
9269 /** a unique id */
9270 id: string;
9271 /** An Access policy */
9272 accessPolicy: AccessPolicy;
9273}
9274
9275/** Defines values for SkuName. */
9276export declare type SkuName = "Standard_LRS" | "Standard_GRS" | "Standard_RAGRS" | "Standard_ZRS" | "Premium_LRS";
9277
9278/** The properties that enable an account to host a static website */
9279export declare interface StaticWebsite {
9280 /** Indicates whether this account is hosting a static website */
9281 enabled: boolean;
9282 /** The default name of the index page under each directory */
9283 indexDocument?: string;
9284 /** The absolute path of the custom 404 page */
9285 errorDocument404Path?: string;
9286 /** Absolute path of the default index page */
9287 defaultIndexDocumentPath?: string;
9288}
9289
9290/**
9291 * Defines the known cloud audiences for Storage.
9292 */
9293export declare enum StorageBlobAudience {
9294 /**
9295 * The OAuth scope to use to retrieve an AAD token for Azure Storage.
9296 */
9297 StorageOAuthScopes = "https://storage.azure.com/.default",
9298 /**
9299 * The OAuth scope to use to retrieve an AAD token for Azure Disk.
9300 */
9301 DiskComputeOAuthScopes = "https://disk.compute.azure.com/.default"
9302}
9303
9304/**
9305 * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:
9306 *
9307 * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.
9308 * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL
9309 * thus avoid the browser cache.
9310 *
9311 * 2. Remove cookie header for security
9312 *
9313 * 3. Remove content-length header to avoid browsers warning
9314 */
9315export declare class StorageBrowserPolicy extends BaseRequestPolicy {
9316 /**
9317 * Creates an instance of StorageBrowserPolicy.
9318 * @param nextPolicy -
9319 * @param options -
9320 */
9321 constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions);
9322 /**
9323 * Sends out request.
9324 *
9325 * @param request -
9326 */
9327 sendRequest(request: WebResource): Promise<HttpOperationResponse>;
9328}
9329
9330/**
9331 * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.
9332 */
9333export declare class StorageBrowserPolicyFactory implements RequestPolicyFactory {
9334 /**
9335 * Creates a StorageBrowserPolicyFactory object.
9336 *
9337 * @param nextPolicy -
9338 * @param options -
9339 */
9340 create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageBrowserPolicy;
9341}
9342
9343/**
9344 * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}
9345 * and etc.
9346 */
9347declare abstract class StorageClient {
9348 /**
9349 * Encoded URL string value.
9350 */
9351 readonly url: string;
9352 readonly accountName: string;
9353 /* Excluded from this release type: pipeline */
9354 /**
9355 * 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.
9356 */
9357 readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;
9358 /**
9359 * StorageClient is a reference to protocol layer operations entry, which is
9360 * generated by AutoRest generator.
9361 */
9362 protected readonly storageClientContext: StorageClientContext;
9363 /**
9364 */
9365 protected readonly isHttps: boolean;
9366 /**
9367 * Creates an instance of StorageClient.
9368 * @param url - url to resource
9369 * @param pipeline - request policy pipeline.
9370 */
9371 protected constructor(url: string, pipeline: PipelineLike);
9372}
9373
9374declare class StorageClientContext extends coreHttp.ServiceClient {
9375 url: string;
9376 version: string;
9377 /**
9378 * Initializes a new instance of the StorageClientContext class.
9379 * @param url The URL of the service account, container, or blob that is the target of the desired
9380 * operation.
9381 * @param options The parameter options
9382 */
9383 constructor(url: string, options?: StorageClientOptionalParams);
9384}
9385
9386/** Optional parameters. */
9387declare interface StorageClientOptionalParams extends coreHttp.ServiceClientOptions {
9388 /** Specifies the version of the operation to use for this request. */
9389 version?: string;
9390 /** Overrides client endpoint. */
9391 endpoint?: string;
9392}
9393
9394/**
9395 * The OAuth scope to use with Azure Storage.
9396 */
9397export declare const StorageOAuthScopes: string | string[];
9398
9399/**
9400 * Options interface for the {@link newPipeline} function.
9401 */
9402export declare interface StoragePipelineOptions {
9403 /**
9404 * Options to configure a proxy for outgoing requests.
9405 */
9406 proxyOptions?: ProxyOptions;
9407 /**
9408 * Options for adding user agent details to outgoing requests.
9409 */
9410 userAgentOptions?: UserAgentOptions;
9411 /**
9412 * Configures the built-in retry policy behavior.
9413 */
9414 retryOptions?: StorageRetryOptions;
9415 /**
9416 * Keep alive configurations. Default keep-alive is enabled.
9417 */
9418 keepAliveOptions?: KeepAliveOptions;
9419 /**
9420 * Configures the HTTP client to send requests and receive responses.
9421 */
9422 httpClient?: IHttpClient;
9423 /**
9424 * The audience used to retrieve an AAD token.
9425 */
9426 audience?: string | string[];
9427}
9428
9429/**
9430 * Storage Blob retry options interface.
9431 */
9432export declare interface StorageRetryOptions {
9433 /**
9434 * Optional. StorageRetryPolicyType, default is exponential retry policy.
9435 */
9436 readonly retryPolicyType?: StorageRetryPolicyType;
9437 /**
9438 * Optional. Max try number of attempts, default is 4.
9439 * A value of 1 means 1 try and no retries.
9440 * A value smaller than 1 means default retry number of attempts.
9441 */
9442 readonly maxTries?: number;
9443 /**
9444 * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.
9445 * A value of zero or undefined means no default timeout on SDK client, Azure
9446 * Storage server's default timeout policy will be used.
9447 *
9448 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations
9449 */
9450 readonly tryTimeoutInMs?: number;
9451 /**
9452 * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).
9453 * The delay increases (exponentially or linearly) with each retry up to a maximum specified by
9454 * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.
9455 */
9456 readonly retryDelayInMs?: number;
9457 /**
9458 * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).
9459 * If you specify 0, then you must also specify 0 for retryDelayInMs.
9460 */
9461 readonly maxRetryDelayInMs?: number;
9462 /**
9463 * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined
9464 * (the default) then operations are not retried against another host.
9465 *
9466 * NOTE: Before setting this field, make sure you understand the issues around
9467 * reading stale and potentially-inconsistent data at
9468 * {@link https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs}
9469 */
9470 readonly secondaryHost?: string;
9471}
9472
9473/**
9474 * Retry policy with exponential retry and linear retry implemented.
9475 */
9476export declare class StorageRetryPolicy extends BaseRequestPolicy {
9477 /**
9478 * RetryOptions.
9479 */
9480 private readonly retryOptions;
9481 /**
9482 * Creates an instance of RetryPolicy.
9483 *
9484 * @param nextPolicy -
9485 * @param options -
9486 * @param retryOptions -
9487 */
9488 constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, retryOptions?: StorageRetryOptions);
9489 /**
9490 * Sends request.
9491 *
9492 * @param request -
9493 */
9494 sendRequest(request: WebResource): Promise<HttpOperationResponse>;
9495 /**
9496 * Decide and perform next retry. Won't mutate request parameter.
9497 *
9498 * @param request -
9499 * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then
9500 * the resource was not found. This may be due to replication delay. So, in this
9501 * case, we'll never try the secondary again for this operation.
9502 * @param attempt - How many retries has been attempted to performed, starting from 1, which includes
9503 * the attempt will be performed by this method call.
9504 */
9505 protected attemptSendRequest(request: WebResource, secondaryHas404: boolean, attempt: number): Promise<HttpOperationResponse>;
9506 /**
9507 * Decide whether to retry according to last HTTP response and retry counters.
9508 *
9509 * @param isPrimaryRetry -
9510 * @param attempt -
9511 * @param response -
9512 * @param err -
9513 */
9514 protected shouldRetry(isPrimaryRetry: boolean, attempt: number, response?: HttpOperationResponse, err?: RestError): boolean;
9515 /**
9516 * Delay a calculated time between retries.
9517 *
9518 * @param isPrimaryRetry -
9519 * @param attempt -
9520 * @param abortSignal -
9521 */
9522 private delay;
9523}
9524
9525/**
9526 * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.
9527 */
9528export declare class StorageRetryPolicyFactory implements RequestPolicyFactory {
9529 private retryOptions?;
9530 /**
9531 * Creates an instance of StorageRetryPolicyFactory.
9532 * @param retryOptions -
9533 */
9534 constructor(retryOptions?: StorageRetryOptions);
9535 /**
9536 * Creates a StorageRetryPolicy object.
9537 *
9538 * @param nextPolicy -
9539 * @param options -
9540 */
9541 create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy;
9542}
9543
9544/**
9545 * RetryPolicy types.
9546 */
9547export declare enum StorageRetryPolicyType {
9548 /**
9549 * Exponential retry. Retry time delay grows exponentially.
9550 */
9551 EXPONENTIAL = 0,
9552 /**
9553 * Linear retry. Retry time delay grows linearly.
9554 */
9555 FIXED = 1
9556}
9557
9558/**
9559 * ONLY AVAILABLE IN NODE.JS RUNTIME.
9560 *
9561 * StorageSharedKeyCredential for account key authorization of Azure Storage service.
9562 */
9563export declare class StorageSharedKeyCredential extends Credential_2 {
9564 /**
9565 * Azure Storage account name; readonly.
9566 */
9567 readonly accountName: string;
9568 /**
9569 * Azure Storage account key; readonly.
9570 */
9571 private readonly accountKey;
9572 /**
9573 * Creates an instance of StorageSharedKeyCredential.
9574 * @param accountName -
9575 * @param accountKey -
9576 */
9577 constructor(accountName: string, accountKey: string);
9578 /**
9579 * Creates a StorageSharedKeyCredentialPolicy object.
9580 *
9581 * @param nextPolicy -
9582 * @param options -
9583 */
9584 create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageSharedKeyCredentialPolicy;
9585 /**
9586 * Generates a hash signature for an HTTP request or for a SAS.
9587 *
9588 * @param stringToSign -
9589 */
9590 computeHMACSHA256(stringToSign: string): string;
9591}
9592
9593/**
9594 * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.
9595 */
9596export declare class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
9597 /**
9598 * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy
9599 */
9600 private readonly factory;
9601 /**
9602 * Creates an instance of StorageSharedKeyCredentialPolicy.
9603 * @param nextPolicy -
9604 * @param options -
9605 * @param factory -
9606 */
9607 constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, factory: StorageSharedKeyCredential);
9608 /**
9609 * Signs request.
9610 *
9611 * @param request -
9612 */
9613 protected signRequest(request: WebResource): WebResource;
9614 /**
9615 * Retrieve header value according to shared key sign rules.
9616 * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key
9617 *
9618 * @param request -
9619 * @param headerName -
9620 */
9621 private getHeaderValueToSign;
9622 /**
9623 * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:
9624 * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
9625 * 2. Convert each HTTP header name to lowercase.
9626 * 3. Sort the headers lexicographically by header name, in ascending order.
9627 * Each header may appear only once in the string.
9628 * 4. Replace any linear whitespace in the header value with a single space.
9629 * 5. Trim any whitespace around the colon in the header.
9630 * 6. Finally, append a new-line character to each canonicalized header in the resulting list.
9631 * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
9632 *
9633 * @param request -
9634 */
9635 private getCanonicalizedHeadersString;
9636 /**
9637 * Retrieves the webResource canonicalized resource string.
9638 *
9639 * @param request -
9640 */
9641 private getCanonicalizedResourceString;
9642}
9643
9644/** Defines values for SyncCopyStatusType. */
9645export declare type SyncCopyStatusType = "success";
9646
9647/**
9648 * Specifies HTTP options for conditional requests based on blob tags.
9649 */
9650export declare interface TagConditions {
9651 /**
9652 * Optional SQL statement to apply to the tags of the blob.
9653 */
9654 tagConditions?: string;
9655}
9656
9657/**
9658 * Blob tags.
9659 */
9660export declare type Tags = Record<string, string>;
9661
9662/**
9663 * A user delegation key.
9664 */
9665export declare interface UserDelegationKey {
9666 /**
9667 * The Azure Active Directory object ID in GUID format.
9668 */
9669 signedObjectId: string;
9670 /**
9671 * The Azure Active Directory tenant ID in GUID format.
9672 */
9673 signedTenantId: string;
9674 /**
9675 * The date-time the key is active.
9676 */
9677 signedStartsOn: Date;
9678 /**
9679 * The date-time the key expires.
9680 */
9681 signedExpiresOn: Date;
9682 /**
9683 * Abbreviation of the Azure Storage service that accepts the key.
9684 */
9685 signedService: string;
9686 /**
9687 * The service version that created the key.
9688 */
9689 signedVersion: string;
9690 /**
9691 * The key as a base64 string.
9692 */
9693 value: string;
9694}
9695
9696/** A user delegation key */
9697export declare interface UserDelegationKeyModel {
9698 /** The Azure Active Directory object ID in GUID format. */
9699 signedObjectId: string;
9700 /** The Azure Active Directory tenant ID in GUID format */
9701 signedTenantId: string;
9702 /** The date-time the key is active */
9703 signedStartsOn: string;
9704 /** The date-time the key expires */
9705 signedExpiresOn: string;
9706 /** Abbreviation of the Azure Storage service that accepts the key */
9707 signedService: string;
9708 /** The service version that created the key */
9709 signedVersion: string;
9710 /** The key as a base64 string */
9711 value: string;
9712}
9713
9714export { WebResource }
9715
9716export { }
9717
\No newline at end of file