@azure/storage-blob 12.13.0 → 12.20.0-alpha.20230306.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13103 -13682
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js +3 -2
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +74 -87
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +10 -23
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -9
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +54 -83
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +67 -165
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +651 -889
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +115 -238
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js +194 -40
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageClient.js +4 -17
- package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/index.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/index.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/index.js +248 -1
- package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js +13 -18
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +5 -5
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js +11 -27
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js +28 -110
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js +16 -43
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/container.js +22 -86
- package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js +16 -54
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/service.js +12 -42
- package/dist-esm/storage-blob/src/generated/src/operations/service.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js +14 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +32 -10
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generatedModels.js +1 -5
- package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-blob/src/index.browser.js +3 -2
- package/dist-esm/storage-blob/src/index.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/index.js +3 -2
- package/dist-esm/storage-blob/src/index.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/PathParameterWorkaroundPolicy.js +25 -0
- package/dist-esm/storage-blob/src/policies/PathParameterWorkaroundPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js +40 -0
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +2 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +165 -0
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +18 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +131 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +1 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +10 -2
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/cache.js +5 -2
- package/dist-esm/storage-blob/src/utils/cache.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/tracing.js +5 -18
- package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +84 -44
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
- package/package.json +22 -17
- package/types/3.1/storage-blob.d.ts +2310 -609
- package/types/latest/storage-blob.d.ts +2550 -670
- package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js +0 -50
- package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/storageClientContext.js +0 -39
- package/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js +0 -245
- package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js +0 -36
- package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js.map +0 -1
@@ -1,11 +1,12 @@
|
|
1
1
|
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { getDefaultProxySettings, } from "@azure/core-rest-pipeline";
|
3
|
+
import { isTokenCredential } from "@azure/core-auth";
|
4
|
+
import { isNode } from "@azure/core-util";
|
5
|
+
import { v4 as generateUuid } from "uuid";
|
4
6
|
import { BlobDownloadResponse } from "./BlobDownloadResponse";
|
5
7
|
import { BlobQueryResponse } from "./BlobQueryResponse";
|
6
8
|
import { AnonymousCredential } from "./credentials/AnonymousCredential";
|
7
9
|
import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential";
|
8
|
-
import { AppendBlob, Blob as StorageBlob, BlockBlob, PageBlob } from "./generated/src/operations";
|
9
10
|
import { ensureCpkIfSpecified, toAccessTier, } from "./models";
|
10
11
|
import { rangeResponseFromModel, } from "./PageBlobRangeResponse";
|
11
12
|
import { newPipeline, isPipelineLike } from "./Pipeline";
|
@@ -15,8 +16,8 @@ import { StorageClient } from "./StorageClient";
|
|
15
16
|
import { Batch } from "./utils/Batch";
|
16
17
|
import { BufferScheduler } from "../../storage-common/src";
|
17
18
|
import { BlobDoesNotUseCustomerSpecifiedEncryption, BlobUsesCustomerSpecifiedEncryptionMsg, BLOCK_BLOB_MAX_BLOCKS, BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES, DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES, DEFAULT_BLOCK_BUFFER_SIZE_BYTES, DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, ETagAny, URLConstants, } from "./utils/constants";
|
18
|
-
import {
|
19
|
-
import { appendToURLPath, appendToURLQuery, extractConnectionStringParts, ExtractPageRangeInfoItems, generateBlockID, getURLParameter, httpAuthorizationToString, isIpEndpointStyle, parseObjectReplicationRecord, setURLParameter, toBlobTags, toBlobTagsString, toQuerySerialization, toTags, } from "./utils/utils.common";
|
19
|
+
import { tracingClient } from "./utils/tracing";
|
20
|
+
import { appendToURLPath, appendToURLQuery, assertResponse, extractConnectionStringParts, ExtractPageRangeInfoItems, generateBlockID, getURLParameter, httpAuthorizationToString, isIpEndpointStyle, parseObjectReplicationRecord, setURLParameter, toBlobTags, toBlobTagsString, toQuerySerialization, toTags, } from "./utils/utils.common";
|
20
21
|
import { fsCreateReadStream, fsStat, readStreamToLocalFile, streamToBuffer, } from "./utils/utils.node";
|
21
22
|
import { generateBlobSASQueryParameters } from "./sas/BlobSASSignatureValues";
|
22
23
|
import { BlobLeaseClient } from "./BlobLeaseClient";
|
@@ -90,7 +91,7 @@ export class BlobClient extends StorageClient {
|
|
90
91
|
super(url, pipeline);
|
91
92
|
({ blobName: this._name, containerName: this._containerName } =
|
92
93
|
this.getBlobAndContainerNamesFromUrl());
|
93
|
-
this.blobContext =
|
94
|
+
this.blobContext = this.storageClientContext.blob;
|
94
95
|
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
95
96
|
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
96
97
|
}
|
@@ -207,15 +208,25 @@ export class BlobClient extends StorageClient {
|
|
207
208
|
* ```
|
208
209
|
*/
|
209
210
|
async download(offset = 0, count, options = {}) {
|
210
|
-
var _a;
|
211
211
|
options.conditions = options.conditions || {};
|
212
212
|
options.conditions = options.conditions || {};
|
213
213
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
214
|
-
|
215
|
-
|
216
|
-
const res = await this.blobContext.download(
|
214
|
+
return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => {
|
215
|
+
var _a;
|
216
|
+
const res = assertResponse(await this.blobContext.download({
|
217
|
+
abortSignal: options.abortSignal,
|
218
|
+
leaseAccessConditions: options.conditions,
|
219
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
220
|
+
requestOptions: {
|
217
221
|
onDownloadProgress: isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
|
218
|
-
},
|
222
|
+
},
|
223
|
+
range: offset === 0 && !count ? undefined : rangeToString({ offset, count }),
|
224
|
+
rangeGetContentMD5: options.rangeGetContentMD5,
|
225
|
+
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
226
|
+
snapshot: options.snapshot,
|
227
|
+
cpkInfo: options.customerProvidedKey,
|
228
|
+
tracingOptions: updatedOptions.tracingOptions,
|
229
|
+
}));
|
219
230
|
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
|
220
231
|
// Return browser response immediately
|
221
232
|
if (!isNode) {
|
@@ -267,17 +278,7 @@ export class BlobClient extends StorageClient {
|
|
267
278
|
maxRetryRequests: options.maxRetryRequests,
|
268
279
|
onProgress: options.onProgress,
|
269
280
|
});
|
270
|
-
}
|
271
|
-
catch (e) {
|
272
|
-
span.setStatus({
|
273
|
-
code: SpanStatusCode.ERROR,
|
274
|
-
message: e.message,
|
275
|
-
});
|
276
|
-
throw e;
|
277
|
-
}
|
278
|
-
finally {
|
279
|
-
span.end();
|
280
|
-
}
|
281
|
+
});
|
281
282
|
}
|
282
283
|
/**
|
283
284
|
* Returns true if the Azure blob resource represented by this client exists; false otherwise.
|
@@ -289,37 +290,31 @@ export class BlobClient extends StorageClient {
|
|
289
290
|
* @param options - options to Exists operation.
|
290
291
|
*/
|
291
292
|
async exists(options = {}) {
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
return true;
|
302
|
-
}
|
303
|
-
catch (e) {
|
304
|
-
if (e.statusCode === 404) {
|
305
|
-
// Expected exception when checking blob existence
|
306
|
-
return false;
|
307
|
-
}
|
308
|
-
else if (e.statusCode === 409 &&
|
309
|
-
(e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg ||
|
310
|
-
e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) {
|
311
|
-
// Expected exception when checking blob existence
|
293
|
+
return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => {
|
294
|
+
try {
|
295
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
296
|
+
await this.getProperties({
|
297
|
+
abortSignal: options.abortSignal,
|
298
|
+
customerProvidedKey: options.customerProvidedKey,
|
299
|
+
conditions: options.conditions,
|
300
|
+
tracingOptions: updatedOptions.tracingOptions,
|
301
|
+
});
|
312
302
|
return true;
|
313
303
|
}
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
304
|
+
catch (e) {
|
305
|
+
if (e.statusCode === 404) {
|
306
|
+
// Expected exception when checking blob existence
|
307
|
+
return false;
|
308
|
+
}
|
309
|
+
else if (e.statusCode === 409 &&
|
310
|
+
(e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg ||
|
311
|
+
e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) {
|
312
|
+
// Expected exception when checking blob existence
|
313
|
+
return true;
|
314
|
+
}
|
315
|
+
throw e;
|
316
|
+
}
|
317
|
+
});
|
323
318
|
}
|
324
319
|
/**
|
325
320
|
* Returns all user-defined metadata, standard HTTP properties, and system properties
|
@@ -334,24 +329,19 @@ export class BlobClient extends StorageClient {
|
|
334
329
|
* @param options - Optional options to Get Properties operation.
|
335
330
|
*/
|
336
331
|
async getProperties(options = {}) {
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
332
|
+
options.conditions = options.conditions || {};
|
333
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
334
|
+
return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => {
|
335
|
+
var _a;
|
336
|
+
const res = assertResponse(await this.blobContext.getProperties({
|
337
|
+
abortSignal: options.abortSignal,
|
338
|
+
leaseAccessConditions: options.conditions,
|
339
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
340
|
+
cpkInfo: options.customerProvidedKey,
|
341
|
+
tracingOptions: updatedOptions.tracingOptions,
|
342
|
+
}));
|
343
343
|
return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
|
344
|
-
}
|
345
|
-
catch (e) {
|
346
|
-
span.setStatus({
|
347
|
-
code: SpanStatusCode.ERROR,
|
348
|
-
message: e.message,
|
349
|
-
});
|
350
|
-
throw e;
|
351
|
-
}
|
352
|
-
finally {
|
353
|
-
span.end();
|
354
|
-
}
|
344
|
+
});
|
355
345
|
}
|
356
346
|
/**
|
357
347
|
* Marks the specified blob or snapshot for deletion. The blob is later deleted
|
@@ -363,22 +353,17 @@ export class BlobClient extends StorageClient {
|
|
363
353
|
* @param options - Optional options to Blob Delete operation.
|
364
354
|
*/
|
365
355
|
async delete(options = {}) {
|
366
|
-
var _a;
|
367
|
-
const { span, updatedOptions } = createSpan("BlobClient-delete", options);
|
368
356
|
options.conditions = options.conditions || {};
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
}
|
379
|
-
finally {
|
380
|
-
span.end();
|
381
|
-
}
|
357
|
+
return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => {
|
358
|
+
var _a;
|
359
|
+
return assertResponse(await this.blobContext.delete({
|
360
|
+
abortSignal: options.abortSignal,
|
361
|
+
deleteSnapshots: options.deleteSnapshots,
|
362
|
+
leaseAccessConditions: options.conditions,
|
363
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
364
|
+
tracingOptions: updatedOptions.tracingOptions,
|
365
|
+
}));
|
366
|
+
});
|
382
367
|
}
|
383
368
|
/**
|
384
369
|
* Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted
|
@@ -390,29 +375,19 @@ export class BlobClient extends StorageClient {
|
|
390
375
|
* @param options - Optional options to Blob Delete operation.
|
391
376
|
*/
|
392
377
|
async deleteIfExists(options = {}) {
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
}
|
399
|
-
catch (e) {
|
400
|
-
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
401
|
-
span.setStatus({
|
402
|
-
code: SpanStatusCode.ERROR,
|
403
|
-
message: "Expected exception when deleting a blob or snapshot only if it exists.",
|
404
|
-
});
|
405
|
-
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
378
|
+
return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => {
|
379
|
+
var _a, _b;
|
380
|
+
try {
|
381
|
+
const res = assertResponse(await this.delete(updatedOptions));
|
382
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
406
383
|
}
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
span.end();
|
415
|
-
}
|
384
|
+
catch (e) {
|
385
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
386
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
387
|
+
}
|
388
|
+
throw e;
|
389
|
+
}
|
390
|
+
});
|
416
391
|
}
|
417
392
|
/**
|
418
393
|
* Restores the contents and metadata of soft deleted blob and any associated
|
@@ -423,20 +398,12 @@ export class BlobClient extends StorageClient {
|
|
423
398
|
* @param options - Optional options to Blob Undelete operation.
|
424
399
|
*/
|
425
400
|
async undelete(options = {}) {
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
code: SpanStatusCode.ERROR,
|
433
|
-
message: e.message,
|
434
|
-
});
|
435
|
-
throw e;
|
436
|
-
}
|
437
|
-
finally {
|
438
|
-
span.end();
|
439
|
-
}
|
401
|
+
return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => {
|
402
|
+
return assertResponse(await this.blobContext.undelete({
|
403
|
+
abortSignal: options.abortSignal,
|
404
|
+
tracingOptions: updatedOptions.tracingOptions,
|
405
|
+
}));
|
406
|
+
});
|
440
407
|
}
|
441
408
|
/**
|
442
409
|
* Sets system properties on the blob.
|
@@ -454,23 +421,19 @@ export class BlobClient extends StorageClient {
|
|
454
421
|
* @param options - Optional options to Blob Set HTTP Headers operation.
|
455
422
|
*/
|
456
423
|
async setHTTPHeaders(blobHTTPHeaders, options = {}) {
|
457
|
-
var _a;
|
458
|
-
const { span, updatedOptions } = createSpan("BlobClient-setHTTPHeaders", options);
|
459
424
|
options.conditions = options.conditions || {};
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
span.end();
|
473
|
-
}
|
425
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
426
|
+
return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => {
|
427
|
+
var _a;
|
428
|
+
return assertResponse(await this.blobContext.setHttpHeaders({
|
429
|
+
abortSignal: options.abortSignal,
|
430
|
+
blobHttpHeaders: blobHTTPHeaders,
|
431
|
+
leaseAccessConditions: options.conditions,
|
432
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
433
|
+
// cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger.
|
434
|
+
tracingOptions: updatedOptions.tracingOptions,
|
435
|
+
}));
|
436
|
+
});
|
474
437
|
}
|
475
438
|
/**
|
476
439
|
* Sets user-defined metadata for the specified blob as one or more name-value pairs.
|
@@ -484,23 +447,20 @@ export class BlobClient extends StorageClient {
|
|
484
447
|
* @param options - Optional options to Set Metadata operation.
|
485
448
|
*/
|
486
449
|
async setMetadata(metadata, options = {}) {
|
487
|
-
var _a;
|
488
|
-
const { span, updatedOptions } = createSpan("BlobClient-setMetadata", options);
|
489
450
|
options.conditions = options.conditions || {};
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
}
|
451
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
452
|
+
return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => {
|
453
|
+
var _a;
|
454
|
+
return assertResponse(await this.blobContext.setMetadata({
|
455
|
+
abortSignal: options.abortSignal,
|
456
|
+
leaseAccessConditions: options.conditions,
|
457
|
+
metadata,
|
458
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
459
|
+
cpkInfo: options.customerProvidedKey,
|
460
|
+
encryptionScope: options.encryptionScope,
|
461
|
+
tracingOptions: updatedOptions.tracingOptions,
|
462
|
+
}));
|
463
|
+
});
|
504
464
|
}
|
505
465
|
/**
|
506
466
|
* Sets tags on the underlying blob.
|
@@ -512,21 +472,16 @@ export class BlobClient extends StorageClient {
|
|
512
472
|
* @param options -
|
513
473
|
*/
|
514
474
|
async setTags(tags, options = {}) {
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
throw e;
|
526
|
-
}
|
527
|
-
finally {
|
528
|
-
span.end();
|
529
|
-
}
|
475
|
+
return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => {
|
476
|
+
var _a;
|
477
|
+
return assertResponse(await this.blobContext.setTags({
|
478
|
+
abortSignal: options.abortSignal,
|
479
|
+
leaseAccessConditions: options.conditions,
|
480
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
481
|
+
tracingOptions: updatedOptions.tracingOptions,
|
482
|
+
tags: toBlobTags(tags),
|
483
|
+
}));
|
484
|
+
});
|
530
485
|
}
|
531
486
|
/**
|
532
487
|
* Gets the tags associated with the underlying blob.
|
@@ -534,23 +489,17 @@ export class BlobClient extends StorageClient {
|
|
534
489
|
* @param options -
|
535
490
|
*/
|
536
491
|
async getTags(options = {}) {
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
492
|
+
return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => {
|
493
|
+
var _a;
|
494
|
+
const response = assertResponse(await this.blobContext.getTags({
|
495
|
+
abortSignal: options.abortSignal,
|
496
|
+
leaseAccessConditions: options.conditions,
|
497
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
498
|
+
tracingOptions: updatedOptions.tracingOptions,
|
499
|
+
}));
|
541
500
|
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} });
|
542
501
|
return wrappedResponse;
|
543
|
-
}
|
544
|
-
catch (e) {
|
545
|
-
span.setStatus({
|
546
|
-
code: SpanStatusCode.ERROR,
|
547
|
-
message: e.message,
|
548
|
-
});
|
549
|
-
throw e;
|
550
|
-
}
|
551
|
-
finally {
|
552
|
-
span.end();
|
553
|
-
}
|
502
|
+
});
|
554
503
|
}
|
555
504
|
/**
|
556
505
|
* Get a {@link BlobLeaseClient} that manages leases on the blob.
|
@@ -568,23 +517,20 @@ export class BlobClient extends StorageClient {
|
|
568
517
|
* @param options - Optional options to the Blob Create Snapshot operation.
|
569
518
|
*/
|
570
519
|
async createSnapshot(options = {}) {
|
571
|
-
var _a;
|
572
|
-
const { span, updatedOptions } = createSpan("BlobClient-createSnapshot", options);
|
573
520
|
options.conditions = options.conditions || {};
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
}
|
521
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
522
|
+
return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => {
|
523
|
+
var _a;
|
524
|
+
return assertResponse(await this.blobContext.createSnapshot({
|
525
|
+
abortSignal: options.abortSignal,
|
526
|
+
leaseAccessConditions: options.conditions,
|
527
|
+
metadata: options.metadata,
|
528
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
529
|
+
cpkInfo: options.customerProvidedKey,
|
530
|
+
encryptionScope: options.encryptionScope,
|
531
|
+
tracingOptions: updatedOptions.tracingOptions,
|
532
|
+
}));
|
533
|
+
});
|
588
534
|
}
|
589
535
|
/**
|
590
536
|
* Asynchronously copies a blob to a destination within the storage account.
|
@@ -686,20 +632,13 @@ export class BlobClient extends StorageClient {
|
|
686
632
|
* @param options - Optional options to the Blob Abort Copy From URL operation.
|
687
633
|
*/
|
688
634
|
async abortCopyFromURL(copyId, options = {}) {
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
message: e.message,
|
697
|
-
});
|
698
|
-
throw e;
|
699
|
-
}
|
700
|
-
finally {
|
701
|
-
span.end();
|
702
|
-
}
|
635
|
+
return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => {
|
636
|
+
return assertResponse(await this.blobContext.abortCopyFromURL(copyId, {
|
637
|
+
abortSignal: options.abortSignal,
|
638
|
+
leaseAccessConditions: options.conditions,
|
639
|
+
tracingOptions: updatedOptions.tracingOptions,
|
640
|
+
}));
|
641
|
+
});
|
703
642
|
}
|
704
643
|
/**
|
705
644
|
* The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not
|
@@ -710,28 +649,33 @@ export class BlobClient extends StorageClient {
|
|
710
649
|
* @param options -
|
711
650
|
*/
|
712
651
|
async syncCopyFromURL(copySource, options = {}) {
|
713
|
-
var _a, _b, _c;
|
714
|
-
const { span, updatedOptions } = createSpan("BlobClient-syncCopyFromURL", options);
|
715
652
|
options.conditions = options.conditions || {};
|
716
653
|
options.sourceConditions = options.sourceConditions || {};
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
654
|
+
return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => {
|
655
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
656
|
+
return assertResponse(await this.blobContext.copyFromURL(copySource, {
|
657
|
+
abortSignal: options.abortSignal,
|
658
|
+
metadata: options.metadata,
|
659
|
+
leaseAccessConditions: options.conditions,
|
660
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
661
|
+
sourceModifiedAccessConditions: {
|
662
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
663
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
664
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
665
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
666
|
+
},
|
667
|
+
sourceContentMD5: options.sourceContentMD5,
|
668
|
+
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
|
669
|
+
tier: toAccessTier(options.tier),
|
670
|
+
blobTagsString: toBlobTagsString(options.tags),
|
671
|
+
immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn,
|
672
|
+
immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode,
|
673
|
+
legalHold: options.legalHold,
|
674
|
+
encryptionScope: options.encryptionScope,
|
675
|
+
copySourceTags: options.copySourceTags,
|
676
|
+
tracingOptions: updatedOptions.tracingOptions,
|
677
|
+
}));
|
678
|
+
});
|
735
679
|
}
|
736
680
|
/**
|
737
681
|
* Sets the tier on a blob. The operation is allowed on a page blob in a premium
|
@@ -745,23 +689,19 @@ export class BlobClient extends StorageClient {
|
|
745
689
|
* @param options - Optional options to the Blob Set Tier operation.
|
746
690
|
*/
|
747
691
|
async setAccessTier(tier, options = {}) {
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
throw e;
|
759
|
-
}
|
760
|
-
finally {
|
761
|
-
span.end();
|
762
|
-
}
|
692
|
+
return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => {
|
693
|
+
var _a;
|
694
|
+
return assertResponse(await this.blobContext.setTier(toAccessTier(tier), {
|
695
|
+
abortSignal: options.abortSignal,
|
696
|
+
leaseAccessConditions: options.conditions,
|
697
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
698
|
+
rehydratePriority: options.rehydratePriority,
|
699
|
+
tracingOptions: updatedOptions.tracingOptions,
|
700
|
+
}));
|
701
|
+
});
|
763
702
|
}
|
764
703
|
async downloadToBuffer(param1, param2, param3, param4 = {}) {
|
704
|
+
var _a;
|
765
705
|
let buffer;
|
766
706
|
let offset = 0;
|
767
707
|
let count = 0;
|
@@ -776,29 +716,26 @@ export class BlobClient extends StorageClient {
|
|
776
716
|
count = typeof param2 === "number" ? param2 : 0;
|
777
717
|
options = param3 || {};
|
778
718
|
}
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
if (!options.conditions) {
|
797
|
-
options.conditions = {};
|
798
|
-
}
|
719
|
+
let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0;
|
720
|
+
if (blockSize < 0) {
|
721
|
+
throw new RangeError("blockSize option must be >= 0");
|
722
|
+
}
|
723
|
+
if (blockSize === 0) {
|
724
|
+
blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;
|
725
|
+
}
|
726
|
+
if (offset < 0) {
|
727
|
+
throw new RangeError("offset option must be >= 0");
|
728
|
+
}
|
729
|
+
if (count && count <= 0) {
|
730
|
+
throw new RangeError("count option must be greater than 0");
|
731
|
+
}
|
732
|
+
if (!options.conditions) {
|
733
|
+
options.conditions = {};
|
734
|
+
}
|
735
|
+
return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => {
|
799
736
|
// Customer doesn't specify length, get it
|
800
737
|
if (!count) {
|
801
|
-
const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions:
|
738
|
+
const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
|
802
739
|
count = response.contentLength - offset;
|
803
740
|
if (count < 0) {
|
804
741
|
throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`);
|
@@ -818,19 +755,19 @@ export class BlobClient extends StorageClient {
|
|
818
755
|
}
|
819
756
|
let transferProgress = 0;
|
820
757
|
const batch = new Batch(options.concurrency);
|
821
|
-
for (let off = offset; off < offset + count; off = off +
|
758
|
+
for (let off = offset; off < offset + count; off = off + blockSize) {
|
822
759
|
batch.addOperation(async () => {
|
823
760
|
// Exclusive chunk end position
|
824
761
|
let chunkEnd = offset + count;
|
825
|
-
if (off +
|
826
|
-
chunkEnd = off +
|
762
|
+
if (off + blockSize < chunkEnd) {
|
763
|
+
chunkEnd = off + blockSize;
|
827
764
|
}
|
828
765
|
const response = await this.download(off, chunkEnd - off, {
|
829
766
|
abortSignal: options.abortSignal,
|
830
767
|
conditions: options.conditions,
|
831
768
|
maxRetryRequests: options.maxRetryRequestsPerBlock,
|
832
769
|
customerProvidedKey: options.customerProvidedKey,
|
833
|
-
tracingOptions:
|
770
|
+
tracingOptions: updatedOptions.tracingOptions,
|
834
771
|
});
|
835
772
|
const stream = response.readableStreamBody;
|
836
773
|
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
|
@@ -845,17 +782,7 @@ export class BlobClient extends StorageClient {
|
|
845
782
|
}
|
846
783
|
await batch.do();
|
847
784
|
return buffer;
|
848
|
-
}
|
849
|
-
catch (e) {
|
850
|
-
span.setStatus({
|
851
|
-
code: SpanStatusCode.ERROR,
|
852
|
-
message: e.message,
|
853
|
-
});
|
854
|
-
throw e;
|
855
|
-
}
|
856
|
-
finally {
|
857
|
-
span.end();
|
858
|
-
}
|
785
|
+
});
|
859
786
|
}
|
860
787
|
/**
|
861
788
|
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
@@ -874,26 +801,15 @@ export class BlobClient extends StorageClient {
|
|
874
801
|
* at the specified path.
|
875
802
|
*/
|
876
803
|
async downloadToFile(filePath, offset = 0, count, options = {}) {
|
877
|
-
|
878
|
-
|
879
|
-
const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
|
804
|
+
return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => {
|
805
|
+
const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
|
880
806
|
if (response.readableStreamBody) {
|
881
807
|
await readStreamToLocalFile(response.readableStreamBody, filePath);
|
882
808
|
}
|
883
809
|
// The stream is no longer accessible so setting it to undefined.
|
884
810
|
response.blobDownloadStream = undefined;
|
885
811
|
return response;
|
886
|
-
}
|
887
|
-
catch (e) {
|
888
|
-
span.setStatus({
|
889
|
-
code: SpanStatusCode.ERROR,
|
890
|
-
message: e.message,
|
891
|
-
});
|
892
|
-
throw e;
|
893
|
-
}
|
894
|
-
finally {
|
895
|
-
span.end();
|
896
|
-
}
|
812
|
+
});
|
897
813
|
}
|
898
814
|
getBlobAndContainerNamesFromUrl() {
|
899
815
|
let containerName;
|
@@ -906,11 +822,11 @@ export class BlobClient extends StorageClient {
|
|
906
822
|
// "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt";
|
907
823
|
// IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`
|
908
824
|
// http://localhost:10001/devstoreaccount1/containername/blob
|
909
|
-
const parsedUrl =
|
910
|
-
if (parsedUrl.
|
825
|
+
const parsedUrl = new URL(this.url);
|
826
|
+
if (parsedUrl.host.split(".")[1] === "blob") {
|
911
827
|
// "https://myaccount.blob.core.windows.net/containername/blob".
|
912
828
|
// .getPath() -> /containername/blob
|
913
|
-
const pathComponents = parsedUrl.
|
829
|
+
const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?");
|
914
830
|
containerName = pathComponents[1];
|
915
831
|
blobName = pathComponents[3];
|
916
832
|
}
|
@@ -918,14 +834,14 @@ export class BlobClient extends StorageClient {
|
|
918
834
|
// IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob
|
919
835
|
// Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob
|
920
836
|
// .getPath() -> /devstoreaccount1/containername/blob
|
921
|
-
const pathComponents = parsedUrl.
|
837
|
+
const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?");
|
922
838
|
containerName = pathComponents[2];
|
923
839
|
blobName = pathComponents[4];
|
924
840
|
}
|
925
841
|
else {
|
926
842
|
// "https://customdomain.com/containername/blob".
|
927
843
|
// .getPath() -> /containername/blob
|
928
|
-
const pathComponents = parsedUrl.
|
844
|
+
const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?");
|
929
845
|
containerName = pathComponents[1];
|
930
846
|
blobName = pathComponents[3];
|
931
847
|
}
|
@@ -958,29 +874,32 @@ export class BlobClient extends StorageClient {
|
|
958
874
|
* @param options - Optional options to the Blob Start Copy From URL operation.
|
959
875
|
*/
|
960
876
|
async startCopyFromURL(copySource, options = {}) {
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
877
|
+
return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => {
|
878
|
+
var _a, _b, _c;
|
879
|
+
options.conditions = options.conditions || {};
|
880
|
+
options.sourceConditions = options.sourceConditions || {};
|
881
|
+
return assertResponse(await this.blobContext.startCopyFromURL(copySource, {
|
882
|
+
abortSignal: options.abortSignal,
|
883
|
+
leaseAccessConditions: options.conditions,
|
884
|
+
metadata: options.metadata,
|
885
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
886
|
+
sourceModifiedAccessConditions: {
|
967
887
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
968
888
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
969
889
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
970
890
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
971
891
|
sourceIfTags: options.sourceConditions.tagConditions,
|
972
|
-
},
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
}
|
892
|
+
},
|
893
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
894
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
895
|
+
legalHold: options.legalHold,
|
896
|
+
rehydratePriority: options.rehydratePriority,
|
897
|
+
tier: toAccessTier(options.tier),
|
898
|
+
blobTagsString: toBlobTagsString(options.tags),
|
899
|
+
sealBlob: options.sealBlob,
|
900
|
+
tracingOptions: updatedOptions.tracingOptions,
|
901
|
+
}));
|
902
|
+
});
|
984
903
|
}
|
985
904
|
/**
|
986
905
|
* Only available for BlobClient constructed with a shared key credential.
|
@@ -1007,63 +926,38 @@ export class BlobClient extends StorageClient {
|
|
1007
926
|
*
|
1008
927
|
* @param options - Optional options to delete immutability policy on the blob.
|
1009
928
|
*/
|
1010
|
-
async deleteImmutabilityPolicy(options) {
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
span.setStatus({
|
1017
|
-
code: SpanStatusCode.ERROR,
|
1018
|
-
message: e.message,
|
1019
|
-
});
|
1020
|
-
throw e;
|
1021
|
-
}
|
1022
|
-
finally {
|
1023
|
-
span.end();
|
1024
|
-
}
|
929
|
+
async deleteImmutabilityPolicy(options = {}) {
|
930
|
+
return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => {
|
931
|
+
return assertResponse(await this.blobContext.deleteImmutabilityPolicy({
|
932
|
+
tracingOptions: updatedOptions.tracingOptions,
|
933
|
+
}));
|
934
|
+
});
|
1025
935
|
}
|
1026
936
|
/**
|
1027
|
-
* Set
|
937
|
+
* Set immutability policy on the blob.
|
1028
938
|
*
|
1029
939
|
* @param options - Optional options to set immutability policy on the blob.
|
1030
940
|
*/
|
1031
|
-
async setImmutabilityPolicy(immutabilityPolicy, options) {
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
message: e.message,
|
1040
|
-
});
|
1041
|
-
throw e;
|
1042
|
-
}
|
1043
|
-
finally {
|
1044
|
-
span.end();
|
1045
|
-
}
|
941
|
+
async setImmutabilityPolicy(immutabilityPolicy, options = {}) {
|
942
|
+
return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => {
|
943
|
+
return assertResponse(await this.blobContext.setImmutabilityPolicy({
|
944
|
+
immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn,
|
945
|
+
immutabilityPolicyMode: immutabilityPolicy.policyMode,
|
946
|
+
tracingOptions: updatedOptions.tracingOptions,
|
947
|
+
}));
|
948
|
+
});
|
1046
949
|
}
|
1047
950
|
/**
|
1048
951
|
* Set legal hold on the blob.
|
1049
952
|
*
|
1050
953
|
* @param options - Optional options to set legal hold on the blob.
|
1051
954
|
*/
|
1052
|
-
async setLegalHold(legalHoldEnabled, options) {
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
span.setStatus({
|
1059
|
-
code: SpanStatusCode.ERROR,
|
1060
|
-
message: e.message,
|
1061
|
-
});
|
1062
|
-
throw e;
|
1063
|
-
}
|
1064
|
-
finally {
|
1065
|
-
span.end();
|
1066
|
-
}
|
955
|
+
async setLegalHold(legalHoldEnabled, options = {}) {
|
956
|
+
return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => {
|
957
|
+
return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, {
|
958
|
+
tracingOptions: updatedOptions.tracingOptions,
|
959
|
+
}));
|
960
|
+
});
|
1067
961
|
}
|
1068
962
|
}
|
1069
963
|
/**
|
@@ -1135,7 +1029,7 @@ export class AppendBlobClient extends BlobClient {
|
|
1135
1029
|
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
1136
1030
|
}
|
1137
1031
|
super(url, pipeline);
|
1138
|
-
this.appendBlobContext =
|
1032
|
+
this.appendBlobContext = this.storageClientContext.appendBlob;
|
1139
1033
|
}
|
1140
1034
|
/**
|
1141
1035
|
* Creates a new AppendBlobClient object identical to the source but with the
|
@@ -1163,23 +1057,25 @@ export class AppendBlobClient extends BlobClient {
|
|
1163
1057
|
* ```
|
1164
1058
|
*/
|
1165
1059
|
async create(options = {}) {
|
1166
|
-
var _a, _b, _c;
|
1167
|
-
const { span, updatedOptions } = createSpan("AppendBlobClient-create", options);
|
1168
1060
|
options.conditions = options.conditions || {};
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1061
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1062
|
+
return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => {
|
1063
|
+
var _a, _b, _c;
|
1064
|
+
return assertResponse(await this.appendBlobContext.create(0, {
|
1065
|
+
abortSignal: options.abortSignal,
|
1066
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1067
|
+
leaseAccessConditions: options.conditions,
|
1068
|
+
metadata: options.metadata,
|
1069
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1070
|
+
cpkInfo: options.customerProvidedKey,
|
1071
|
+
encryptionScope: options.encryptionScope,
|
1072
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
1073
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
1074
|
+
legalHold: options.legalHold,
|
1075
|
+
blobTagsString: toBlobTagsString(options.tags),
|
1076
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1077
|
+
}));
|
1078
|
+
});
|
1183
1079
|
}
|
1184
1080
|
/**
|
1185
1081
|
* Creates a 0-length append blob. Call AppendBlock to append data to an append blob.
|
@@ -1189,30 +1085,20 @@ export class AppendBlobClient extends BlobClient {
|
|
1189
1085
|
* @param options -
|
1190
1086
|
*/
|
1191
1087
|
async createIfNotExists(options = {}) {
|
1192
|
-
var _a, _b;
|
1193
|
-
const { span, updatedOptions } = createSpan("AppendBlobClient-createIfNotExists", options);
|
1194
1088
|
const conditions = { ifNoneMatch: ETagAny };
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
1201
|
-
span.setStatus({
|
1202
|
-
code: SpanStatusCode.ERROR,
|
1203
|
-
message: "Expected exception when creating a blob only if it does not already exist.",
|
1204
|
-
});
|
1205
|
-
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
1089
|
+
return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => {
|
1090
|
+
var _a, _b;
|
1091
|
+
try {
|
1092
|
+
const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions })));
|
1093
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
1206
1094
|
}
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
span.end();
|
1215
|
-
}
|
1095
|
+
catch (e) {
|
1096
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
1097
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
1098
|
+
}
|
1099
|
+
throw e;
|
1100
|
+
}
|
1101
|
+
});
|
1216
1102
|
}
|
1217
1103
|
/**
|
1218
1104
|
* Seals the append blob, making it read only.
|
@@ -1220,22 +1106,17 @@ export class AppendBlobClient extends BlobClient {
|
|
1220
1106
|
* @param options -
|
1221
1107
|
*/
|
1222
1108
|
async seal(options = {}) {
|
1223
|
-
var _a;
|
1224
|
-
const { span, updatedOptions } = createSpan("AppendBlobClient-seal", options);
|
1225
1109
|
options.conditions = options.conditions || {};
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
}
|
1236
|
-
finally {
|
1237
|
-
span.end();
|
1238
|
-
}
|
1110
|
+
return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => {
|
1111
|
+
var _a;
|
1112
|
+
return assertResponse(await this.appendBlobContext.seal({
|
1113
|
+
abortSignal: options.abortSignal,
|
1114
|
+
appendPositionAccessConditions: options.conditions,
|
1115
|
+
leaseAccessConditions: options.conditions,
|
1116
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1117
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1118
|
+
}));
|
1119
|
+
});
|
1239
1120
|
}
|
1240
1121
|
/**
|
1241
1122
|
* Commits a new block of data to the end of the existing append blob.
|
@@ -1262,25 +1143,25 @@ export class AppendBlobClient extends BlobClient {
|
|
1262
1143
|
* ```
|
1263
1144
|
*/
|
1264
1145
|
async appendBlock(body, contentLength, options = {}) {
|
1265
|
-
var _a;
|
1266
|
-
const { span, updatedOptions } = createSpan("AppendBlobClient-appendBlock", options);
|
1267
1146
|
options.conditions = options.conditions || {};
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1147
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1148
|
+
return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => {
|
1149
|
+
var _a;
|
1150
|
+
return assertResponse(await this.appendBlobContext.appendBlock(contentLength, body, {
|
1151
|
+
abortSignal: options.abortSignal,
|
1152
|
+
appendPositionAccessConditions: options.conditions,
|
1153
|
+
leaseAccessConditions: options.conditions,
|
1154
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1155
|
+
requestOptions: {
|
1271
1156
|
onUploadProgress: options.onProgress,
|
1272
|
-
},
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
});
|
1279
|
-
|
1280
|
-
}
|
1281
|
-
finally {
|
1282
|
-
span.end();
|
1283
|
-
}
|
1157
|
+
},
|
1158
|
+
transactionalContentMD5: options.transactionalContentMD5,
|
1159
|
+
transactionalContentCrc64: options.transactionalContentCrc64,
|
1160
|
+
cpkInfo: options.customerProvidedKey,
|
1161
|
+
encryptionScope: options.encryptionScope,
|
1162
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1163
|
+
}));
|
1164
|
+
});
|
1284
1165
|
}
|
1285
1166
|
/**
|
1286
1167
|
* The Append Block operation commits a new block of data to the end of an existing append blob
|
@@ -1297,29 +1178,31 @@ export class AppendBlobClient extends BlobClient {
|
|
1297
1178
|
* @param options -
|
1298
1179
|
*/
|
1299
1180
|
async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) {
|
1300
|
-
var _a;
|
1301
|
-
const { span, updatedOptions } = createSpan("AppendBlobClient-appendBlockFromURL", options);
|
1302
1181
|
options.conditions = options.conditions || {};
|
1303
1182
|
options.sourceConditions = options.sourceConditions || {};
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1183
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1184
|
+
return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => {
|
1185
|
+
var _a, _b, _c, _d, _e;
|
1186
|
+
return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, {
|
1187
|
+
abortSignal: options.abortSignal,
|
1188
|
+
sourceRange: rangeToString({ offset: sourceOffset, count }),
|
1189
|
+
sourceContentMD5: options.sourceContentMD5,
|
1190
|
+
sourceContentCrc64: options.sourceContentCrc64,
|
1191
|
+
leaseAccessConditions: options.conditions,
|
1192
|
+
appendPositionAccessConditions: options.conditions,
|
1193
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1194
|
+
sourceModifiedAccessConditions: {
|
1195
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
1196
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
1197
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
1198
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
1199
|
+
},
|
1200
|
+
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
|
1201
|
+
cpkInfo: options.customerProvidedKey,
|
1202
|
+
encryptionScope: options.encryptionScope,
|
1203
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1204
|
+
}));
|
1205
|
+
});
|
1323
1206
|
}
|
1324
1207
|
}
|
1325
1208
|
/**
|
@@ -1391,8 +1274,8 @@ export class BlockBlobClient extends BlobClient {
|
|
1391
1274
|
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
1392
1275
|
}
|
1393
1276
|
super(url, pipeline);
|
1394
|
-
this.blockBlobContext =
|
1395
|
-
this._blobContext =
|
1277
|
+
this.blockBlobContext = this.storageClientContext.blockBlob;
|
1278
|
+
this._blobContext = this.storageClientContext.blob;
|
1396
1279
|
}
|
1397
1280
|
/**
|
1398
1281
|
* Creates a new BlockBlobClient object identical to the source but with the
|
@@ -1436,36 +1319,31 @@ export class BlockBlobClient extends BlobClient {
|
|
1436
1319
|
* @param options -
|
1437
1320
|
*/
|
1438
1321
|
async query(query, options = {}) {
|
1439
|
-
var _a;
|
1440
1322
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1323
|
+
if (!isNode) {
|
1324
|
+
throw new Error("This operation currently is only supported in Node.js.");
|
1325
|
+
}
|
1326
|
+
return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => {
|
1327
|
+
var _a;
|
1328
|
+
const response = assertResponse(await this._blobContext.query({
|
1329
|
+
abortSignal: options.abortSignal,
|
1330
|
+
queryRequest: {
|
1448
1331
|
queryType: "SQL",
|
1449
1332
|
expression: query,
|
1450
1333
|
inputSerialization: toQuerySerialization(options.inputTextConfiguration),
|
1451
1334
|
outputSerialization: toQuerySerialization(options.outputTextConfiguration),
|
1452
|
-
},
|
1335
|
+
},
|
1336
|
+
leaseAccessConditions: options.conditions,
|
1337
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1338
|
+
cpkInfo: options.customerProvidedKey,
|
1339
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1340
|
+
}));
|
1453
1341
|
return new BlobQueryResponse(response, {
|
1454
1342
|
abortSignal: options.abortSignal,
|
1455
1343
|
onProgress: options.onProgress,
|
1456
1344
|
onError: options.onError,
|
1457
1345
|
});
|
1458
|
-
}
|
1459
|
-
catch (e) {
|
1460
|
-
span.setStatus({
|
1461
|
-
code: SpanStatusCode.ERROR,
|
1462
|
-
message: e.message,
|
1463
|
-
});
|
1464
|
-
throw e;
|
1465
|
-
}
|
1466
|
-
finally {
|
1467
|
-
span.end();
|
1468
|
-
}
|
1346
|
+
});
|
1469
1347
|
}
|
1470
1348
|
/**
|
1471
1349
|
* Creates a new block blob, or updates the content of an existing block blob.
|
@@ -1495,25 +1373,29 @@ export class BlockBlobClient extends BlobClient {
|
|
1495
1373
|
* ```
|
1496
1374
|
*/
|
1497
1375
|
async upload(body, contentLength, options = {}) {
|
1498
|
-
var _a, _b, _c;
|
1499
1376
|
options.conditions = options.conditions || {};
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
return await this.blockBlobContext.upload(contentLength, body,
|
1377
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1378
|
+
return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => {
|
1379
|
+
var _a, _b, _c;
|
1380
|
+
return assertResponse(await this.blockBlobContext.upload(contentLength, body, {
|
1381
|
+
abortSignal: options.abortSignal,
|
1382
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1383
|
+
leaseAccessConditions: options.conditions,
|
1384
|
+
metadata: options.metadata,
|
1385
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1386
|
+
requestOptions: {
|
1504
1387
|
onUploadProgress: options.onProgress,
|
1505
|
-
},
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
}
|
1388
|
+
},
|
1389
|
+
cpkInfo: options.customerProvidedKey,
|
1390
|
+
encryptionScope: options.encryptionScope,
|
1391
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
1392
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
1393
|
+
legalHold: options.legalHold,
|
1394
|
+
tier: toAccessTier(options.tier),
|
1395
|
+
blobTagsString: toBlobTagsString(options.tags),
|
1396
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1397
|
+
}));
|
1398
|
+
});
|
1517
1399
|
}
|
1518
1400
|
/**
|
1519
1401
|
* Creates a new Block Blob where the contents of the blob are read from a given URL.
|
@@ -1534,29 +1416,18 @@ export class BlockBlobClient extends BlobClient {
|
|
1534
1416
|
* @param options - Optional parameters.
|
1535
1417
|
*/
|
1536
1418
|
async syncUploadFromURL(sourceURL, options = {}) {
|
1537
|
-
var _a, _b, _c, _d, _e;
|
1538
1419
|
options.conditions = options.conditions || {};
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
return await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign(
|
1543
|
-
sourceIfMatch: (
|
1544
|
-
sourceIfModifiedSince: (
|
1545
|
-
sourceIfNoneMatch: (
|
1546
|
-
sourceIfUnmodifiedSince: (
|
1547
|
-
sourceIfTags: (
|
1548
|
-
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags
|
1549
|
-
}
|
1550
|
-
catch (e) {
|
1551
|
-
span.setStatus({
|
1552
|
-
code: SpanStatusCode.ERROR,
|
1553
|
-
message: e.message,
|
1554
|
-
});
|
1555
|
-
throw e;
|
1556
|
-
}
|
1557
|
-
finally {
|
1558
|
-
span.end();
|
1559
|
-
}
|
1420
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1421
|
+
return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => {
|
1422
|
+
var _a, _b, _c, _d, _e, _f;
|
1423
|
+
return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {
|
1424
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
1425
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
1426
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
1427
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
1428
|
+
sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions,
|
1429
|
+
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions })));
|
1430
|
+
});
|
1560
1431
|
}
|
1561
1432
|
/**
|
1562
1433
|
* Uploads the specified block to the block blob's "staging area" to be later
|
@@ -1570,23 +1441,21 @@ export class BlockBlobClient extends BlobClient {
|
|
1570
1441
|
* @returns Response data for the Block Blob Stage Block operation.
|
1571
1442
|
*/
|
1572
1443
|
async stageBlock(blockId, body, contentLength, options = {}) {
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1444
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1445
|
+
return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => {
|
1446
|
+
return assertResponse(await this.blockBlobContext.stageBlock(blockId, contentLength, body, {
|
1447
|
+
abortSignal: options.abortSignal,
|
1448
|
+
leaseAccessConditions: options.conditions,
|
1449
|
+
requestOptions: {
|
1577
1450
|
onUploadProgress: options.onProgress,
|
1578
|
-
},
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
});
|
1585
|
-
|
1586
|
-
}
|
1587
|
-
finally {
|
1588
|
-
span.end();
|
1589
|
-
}
|
1451
|
+
},
|
1452
|
+
transactionalContentMD5: options.transactionalContentMD5,
|
1453
|
+
transactionalContentCrc64: options.transactionalContentCrc64,
|
1454
|
+
cpkInfo: options.customerProvidedKey,
|
1455
|
+
encryptionScope: options.encryptionScope,
|
1456
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1457
|
+
}));
|
1458
|
+
});
|
1590
1459
|
}
|
1591
1460
|
/**
|
1592
1461
|
* The Stage Block From URL operation creates a new block to be committed as part
|
@@ -1610,21 +1479,20 @@ export class BlockBlobClient extends BlobClient {
|
|
1610
1479
|
* @returns Response data for the Block Blob Stage Block From URL operation.
|
1611
1480
|
*/
|
1612
1481
|
async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) {
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
}
|
1482
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1483
|
+
return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => {
|
1484
|
+
return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, {
|
1485
|
+
abortSignal: options.abortSignal,
|
1486
|
+
leaseAccessConditions: options.conditions,
|
1487
|
+
sourceContentMD5: options.sourceContentMD5,
|
1488
|
+
sourceContentCrc64: options.sourceContentCrc64,
|
1489
|
+
sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }),
|
1490
|
+
cpkInfo: options.customerProvidedKey,
|
1491
|
+
encryptionScope: options.encryptionScope,
|
1492
|
+
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
|
1493
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1494
|
+
}));
|
1495
|
+
});
|
1628
1496
|
}
|
1629
1497
|
/**
|
1630
1498
|
* Writes a blob by specifying the list of block IDs that make up the blob.
|
@@ -1639,23 +1507,26 @@ export class BlockBlobClient extends BlobClient {
|
|
1639
1507
|
* @returns Response data for the Block Blob Commit Block List operation.
|
1640
1508
|
*/
|
1641
1509
|
async commitBlockList(blocks, options = {}) {
|
1642
|
-
var _a, _b, _c;
|
1643
1510
|
options.conditions = options.conditions || {};
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
return await this.blockBlobContext.commitBlockList({ latest: blocks },
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1511
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1512
|
+
return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => {
|
1513
|
+
var _a, _b, _c;
|
1514
|
+
return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks }, {
|
1515
|
+
abortSignal: options.abortSignal,
|
1516
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1517
|
+
leaseAccessConditions: options.conditions,
|
1518
|
+
metadata: options.metadata,
|
1519
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1520
|
+
cpkInfo: options.customerProvidedKey,
|
1521
|
+
encryptionScope: options.encryptionScope,
|
1522
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
1523
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
1524
|
+
legalHold: options.legalHold,
|
1525
|
+
tier: toAccessTier(options.tier),
|
1526
|
+
blobTagsString: toBlobTagsString(options.tags),
|
1527
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1528
|
+
}));
|
1529
|
+
});
|
1659
1530
|
}
|
1660
1531
|
/**
|
1661
1532
|
* Returns the list of blocks that have been uploaded as part of a block blob
|
@@ -1668,10 +1539,14 @@ export class BlockBlobClient extends BlobClient {
|
|
1668
1539
|
* @returns Response data for the Block Blob Get Block List operation.
|
1669
1540
|
*/
|
1670
1541
|
async getBlockList(listType, options = {}) {
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1542
|
+
return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => {
|
1543
|
+
var _a;
|
1544
|
+
const res = assertResponse(await this.blockBlobContext.getBlockList(listType, {
|
1545
|
+
abortSignal: options.abortSignal,
|
1546
|
+
leaseAccessConditions: options.conditions,
|
1547
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1548
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1549
|
+
}));
|
1675
1550
|
if (!res.committedBlocks) {
|
1676
1551
|
res.committedBlocks = [];
|
1677
1552
|
}
|
@@ -1679,17 +1554,7 @@ export class BlockBlobClient extends BlobClient {
|
|
1679
1554
|
res.uncommittedBlocks = [];
|
1680
1555
|
}
|
1681
1556
|
return res;
|
1682
|
-
}
|
1683
|
-
catch (e) {
|
1684
|
-
span.setStatus({
|
1685
|
-
code: SpanStatusCode.ERROR,
|
1686
|
-
message: e.message,
|
1687
|
-
});
|
1688
|
-
throw e;
|
1689
|
-
}
|
1690
|
-
finally {
|
1691
|
-
span.end();
|
1692
|
-
}
|
1557
|
+
});
|
1693
1558
|
}
|
1694
1559
|
// High level functions
|
1695
1560
|
/**
|
@@ -1708,8 +1573,7 @@ export class BlockBlobClient extends BlobClient {
|
|
1708
1573
|
* @param options -
|
1709
1574
|
*/
|
1710
1575
|
async uploadData(data, options = {}) {
|
1711
|
-
|
1712
|
-
try {
|
1576
|
+
return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => {
|
1713
1577
|
if (isNode) {
|
1714
1578
|
let buffer;
|
1715
1579
|
if (data instanceof Buffer) {
|
@@ -1728,17 +1592,7 @@ export class BlockBlobClient extends BlobClient {
|
|
1728
1592
|
const browserBlob = new Blob([data]);
|
1729
1593
|
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
|
1730
1594
|
}
|
1731
|
-
}
|
1732
|
-
catch (e) {
|
1733
|
-
span.setStatus({
|
1734
|
-
code: SpanStatusCode.ERROR,
|
1735
|
-
message: e.message,
|
1736
|
-
});
|
1737
|
-
throw e;
|
1738
|
-
}
|
1739
|
-
finally {
|
1740
|
-
span.end();
|
1741
|
-
}
|
1595
|
+
});
|
1742
1596
|
}
|
1743
1597
|
/**
|
1744
1598
|
* ONLY AVAILABLE IN BROWSERS.
|
@@ -1760,21 +1614,10 @@ export class BlockBlobClient extends BlobClient {
|
|
1760
1614
|
* @returns Response data for the Blob Upload operation.
|
1761
1615
|
*/
|
1762
1616
|
async uploadBrowserData(browserData, options = {}) {
|
1763
|
-
|
1764
|
-
try {
|
1617
|
+
return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => {
|
1765
1618
|
const browserBlob = new Blob([browserData]);
|
1766
|
-
return
|
1767
|
-
}
|
1768
|
-
catch (e) {
|
1769
|
-
span.setStatus({
|
1770
|
-
code: SpanStatusCode.ERROR,
|
1771
|
-
message: e.message,
|
1772
|
-
});
|
1773
|
-
throw e;
|
1774
|
-
}
|
1775
|
-
finally {
|
1776
|
-
span.end();
|
1777
|
-
}
|
1619
|
+
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
|
1620
|
+
});
|
1778
1621
|
}
|
1779
1622
|
/**
|
1780
1623
|
*
|
@@ -1792,27 +1635,23 @@ export class BlockBlobClient extends BlobClient {
|
|
1792
1635
|
* @returns Response data for the Blob Upload operation.
|
1793
1636
|
*/
|
1794
1637
|
async uploadSeekableInternal(bodyFactory, size, options = {}) {
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {
|
1638
|
+
var _a, _b;
|
1639
|
+
let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0;
|
1640
|
+
if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {
|
1799
1641
|
throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`);
|
1800
1642
|
}
|
1801
|
-
|
1802
|
-
|
1803
|
-
}
|
1804
|
-
if (options.maxSingleShotSize < 0 ||
|
1805
|
-
options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) {
|
1643
|
+
const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;
|
1644
|
+
if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) {
|
1806
1645
|
throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`);
|
1807
1646
|
}
|
1808
|
-
if (
|
1647
|
+
if (blockSize === 0) {
|
1809
1648
|
if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) {
|
1810
1649
|
throw new RangeError(`${size} is too larger to upload to a block blob.`);
|
1811
1650
|
}
|
1812
|
-
if (size >
|
1813
|
-
|
1814
|
-
if (
|
1815
|
-
|
1651
|
+
if (size > maxSingleShotSize) {
|
1652
|
+
blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);
|
1653
|
+
if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {
|
1654
|
+
blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;
|
1816
1655
|
}
|
1817
1656
|
}
|
1818
1657
|
}
|
@@ -1822,12 +1661,11 @@ export class BlockBlobClient extends BlobClient {
|
|
1822
1661
|
if (!options.conditions) {
|
1823
1662
|
options.conditions = {};
|
1824
1663
|
}
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
return await this.upload(bodyFactory(0, size), size, updatedOptions);
|
1664
|
+
return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => {
|
1665
|
+
if (size <= maxSingleShotSize) {
|
1666
|
+
return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions));
|
1829
1667
|
}
|
1830
|
-
const numBlocks = Math.floor((size - 1) /
|
1668
|
+
const numBlocks = Math.floor((size - 1) / blockSize) + 1;
|
1831
1669
|
if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {
|
1832
1670
|
throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` +
|
1833
1671
|
`the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`);
|
@@ -1839,8 +1677,8 @@ export class BlockBlobClient extends BlobClient {
|
|
1839
1677
|
for (let i = 0; i < numBlocks; i++) {
|
1840
1678
|
batch.addOperation(async () => {
|
1841
1679
|
const blockID = generateBlockID(blockIDPrefix, i);
|
1842
|
-
const start =
|
1843
|
-
const end = i === numBlocks - 1 ? size : start +
|
1680
|
+
const start = blockSize * i;
|
1681
|
+
const end = i === numBlocks - 1 ? size : start + blockSize;
|
1844
1682
|
const contentLength = end - start;
|
1845
1683
|
blockList.push(blockID);
|
1846
1684
|
await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {
|
@@ -1861,17 +1699,7 @@ export class BlockBlobClient extends BlobClient {
|
|
1861
1699
|
}
|
1862
1700
|
await batch.do();
|
1863
1701
|
return this.commitBlockList(blockList, updatedOptions);
|
1864
|
-
}
|
1865
|
-
catch (e) {
|
1866
|
-
span.setStatus({
|
1867
|
-
code: SpanStatusCode.ERROR,
|
1868
|
-
message: e.message,
|
1869
|
-
});
|
1870
|
-
throw e;
|
1871
|
-
}
|
1872
|
-
finally {
|
1873
|
-
span.end();
|
1874
|
-
}
|
1702
|
+
});
|
1875
1703
|
}
|
1876
1704
|
/**
|
1877
1705
|
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
@@ -1887,27 +1715,16 @@ export class BlockBlobClient extends BlobClient {
|
|
1887
1715
|
* @returns Response data for the Blob Upload operation.
|
1888
1716
|
*/
|
1889
1717
|
async uploadFile(filePath, options = {}) {
|
1890
|
-
|
1891
|
-
try {
|
1718
|
+
return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => {
|
1892
1719
|
const size = (await fsStat(filePath)).size;
|
1893
|
-
return
|
1720
|
+
return this.uploadSeekableInternal((offset, count) => {
|
1894
1721
|
return () => fsCreateReadStream(filePath, {
|
1895
1722
|
autoClose: true,
|
1896
1723
|
end: count ? offset + count - 1 : Infinity,
|
1897
1724
|
start: offset,
|
1898
1725
|
});
|
1899
|
-
}, size, Object.assign(Object.assign({}, options), { tracingOptions:
|
1900
|
-
}
|
1901
|
-
catch (e) {
|
1902
|
-
span.setStatus({
|
1903
|
-
code: SpanStatusCode.ERROR,
|
1904
|
-
message: e.message,
|
1905
|
-
});
|
1906
|
-
throw e;
|
1907
|
-
}
|
1908
|
-
finally {
|
1909
|
-
span.end();
|
1910
|
-
}
|
1726
|
+
}, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
|
1727
|
+
});
|
1911
1728
|
}
|
1912
1729
|
/**
|
1913
1730
|
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
@@ -1932,8 +1749,7 @@ export class BlockBlobClient extends BlobClient {
|
|
1932
1749
|
if (!options.conditions) {
|
1933
1750
|
options.conditions = {};
|
1934
1751
|
}
|
1935
|
-
|
1936
|
-
try {
|
1752
|
+
return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => {
|
1937
1753
|
let blockNum = 0;
|
1938
1754
|
const blockIDPrefix = generateUuid();
|
1939
1755
|
let transferProgress = 0;
|
@@ -1959,18 +1775,8 @@ export class BlockBlobClient extends BlobClient {
|
|
1959
1775
|
// Outgoing queue shouldn't be empty.
|
1960
1776
|
Math.ceil((maxConcurrency / 4) * 3));
|
1961
1777
|
await scheduler.do();
|
1962
|
-
return await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions:
|
1963
|
-
}
|
1964
|
-
catch (e) {
|
1965
|
-
span.setStatus({
|
1966
|
-
code: SpanStatusCode.ERROR,
|
1967
|
-
message: e.message,
|
1968
|
-
});
|
1969
|
-
throw e;
|
1970
|
-
}
|
1971
|
-
finally {
|
1972
|
-
span.end();
|
1973
|
-
}
|
1778
|
+
return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })));
|
1779
|
+
});
|
1974
1780
|
}
|
1975
1781
|
}
|
1976
1782
|
/**
|
@@ -2042,7 +1848,7 @@ export class PageBlobClient extends BlobClient {
|
|
2042
1848
|
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
2043
1849
|
}
|
2044
1850
|
super(url, pipeline);
|
2045
|
-
this.pageBlobContext =
|
1851
|
+
this.pageBlobContext = this.storageClientContext.pageBlob;
|
2046
1852
|
}
|
2047
1853
|
/**
|
2048
1854
|
* Creates a new PageBlobClient object identical to the source but with the
|
@@ -2065,23 +1871,27 @@ export class PageBlobClient extends BlobClient {
|
|
2065
1871
|
* @returns Response data for the Page Blob Create operation.
|
2066
1872
|
*/
|
2067
1873
|
async create(size, options = {}) {
|
2068
|
-
var _a, _b, _c;
|
2069
1874
|
options.conditions = options.conditions || {};
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
return await this.pageBlobContext.create(0, size,
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
1875
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1876
|
+
return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => {
|
1877
|
+
var _a, _b, _c;
|
1878
|
+
return assertResponse(await this.pageBlobContext.create(0, size, {
|
1879
|
+
abortSignal: options.abortSignal,
|
1880
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1881
|
+
blobSequenceNumber: options.blobSequenceNumber,
|
1882
|
+
leaseAccessConditions: options.conditions,
|
1883
|
+
metadata: options.metadata,
|
1884
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1885
|
+
cpkInfo: options.customerProvidedKey,
|
1886
|
+
encryptionScope: options.encryptionScope,
|
1887
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
1888
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
1889
|
+
legalHold: options.legalHold,
|
1890
|
+
tier: toAccessTier(options.tier),
|
1891
|
+
blobTagsString: toBlobTagsString(options.tags),
|
1892
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1893
|
+
}));
|
1894
|
+
});
|
2085
1895
|
}
|
2086
1896
|
/**
|
2087
1897
|
* Creates a page blob of the specified length. Call uploadPages to upload data
|
@@ -2093,30 +1903,20 @@ export class PageBlobClient extends BlobClient {
|
|
2093
1903
|
* @param options -
|
2094
1904
|
*/
|
2095
1905
|
async createIfNotExists(size, options = {}) {
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
}
|
2103
|
-
catch (e) {
|
2104
|
-
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
2105
|
-
span.setStatus({
|
2106
|
-
code: SpanStatusCode.ERROR,
|
2107
|
-
message: "Expected exception when creating a blob only if it does not already exist.",
|
2108
|
-
});
|
2109
|
-
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
1906
|
+
return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => {
|
1907
|
+
var _a, _b;
|
1908
|
+
try {
|
1909
|
+
const conditions = { ifNoneMatch: ETagAny };
|
1910
|
+
const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions })));
|
1911
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
2110
1912
|
}
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
span.end();
|
2119
|
-
}
|
1913
|
+
catch (e) {
|
1914
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
1915
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
1916
|
+
}
|
1917
|
+
throw e;
|
1918
|
+
}
|
1919
|
+
});
|
2120
1920
|
}
|
2121
1921
|
/**
|
2122
1922
|
* Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.
|
@@ -2129,25 +1929,26 @@ export class PageBlobClient extends BlobClient {
|
|
2129
1929
|
* @returns Response data for the Page Blob Upload Pages operation.
|
2130
1930
|
*/
|
2131
1931
|
async uploadPages(body, offset, count, options = {}) {
|
2132
|
-
var _a;
|
2133
1932
|
options.conditions = options.conditions || {};
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
return await this.pageBlobContext.uploadPages(count, body,
|
1933
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1934
|
+
return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => {
|
1935
|
+
var _a;
|
1936
|
+
return assertResponse(await this.pageBlobContext.uploadPages(count, body, {
|
1937
|
+
abortSignal: options.abortSignal,
|
1938
|
+
leaseAccessConditions: options.conditions,
|
1939
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1940
|
+
requestOptions: {
|
2138
1941
|
onUploadProgress: options.onProgress,
|
2139
|
-
},
|
2140
|
-
|
2141
|
-
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2148
|
-
|
2149
|
-
span.end();
|
2150
|
-
}
|
1942
|
+
},
|
1943
|
+
range: rangeToString({ offset, count }),
|
1944
|
+
sequenceNumberAccessConditions: options.conditions,
|
1945
|
+
transactionalContentMD5: options.transactionalContentMD5,
|
1946
|
+
transactionalContentCrc64: options.transactionalContentCrc64,
|
1947
|
+
cpkInfo: options.customerProvidedKey,
|
1948
|
+
encryptionScope: options.encryptionScope,
|
1949
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1950
|
+
}));
|
1951
|
+
});
|
2151
1952
|
}
|
2152
1953
|
/**
|
2153
1954
|
* The Upload Pages operation writes a range of pages to a page blob where the
|
@@ -2161,29 +1962,30 @@ export class PageBlobClient extends BlobClient {
|
|
2161
1962
|
* @param options -
|
2162
1963
|
*/
|
2163
1964
|
async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) {
|
2164
|
-
var _a;
|
2165
1965
|
options.conditions = options.conditions || {};
|
2166
1966
|
options.sourceConditions = options.sourceConditions || {};
|
2167
|
-
|
2168
|
-
|
2169
|
-
|
2170
|
-
return await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }),
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2174
|
-
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
1967
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1968
|
+
return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => {
|
1969
|
+
var _a, _b, _c, _d, _e;
|
1970
|
+
return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), {
|
1971
|
+
abortSignal: options.abortSignal,
|
1972
|
+
sourceContentMD5: options.sourceContentMD5,
|
1973
|
+
sourceContentCrc64: options.sourceContentCrc64,
|
1974
|
+
leaseAccessConditions: options.conditions,
|
1975
|
+
sequenceNumberAccessConditions: options.conditions,
|
1976
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1977
|
+
sourceModifiedAccessConditions: {
|
1978
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
1979
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
1980
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
1981
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
1982
|
+
},
|
1983
|
+
cpkInfo: options.customerProvidedKey,
|
1984
|
+
encryptionScope: options.encryptionScope,
|
1985
|
+
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
|
1986
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1987
|
+
}));
|
1988
|
+
});
|
2187
1989
|
}
|
2188
1990
|
/**
|
2189
1991
|
* Frees the specified pages from the page blob.
|
@@ -2195,22 +1997,20 @@ export class PageBlobClient extends BlobClient {
|
|
2195
1997
|
* @returns Response data for the Page Blob Clear Pages operation.
|
2196
1998
|
*/
|
2197
1999
|
async clearPages(offset = 0, count, options = {}) {
|
2198
|
-
var _a;
|
2199
2000
|
options.conditions = options.conditions || {};
|
2200
|
-
|
2201
|
-
|
2202
|
-
return await this.pageBlobContext.clearPages(0,
|
2203
|
-
|
2204
|
-
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
|
2211
|
-
|
2212
|
-
|
2213
|
-
}
|
2001
|
+
return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => {
|
2002
|
+
var _a;
|
2003
|
+
return assertResponse(await this.pageBlobContext.clearPages(0, {
|
2004
|
+
abortSignal: options.abortSignal,
|
2005
|
+
leaseAccessConditions: options.conditions,
|
2006
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2007
|
+
range: rangeToString({ offset, count }),
|
2008
|
+
sequenceNumberAccessConditions: options.conditions,
|
2009
|
+
cpkInfo: options.customerProvidedKey,
|
2010
|
+
encryptionScope: options.encryptionScope,
|
2011
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2012
|
+
}));
|
2013
|
+
});
|
2214
2014
|
}
|
2215
2015
|
/**
|
2216
2016
|
* Returns the list of valid page ranges for a page blob or snapshot of a page blob.
|
@@ -2222,24 +2022,18 @@ export class PageBlobClient extends BlobClient {
|
|
2222
2022
|
* @returns Response data for the Page Blob Get Ranges operation.
|
2223
2023
|
*/
|
2224
2024
|
async getPageRanges(offset = 0, count, options = {}) {
|
2225
|
-
var _a;
|
2226
2025
|
options.conditions = options.conditions || {};
|
2227
|
-
|
2228
|
-
|
2229
|
-
|
2230
|
-
|
2231
|
-
.
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
throw e;
|
2239
|
-
}
|
2240
|
-
finally {
|
2241
|
-
span.end();
|
2242
|
-
}
|
2026
|
+
return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => {
|
2027
|
+
var _a;
|
2028
|
+
const response = assertResponse(await this.pageBlobContext.getPageRanges({
|
2029
|
+
abortSignal: options.abortSignal,
|
2030
|
+
leaseAccessConditions: options.conditions,
|
2031
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2032
|
+
range: rangeToString({ offset, count }),
|
2033
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2034
|
+
}));
|
2035
|
+
return rangeResponseFromModel(response);
|
2036
|
+
});
|
2243
2037
|
}
|
2244
2038
|
/**
|
2245
2039
|
* getPageRangesSegment returns a single segment of page ranges starting from the
|
@@ -2254,21 +2048,18 @@ export class PageBlobClient extends BlobClient {
|
|
2254
2048
|
* @param options - Options to PageBlob Get Page Ranges Segment operation.
|
2255
2049
|
*/
|
2256
2050
|
async listPageRangesSegment(offset = 0, count, marker, options = {}) {
|
2257
|
-
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2268
|
-
}
|
2269
|
-
finally {
|
2270
|
-
span.end();
|
2271
|
-
}
|
2051
|
+
return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => {
|
2052
|
+
var _a;
|
2053
|
+
return assertResponse(await this.pageBlobContext.getPageRanges({
|
2054
|
+
abortSignal: options.abortSignal,
|
2055
|
+
leaseAccessConditions: options.conditions,
|
2056
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2057
|
+
range: rangeToString({ offset, count }),
|
2058
|
+
marker: marker,
|
2059
|
+
maxPageSize: options.maxPageSize,
|
2060
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2061
|
+
}));
|
2062
|
+
});
|
2272
2063
|
}
|
2273
2064
|
/**
|
2274
2065
|
* Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel}
|
@@ -2429,24 +2220,19 @@ export class PageBlobClient extends BlobClient {
|
|
2429
2220
|
* @returns Response data for the Page Blob Get Page Range Diff operation.
|
2430
2221
|
*/
|
2431
2222
|
async getPageRangesDiff(offset, count, prevSnapshot, options = {}) {
|
2432
|
-
var _a;
|
2433
2223
|
options.conditions = options.conditions || {};
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
.
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
}
|
2447
|
-
finally {
|
2448
|
-
span.end();
|
2449
|
-
}
|
2224
|
+
return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => {
|
2225
|
+
var _a;
|
2226
|
+
const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({
|
2227
|
+
abortSignal: options.abortSignal,
|
2228
|
+
leaseAccessConditions: options.conditions,
|
2229
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2230
|
+
prevsnapshot: prevSnapshot,
|
2231
|
+
range: rangeToString({ offset, count }),
|
2232
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2233
|
+
}));
|
2234
|
+
return rangeResponseFromModel(result);
|
2235
|
+
});
|
2450
2236
|
}
|
2451
2237
|
/**
|
2452
2238
|
* getPageRangesDiffSegment returns a single segment of page ranges starting from the
|
@@ -2462,25 +2248,23 @@ export class PageBlobClient extends BlobClient {
|
|
2462
2248
|
* @param marker - A string value that identifies the portion of the get to be returned with the next get operation.
|
2463
2249
|
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2464
2250
|
*/
|
2465
|
-
async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options) {
|
2466
|
-
|
2467
|
-
|
2468
|
-
|
2469
|
-
|
2251
|
+
async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) {
|
2252
|
+
return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => {
|
2253
|
+
var _a;
|
2254
|
+
return assertResponse(await this.pageBlobContext.getPageRangesDiff({
|
2255
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
2256
|
+
leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions,
|
2257
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2258
|
+
prevsnapshot: prevSnapshotOrUrl,
|
2259
|
+
range: rangeToString({
|
2470
2260
|
offset: offset,
|
2471
2261
|
count: count,
|
2472
|
-
}),
|
2473
|
-
|
2474
|
-
|
2475
|
-
|
2476
|
-
|
2477
|
-
|
2478
|
-
});
|
2479
|
-
throw e;
|
2480
|
-
}
|
2481
|
-
finally {
|
2482
|
-
span.end();
|
2483
|
-
}
|
2262
|
+
}),
|
2263
|
+
marker: marker,
|
2264
|
+
maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize,
|
2265
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2266
|
+
}));
|
2267
|
+
});
|
2484
2268
|
}
|
2485
2269
|
/**
|
2486
2270
|
* Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel}
|
@@ -2645,24 +2429,19 @@ export class PageBlobClient extends BlobClient {
|
|
2645
2429
|
* @returns Response data for the Page Blob Get Page Range Diff operation.
|
2646
2430
|
*/
|
2647
2431
|
async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) {
|
2648
|
-
var _a;
|
2649
2432
|
options.conditions = options.conditions || {};
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
|
2654
|
-
.
|
2655
|
-
|
2656
|
-
|
2657
|
-
|
2658
|
-
|
2659
|
-
|
2660
|
-
|
2661
|
-
|
2662
|
-
}
|
2663
|
-
finally {
|
2664
|
-
span.end();
|
2665
|
-
}
|
2433
|
+
return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => {
|
2434
|
+
var _a;
|
2435
|
+
const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({
|
2436
|
+
abortSignal: options.abortSignal,
|
2437
|
+
leaseAccessConditions: options.conditions,
|
2438
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2439
|
+
prevSnapshotUrl,
|
2440
|
+
range: rangeToString({ offset, count }),
|
2441
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2442
|
+
}));
|
2443
|
+
return rangeResponseFromModel(response);
|
2444
|
+
});
|
2666
2445
|
}
|
2667
2446
|
/**
|
2668
2447
|
* Resizes the page blob to the specified size (which must be a multiple of 512).
|
@@ -2673,22 +2452,17 @@ export class PageBlobClient extends BlobClient {
|
|
2673
2452
|
* @returns Response data for the Page Blob Resize operation.
|
2674
2453
|
*/
|
2675
2454
|
async resize(size, options = {}) {
|
2676
|
-
var _a;
|
2677
2455
|
options.conditions = options.conditions || {};
|
2678
|
-
|
2679
|
-
|
2680
|
-
return await this.pageBlobContext.resize(size,
|
2681
|
-
|
2682
|
-
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2686
|
-
});
|
2687
|
-
|
2688
|
-
}
|
2689
|
-
finally {
|
2690
|
-
span.end();
|
2691
|
-
}
|
2456
|
+
return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => {
|
2457
|
+
var _a;
|
2458
|
+
return assertResponse(await this.pageBlobContext.resize(size, {
|
2459
|
+
abortSignal: options.abortSignal,
|
2460
|
+
leaseAccessConditions: options.conditions,
|
2461
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2462
|
+
encryptionScope: options.encryptionScope,
|
2463
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2464
|
+
}));
|
2465
|
+
});
|
2692
2466
|
}
|
2693
2467
|
/**
|
2694
2468
|
* Sets a page blob's sequence number.
|
@@ -2700,22 +2474,17 @@ export class PageBlobClient extends BlobClient {
|
|
2700
2474
|
* @returns Response data for the Page Blob Update Sequence Number operation.
|
2701
2475
|
*/
|
2702
2476
|
async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) {
|
2703
|
-
var _a;
|
2704
2477
|
options.conditions = options.conditions || {};
|
2705
|
-
|
2706
|
-
|
2707
|
-
return await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction,
|
2708
|
-
|
2709
|
-
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2713
|
-
});
|
2714
|
-
|
2715
|
-
}
|
2716
|
-
finally {
|
2717
|
-
span.end();
|
2718
|
-
}
|
2478
|
+
return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => {
|
2479
|
+
var _a;
|
2480
|
+
return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, {
|
2481
|
+
abortSignal: options.abortSignal,
|
2482
|
+
blobSequenceNumber: sequenceNumber,
|
2483
|
+
leaseAccessConditions: options.conditions,
|
2484
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2485
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2486
|
+
}));
|
2487
|
+
});
|
2719
2488
|
}
|
2720
2489
|
/**
|
2721
2490
|
* Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.
|
@@ -2731,21 +2500,14 @@ export class PageBlobClient extends BlobClient {
|
|
2731
2500
|
* @returns Response data for the Page Blob Copy Incremental operation.
|
2732
2501
|
*/
|
2733
2502
|
async startCopyIncremental(copySource, options = {}) {
|
2734
|
-
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2740
|
-
|
2741
|
-
|
2742
|
-
message: e.message,
|
2743
|
-
});
|
2744
|
-
throw e;
|
2745
|
-
}
|
2746
|
-
finally {
|
2747
|
-
span.end();
|
2748
|
-
}
|
2503
|
+
return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => {
|
2504
|
+
var _a;
|
2505
|
+
return assertResponse(await this.pageBlobContext.copyIncremental(copySource, {
|
2506
|
+
abortSignal: options.abortSignal,
|
2507
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2508
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2509
|
+
}));
|
2510
|
+
});
|
2749
2511
|
}
|
2750
2512
|
}
|
2751
2513
|
//# sourceMappingURL=Clients.js.map
|