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C,OAAO,CAAM,EAAE;YACf,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,CAAC,CAAC,OAAO;aACnB,CAAC,CAAC;YACH,MAAM,CAAC,CAAC;SACT;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC;IAED;;;;;;;;;;;;OAYG;IACI,KAAK,CAAC,oBAAoB,CAC/B,UAAkB,EAClB,UAA+C,EAAE;;QAEjD,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;QAC5F,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,UAAU,kBAC1D,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,wBAAwB,kCACnB,OAAO,CAAC,UAAU,KACrB,MAAM,EAAE,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,OAExC,kCAAkC,CAAC,cAAc,CAAC,EACrD,CAAC;SACJ;QAAC,OAAO,CAAM,EAAE;YACf,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,CAAC,CAAC,OAAO;aACnB,CAAC,CAAC;YACH,MAAM,CAAC,CAAC;SACT;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n generateUuid,\n getDefaultProxySettings,\n HttpRequestBody,\n HttpResponse,\n isNode,\n isTokenCredential,\n TokenCredential,\n TransferProgressEvent,\n URLBuilder,\n} from \"@azure/core-http\";\nimport { PollerLike, PollOperationState } from \"@azure/core-lro\";\nimport { SpanStatusCode } from \"@azure/core-tracing\";\nimport { Readable } from \"stream\";\n\nimport { BlobDownloadResponse } from \"./BlobDownloadResponse\";\nimport { BlobQueryResponse } from \"./BlobQueryResponse\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AppendBlob, Blob as StorageBlob, BlockBlob, PageBlob } from \"./generated/src/operations\";\nimport {\n AppendBlobAppendBlockFromUrlResponse,\n AppendBlobAppendBlockResponse,\n AppendBlobCreateResponse,\n BlobAbortCopyFromURLResponse,\n BlobCopyFromURLResponse,\n BlobCreateSnapshotResponse,\n BlobDeleteResponse,\n BlobDownloadOptionalParams,\n BlobDownloadResponseModel,\n BlobGetPropertiesResponseModel,\n BlobGetTagsHeaders,\n BlobSetHTTPHeadersResponse,\n BlobSetMetadataResponse,\n BlobSetTagsResponse,\n BlobSetTierResponse,\n BlobStartCopyFromURLResponse,\n BlobTags,\n BlobUndeleteResponse,\n BlockBlobCommitBlockListResponse,\n BlockBlobGetBlockListResponse,\n BlockBlobStageBlockFromURLResponse,\n BlockBlobStageBlockResponse,\n BlockBlobUploadHeaders,\n BlockBlobUploadResponse,\n BlockListType,\n CpkInfo,\n DeleteSnapshotsOptionType,\n LeaseAccessConditions,\n PageBlobClearPagesResponse,\n PageBlobCopyIncrementalResponse,\n PageBlobCreateResponse,\n PageBlobResizeResponse,\n PageBlobUpdateSequenceNumberResponse,\n PageBlobUploadPagesFromURLResponse,\n PageBlobUploadPagesResponse,\n RehydratePriority,\n SequenceNumberActionType,\n BlockBlobPutBlobFromUrlResponse,\n BlobHTTPHeaders,\n PageBlobGetPageRangesResponseModel,\n PageRangeInfo,\n PageBlobGetPageRangesDiffResponseModel,\n BlobCopySourceTags,\n} from \"./generatedModels\";\nimport {\n AppendBlobRequestConditions,\n BlobDownloadResponseParsed,\n BlobRequestConditions,\n BlockBlobTier,\n ensureCpkIfSpecified,\n Metadata,\n ObjectReplicationPolicy,\n PageBlobRequestConditions,\n PremiumPageBlobTier,\n Tags,\n toAccessTier,\n TagConditions,\n MatchConditions,\n ModificationConditions,\n ModifiedAccessConditions,\n BlobQueryArrowField,\n BlobImmutabilityPolicy,\n HttpAuthorization,\n} from \"./models\";\nimport {\n PageBlobGetPageRangesDiffResponse,\n PageBlobGetPageRangesResponse,\n rangeResponseFromModel,\n} from \"./PageBlobRangeResponse\";\nimport { newPipeline, PipelineLike, isPipelineLike, StoragePipelineOptions } from \"./Pipeline\";\nimport {\n BlobBeginCopyFromUrlPoller,\n BlobBeginCopyFromUrlPollState,\n CopyPollerBlobClient,\n} from \"./pollers/BlobStartCopyFromUrlPoller\";\nimport { Range, rangeToString } from \"./Range\";\nimport { CommonOptions, StorageClient } from \"./StorageClient\";\nimport { Batch } from \"./utils/Batch\";\nimport { BufferScheduler } from \"../../storage-common/src\";\nimport {\n BlobDoesNotUseCustomerSpecifiedEncryption,\n BlobUsesCustomerSpecifiedEncryptionMsg,\n BLOCK_BLOB_MAX_BLOCKS,\n BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES,\n BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES,\n DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES,\n DEFAULT_BLOCK_BUFFER_SIZE_BYTES,\n DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS,\n ETagAny,\n URLConstants,\n} from \"./utils/constants\";\nimport { createSpan, convertTracingToRequestOptionsBase } from \"./utils/tracing\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\n ExtractPageRangeInfoItems,\n generateBlockID,\n getURLParameter,\n httpAuthorizationToString,\n isIpEndpointStyle,\n parseObjectReplicationRecord,\n setURLParameter,\n toBlobTags,\n toBlobTagsString,\n toQuerySerialization,\n toTags,\n} from \"./utils/utils.common\";\nimport {\n fsCreateReadStream,\n fsStat,\n readStreamToLocalFile,\n streamToBuffer,\n} from \"./utils/utils.node\";\nimport { SASProtocol } from \"./sas/SASQueryParameters\";\nimport { SasIPRange } from \"./sas/SasIPRange\";\nimport { generateBlobSASQueryParameters } from \"./sas/BlobSASSignatureValues\";\nimport { BlobSASPermissions } from \"./sas/BlobSASPermissions\";\nimport { BlobLeaseClient } from \"./BlobLeaseClient\";\nimport {\n BlobDeleteImmutabilityPolicyResponse,\n BlobSetImmutabilityPolicyResponse,\n BlobSetLegalHoldResponse,\n} from \"./generatedModels\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\n\n/**\n * Options to configure the {@link BlobClient.beginCopyFromURL} operation.\n */\nexport interface BlobBeginCopyFromURLOptions extends BlobStartCopyFromURLOptions {\n /**\n * The amount of time in milliseconds the poller should wait between\n * calls to the service to determine the status of the Blob copy.\n * Defaults to 15 seconds.\n */\n intervalInMs?: number;\n /**\n * Callback to receive the state of the copy progress.\n */\n onProgress?: (state: BlobBeginCopyFromUrlPollState) => void;\n /**\n * Serialized poller state that can be used to resume polling from.\n * This may be useful when starting a copy on one process or thread\n * and you wish to continue polling on another process or thread.\n *\n * To get serialized poller state, call `poller.toString()` on an existing\n * poller.\n */\n resumeFrom?: string;\n}\n\n/**\n * Contains response data for the {@link BlobClient.beginCopyFromURL} operation.\n */\nexport interface BlobBeginCopyFromURLResponse extends BlobStartCopyFromURLResponse {}\n\n/**\n * Options to configure the {@link BlobClient.download} operation.\n */\nexport interface BlobDownloadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * An opaque DateTime string value that, when present, specifies the blob snapshot to retrieve.\n */\n snapshot?: string;\n /**\n * When this is set to true and download range of blob, the service returns the MD5 hash for the range,\n * as long as the range is less than or equal to 4 MB in size.\n *\n * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.\n */\n rangeGetContentMD5?: boolean;\n /**\n * When this is set to true and download range of blob, the service returns the CRC64 hash for the range,\n * as long as the range is less than or equal to 4 MB in size.\n *\n * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.\n */\n rangeGetContentCrc64?: boolean;\n /**\n * Conditions to meet when downloading blobs.\n */\n conditions?: BlobRequestConditions;\n /**\n * Call back to receive events on the progress of download operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Optional. ONLY AVAILABLE IN NODE.JS.\n *\n * How many retries will perform when original body download stream unexpected ends.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors.\n *\n * With this option, every additional retry means an additional `FileClient.download()` request will be made\n * from the broken point, until the requested range has been successfully downloaded or maxRetryRequests is reached.\n *\n * Default value is 5, please set a larger value when loading large files in poor network.\n */\n maxRetryRequests?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.exists} operation.\n */\nexport interface BlobExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Conditions to meet.\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.getProperties} operation.\n */\nexport interface BlobGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting blob properties.\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.delete} operation.\n */\nexport interface BlobDeleteOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when deleting blobs.\n */\n conditions?: BlobRequestConditions;\n /**\n * Specifies options to delete blobs that have associated snapshots.\n * - `include`: Delete the base blob and all of its snapshots.\n * - `only`: Delete only the blob's snapshots and not the blob itself.\n */\n deleteSnapshots?: DeleteSnapshotsOptionType;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.undelete} operation.\n */\nexport interface BlobUndeleteOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.setHTTPHeaders} operation.\n */\nexport interface BlobSetHTTPHeadersOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting blob HTTP headers.\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.setMetadata} operation.\n */\nexport interface BlobSetMetadataOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting blob metadata.\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link BlobClient.setTags} operation.\n */\nexport interface BlobSetTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet for the blob to perform this operation.\n */\n conditions?: TagConditions & LeaseAccessConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.getTags} operation.\n */\nexport interface BlobGetTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet for the blob to perform this operation.\n */\n conditions?: TagConditions & LeaseAccessConditions;\n}\n\n/**\n * Contains response data for the {@link BlobClient.getTags} operation.\n */\nexport type BlobGetTagsResponse = { tags: Tags } & BlobGetTagsHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobGetTagsHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: BlobTags;\n };\n };\n\n/**\n * Options to configure Blob - Acquire Lease operation.\n */\nexport interface BlobAcquireLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when acquiring the lease of a blob.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Release Lease operation.\n */\nexport interface BlobReleaseLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when releasing the lease of a blob.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Renew Lease operation.\n */\nexport interface BlobRenewLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when renewing the lease of a blob.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Change Lease operation.\n */\nexport interface BlobChangeLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease of a blob.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Break Lease operation.\n */\nexport interface BlobBreakLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when breaking the lease of a blob.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.createSnapshot} operation.\n */\nexport interface BlobCreateSnapshotOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the snapshot.\n */\n metadata?: Metadata;\n /**\n * Conditions to meet when creating blob snapshots.\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link BlobClient.beginCopyFromURL} operation.\n */\nexport interface BlobStartCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the blob that are being copied.\n */\n metadata?: Metadata;\n /**\n * Conditions to meet for the destination blob when copying from a URL to the blob.\n */\n conditions?: BlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n */\n sourceConditions?: ModifiedAccessConditions;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: BlockBlobTier | PremiumPageBlobTier | string;\n /**\n * Rehydrate Priority - possible values include 'High', 'Standard'.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier\n */\n rehydratePriority?: RehydratePriority;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n /**\n * Blob tags.\n */\n tags?: Tags;\n /**\n * Overrides the sealed state of the destination blob. Default true.\n */\n sealBlob?: boolean;\n}\n\n/**\n * Options to configure the {@link BlobClient.abortCopyFromURL} operation.\n */\nexport interface BlobAbortCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n */\n conditions?: LeaseAccessConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.syncCopyFromURL} operation.\n */\nexport interface BlobSyncCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the snapshot.\n */\n metadata?: Metadata;\n /**\n * Conditions to meet for the destination blob when copying from a URL to the blob.\n */\n conditions?: BlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n /**\n * Blob tags.\n */\n tags?: Tags;\n /**\n * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.\n */\n sourceAuthorization?: HttpAuthorization;\n /**\n * 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.\n */\n encryptionScope?: string;\n /**\n * Optional. Default 'REPLACE'. Indicates if source tags should be copied or replaced with the tags specified by {@link tags}.\n */\n copySourceTags?: BlobCopySourceTags;\n}\n\n/**\n * Options to configure the {@link BlobClient.setAccessTier} operation.\n */\nexport interface BlobSetTierOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n */\n conditions?: LeaseAccessConditions & TagConditions;\n /**\n * Rehydrate Priority - possible values include 'High', 'Standard'.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier\n */\n rehydratePriority?: RehydratePriority;\n}\n\n/**\n * Option interface for the {@link BlobClient.downloadToBuffer} operation.\n */\nexport interface BlobDownloadToBufferOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * blockSize is the data every request trying to download.\n * Must be greater than or equal to 0.\n * If set to 0 or undefined, blockSize will automatically calculated according to the blob size.\n */\n blockSize?: number;\n\n /**\n * Optional. ONLY AVAILABLE IN NODE.JS.\n *\n * How many retries will perform when original block download stream unexpected ends.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors.\n *\n * With this option, every additional retry means an additional FileClient.download() request will be made\n * from the broken point, until the requested block has been successfully downloaded or\n * maxRetryRequestsPerBlock is reached.\n *\n * Default value is 5, please set a larger value when in poor network.\n */\n maxRetryRequestsPerBlock?: number;\n\n /**\n * Progress updater.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Access conditions headers.\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Concurrency of parallel download.\n */\n concurrency?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Contains response data for the {@link BlobClient.deleteIfExists} operation.\n */\nexport interface BlobDeleteIfExistsResponse extends BlobDeleteResponse {\n /**\n * Indicate whether the blob is successfully deleted. Is false if the blob does not exist in the first place.\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link BlobClient.getProperties} operation.\n */\nexport interface BlobGetPropertiesResponse extends BlobGetPropertiesResponseModel {\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n */\n objectReplicationSourceProperties?: ObjectReplicationPolicy[];\n\n /**\n * Object Replication Policy Id of the destination blob.\n */\n objectReplicationDestinationPolicyId?: string;\n}\n\n/**\n * Common options of {@link BlobGenerateSasUrlOptions} and {@link ContainerGenerateSasUrlOptions}.\n */\nexport interface CommonGenerateSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * Optional. The name of the access policy on the container this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n */\n contentType?: string;\n}\n\n/**\n * Options to configure {@link BlobClient.generateSasUrl} operation.\n */\nexport interface BlobGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {\n /**\n * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.\n */\n permissions?: BlobSASPermissions;\n}\n\n/**\n * Options for deleting immutability policy {@link BlobClient.deleteImmutabilityPolicy} operation.\n */\nexport interface BlobDeleteImmutabilityPolicyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options for setting immutability policy {@link BlobClient.setImmutabilityPolicy} operation.\n */\nexport interface BlobSetImmutabilityPolicyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n modifiedAccessCondition?: ModificationConditions;\n}\n\n/**\n * Options for setting legal hold {@link BlobClient.setLegalHold} operation.\n */\nexport interface BlobSetLegalHoldOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,\n * append blob, or page blob.\n */\nexport class BlobClient extends StorageClient {\n /**\n * blobContext provided by protocol layer.\n */\n private blobContext: StorageBlob;\n\n private _name: string;\n private _containerName: string;\n\n private _versionId?: string;\n private _snapshot?: string;\n\n /**\n * The name of the blob.\n */\n public get name(): string {\n return this._name;\n }\n\n /**\n * The name of the storage container the blob is associated with.\n */\n public get containerName(): string {\n return this._containerName;\n }\n\n /**\n *\n * Creates an instance of BlobClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `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`\n * @param containerName - Container name.\n * @param blobName - Blob name.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param url - A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @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.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param url - A URL string pointing to Azure Storage blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob\".\n * You can append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: PipelineLike);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | PipelineLike,\n blobNameOrOptions?: string | StoragePipelineOptions,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n ) {\n options = options || {};\n let pipeline: PipelineLike;\n let url: string;\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n\n super(url, pipeline);\n ({ blobName: this._name, containerName: this._containerName } =\n this.getBlobAndContainerNamesFromUrl());\n this.blobContext = new StorageBlob(this.storageClientContext);\n\n this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT) as string;\n this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID) as string;\n }\n\n /**\n * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp\n */\n public withSnapshot(snapshot: string): BlobClient {\n return new BlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a new BlobClient object pointing to a version of this blob.\n * Provide \"\" will remove the versionId and return a Client to the base blob.\n *\n * @param versionId - The versionId.\n * @returns A new BlobClient object pointing to the version of this blob.\n */\n public withVersion(versionId: string): BlobClient {\n return new BlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.VERSIONID,\n versionId.length === 0 ? undefined : versionId\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a AppendBlobClient object.\n *\n */\n public getAppendBlobClient(): AppendBlobClient {\n return new AppendBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Creates a BlockBlobClient object.\n *\n */\n public getBlockBlobClient(): BlockBlobClient {\n return new BlockBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Creates a PageBlobClient object.\n *\n */\n public getPageBlobClient(): PageBlobClient {\n return new PageBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Reads or downloads a blob from the system, including its metadata and properties.\n * You can also call Get Blob to read a snapshot.\n *\n * * In Node.js, data returns in a Readable stream readableStreamBody\n * * In browsers, data returns in a promise blobBody\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob\n *\n * @param offset - From which position of the blob to download, greater than or equal to 0\n * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined\n * @param options - Optional options to Blob Download operation.\n *\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody);\n * console.log(\"Downloaded blob content:\", downloaded.toString());\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * Example usage (browser):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody);\n * console.log(\n * \"Downloaded blob content\",\n * downloaded\n * );\n *\n * async function blobToString(blob: Blob): Promise<string> {\n * const fileReader = new FileReader();\n * return new Promise<string>((resolve, reject) => {\n * fileReader.onloadend = (ev: any) => {\n * resolve(ev.target!.result);\n * };\n * fileReader.onerror = reject;\n * fileReader.readAsText(blob);\n * });\n * }\n * ```\n */\n public async download(\n offset: number = 0,\n count?: number,\n options: BlobDownloadOptions = {}\n ): Promise<BlobDownloadResponseParsed> {\n options.conditions = options.conditions || {};\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n const { span, updatedOptions } = createSpan(\"BlobClient-download\", options);\n\n try {\n const res = await this.blobContext.download({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n requestOptions: {\n onDownloadProgress: isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream\n },\n range: offset === 0 && !count ? undefined : rangeToString({ offset, count }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n\n const wrappedRes = {\n ...res,\n _response: res._response, // _response is made non-enumerable\n objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,\n objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules),\n };\n // Return browser response immediately\n if (!isNode) {\n return wrappedRes;\n }\n\n // We support retrying when download stream unexpected ends in Node.js runtime\n // Following code shouldn't be bundled into browser build, however some\n // bundlers may try to bundle following code and \"FileReadResponse.ts\".\n // In this case, \"FileDownloadResponse.browser.ts\" will be used as a shim of \"FileDownloadResponse.ts\"\n // The config is in package.json \"browser\" field\n if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) {\n // TODO: Default value or make it a required parameter?\n options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS;\n }\n\n if (res.contentLength === undefined) {\n throw new RangeError(`File download response doesn't contain valid content length header`);\n }\n\n if (!res.etag) {\n throw new RangeError(`File download response doesn't contain valid etag header`);\n }\n\n return new BlobDownloadResponse(\n wrappedRes,\n async (start: number): Promise<NodeJS.ReadableStream> => {\n const updatedDownloadOptions: BlobDownloadOptionalParams = {\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ifMatch: options.conditions!.ifMatch || res.etag,\n ifModifiedSince: options.conditions!.ifModifiedSince,\n ifNoneMatch: options.conditions!.ifNoneMatch,\n ifUnmodifiedSince: options.conditions!.ifUnmodifiedSince,\n ifTags: options.conditions?.tagConditions,\n },\n range: rangeToString({\n count: offset + res.contentLength! - start,\n offset: start,\n }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey,\n };\n\n // Debug purpose only\n // console.log(\n // `Read from internal stream, range: ${\n // updatedOptions.range\n // }, options: ${JSON.stringify(updatedOptions)}`\n // );\n\n return (\n await this.blobContext.download({\n abortSignal: options.abortSignal,\n ...updatedDownloadOptions,\n })\n ).readableStreamBody!;\n },\n offset,\n res.contentLength!,\n {\n maxRetryRequests: options.maxRetryRequests,\n onProgress: options.onProgress,\n }\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns true if the Azure blob resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing blob might be deleted by other clients or\n * applications. Vice versa new blobs might be added by other clients or applications after this\n * function completes.\n *\n * @param options - options to Exists operation.\n */\n public async exists(options: BlobExistsOptions = {}): Promise<boolean> {\n const { span, updatedOptions } = createSpan(\"BlobClient-exists\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n await this.getProperties({\n abortSignal: options.abortSignal,\n customerProvidedKey: options.customerProvidedKey,\n conditions: options.conditions,\n tracingOptions: updatedOptions.tracingOptions,\n });\n return true;\n } catch (e: any) {\n if (e.statusCode === 404) {\n // Expected exception when checking blob existence\n return false;\n } else if (\n e.statusCode === 409 &&\n (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg ||\n e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)\n ) {\n // Expected exception when checking blob existence\n return true;\n }\n\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns all user-defined metadata, standard HTTP properties, and system properties\n * for the blob. It does not return the content of the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param options - Optional options to Get Properties operation.\n */\n public async getProperties(\n options: BlobGetPropertiesOptions = {}\n ): Promise<BlobGetPropertiesResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-getProperties\", options);\n try {\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const res = await this.blobContext.getProperties({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n\n return {\n ...res,\n _response: res._response, // _response is made non-enumerable\n objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,\n objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules),\n };\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param options - Optional options to Blob Delete operation.\n */\n public async delete(options: BlobDeleteOptions = {}): Promise<BlobDeleteResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-delete\", options);\n options.conditions = options.conditions || {};\n try {\n return await this.blobContext.delete({\n abortSignal: options.abortSignal,\n deleteSnapshots: options.deleteSnapshots,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param options - Optional options to Blob Delete operation.\n */\n public async deleteIfExists(\n options: BlobDeleteOptions = {}\n ): Promise<BlobDeleteIfExistsResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-deleteIfExists\", options);\n try {\n const res = await this.delete(updatedOptions);\n return {\n succeeded: true,\n ...res,\n _response: res._response, // _response is made non-enumerable\n };\n } catch (e: any) {\n if (e.details?.errorCode === \"BlobNotFound\") {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"Expected exception when deleting a blob or snapshot only if it exists.\",\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Restores the contents and metadata of soft deleted blob and any associated\n * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29\n * or later.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob\n *\n * @param options - Optional options to Blob Undelete operation.\n */\n public async undelete(options: BlobUndeleteOptions = {}): Promise<BlobUndeleteResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-undelete\", options);\n try {\n return await this.blobContext.undelete({\n abortSignal: options.abortSignal,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets system properties on the blob.\n *\n * If no value provided, or no value provided for the specified blob HTTP headers,\n * these blob HTTP headers without a value will be cleared.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param blobHTTPHeaders - If no value provided, or no value provided for\n * the specified blob HTTP headers, these blob HTTP\n * headers without a value will be cleared.\n * A common header to set is `blobContentType`\n * enabling the browser to provide functionality\n * based on file type.\n * @param options - Optional options to Blob Set HTTP Headers operation.\n */\n public async setHTTPHeaders(\n blobHTTPHeaders?: BlobHTTPHeaders,\n options: BlobSetHTTPHeadersOptions = {}\n ): Promise<BlobSetHTTPHeadersResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-setHTTPHeaders\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setHttpHeaders({\n abortSignal: options.abortSignal,\n blobHttpHeaders: blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger.\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets user-defined metadata for the specified blob as one or more name-value pairs.\n *\n * If no option provided, or no metadata defined in the parameter, the blob\n * metadata will be removed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional options to Set Metadata operation.\n */\n public async setMetadata(\n metadata?: Metadata,\n options: BlobSetMetadataOptions = {}\n ): Promise<BlobSetMetadataResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-setMetadata\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setMetadata({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets tags on the underlying blob.\n * 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.\n * Valid tag key and value characters include lower and upper case letters, digits (0-9),\n * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').\n *\n * @param tags -\n * @param options -\n */\n public async setTags(tags: Tags, options: BlobSetTagsOptions = {}): Promise<BlobSetTagsResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-setTags\", options);\n try {\n return await this.blobContext.setTags({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n ...convertTracingToRequestOptionsBase(updatedOptions),\n tags: toBlobTags(tags),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the tags associated with the underlying blob.\n *\n * @param options -\n */\n public async getTags(options: BlobGetTagsOptions = {}): Promise<BlobGetTagsResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-getTags\", options);\n try {\n const response = await this.blobContext.getTags({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n const wrappedResponse: BlobGetTagsResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n tags: toTags({ blobTagSet: response.blobTagSet }) || {},\n };\n return wrappedResponse;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the blob.\n *\n * @param proposeLeaseId - Initial proposed lease Id.\n * @returns A new BlobLeaseClient object for managing leases on the blob.\n */\n public getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n\n /**\n * Creates a read-only snapshot of a blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob\n *\n * @param options - Optional options to the Blob Create Snapshot operation.\n */\n public async createSnapshot(\n options: BlobCreateSnapshotOptions = {}\n ): Promise<BlobCreateSnapshotResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-createSnapshot\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.createSnapshot({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * This method returns a long running operation poller that allows you to wait\n * indefinitely until the copy is completed.\n * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.\n * Note that the onProgress callback will not be invoked if the operation completes in the first\n * request, and attempting to cancel a completed copy will result in an error being thrown.\n *\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * Example using automatic polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using manual polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * while (!poller.isDone()) {\n * await poller.poll();\n * }\n * const result = copyPoller.getResult();\n * ```\n *\n * Example using progress updates:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * onProgress(state) {\n * console.log(`Progress: ${state.copyProgress}`);\n * }\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using a changing polling interval (default 15 seconds):\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * intervalInMs: 1000 // poll blob every 1 second for copy progress\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using copy cancellation:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * // cancel operation after starting it.\n * try {\n * await copyPoller.cancelOperation();\n * // calls to get the result now throw PollerCancelledError\n * await copyPoller.getResult();\n * } catch (err) {\n * if (err.name === 'PollerCancelledError') {\n * console.log('The copy was cancelled.');\n * }\n * }\n * ```\n *\n * @param copySource - url to the source Azure Blob/File.\n * @param options - Optional options to the Blob Start Copy From URL operation.\n */\n public async beginCopyFromURL(\n copySource: string,\n options: BlobBeginCopyFromURLOptions = {}\n ): Promise<\n PollerLike<PollOperationState<BlobBeginCopyFromURLResponse>, BlobBeginCopyFromURLResponse>\n > {\n const client: CopyPollerBlobClient = {\n abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),\n getProperties: (...args) => this.getProperties(...args),\n startCopyFromURL: (...args) => this.startCopyFromURL(...args),\n };\n const poller = new BlobBeginCopyFromUrlPoller({\n blobClient: client,\n copySource,\n intervalInMs: options.intervalInMs,\n onProgress: options.onProgress,\n resumeFrom: options.resumeFrom,\n startCopyFromURLOptions: options,\n });\n\n // Trigger the startCopyFromURL call by calling poll.\n // Any errors from this method should be surfaced to the user.\n await poller.poll();\n\n return poller;\n }\n\n /**\n * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero\n * length and full metadata. Version 2012-02-12 and newer.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob\n *\n * @param copyId - Id of the Copy From URL operation.\n * @param options - Optional options to the Blob Abort Copy From URL operation.\n */\n public async abortCopyFromURL(\n copyId: string,\n options: BlobAbortCopyFromURLOptions = {}\n ): Promise<BlobAbortCopyFromURLResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-abortCopyFromURL\", options);\n try {\n return await this.blobContext.abortCopyFromURL(copyId, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not\n * return a response until the copy is complete.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url\n *\n * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication\n * @param options -\n */\n public async syncCopyFromURL(\n copySource: string,\n options: BlobSyncCopyFromURLOptions = {}\n ): Promise<BlobCopyFromURLResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-syncCopyFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n\n try {\n return await this.blobContext.copyFromURL(copySource, {\n abortSignal: options.abortSignal,\n metadata: options.metadata,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n },\n sourceContentMD5: options.sourceContentMD5,\n copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),\n blobTagsString: toBlobTagsString(options.tags),\n immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,\n immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,\n legalHold: options.legalHold,\n encryptionScope: options.encryptionScope,\n copySourceTags: options.copySourceTags,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets the tier on a blob. The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier\n *\n * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive.\n * @param options - Optional options to the Blob Set Tier operation.\n */\n public async setAccessTier(\n tier: BlockBlobTier | PremiumPageBlobTier | string,\n options: BlobSetTierOptions = {}\n ): Promise<BlobSetTierResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-setAccessTier\", options);\n try {\n return await this.blobContext.setTier(toAccessTier(tier)!, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n rehydratePriority: options.rehydratePriority,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n // High level function\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob in parallel to a buffer.\n * Offset and count are optional, downloads the entire blob if they are not provided.\n *\n * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two\n * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,\n * consider {@link downloadToFile}.\n *\n * @param offset - From which position of the block blob to download(in bytes)\n * @param count - How much data(in bytes) to be downloaded. Will download to the end when passing undefined\n * @param options - BlobDownloadToBufferOptions\n */\n public async downloadToBuffer(\n offset?: number,\n count?: number,\n options?: BlobDownloadToBufferOptions\n ): Promise<Buffer>;\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob in parallel to a buffer.\n * Offset and count are optional, downloads the entire blob if they are not provided.\n *\n * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two\n * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,\n * consider {@link downloadToFile}.\n *\n * @param buffer - Buffer to be fill, must have length larger than count\n * @param offset - From which position of the block blob to download(in bytes)\n * @param count - How much data(in bytes) to be downloaded. Will download to the end when passing undefined\n * @param options - BlobDownloadToBufferOptions\n */\n public async downloadToBuffer(\n buffer: Buffer,\n offset?: number,\n count?: number,\n options?: BlobDownloadToBufferOptions\n ): Promise<Buffer>;\n\n public async downloadToBuffer(\n param1?: Buffer | number,\n param2?: number,\n param3?: BlobDownloadToBufferOptions | number,\n param4: BlobDownloadToBufferOptions = {}\n ): Promise<Buffer | undefined> {\n let buffer: Buffer | undefined;\n let offset = 0;\n let count = 0;\n let options = param4;\n if (param1 instanceof Buffer) {\n buffer = param1;\n offset = param2 || 0;\n count = typeof param3 === \"number\" ? param3 : 0;\n } else {\n offset = typeof param1 === \"number\" ? param1 : 0;\n count = typeof param2 === \"number\" ? param2 : 0;\n options = (param3 as BlobDownloadToBufferOptions) || {};\n }\n const { span, updatedOptions } = createSpan(\"BlobClient-downloadToBuffer\", options);\n\n try {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0) {\n throw new RangeError(\"blockSize option must be >= 0\");\n }\n if (options.blockSize === 0) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n\n if (offset < 0) {\n throw new RangeError(\"offset option must be >= 0\");\n }\n\n if (count && count <= 0) {\n throw new RangeError(\"count option must be greater than 0\");\n }\n\n if (!options.conditions) {\n options.conditions = {};\n }\n\n // Customer doesn't specify length, get it\n if (!count) {\n const response = await this.getProperties({\n ...options,\n tracingOptions: {\n ...options.tracingOptions,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n },\n });\n count = response.contentLength! - offset;\n if (count < 0) {\n throw new RangeError(\n `offset ${offset} shouldn't be larger than blob size ${response.contentLength!}`\n );\n }\n }\n\n // Allocate the buffer of size = count if the buffer is not provided\n if (!buffer) {\n try {\n buffer = Buffer.alloc(count);\n } catch (error: any) {\n throw new Error(\n `Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the \"downloadToBuffer\" method or try using other methods like \"download\" or \"downloadToFile\".\\t ${error.message}`\n );\n }\n }\n\n if (buffer.length < count) {\n throw new RangeError(\n `The buffer's size should be equal to or larger than the request count of bytes: ${count}`\n );\n }\n\n let transferProgress: number = 0;\n const batch = new Batch(options.concurrency);\n for (let off = offset; off < offset + count; off = off + options.blockSize) {\n batch.addOperation(async () => {\n // Exclusive chunk end position\n let chunkEnd = offset + count!;\n if (off + options.blockSize! < chunkEnd) {\n chunkEnd = off + options.blockSize!;\n }\n const response = await this.download(off, chunkEnd - off, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n maxRetryRequests: options.maxRetryRequestsPerBlock,\n customerProvidedKey: options.customerProvidedKey,\n tracingOptions: {\n ...options.tracingOptions,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n },\n });\n const stream = response.readableStreamBody!;\n await streamToBuffer(stream, buffer!, off - offset, chunkEnd - offset);\n // Update progress after block is downloaded, in case of block trying\n // Could provide finer grained progress updating inside HTTP requests,\n // only if convenience layer download try is enabled\n transferProgress += chunkEnd - off;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n });\n }\n await batch.do();\n return buffer;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob to a local file.\n * Fails if the the given file path already exits.\n * Offset and count are optional, pass 0 and undefined respectively to download the entire blob.\n *\n * @param filePath -\n * @param offset - From which position of the block blob to download.\n * @param count - How much data to be downloaded. Will download to the end when passing undefined.\n * @param options - Options to Blob download options.\n * @returns The response data for blob download operation,\n * but with readableStreamBody set to undefined since its\n * content is already read and written into a local file\n * at the specified path.\n */\n public async downloadToFile(\n filePath: string,\n offset: number = 0,\n count?: number,\n options: BlobDownloadOptions = {}\n ): Promise<BlobDownloadResponseParsed> {\n const { span, updatedOptions } = createSpan(\"BlobClient-downloadToFile\", options);\n try {\n const response = await this.download(offset, count, {\n ...options,\n tracingOptions: {\n ...options.tracingOptions,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n },\n });\n if (response.readableStreamBody) {\n await readStreamToLocalFile(response.readableStreamBody, filePath);\n }\n\n // The stream is no longer accessible so setting it to undefined.\n (response as any).blobDownloadStream = undefined;\n return response;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private getBlobAndContainerNamesFromUrl(): { blobName: string; containerName: string } {\n let containerName;\n let blobName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`\n // http://localhost:10001/devstoreaccount1/containername/blob\n\n const parsedUrl = URLBuilder.parse(this.url);\n\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents![1];\n blobName = pathComponents![3];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob\n // .getPath() -> /devstoreaccount1/containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)/([^/]*)(/(.*))?\");\n containerName = pathComponents![2];\n blobName = pathComponents![4];\n } else {\n // \"https://customdomain.com/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents![1];\n blobName = pathComponents![3];\n }\n\n // decode the encoded blobName, containerName - to get all the special characters that might be present in them\n containerName = decodeURIComponent(containerName);\n blobName = decodeURIComponent(blobName);\n\n // Azure Storage Server will replace \"\\\" with \"/\" in the blob names\n // doing the same in the SDK side so that the user doesn't have to replace \"\\\" instances in the blobName\n blobName = blobName.replace(/\\\\/g, \"/\");\n\n if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n\n return { blobName, containerName };\n } catch (error: any) {\n throw new Error(\"Unable to extract blobName and containerName with provided information.\");\n }\n }\n\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * @param copySource - url to the source Azure Blob/File.\n * @param options - Optional options to the Blob Start Copy From URL operation.\n */\n private async startCopyFromURL(\n copySource: string,\n options: BlobStartCopyFromURLOptions = {}\n ): Promise<BlobStartCopyFromURLResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-startCopyFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n\n try {\n return await this.blobContext.startCopyFromURL(copySource, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n sourceIfTags: options.sourceConditions.tagConditions,\n },\n immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,\n immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,\n legalHold: options.legalHold,\n rehydratePriority: options.rehydratePriority,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n sealBlob: options.sealBlob,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Only available for BlobClient constructed with a shared key credential.\n *\n * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasUrl(options: BlobGenerateSasUrlOptions): Promise<string> {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw new RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\"\n );\n }\n\n const sas = generateBlobSASQueryParameters(\n {\n containerName: this._containerName,\n blobName: this._name,\n snapshotTime: this._snapshot,\n versionId: this._versionId,\n ...options,\n },\n this.credential\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Delete the immutablility policy on the blob.\n *\n * @param options - Optional options to delete immutability policy on the blob.\n */\n public async deleteImmutabilityPolicy(\n options?: BlobDeleteImmutabilityPolicyOptions\n ): Promise<BlobDeleteImmutabilityPolicyResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-deleteImmutabilityPolicy\", options);\n try {\n return await this.blobContext.deleteImmutabilityPolicy({\n abortSignal: options?.abortSignal,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Set immutablility policy on the blob.\n *\n * @param options - Optional options to set immutability policy on the blob.\n */\n public async setImmutabilityPolicy(\n immutabilityPolicy: BlobImmutabilityPolicy,\n options?: BlobSetImmutabilityPolicyOptions\n ): Promise<BlobSetImmutabilityPolicyResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-setImmutabilityPolicy\", options);\n try {\n return await this.blobContext.setImmutabilityPolicy({\n abortSignal: options?.abortSignal,\n immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn,\n immutabilityPolicyMode: immutabilityPolicy.policyMode,\n modifiedAccessConditions: options?.modifiedAccessCondition,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Set legal hold on the blob.\n *\n * @param options - Optional options to set legal hold on the blob.\n */\n public async setLegalHold(\n legalHoldEnabled: boolean,\n options?: BlobSetLegalHoldOptions\n ): Promise<BlobSetLegalHoldResponse> {\n const { span, updatedOptions } = createSpan(\"BlobClient-setLegalHold\", options);\n try {\n return await this.blobContext.setLegalHold(legalHoldEnabled, {\n abortSignal: options?.abortSignal,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link AppendBlobClient.create} operation.\n */\nexport interface AppendBlobCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Conditions to meet when creating append blobs.\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when creating append blobs. A common header\n * to set is `blobContentType`, enabling the browser to provide functionality\n * based on file type.\n *\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n /**\n * Blob tags.\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure {@link AppendBlobClient.createIfNotExists} operation.\n */\nexport interface AppendBlobCreateIfNotExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * HTTP headers to set when creating append blobs. A common header to set is\n * `blobContentType`, enabling the browser to provide functionality\n * based on file type.\n *\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n}\n\n/**\n * Options to configure {@link AppendBlobClient.seal} operation.\n */\nexport interface AppendBlobSealOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet.\n */\n conditions?: AppendBlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link AppendBlobClient.appendBlock} operation.\n */\nexport interface AppendBlobAppendBlockOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when appending append blob blocks.\n */\n conditions?: AppendBlobRequestConditions;\n /**\n * Callback to receive events on the progress of append block operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the append block content. This hash is used to verify the integrity of the append block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link AppendBlobClient.appendBlockFromURL} operation.\n */\nexport interface AppendBlobAppendBlockFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when appending append blob blocks.\n */\n conditions?: AppendBlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * An MD5 hash of the append block content from the URI.\n * This hash is used to verify the integrity of the append block during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the append block content from the URI.\n * This hash is used to verify the integrity of the append block during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.\n */\n sourceAuthorization?: HttpAuthorization;\n}\n\n/**\n * Contains response data for the {@link appendBlobClient.createIfNotExists} operation.\n */\nexport interface AppendBlobCreateIfNotExistsResponse extends AppendBlobCreateResponse {\n /**\n * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.\n */\n succeeded: boolean;\n}\n\n/**\n * AppendBlobClient defines a set of operations applicable to append blobs.\n */\nexport class AppendBlobClient extends BlobClient {\n /**\n * appendBlobsContext provided by protocol layer.\n */\n private appendBlobContext: AppendBlob;\n\n /**\n *\n * Creates an instance of AppendBlobClient.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `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`\n * @param containerName - Container name.\n * @param blobName - Blob name.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of AppendBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to an append blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param url - A URL string pointing to Azure Storage append blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @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.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of AppendBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to an append blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param url - A URL string pointing to Azure Storage append blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: PipelineLike);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | PipelineLike,\n blobNameOrOptions?: string | StoragePipelineOptions,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: PipelineLike;\n let url: string;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString;\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.appendBlobContext = new AppendBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new AppendBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n public withSnapshot(snapshot: string): AppendBlobClient {\n return new AppendBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param options - Options to the Append Block Create operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const appendBlobClient = containerClient.getAppendBlobClient(\"<blob name>\");\n * await appendBlobClient.create();\n * ```\n */\n public async create(options: AppendBlobCreateOptions = {}): Promise<AppendBlobCreateResponse> {\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-create\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.create(0, {\n abortSignal: options.abortSignal,\n blobHttpHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,\n immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,\n legalHold: options.legalHold,\n blobTagsString: toBlobTagsString(options.tags),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * If the blob with the same name already exists, the content of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param options -\n */\n public async createIfNotExists(\n options: AppendBlobCreateIfNotExistsOptions = {}\n ): Promise<AppendBlobCreateIfNotExistsResponse> {\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-createIfNotExists\", options);\n const conditions = { ifNoneMatch: ETagAny };\n try {\n const res = await this.create({\n ...updatedOptions,\n conditions,\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response, // _response is made non-enumerable\n };\n } catch (e: any) {\n if (e.details?.errorCode === \"BlobAlreadyExists\") {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"Expected exception when creating a blob only if it does not already exist.\",\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Seals the append blob, making it read only.\n *\n * @param options -\n */\n public async seal(options: AppendBlobSealOptions = {}): Promise<AppendBlobAppendBlockResponse> {\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-seal\", options);\n options.conditions = options.conditions || {};\n try {\n return await this.appendBlobContext.seal({\n abortSignal: options.abortSignal,\n appendPositionAccessConditions: options.conditions,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Commits a new block of data to the end of the existing append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/append-block\n *\n * @param body - Data to be appended.\n * @param contentLength - Length of the body in bytes.\n * @param options - Options to the Append Block operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello World!\";\n *\n * // Create a new append blob and append data to the blob.\n * const newAppendBlobClient = containerClient.getAppendBlobClient(\"<blob name>\");\n * await newAppendBlobClient.create();\n * await newAppendBlobClient.appendBlock(content, content.length);\n *\n * // Append data to an existing append blob.\n * const existingAppendBlobClient = containerClient.getAppendBlobClient(\"<blob name>\");\n * await existingAppendBlobClient.appendBlock(content, content.length);\n * ```\n */\n public async appendBlock(\n body: HttpRequestBody,\n contentLength: number,\n options: AppendBlobAppendBlockOptions = {}\n ): Promise<AppendBlobAppendBlockResponse> {\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-appendBlock\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.appendBlock(contentLength, body, {\n abortSignal: options.abortSignal,\n appendPositionAccessConditions: options.conditions,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n requestOptions: {\n onUploadProgress: options.onProgress,\n },\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob\n * where the contents are read from a source url.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url\n *\n * @param sourceURL -\n * The url to the blob that will be the source of the copy. A source blob in the same storage account can\n * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob\n * must either be public or must be authenticated via a shared access signature. If the source blob is\n * public, no authentication is required to perform the operation.\n * @param sourceOffset - Offset in source to be appended\n * @param count - Number of bytes to be appended as a block\n * @param options -\n */\n public async appendBlockFromURL(\n sourceURL: string,\n sourceOffset: number,\n count: number,\n options: AppendBlobAppendBlockFromURLOptions = {}\n ): Promise<AppendBlobAppendBlockFromUrlResponse> {\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-appendBlockFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, {\n abortSignal: options.abortSignal,\n sourceRange: rangeToString({ offset: sourceOffset, count }),\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n leaseAccessConditions: options.conditions,\n appendPositionAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n },\n copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link BlockBlobClient.upload} operation.\n */\nexport interface BlockBlobUploadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when uploading to the block blob.\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when uploading to a block blob. A common header to set is\n * `blobContentType`, enabling the browser to provide functionality\n * based on file type.\n *\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when uploading to a block blob.\n */\n metadata?: Metadata;\n /**\n * Callback to receive events on the progress of upload operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: BlockBlobTier | string;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n /**\n * Blob tags.\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.syncUploadFromURL} operation.\n */\nexport interface BlockBlobSyncUploadFromURLOptions extends CommonOptions {\n /**\n * Server timeout in seconds.\n * For more information, @see https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\n */\n timeoutInSeconds?: number;\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: Metadata;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: BlockBlobTier | string;\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Blob tags.\n */\n tags?: Tags;\n /**\n * Optional, default is true. Indicates if properties from the source blob should be copied.\n */\n copySourceBlobProperties?: boolean;\n /**\n * HTTP headers to set when uploading to a block blob.\n *\n * A common header to set is `blobContentType`, enabling the browser to provide functionality\n * based on file type.\n *\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * Conditions to meet for the destination Azure Blob.\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Conditions to meet for the source Azure Blob.\n */\n sourceConditions?: ModifiedAccessConditions;\n /**\n * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.\n */\n sourceAuthorization?: HttpAuthorization;\n /**\n * Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by {@link tags}.\n */\n copySourceTags?: BlobCopySourceTags;\n}\n\n/**\n * Blob query error type.\n */\nexport interface BlobQueryError {\n /**\n * Whether error is fatal. Fatal error will stop query.\n */\n isFatal: boolean;\n /**\n * Error name.\n */\n name: string;\n /**\n * Position in bytes of the query.\n */\n position: number;\n /**\n * Error description.\n */\n description: string;\n}\n\n/**\n * Options to query blob with JSON format.\n */\nexport interface BlobQueryJsonTextConfiguration {\n /**\n * Record separator.\n */\n recordSeparator: string;\n /**\n * Query for a JSON format blob.\n */\n kind: \"json\";\n}\n\n/**\n * Options to query blob with CSV format.\n */\nexport interface BlobQueryCsvTextConfiguration {\n /**\n * Record separator.\n */\n recordSeparator: string;\n /**\n * Query for a CSV format blob.\n */\n kind: \"csv\";\n /**\n * Column separator. Default is \",\".\n */\n columnSeparator?: string;\n /**\n * Field quote.\n */\n fieldQuote?: string;\n /**\n * Escape character.\n */\n escapeCharacter?: string;\n /**\n * Has headers. Default is false.\n */\n hasHeaders?: boolean;\n}\n\n/**\n * Options to query blob with Apache Arrow format. Only valid for {@link BlockBlobQueryOptions.outputTextConfiguration}.\n */\nexport interface BlobQueryArrowConfiguration {\n /**\n * Kind.\n */\n kind: \"arrow\";\n\n /**\n * List of {@link BlobQueryArrowField} describing the schema of the data.\n */\n schema: BlobQueryArrowField[];\n}\n\n/**\n * Options to query blob with Parquet format. Only valid for {@link BlockBlobQueryOptions.inputTextConfiguration}.\n */\nexport interface BlobQueryParquetConfiguration {\n /**\n * Kind.\n */\n kind: \"parquet\";\n}\n\n/**\n * Options to configure {@link BlockBlobClient.query} operation.\n */\nexport interface BlockBlobQueryOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Configurations for the query input.\n */\n inputTextConfiguration?:\n | BlobQueryJsonTextConfiguration\n | BlobQueryCsvTextConfiguration\n | BlobQueryParquetConfiguration;\n /**\n * Configurations for the query output.\n */\n outputTextConfiguration?:\n | BlobQueryJsonTextConfiguration\n | BlobQueryCsvTextConfiguration\n | BlobQueryArrowConfiguration;\n /**\n * Callback to receive events on the progress of query operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Callback to receive error events during the query operaiton.\n */\n onError?: (error: BlobQueryError) => void;\n /**\n * Conditions to meet when uploading to the block blob.\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.stageBlock} operation.\n */\nexport interface BlockBlobStageBlockOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n */\n conditions?: LeaseAccessConditions;\n /**\n * Callback to receive events on the progress of stage block operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n */\n transactionalContentMD5?: Uint8Array;\n\n /**\n * A CRC64 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.stageBlockFromURL} operation.\n */\nexport interface BlockBlobStageBlockFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Specifies the bytes of the source Blob/File to upload.\n * If not specified, the entire content is uploaded as a single block.\n */\n range?: Range;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n */\n conditions?: LeaseAccessConditions;\n /**\n * An MD5 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.\n */\n sourceAuthorization?: HttpAuthorization;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.commitBlockList} operation.\n */\nexport interface BlockBlobCommitBlockListOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when committing the block list.\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when committing block list.\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when committing block list.\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: BlockBlobTier | string;\n\n /**\n * Blob tags.\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.getBlockList} operation.\n */\nexport interface BlockBlobGetBlockListOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n */\n conditions?: LeaseAccessConditions & TagConditions;\n}\n\n/**\n * Option interface for the {@link BlockBlobClient.uploadStream} operation.\n */\nexport interface BlockBlobUploadStreamOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Blob HTTP Headers.\n *\n * A common header to set is `blobContentType`, enabling the\n * browser to provide functionality based on file type.\n *\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n\n /**\n * Metadata of block blob.\n */\n metadata?: { [propertyName: string]: string };\n\n /**\n * Access conditions headers.\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Progress updater.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n\n /**\n * Blob tags.\n */\n tags?: Tags;\n\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: BlockBlobTier | string;\n}\n/**\n * Option interface for {@link BlockBlobClient.uploadFile} and {@link BlockBlobClient.uploadSeekableStream}.\n */\nexport interface BlockBlobParallelUploadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Destination block blob size in bytes.\n */\n blockSize?: number;\n\n /**\n * Blob size threshold in bytes to start concurrency uploading.\n * Default value is 256MB, blob size less than this option will\n * be uploaded via one I/O operation without concurrency.\n * You can customize a value less equal than the default value.\n */\n maxSingleShotSize?: number;\n\n /**\n * Progress updater.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Blob HTTP Headers. A common header to set is\n * `blobContentType`, enabling the browser to provide\n * functionality based on file type.\n *\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n\n /**\n * Metadata of block blob.\n */\n metadata?: { [propertyName: string]: string };\n\n /**\n * Access conditions headers.\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Concurrency of parallel uploading. Must be greater than or equal to 0.\n */\n concurrency?: number;\n\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n\n /**\n * Blob tags.\n */\n tags?: Tags;\n\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: BlockBlobTier | string;\n}\n\n/**\n * Response type for {@link BlockBlobClient.uploadFile}, {@link BlockBlobClient.uploadStream}, and\n * {@link BlockBlobClient.uploadBrowserDate}.\n */\nexport type BlobUploadCommonResponse = BlockBlobUploadHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse;\n};\n\n/**\n * BlockBlobClient defines a set of operations applicable to block blobs.\n */\nexport class BlockBlobClient extends BlobClient {\n /**\n * blobContext provided by protocol layer.\n *\n * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API\n * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient.\n */\n private _blobContext: StorageBlob;\n\n /**\n * blockBlobContext provided by protocol layer.\n */\n private blockBlobContext: BlockBlob;\n\n /**\n *\n * Creates an instance of BlockBlobClient.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `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`\n * @param containerName - Container name.\n * @param blobName - Blob name.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlockBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a block blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param url - A URL string pointing to Azure Storage block blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @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.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlockBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a block blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param url - A URL string pointing to Azure Storage block blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: PipelineLike);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | PipelineLike,\n blobNameOrOptions?: string | StoragePipelineOptions,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: PipelineLike;\n let url: string;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.blockBlobContext = new BlockBlob(this.storageClientContext);\n this._blobContext = new StorageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new BlockBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a URL to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n public withSnapshot(snapshot: string): BlockBlobClient {\n return new BlockBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Quick query for a JSON or CSV formatted blob.\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Query and convert a blob to a string\n * const queryBlockBlobResponse = await blockBlobClient.query(\"select * from BlobStorage\");\n * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString();\n * console.log(\"Query blob content:\", downloaded);\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * @param query -\n * @param options -\n */\n public async query(\n query: string,\n options: BlockBlobQueryOptions = {}\n ): Promise<BlobDownloadResponseModel> {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-query\", options);\n\n try {\n if (!isNode) {\n throw new Error(\"This operation currently is only supported in Node.js.\");\n }\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const response = await this._blobContext.query({\n abortSignal: options.abortSignal,\n queryRequest: {\n queryType: \"SQL\",\n expression: query,\n inputSerialization: toQuerySerialization(options.inputTextConfiguration),\n outputSerialization: toQuerySerialization(options.outputTextConfiguration),\n },\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n return new BlobQueryResponse(response, {\n abortSignal: options.abortSignal,\n onProgress: options.onProgress,\n onError: options.onError,\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link stageBlock} and {@link commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link uploadFile},\n * {@link uploadStream} or {@link uploadBrowserData} for better performance\n * with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param options - Options to the Block Blob Upload operation.\n * @returns Response data for the Block Blob Upload operation.\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n public async upload(\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobUploadOptions = {}\n ): Promise<BlockBlobUploadResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-upload\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.upload(contentLength, body, {\n abortSignal: options.abortSignal,\n blobHttpHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n requestOptions: {\n onUploadProgress: options.onProgress,\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,\n immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,\n legalHold: options.legalHold,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new Block Blob where the contents of the blob are read from a given URL.\n * This API is supported beginning with the 2020-04-08 version. Partial updates\n * are not supported with Put Blob from URL; the content of an existing blob is overwritten with\n * the content of the new blob. To perform partial updates to a block blob’s contents using a\n * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}.\n *\n * @param sourceURL - Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>\n * @param options - Optional parameters.\n */\n\n public async syncUploadFromURL(\n sourceURL: string,\n options: BlockBlobSyncUploadFromURLOptions = {}\n ): Promise<BlockBlobPutBlobFromUrlResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-syncUploadFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.putBlobFromUrl(0, sourceURL, {\n ...options,\n blobHttpHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions.tagConditions,\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions?.ifMatch,\n sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince,\n sourceIfTags: options.sourceConditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n copySourceTags: options.copySourceTags,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Uploads the specified block to the block blob's \"staging area\" to be later\n * committed by a call to commitBlockList.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block\n *\n * @param blockId - A 64-byte value that is base64-encoded\n * @param body - Data to upload to the staging area.\n * @param contentLength - Number of bytes to upload.\n * @param options - Options to the Block Blob Stage Block operation.\n * @returns Response data for the Block Blob Stage Block operation.\n */\n public async stageBlock(\n blockId: string,\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobStageBlockOptions = {}\n ): Promise<BlockBlobStageBlockResponse> {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-stageBlock\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlock(blockId, contentLength, body, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n requestOptions: {\n onUploadProgress: options.onProgress,\n },\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Stage Block From URL operation creates a new block to be committed as part\n * of a blob where the contents are read from a URL.\n * This API is available starting in version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url\n *\n * @param blockId - A 64-byte value that is base64-encoded\n * @param sourceURL - Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>\n * @param offset - From which position of the blob to download, greater than or equal to 0\n * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined\n * @param options - Options to the Block Blob Stage Block From URL operation.\n * @returns Response data for the Block Blob Stage Block From URL operation.\n */\n public async stageBlockFromURL(\n blockId: string,\n sourceURL: string,\n offset: number = 0,\n count?: number,\n options: BlockBlobStageBlockFromURLOptions = {}\n ): Promise<BlockBlobStageBlockFromURLResponse> {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-stageBlockFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }),\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Writes a blob by specifying the list of block IDs that make up the blob.\n * In order to be written as part of a blob, a block must have been successfully written\n * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to\n * update a blob by uploading only those blocks that have changed, then committing the new and existing\n * blocks together. Any blocks not specified in the block list and permanently deleted.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list\n *\n * @param blocks - Array of 64-byte value that is base64-encoded\n * @param options - Options to the Block Blob Commit Block List operation.\n * @returns Response data for the Block Blob Commit Block List operation.\n */\n public async commitBlockList(\n blocks: string[],\n options: BlockBlobCommitBlockListOptions = {}\n ): Promise<BlockBlobCommitBlockListResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-commitBlockList\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.commitBlockList(\n { latest: blocks },\n {\n abortSignal: options.abortSignal,\n blobHttpHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,\n immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,\n legalHold: options.legalHold,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n }\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the list of blocks that have been uploaded as part of a block blob\n * using the specified block list filter.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list\n *\n * @param listType - Specifies whether to return the list of committed blocks,\n * the list of uncommitted blocks, or both lists together.\n * @param options - Options to the Block Blob Get Block List operation.\n * @returns Response data for the Block Blob Get Block List operation.\n */\n public async getBlockList(\n listType: BlockListType,\n options: BlockBlobGetBlockListOptions = {}\n ): Promise<BlockBlobGetBlockListResponse> {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-getBlockList\", options);\n try {\n const res = await this.blockBlobContext.getBlockList(listType, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n\n if (!res.committedBlocks) {\n res.committedBlocks = [];\n }\n\n if (!res.uncommittedBlocks) {\n res.uncommittedBlocks = [];\n }\n\n return res;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n // High level functions\n\n /**\n * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.\n *\n * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is\n * `blobContentType`, enabling the browser to provide\n * functionality based on file type.\n *\n * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView\n * @param options -\n */\n public async uploadData(\n data: Buffer | Blob | ArrayBuffer | ArrayBufferView,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise<BlobUploadCommonResponse> {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadData\", options);\n try {\n if (isNode) {\n let buffer: Buffer;\n if (data instanceof Buffer) {\n buffer = data;\n } else if (data instanceof ArrayBuffer) {\n buffer = Buffer.from(data);\n } else {\n data = data as ArrayBufferView;\n buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n }\n\n return this.uploadSeekableInternal(\n (offset: number, size: number): Buffer => buffer.slice(offset, offset + size),\n buffer.byteLength,\n updatedOptions\n );\n } else {\n const browserBlob = new Blob([data]);\n return this.uploadSeekableInternal(\n (offset: number, size: number): Blob => browserBlob.slice(offset, offset + size),\n browserBlob.size,\n updatedOptions\n );\n }\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN BROWSERS.\n *\n * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.\n *\n * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call\n * {@link commitBlockList} to commit the block list.\n *\n * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is\n * `blobContentType`, enabling the browser to provide\n * functionality based on file type.\n *\n * @deprecated Use {@link uploadData} instead.\n *\n * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView\n * @param options - Options to upload browser data.\n * @returns Response data for the Blob Upload operation.\n */\n public async uploadBrowserData(\n browserData: Blob | ArrayBuffer | ArrayBufferView,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise<BlobUploadCommonResponse> {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadBrowserData\", options);\n try {\n const browserBlob = new Blob([browserData]);\n return await this.uploadSeekableInternal(\n (offset: number, size: number): Blob => browserBlob.slice(offset, offset + size),\n browserBlob.size,\n updatedOptions\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n *\n * Uploads data to block blob. Requires a bodyFactory as the data source,\n * which need to return a {@link HttpRequestBody} object with the offset and size provided.\n *\n * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * @param bodyFactory -\n * @param size - size of the data to upload.\n * @param options - Options to Upload to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n private async uploadSeekableInternal(\n bodyFactory: (offset: number, size: number) => HttpRequestBody,\n size: number,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise<BlobUploadCommonResponse> {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {\n throw new RangeError(\n `blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`\n );\n }\n\n if (options.maxSingleShotSize !== 0 && !options.maxSingleShotSize) {\n options.maxSingleShotSize = BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;\n }\n if (\n options.maxSingleShotSize < 0 ||\n options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES\n ) {\n throw new RangeError(\n `maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`\n );\n }\n\n if (options.blockSize === 0) {\n if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(`${size} is too larger to upload to a block blob.`);\n }\n if (size > options.maxSingleShotSize) {\n options.blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);\n if (options.blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n }\n }\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadSeekableInternal\", options);\n\n try {\n if (size <= options.maxSingleShotSize) {\n return await this.upload(bodyFactory(0, size), size, updatedOptions);\n }\n\n const numBlocks: number = Math.floor((size - 1) / options.blockSize) + 1;\n if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(\n `The buffer's size is too big or the BlockSize is too small;` +\n `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`\n );\n }\n\n const blockList: string[] = [];\n const blockIDPrefix = generateUuid();\n let transferProgress: number = 0;\n\n const batch = new Batch(options.concurrency);\n for (let i = 0; i < numBlocks; i++) {\n batch.addOperation(async (): Promise<any> => {\n const blockID = generateBlockID(blockIDPrefix, i);\n const start = options.blockSize! * i;\n const end = i === numBlocks - 1 ? size : start + options.blockSize!;\n const contentLength = end - start;\n blockList.push(blockID);\n await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n // Update progress after block is successfully uploaded to server, in case of block trying\n // TODO: Hook with convenience layer progress event in finer level\n transferProgress += contentLength;\n if (options.onProgress) {\n options.onProgress!({\n loadedBytes: transferProgress,\n });\n }\n });\n }\n await batch.do();\n\n return this.commitBlockList(blockList, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a local file in blocks to a block blob.\n *\n * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList\n * to commit the block list.\n *\n * @param filePath - Full path of local file\n * @param options - Options to Upload to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n public async uploadFile(\n filePath: string,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise<BlobUploadCommonResponse> {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadFile\", options);\n try {\n const size = (await fsStat(filePath)).size;\n return await this.uploadSeekableInternal(\n (offset, count) => {\n return () =>\n fsCreateReadStream(filePath, {\n autoClose: true,\n end: count ? offset + count - 1 : Infinity,\n start: offset,\n });\n },\n size,\n {\n ...options,\n tracingOptions: {\n ...options!.tracingOptions,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n },\n }\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a Node.js Readable stream into block blob.\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * * Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n *\n * @param stream - Node.js Readable stream\n * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB\n * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated,\n * positive correlation with max uploading concurrency. Default value is 5\n * @param options - Options to Upload Stream to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n public async uploadStream(\n stream: Readable,\n bufferSize: number = DEFAULT_BLOCK_BUFFER_SIZE_BYTES,\n maxConcurrency: number = 5,\n options: BlockBlobUploadStreamOptions = {}\n ): Promise<BlobUploadCommonResponse> {\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadStream\", options);\n\n try {\n let blockNum = 0;\n const blockIDPrefix = generateUuid();\n let transferProgress: number = 0;\n const blockList: string[] = [];\n\n const scheduler = new BufferScheduler(\n stream,\n bufferSize,\n maxConcurrency,\n async (body, length) => {\n const blockID = generateBlockID(blockIDPrefix, blockNum);\n blockList.push(blockID);\n blockNum++;\n\n await this.stageBlock(blockID, body, length, {\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Update progress after block is successfully uploaded to server, in case of block trying\n transferProgress += length;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n },\n // concurrency should set a smaller value than maxConcurrency, which is helpful to\n // reduce the possibility when a outgoing handler waits for stream data, in\n // this situation, outgoing handlers are blocked.\n // Outgoing queue shouldn't be empty.\n Math.ceil((maxConcurrency / 4) * 3)\n );\n await scheduler.do();\n\n return await this.commitBlockList(blockList, {\n ...options,\n tracingOptions: {\n ...options!.tracingOptions,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n },\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure the {@link PageBlobClient.create} operation.\n */\nexport interface PageBlobCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when creating a page blob.\n */\n conditions?: BlobRequestConditions;\n /**\n * A user-controlled value that can be used to track requests.\n * The value must be between 0 and 2^63 - 1. The default value is 0.\n */\n blobSequenceNumber?: number;\n /**\n * HTTP headers to set when creating a page blob.\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: PremiumPageBlobTier | string;\n /**\n * Blob tags.\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.createIfNotExists} operation.\n */\nexport interface PageBlobCreateIfNotExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * A user-controlled value that can be used to track requests.\n * The value must be between 0 and 2^63 - 1. The default value is 0.\n */\n blobSequenceNumber?: number;\n /**\n * HTTP headers to set when creating a page blob.\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Optional. Specifies immutability policy for a blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n immutabilityPolicy?: BlobImmutabilityPolicy;\n /**\n * Optional. Indicates if a legal hold should be placed on the blob.\n * Note that is parameter is only applicable to a blob within a container that\n * has version level worm enabled.\n */\n legalHold?: boolean;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n */\n tier?: PremiumPageBlobTier | string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.uploadPages} operation.\n */\nexport interface PageBlobUploadPagesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when uploading pages.\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Callback to receive events on the progress of upload pages operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the content. This hash is used to verify the integrity of the content during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content. This hash is used to verify the integrity of the content during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.clearPages} operation.\n */\nexport interface PageBlobClearPagesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when clearing pages.\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.getPageRanges} operation.\n */\nexport interface PageBlobGetPageRangesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges.\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure page blob - get page ranges segment operations.\n *\n * See:\n * - {@link PageBlobClient.listPageRangesSegment}\n * - {@link PageBlobClient.listPageRangeItemSegments}\n * - {@link PageBlobClient.listPageRangeItems}\n */\ninterface PageBlobListPageRangesSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges.\n */\n conditions?: BlobRequestConditions;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.listPageRanges} operation.\n */\nexport interface PageBlobListPageRangesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges.\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.getRangesDiff} operation.\n */\nexport interface PageBlobGetPageRangesDiffOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges diff.\n */\n conditions?: BlobRequestConditions;\n /**\n * (unused)\n */\n range?: string;\n}\n\n/**\n * Options to configure page blob - get page ranges diff segment operations.\n *\n * See:\n * - {@link PageBlobClient.listPageRangesDiffSegment}\n * - {@link PageBlobClient.listPageRangeDiffItemSegments}\n * - {@link PageBlobClient.listPageRangeDiffItems}\n */\ninterface PageBlobListPageRangesDiffSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges.\n */\n conditions?: BlobRequestConditions;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.listPageRangesDiff} operation.\n */\nexport interface PageBlobListPageRangesDiffOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges diff.\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure {@link PageBlobClient.resize} operation.\n */\nexport interface PageBlobResizeOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when resizing a page blob.\n */\n conditions?: BlobRequestConditions;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link PageBlobClient.updateSequenceNumber} operation.\n */\nexport interface PageBlobUpdateSequenceNumberOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when updating sequence number.\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure {@link PageBlobClient.startCopyIncremental} operation.\n */\nexport interface PageBlobStartCopyIncrementalOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when starting a copy incremental operation.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure {@link PageBlobClient.uploadPagesFromURL} operation.\n */\nexport interface PageBlobUploadPagesFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when updating sequence number.\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * An MD5 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.\n */\n sourceAuthorization?: HttpAuthorization;\n}\n\n/**\n * Contains response data for the {@link PageBlobClient.createIfNotExists} operation.\n */\nexport interface PageBlobCreateIfNotExistsResponse extends PageBlobCreateResponse {\n /**\n * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.\n */\n succeeded: boolean;\n}\n\n/**\n * PageBlobClient defines a set of operations applicable to page blobs.\n */\nexport class PageBlobClient extends BlobClient {\n /**\n * pageBlobsContext provided by protocol layer.\n */\n private pageBlobContext: PageBlob;\n\n /**\n *\n * Creates an instance of PageBlobClient.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `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`\n * @param containerName - Container name.\n * @param blobName - Blob name.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of PageBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param url - A Client string pointing to Azure Storage page blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString\".\n * @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.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of PageBlobClient.\n *\n * @param url - A URL string pointing to Azure Storage page blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob\".\n * You can append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: PipelineLike);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | PipelineLike,\n blobNameOrOptions?: string | StoragePipelineOptions,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: PipelineLike;\n let url: string;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.pageBlobContext = new PageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new PageBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n public withSnapshot(snapshot: string): PageBlobClient {\n return new PageBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param size - size of the page blob.\n * @param options - Options to the Page Blob Create operation.\n * @returns Response data for the Page Blob Create operation.\n */\n public async create(\n size: number,\n options: PageBlobCreateOptions = {}\n ): Promise<PageBlobCreateResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-create\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.create(0, size, {\n abortSignal: options.abortSignal,\n blobHttpHeaders: options.blobHTTPHeaders,\n blobSequenceNumber: options.blobSequenceNumber,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,\n immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,\n legalHold: options.legalHold,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob. If the blob with the same name already exists, the content\n * of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param size - size of the page blob.\n * @param options -\n */\n public async createIfNotExists(\n size: number,\n options: PageBlobCreateIfNotExistsOptions = {}\n ): Promise<PageBlobCreateIfNotExistsResponse> {\n const { span, updatedOptions } = createSpan(\"PageBlobClient-createIfNotExists\", options);\n try {\n const conditions = { ifNoneMatch: ETagAny };\n const res = await this.create(size, {\n ...options,\n conditions,\n tracingOptions: updatedOptions.tracingOptions,\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response, // _response is made non-enumerable\n };\n } catch (e: any) {\n if (e.details?.errorCode === \"BlobAlreadyExists\") {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"Expected exception when creating a blob only if it does not already exist.\",\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param body - Data to upload\n * @param offset - Offset of destination page blob\n * @param count - Content length of the body, also number of bytes to be uploaded\n * @param options - Options to the Page Blob Upload Pages operation.\n * @returns Response data for the Page Blob Upload Pages operation.\n */\n public async uploadPages(\n body: HttpRequestBody,\n offset: number,\n count: number,\n options: PageBlobUploadPagesOptions = {}\n ): Promise<PageBlobUploadPagesResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-uploadPages\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPages(count, body, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n requestOptions: {\n onUploadProgress: options.onProgress,\n },\n range: rangeToString({ offset, count }),\n sequenceNumberAccessConditions: options.conditions,\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the\n * contents are read from a URL.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url\n *\n * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication\n * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob\n * @param destOffset - Offset of destination page blob\n * @param count - Number of bytes to be uploaded from source page blob\n * @param options -\n */\n public async uploadPagesFromURL(\n sourceURL: string,\n sourceOffset: number,\n destOffset: number,\n count: number,\n options: PageBlobUploadPagesFromURLOptions = {}\n ): Promise<PageBlobUploadPagesFromURLResponse> {\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-uploadPagesFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPagesFromURL(\n sourceURL,\n rangeToString({ offset: sourceOffset, count }),\n 0,\n rangeToString({ offset: destOffset, count }),\n {\n abortSignal: options.abortSignal,\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n leaseAccessConditions: options.conditions,\n sequenceNumberAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n }\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Frees the specified pages from the page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param offset - Starting byte position of the pages to clear.\n * @param count - Number of bytes to clear.\n * @param options - Options to the Page Blob Clear Pages operation.\n * @returns Response data for the Page Blob Clear Pages operation.\n */\n public async clearPages(\n offset: number = 0,\n count?: number,\n options: PageBlobClearPagesOptions = {}\n ): Promise<PageBlobClearPagesResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-clearPages\", options);\n try {\n return await this.pageBlobContext.clearPages(0, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n range: rangeToString({ offset, count }),\n sequenceNumberAccessConditions: options.conditions,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the list of valid page ranges for a page blob or snapshot of a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns Response data for the Page Blob Get Ranges operation.\n */\n public async getPageRanges(\n offset: number = 0,\n count?: number,\n options: PageBlobGetPageRangesOptions = {}\n ): Promise<PageBlobGetPageRangesResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRanges\", options);\n try {\n return await this.pageBlobContext\n .getPageRanges({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n range: rangeToString({ offset, count }),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n })\n .then(rangeResponseFromModel);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * getPageRangesSegment returns a single segment of page ranges starting from the\n * specified Marker. Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call getPageRangesSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.\n * @param options - Options to PageBlob Get Page Ranges Segment operation.\n */\n private async listPageRangesSegment(\n offset: number = 0,\n count?: number,\n marker?: string,\n options: PageBlobListPageRangesSegmentOptions = {}\n ): Promise<PageBlobGetPageRangesResponseModel> {\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesSegment\", options);\n try {\n return await this.pageBlobContext.getPageRanges({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n range: rangeToString({ offset, count }),\n marker: marker,\n maxPageSize: options.maxPageSize,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel}\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param marker - A string value that identifies the portion of\n * the get of page ranges to be returned with the next getting operation. The\n * operation returns the ContinuationToken value within the response body if the\n * getting operation did not return all page ranges remaining within the current page.\n * The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of get\n * items. The marker value is opaque to the client.\n * @param options - Options to List Page Ranges operation.\n */\n private async *listPageRangeItemSegments(\n offset: number = 0,\n count?: number,\n marker?: string,\n options: PageBlobListPageRangesSegmentOptions = {}\n ): AsyncIterableIterator<PageBlobGetPageRangesResponseModel> {\n let getPageRangeItemSegmentsResponse;\n if (!!marker || marker === undefined) {\n do {\n getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(\n offset,\n count,\n marker,\n options\n );\n marker = getPageRangeItemSegmentsResponse.continuationToken;\n yield await getPageRangeItemSegmentsResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to List Page Ranges operation.\n */\n private async *listPageRangeItems(\n offset: number = 0,\n count?: number,\n options: PageBlobListPageRangesSegmentOptions = {}\n ): AsyncIterableIterator<PageRangeInfo> {\n let marker: string | undefined;\n for await (const getPageRangesSegment of this.listPageRangeItemSegments(\n offset,\n count,\n marker,\n options\n )) {\n yield* ExtractPageRangeInfoItems(getPageRangesSegment);\n }\n }\n\n /**\n * Returns an async iterable iterator to list of page ranges for a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * .byPage() returns an async iterable iterator to list of page ranges for a page blob.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the pageBlobClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"<your-container-name>\").getPageBlobClient(\"<your-blob-name>\");`\n * let i = 1;\n * for await (const pageRange of pageBlobClient.listPageRanges()) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = pageBlobClient.listPageRanges();\n * let pageRangeItem = await iter.next();\n * while (!pageRangeItem.done) {\n * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);\n * pageRangeItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) {\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 page ranges\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 page ranges\n * for (const blob of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n public listPageRanges(\n offset: number = 0,\n count?: number,\n options: PageBlobListPageRangesOptions = {}\n ): PagedAsyncIterableIterator<PageRangeInfo, PageBlobGetPageRangesResponseModel> {\n options.conditions = options.conditions || {};\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listPageRangeItems(offset, count, options);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listPageRangeItemSegments(offset, count, settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page blob\n * @param count - Number of bytes to get ranges diff.\n * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n * @returns Response data for the Page Blob Get Page Range Diff operation.\n */\n public async getPageRangesDiff(\n offset: number,\n count: number,\n prevSnapshot: string,\n options: PageBlobGetPageRangesDiffOptions = {}\n ): Promise<PageBlobGetPageRangesDiffResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesDiff\", options);\n\n try {\n return await this.pageBlobContext\n .getPageRangesDiff({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n prevsnapshot: prevSnapshot,\n range: rangeToString({ offset, count }),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n })\n .then(rangeResponseFromModel);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * getPageRangesDiffSegment returns a single segment of page ranges starting from the\n * specified Marker for difference between previous snapshot and the target page blob.\n * Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call getPageRangesDiffSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param marker - A string value that identifies the portion of the get to be returned with the next get operation.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n private async listPageRangesDiffSegment(\n offset: number,\n count: number,\n prevSnapshotOrUrl: string,\n marker?: string,\n options?: PageBlobListPageRangesDiffSegmentOptions\n ): Promise<PageBlobGetPageRangesResponseModel> {\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesDiffSegment\", options);\n try {\n return await this.pageBlobContext.getPageRangesDiff({\n abortSignal: options?.abortSignal,\n leaseAccessConditions: options?.conditions,\n modifiedAccessConditions: {\n ...options?.conditions,\n ifTags: options?.conditions?.tagConditions,\n },\n prevsnapshot: prevSnapshotOrUrl,\n range: rangeToString({\n offset: offset,\n count: count,\n }),\n marker: marker,\n maxPageSize: options?.maxPageSize,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel}\n *\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param marker - A string value that identifies the portion of\n * the get of page ranges to be returned with the next getting operation. The\n * operation returns the ContinuationToken value within the response body if the\n * getting operation did not return all page ranges remaining within the current page.\n * The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of get\n * items. The marker value is opaque to the client.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n private async *listPageRangeDiffItemSegments(\n offset: number,\n count: number,\n prevSnapshotOrUrl: string,\n marker?: string,\n options?: PageBlobListPageRangesDiffSegmentOptions\n ): AsyncIterableIterator<PageBlobGetPageRangesDiffResponseModel> {\n let getPageRangeItemSegmentsResponse;\n if (!!marker || marker === undefined) {\n do {\n getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(\n offset,\n count,\n prevSnapshotOrUrl,\n marker,\n options\n );\n marker = getPageRangeItemSegmentsResponse.continuationToken;\n yield await getPageRangeItemSegmentsResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n private async *listPageRangeDiffItems(\n offset: number,\n count: number,\n prevSnapshotOrUrl: string,\n options?: PageBlobListPageRangesDiffSegmentOptions\n ): AsyncIterableIterator<PageRangeInfo> {\n let marker: string | undefined;\n for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(\n offset,\n count,\n prevSnapshotOrUrl,\n marker,\n options\n )) {\n yield* ExtractPageRangeInfoItems(getPageRangesSegment);\n }\n }\n\n /**\n * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the pageBlobClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"<your-container-name>\").getPageBlobClient(\"<your-blob-name>\");`\n * let i = 1;\n * for await (const pageRange of pageBlobClient.listPageRangesDiff()) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = pageBlobClient.listPageRangesDiff();\n * let pageRangeItem = await iter.next();\n * while (!pageRangeItem.done) {\n * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);\n * pageRangeItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) {\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 page ranges\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 page ranges\n * for (const blob of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n public listPageRangesDiff(\n offset: number,\n count: number,\n prevSnapshot: string,\n options: PageBlobListPageRangesDiffOptions = {}\n ): PagedAsyncIterableIterator<PageRangeInfo, PageBlobGetPageRangesDiffResponseModel> {\n options.conditions = options.conditions || {};\n\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, {\n ...options,\n });\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listPageRangeDiffItemSegments(\n offset,\n count,\n prevSnapshot,\n settings.continuationToken,\n {\n maxPageSize: settings.maxPageSize,\n ...options,\n }\n );\n },\n };\n }\n\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page blob\n * @param count - Number of bytes to get ranges diff.\n * @param prevSnapshotUrl - URL of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n * @returns Response data for the Page Blob Get Page Range Diff operation.\n */\n public async getPageRangesDiffForManagedDisks(\n offset: number,\n count: number,\n prevSnapshotUrl: string,\n options: PageBlobGetPageRangesDiffOptions = {}\n ): Promise<PageBlobGetPageRangesDiffResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\n \"PageBlobClient-GetPageRangesDiffForManagedDisks\",\n options\n );\n\n try {\n return await this.pageBlobContext\n .getPageRangesDiff({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n prevSnapshotUrl,\n range: rangeToString({ offset, count }),\n ...convertTracingToRequestOptionsBase(updatedOptions),\n })\n .then(rangeResponseFromModel);\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Resizes the page blob to the specified size (which must be a multiple of 512).\n * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties\n *\n * @param size - Target size\n * @param options - Options to the Page Blob Resize operation.\n * @returns Response data for the Page Blob Resize operation.\n */\n public async resize(\n size: number,\n options: PageBlobResizeOptions = {}\n ): Promise<PageBlobResizeResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-resize\", options);\n try {\n return await this.pageBlobContext.resize(size, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n encryptionScope: options.encryptionScope,\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets a page blob's sequence number.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number.\n * @param sequenceNumber - Required if sequenceNumberAction is max or update\n * @param options - Options to the Page Blob Update Sequence Number operation.\n * @returns Response data for the Page Blob Update Sequence Number operation.\n */\n public async updateSequenceNumber(\n sequenceNumberAction: SequenceNumberActionType,\n sequenceNumber?: number,\n options: PageBlobUpdateSequenceNumberOptions = {}\n ): Promise<PageBlobUpdateSequenceNumberResponse> {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-updateSequenceNumber\", options);\n try {\n return await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, {\n abortSignal: options.abortSignal,\n blobSequenceNumber: sequenceNumber,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.\n * The snapshot is copied such that only the differential changes between the previously\n * copied snapshot are transferred to the destination.\n * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.\n * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob\n * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots\n *\n * @param copySource - Specifies the name of the source page blob snapshot. For example,\n * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>\n * @param options - Options to the Page Blob Copy Incremental operation.\n * @returns Response data for the Page Blob Copy Incremental operation.\n */\n public async startCopyIncremental(\n copySource: string,\n options: PageBlobStartCopyIncrementalOptions = {}\n ): Promise<PageBlobCopyIncrementalResponse> {\n const { span, updatedOptions } = createSpan(\"PageBlobClient-startCopyIncremental\", options);\n try {\n return await this.pageBlobContext.copyIncremental(copySource, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n ...convertTracingToRequestOptionsBase(updatedOptions),\n });\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n"]}
\No newline at end of file