@azure/storage-file-datalake 12.8.1-alpha.20220401.1 → 12.9.0-beta.1
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/CHANGELOG.md +6 -3
- package/dist/index.js +176 -18
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js +2 -2
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/clients.js +24 -13
- package/dist-esm/storage-file-datalake/src/clients.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/mappers.js +70 -0
- package/dist-esm/storage-file-datalake/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js +31 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/path.js +13 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/path.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/storageClientContext.js +2 -2
- package/dist-esm/storage-file-datalake/src/generated/src/storageClientContext.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/models.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/transforms.js +9 -0
- package/dist-esm/storage-file-datalake/src/transforms.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/constants.js +3 -2
- package/dist-esm/storage-file-datalake/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js +26 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js.map +1 -1
- package/package.json +10 -6
- package/types/3.1/storage-file-datalake.d.ts +84 -0
- package/types/latest/storage-file-datalake.d.ts +86 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 12.
|
|
3
|
+
## 12.9.0-beta.1 (2022-04-19)
|
|
4
4
|
|
|
5
5
|
### Features Added
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Added support for service version 2021-06-08.
|
|
8
|
+
- Added support for Customer Provided Key server-side encryption of files.
|
|
9
|
+
- Added ability to retrieve path createdOn and expiresOn times with DataLakeFileSystemClient.listPaths().
|
|
8
10
|
|
|
9
11
|
### Bugs Fixed
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
- Add missing browser mapping for `./dist-esm/storage-common/src/BufferScheduler.js`
|
|
14
|
+
- Add `react-native` mapping to ESM entry point
|
|
12
15
|
|
|
13
16
|
## 12.8.0 (2022-03-11)
|
|
14
17
|
|
package/dist/index.js
CHANGED
|
@@ -123,8 +123,8 @@ class AnonymousCredential extends Credential {
|
|
|
123
123
|
|
|
124
124
|
// Copyright (c) Microsoft Corporation.
|
|
125
125
|
// Licensed under the MIT license.
|
|
126
|
-
const SDK_VERSION = "12.
|
|
127
|
-
const SERVICE_VERSION = "2021-
|
|
126
|
+
const SDK_VERSION = "12.9.0-beta.1";
|
|
127
|
+
const SERVICE_VERSION = "2021-06-08";
|
|
128
128
|
const KB = 1024;
|
|
129
129
|
const MB = KB * 1024;
|
|
130
130
|
const DEFAULT_HIGH_LEVEL_CONCURRENCY = 5;
|
|
@@ -321,6 +321,7 @@ const ToDfsEndpointHostMappings = [
|
|
|
321
321
|
];
|
|
322
322
|
const ETagAny = "*";
|
|
323
323
|
const DeletionIdKey = "deletionid";
|
|
324
|
+
const EncryptionAlgorithmAES25 = "AES256";
|
|
324
325
|
const PathResultTypeConstants = {
|
|
325
326
|
FileResourceType: "file",
|
|
326
327
|
DirectoryResourceType: "directory",
|
|
@@ -737,6 +738,31 @@ function isIpEndpointStyle(parsedUrl) {
|
|
|
737
738
|
// For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.
|
|
738
739
|
return /^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host);
|
|
739
740
|
}
|
|
741
|
+
/**
|
|
742
|
+
* This is to convert a Windows File Time ticks to a Date object.
|
|
743
|
+
*/
|
|
744
|
+
function windowsFileTimeTicksToTime(timeNumber) {
|
|
745
|
+
if (!timeNumber)
|
|
746
|
+
return undefined;
|
|
747
|
+
const timeNumberInternal = parseInt(timeNumber);
|
|
748
|
+
if (timeNumberInternal === 0)
|
|
749
|
+
return undefined;
|
|
750
|
+
// A windows file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed
|
|
751
|
+
// since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).
|
|
752
|
+
// Date accepts a value that represents miliseconds from 12:00 A.M. January 1, 1970
|
|
753
|
+
// Here should correct the year number after converting.
|
|
754
|
+
const date = new Date(timeNumberInternal / 10000);
|
|
755
|
+
date.setUTCFullYear(date.getUTCFullYear() - 369);
|
|
756
|
+
return date;
|
|
757
|
+
}
|
|
758
|
+
function ensureCpkIfSpecified(cpk, isHttps) {
|
|
759
|
+
if (cpk && !isHttps) {
|
|
760
|
+
throw new RangeError("Customer-provided encryption key must be used over HTTPS.");
|
|
761
|
+
}
|
|
762
|
+
if (cpk && !cpk.encryptionAlgorithm) {
|
|
763
|
+
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
740
766
|
|
|
741
767
|
/**
|
|
742
768
|
* StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.
|
|
@@ -1226,6 +1252,27 @@ const Path$1 = {
|
|
|
1226
1252
|
type: {
|
|
1227
1253
|
name: "String"
|
|
1228
1254
|
}
|
|
1255
|
+
},
|
|
1256
|
+
encryptionScope: {
|
|
1257
|
+
serializedName: "EncryptionScope",
|
|
1258
|
+
xmlName: "EncryptionScope",
|
|
1259
|
+
type: {
|
|
1260
|
+
name: "String"
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
creationTime: {
|
|
1264
|
+
serializedName: "creationTime",
|
|
1265
|
+
xmlName: "creationTime",
|
|
1266
|
+
type: {
|
|
1267
|
+
name: "String"
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1270
|
+
expiryTime: {
|
|
1271
|
+
serializedName: "expiryTime",
|
|
1272
|
+
xmlName: "expiryTime",
|
|
1273
|
+
type: {
|
|
1274
|
+
name: "String"
|
|
1275
|
+
}
|
|
1229
1276
|
}
|
|
1230
1277
|
}
|
|
1231
1278
|
}
|
|
@@ -2233,6 +2280,20 @@ const PathCreateHeaders = {
|
|
|
2233
2280
|
name: "Number"
|
|
2234
2281
|
}
|
|
2235
2282
|
},
|
|
2283
|
+
isServerEncrypted: {
|
|
2284
|
+
serializedName: "x-ms-request-server-encrypted",
|
|
2285
|
+
xmlName: "x-ms-request-server-encrypted",
|
|
2286
|
+
type: {
|
|
2287
|
+
name: "Boolean"
|
|
2288
|
+
}
|
|
2289
|
+
},
|
|
2290
|
+
encryptionKeySha256: {
|
|
2291
|
+
serializedName: "x-ms-encryption-key-sha256",
|
|
2292
|
+
xmlName: "x-ms-encryption-key-sha256",
|
|
2293
|
+
type: {
|
|
2294
|
+
name: "String"
|
|
2295
|
+
}
|
|
2296
|
+
},
|
|
2236
2297
|
errorCode: {
|
|
2237
2298
|
serializedName: "x-ms-error-code",
|
|
2238
2299
|
xmlName: "x-ms-error-code",
|
|
@@ -2620,6 +2681,20 @@ const PathReadHeaders = {
|
|
|
2620
2681
|
type: {
|
|
2621
2682
|
name: "String"
|
|
2622
2683
|
}
|
|
2684
|
+
},
|
|
2685
|
+
isServerEncrypted: {
|
|
2686
|
+
serializedName: "x-ms-request-server-encrypted",
|
|
2687
|
+
xmlName: "x-ms-request-server-encrypted",
|
|
2688
|
+
type: {
|
|
2689
|
+
name: "Boolean"
|
|
2690
|
+
}
|
|
2691
|
+
},
|
|
2692
|
+
encryptionKeySha256: {
|
|
2693
|
+
serializedName: "x-ms-encryption-key-sha256",
|
|
2694
|
+
xmlName: "x-ms-encryption-key-sha256",
|
|
2695
|
+
type: {
|
|
2696
|
+
name: "String"
|
|
2697
|
+
}
|
|
2623
2698
|
}
|
|
2624
2699
|
}
|
|
2625
2700
|
}
|
|
@@ -3118,6 +3193,20 @@ const PathFlushDataHeaders = {
|
|
|
3118
3193
|
type: {
|
|
3119
3194
|
name: "String"
|
|
3120
3195
|
}
|
|
3196
|
+
},
|
|
3197
|
+
isServerEncrypted: {
|
|
3198
|
+
serializedName: "x-ms-request-server-encrypted",
|
|
3199
|
+
xmlName: "x-ms-request-server-encrypted",
|
|
3200
|
+
type: {
|
|
3201
|
+
name: "Boolean"
|
|
3202
|
+
}
|
|
3203
|
+
},
|
|
3204
|
+
encryptionKeySha256: {
|
|
3205
|
+
serializedName: "x-ms-encryption-key-sha256",
|
|
3206
|
+
xmlName: "x-ms-encryption-key-sha256",
|
|
3207
|
+
type: {
|
|
3208
|
+
name: "String"
|
|
3209
|
+
}
|
|
3121
3210
|
}
|
|
3122
3211
|
}
|
|
3123
3212
|
}
|
|
@@ -3213,6 +3302,13 @@ const PathAppendDataHeaders = {
|
|
|
3213
3302
|
type: {
|
|
3214
3303
|
name: "Boolean"
|
|
3215
3304
|
}
|
|
3305
|
+
},
|
|
3306
|
+
encryptionKeySha256: {
|
|
3307
|
+
serializedName: "x-ms-encryption-key-sha256",
|
|
3308
|
+
xmlName: "x-ms-encryption-key-sha256",
|
|
3309
|
+
type: {
|
|
3310
|
+
name: "String"
|
|
3311
|
+
}
|
|
3216
3312
|
}
|
|
3217
3313
|
}
|
|
3218
3314
|
}
|
|
@@ -3526,7 +3622,7 @@ const timeout = {
|
|
|
3526
3622
|
const version = {
|
|
3527
3623
|
parameterPath: "version",
|
|
3528
3624
|
mapper: {
|
|
3529
|
-
defaultValue: "2021-
|
|
3625
|
+
defaultValue: "2021-06-08",
|
|
3530
3626
|
isConstant: true,
|
|
3531
3627
|
serializedName: "x-ms-version",
|
|
3532
3628
|
type: {
|
|
@@ -3890,6 +3986,36 @@ const sourceIfUnmodifiedSince = {
|
|
|
3890
3986
|
}
|
|
3891
3987
|
}
|
|
3892
3988
|
};
|
|
3989
|
+
const encryptionKey = {
|
|
3990
|
+
parameterPath: ["options", "cpkInfo", "encryptionKey"],
|
|
3991
|
+
mapper: {
|
|
3992
|
+
serializedName: "x-ms-encryption-key",
|
|
3993
|
+
xmlName: "x-ms-encryption-key",
|
|
3994
|
+
type: {
|
|
3995
|
+
name: "String"
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
};
|
|
3999
|
+
const encryptionKeySha256 = {
|
|
4000
|
+
parameterPath: ["options", "cpkInfo", "encryptionKeySha256"],
|
|
4001
|
+
mapper: {
|
|
4002
|
+
serializedName: "x-ms-encryption-key-sha256",
|
|
4003
|
+
xmlName: "x-ms-encryption-key-sha256",
|
|
4004
|
+
type: {
|
|
4005
|
+
name: "String"
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
4008
|
+
};
|
|
4009
|
+
const encryptionAlgorithm = {
|
|
4010
|
+
parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"],
|
|
4011
|
+
mapper: {
|
|
4012
|
+
serializedName: "x-ms-encryption-algorithm",
|
|
4013
|
+
xmlName: "x-ms-encryption-algorithm",
|
|
4014
|
+
type: {
|
|
4015
|
+
name: "String"
|
|
4016
|
+
}
|
|
4017
|
+
}
|
|
4018
|
+
};
|
|
3893
4019
|
const contentType1 = {
|
|
3894
4020
|
parameterPath: ["options", "contentType"],
|
|
3895
4021
|
mapper: {
|
|
@@ -4757,7 +4883,10 @@ const createOperationSpec = {
|
|
|
4757
4883
|
sourceIfMatch,
|
|
4758
4884
|
sourceIfNoneMatch,
|
|
4759
4885
|
sourceIfModifiedSince,
|
|
4760
|
-
sourceIfUnmodifiedSince
|
|
4886
|
+
sourceIfUnmodifiedSince,
|
|
4887
|
+
encryptionKey,
|
|
4888
|
+
encryptionKeySha256,
|
|
4889
|
+
encryptionAlgorithm
|
|
4761
4890
|
],
|
|
4762
4891
|
serializer
|
|
4763
4892
|
};
|
|
@@ -4886,6 +5015,9 @@ const readOperationSpec = {
|
|
|
4886
5015
|
leaseId,
|
|
4887
5016
|
ifMatch,
|
|
4888
5017
|
ifNoneMatch,
|
|
5018
|
+
encryptionKey,
|
|
5019
|
+
encryptionKeySha256,
|
|
5020
|
+
encryptionAlgorithm,
|
|
4889
5021
|
range,
|
|
4890
5022
|
xMsRangeGetContentMd5
|
|
4891
5023
|
],
|
|
@@ -5041,6 +5173,9 @@ const flushDataOperationSpec = {
|
|
|
5041
5173
|
leaseId,
|
|
5042
5174
|
ifMatch,
|
|
5043
5175
|
ifNoneMatch,
|
|
5176
|
+
encryptionKey,
|
|
5177
|
+
encryptionKeySha256,
|
|
5178
|
+
encryptionAlgorithm,
|
|
5044
5179
|
contentLength,
|
|
5045
5180
|
contentMD5
|
|
5046
5181
|
],
|
|
@@ -5069,6 +5204,9 @@ const appendDataOperationSpec = {
|
|
|
5069
5204
|
requestId,
|
|
5070
5205
|
version,
|
|
5071
5206
|
leaseId,
|
|
5207
|
+
encryptionKey,
|
|
5208
|
+
encryptionKeySha256,
|
|
5209
|
+
encryptionAlgorithm,
|
|
5072
5210
|
accept2,
|
|
5073
5211
|
contentLength,
|
|
5074
5212
|
contentType2,
|
|
@@ -5585,7 +5723,7 @@ function attachCredential(thing, credential) {
|
|
|
5585
5723
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5586
5724
|
*/
|
|
5587
5725
|
const packageName = "azure-storage-datalake";
|
|
5588
|
-
const packageVersion = "12.
|
|
5726
|
+
const packageVersion = "12.9.0-beta.1";
|
|
5589
5727
|
class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
|
5590
5728
|
/**
|
|
5591
5729
|
* Initializes a new instance of the StorageClientContext class.
|
|
@@ -5611,7 +5749,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
|
|
|
5611
5749
|
// Parameter assignments
|
|
5612
5750
|
this.url = url;
|
|
5613
5751
|
// Assigning values to Constant parameters
|
|
5614
|
-
this.version = options.version || "2021-
|
|
5752
|
+
this.version = options.version || "2021-06-08";
|
|
5615
5753
|
this.resource = options.resource || "filesystem";
|
|
5616
5754
|
}
|
|
5617
5755
|
}
|
|
@@ -5891,6 +6029,15 @@ function toAccessControlChangeFailureArray(aclFailedEntries = []) {
|
|
|
5891
6029
|
};
|
|
5892
6030
|
});
|
|
5893
6031
|
}
|
|
6032
|
+
function toBlobCpkInfo(input) {
|
|
6033
|
+
return input
|
|
6034
|
+
? {
|
|
6035
|
+
encryptionKey: input.encryptionKey,
|
|
6036
|
+
encryptionKeySha256: input.encryptionKeySha256,
|
|
6037
|
+
encryptionAlgorithm: "AES256",
|
|
6038
|
+
}
|
|
6039
|
+
: undefined;
|
|
6040
|
+
}
|
|
5894
6041
|
|
|
5895
6042
|
// Copyright (c) Microsoft Corporation.
|
|
5896
6043
|
/**
|
|
@@ -7937,7 +8084,8 @@ class DataLakePathClient extends StorageClient {
|
|
|
7937
8084
|
options.conditions = options.conditions || {};
|
|
7938
8085
|
const { span, updatedOptions } = createSpan("DataLakePathClient-create", options);
|
|
7939
8086
|
try {
|
|
7940
|
-
|
|
8087
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
|
8088
|
+
return await this.pathContext.create(Object.assign(Object.assign(Object.assign({}, options), { resource: resourceType, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, properties: toProperties(options.metadata), cpkInfo: options.customerProvidedKey }), convertTracingToRequestOptionsBase(updatedOptions)));
|
|
7941
8089
|
}
|
|
7942
8090
|
catch (e) {
|
|
7943
8091
|
span.setStatus({
|
|
@@ -7996,7 +8144,7 @@ class DataLakePathClient extends StorageClient {
|
|
|
7996
8144
|
async exists(options = {}) {
|
|
7997
8145
|
const { span, updatedOptions } = createSpan("DataLakeFileClient-exists", options);
|
|
7998
8146
|
try {
|
|
7999
|
-
return await this.blobClient.exists(updatedOptions);
|
|
8147
|
+
return await this.blobClient.exists(Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey) }));
|
|
8000
8148
|
}
|
|
8001
8149
|
catch (e) {
|
|
8002
8150
|
span.setStatus({
|
|
@@ -8239,7 +8387,7 @@ class DataLakePathClient extends StorageClient {
|
|
|
8239
8387
|
async getProperties(options = {}) {
|
|
8240
8388
|
const { span, updatedOptions } = createSpan("DataLakePathClient-getProperties", options);
|
|
8241
8389
|
try {
|
|
8242
|
-
return await this.blobClient.getProperties(Object.assign(Object.assign({}, options), { customerProvidedKey:
|
|
8390
|
+
return await this.blobClient.getProperties(Object.assign(Object.assign({}, options), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
8243
8391
|
}
|
|
8244
8392
|
catch (e) {
|
|
8245
8393
|
span.setStatus({
|
|
@@ -8300,7 +8448,7 @@ class DataLakePathClient extends StorageClient {
|
|
|
8300
8448
|
async setMetadata(metadata, options = {}) {
|
|
8301
8449
|
const { span, updatedOptions } = createSpan("DataLakePathClient-setMetadata", options);
|
|
8302
8450
|
try {
|
|
8303
|
-
return await this.blobClient.setMetadata(metadata, Object.assign(Object.assign({}, options), { customerProvidedKey:
|
|
8451
|
+
return await this.blobClient.setMetadata(metadata, Object.assign(Object.assign({}, options), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
8304
8452
|
}
|
|
8305
8453
|
catch (e) {
|
|
8306
8454
|
span.setStatus({
|
|
@@ -8582,7 +8730,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8582
8730
|
async read(offset = 0, count, options = {}) {
|
|
8583
8731
|
const { span, updatedOptions } = createSpan("DataLakeFileClient-read", options);
|
|
8584
8732
|
try {
|
|
8585
|
-
const rawResponse = await this.blockBlobClientInternal.download(offset, count, updatedOptions);
|
|
8733
|
+
const rawResponse = await this.blockBlobClientInternal.download(offset, count, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey) }));
|
|
8586
8734
|
const response = rawResponse;
|
|
8587
8735
|
if (!coreHttp.isNode && !response.contentAsBlob) {
|
|
8588
8736
|
response.contentAsBlob = rawResponse.blobBody;
|
|
@@ -8620,11 +8768,12 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8620
8768
|
options.conditions = options.conditions || {};
|
|
8621
8769
|
const { span, updatedOptions } = createSpan("DataLakeFileClient-append", options);
|
|
8622
8770
|
try {
|
|
8771
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
|
8623
8772
|
return await this.pathContextInternal.appendData(body, Object.assign({ pathHttpHeaders: {
|
|
8624
8773
|
contentMD5: options.transactionalContentMD5,
|
|
8625
8774
|
}, abortSignal: options.abortSignal, position: offset, contentLength: length, leaseAccessConditions: options.conditions, requestOptions: {
|
|
8626
8775
|
onUploadProgress: options.onProgress,
|
|
8627
|
-
} }, convertTracingToRequestOptionsBase(updatedOptions)));
|
|
8776
|
+
}, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
|
|
8628
8777
|
}
|
|
8629
8778
|
catch (e) {
|
|
8630
8779
|
span.setStatus({
|
|
@@ -8653,7 +8802,8 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8653
8802
|
options.conditions = options.conditions || {};
|
|
8654
8803
|
const { span, updatedOptions } = createSpan("DataLakeFileClient-flush", options);
|
|
8655
8804
|
try {
|
|
8656
|
-
|
|
8805
|
+
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
|
8806
|
+
return await this.pathContextInternal.flushData(Object.assign(Object.assign(Object.assign({}, options), { position, contentLength: 0, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey }), convertTracingToRequestOptionsBase(updatedOptions)));
|
|
8657
8807
|
}
|
|
8658
8808
|
catch (e) {
|
|
8659
8809
|
span.setStatus({
|
|
@@ -8755,6 +8905,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8755
8905
|
umask: options.umask,
|
|
8756
8906
|
conditions: options.conditions,
|
|
8757
8907
|
pathHttpHeaders: options.pathHttpHeaders,
|
|
8908
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
8758
8909
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8759
8910
|
});
|
|
8760
8911
|
// append() with empty data would return error, so do not continue
|
|
@@ -8793,6 +8944,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8793
8944
|
await this.append(bodyFactory(0, size), 0, size, {
|
|
8794
8945
|
abortSignal: options.abortSignal,
|
|
8795
8946
|
conditions: options.conditions,
|
|
8947
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
8796
8948
|
onProgress: options.onProgress,
|
|
8797
8949
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8798
8950
|
});
|
|
@@ -8801,6 +8953,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8801
8953
|
conditions: options.conditions,
|
|
8802
8954
|
close: options.close,
|
|
8803
8955
|
pathHttpHeaders: options.pathHttpHeaders,
|
|
8956
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
8804
8957
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8805
8958
|
});
|
|
8806
8959
|
}
|
|
@@ -8819,6 +8972,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8819
8972
|
await this.append(bodyFactory(start, contentLength), start, contentLength, {
|
|
8820
8973
|
abortSignal: options.abortSignal,
|
|
8821
8974
|
conditions: options.conditions,
|
|
8975
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
8822
8976
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8823
8977
|
});
|
|
8824
8978
|
transferProgress += contentLength;
|
|
@@ -8833,6 +8987,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8833
8987
|
conditions: options.conditions,
|
|
8834
8988
|
close: options.close,
|
|
8835
8989
|
pathHttpHeaders: options.pathHttpHeaders,
|
|
8990
|
+
customerProvidedKey: updatedOptions.customerProvidedKey,
|
|
8836
8991
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8837
8992
|
});
|
|
8838
8993
|
}
|
|
@@ -8874,6 +9029,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8874
9029
|
umask: options.umask,
|
|
8875
9030
|
conditions: options.conditions,
|
|
8876
9031
|
pathHttpHeaders: options.pathHttpHeaders,
|
|
9032
|
+
customerProvidedKey: options.customerProvidedKey,
|
|
8877
9033
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8878
9034
|
});
|
|
8879
9035
|
// After the File is Create, Lease ID is the only valid request parameter.
|
|
@@ -8895,6 +9051,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8895
9051
|
await this.append(body, offset, length, {
|
|
8896
9052
|
abortSignal: options.abortSignal,
|
|
8897
9053
|
conditions: options.conditions,
|
|
9054
|
+
customerProvidedKey: options.customerProvidedKey,
|
|
8898
9055
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8899
9056
|
});
|
|
8900
9057
|
// Update progress after block is successfully uploaded to server, in case of block trying
|
|
@@ -8914,6 +9071,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8914
9071
|
conditions: options.conditions,
|
|
8915
9072
|
close: options.close,
|
|
8916
9073
|
pathHttpHeaders: options.pathHttpHeaders,
|
|
9074
|
+
customerProvidedKey: options.customerProvidedKey,
|
|
8917
9075
|
tracingOptions: updatedOptions.tracingOptions,
|
|
8918
9076
|
});
|
|
8919
9077
|
}
|
|
@@ -8946,10 +9104,10 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8946
9104
|
const { span, updatedOptions } = createSpan("DataLakeFileClient-readToBuffer", options);
|
|
8947
9105
|
try {
|
|
8948
9106
|
if (buffer) {
|
|
8949
|
-
return await this.blockBlobClientInternal.downloadToBuffer(buffer, offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, tracingOptions: updatedOptions.tracingOptions }));
|
|
9107
|
+
return await this.blockBlobClientInternal.downloadToBuffer(buffer, offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
8950
9108
|
}
|
|
8951
9109
|
else {
|
|
8952
|
-
return await this.blockBlobClientInternal.downloadToBuffer(offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, tracingOptions: updatedOptions.tracingOptions }));
|
|
9110
|
+
return await this.blockBlobClientInternal.downloadToBuffer(offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
|
|
8953
9111
|
}
|
|
8954
9112
|
}
|
|
8955
9113
|
catch (e) {
|
|
@@ -8982,7 +9140,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
8982
9140
|
async readToFile(filePath, offset = 0, count, options = {}) {
|
|
8983
9141
|
const { span, updatedOptions } = createSpan("DataLakeFileClient-readToFile", options);
|
|
8984
9142
|
try {
|
|
8985
|
-
return await this.blockBlobClientInternal.downloadToFile(filePath, offset, count, updatedOptions);
|
|
9143
|
+
return await this.blockBlobClientInternal.downloadToFile(filePath, offset, count, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey) }));
|
|
8986
9144
|
}
|
|
8987
9145
|
catch (e) {
|
|
8988
9146
|
span.setStatus({
|
|
@@ -9026,7 +9184,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
9026
9184
|
async query(query, options = {}) {
|
|
9027
9185
|
const { span, updatedOptions } = createSpan("DataLakeFileClient-query", options);
|
|
9028
9186
|
try {
|
|
9029
|
-
const rawResponse = await this.blockBlobClientInternal.query(query, updatedOptions);
|
|
9187
|
+
const rawResponse = await this.blockBlobClientInternal.query(query, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey) }));
|
|
9030
9188
|
const response = rawResponse;
|
|
9031
9189
|
if (!coreHttp.isNode && !response.contentAsBlob) {
|
|
9032
9190
|
response.contentAsBlob = rawResponse.blobBody;
|
|
@@ -9567,7 +9725,7 @@ class DataLakeFileSystemClient extends StorageClient {
|
|
|
9567
9725
|
const response = rawResponse;
|
|
9568
9726
|
response.pathItems = [];
|
|
9569
9727
|
for (const path of rawResponse.paths || []) {
|
|
9570
|
-
response.pathItems.push(Object.assign(Object.assign({}, path), { permissions: toPermissions(path.permissions) }));
|
|
9728
|
+
response.pathItems.push(Object.assign(Object.assign({}, path), { permissions: toPermissions(path.permissions), createdOn: windowsFileTimeTicksToTime(path.creationTime), expiresOn: windowsFileTimeTicksToTime(path.expiryTime) }));
|
|
9571
9729
|
}
|
|
9572
9730
|
delete rawResponse.paths;
|
|
9573
9731
|
return response;
|