UNPKG

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