@azure/storage-file-datalake 12.27.0-beta.1 → 12.27.0
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/browser/DataLakeFileSystemClient.d.ts +13 -13
- package/dist/browser/DataLakeFileSystemClient.js +136 -93
- package/dist/browser/DataLakeFileSystemClient.js.map +1 -1
- package/dist/browser/DataLakeLeaseClient.js +1 -0
- package/dist/browser/DataLakeLeaseClient.js.map +1 -1
- package/dist/browser/DataLakeServiceClient.d.ts +6 -6
- package/dist/browser/DataLakeServiceClient.js +28 -11
- package/dist/browser/DataLakeServiceClient.js.map +1 -1
- package/dist/browser/Pipeline.js +24 -15
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/StorageClient.js +43 -3
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/StorageContextClient.js +2 -3
- package/dist/browser/StorageContextClient.js.map +1 -1
- package/dist/browser/clients.d.ts +33 -33
- package/dist/browser/clients.js +269 -89
- package/dist/browser/clients.js.map +1 -1
- package/dist/browser/generated/src/operations/fileSystemOperations.js +1 -0
- package/dist/browser/generated/src/operations/fileSystemOperations.js.map +1 -1
- package/dist/browser/generated/src/operations/pathOperations.js +1 -0
- package/dist/browser/generated/src/operations/pathOperations.js.map +1 -1
- package/dist/browser/generated/src/operations/service.js +1 -0
- package/dist/browser/generated/src/operations/service.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +15 -4
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/index-browser.d.mts.map +1 -1
- package/dist/browser/index-browser.mjs.map +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/models.d.ts +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/browser/sas/AccountSASPermissions.js +34 -36
- package/dist/browser/sas/AccountSASPermissions.js.map +1 -1
- package/dist/browser/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/browser/sas/AccountSASResourceTypes.js +13 -15
- package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/browser/sas/AccountSASServices.js +16 -18
- package/dist/browser/sas/AccountSASServices.js.map +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/browser/sas/AccountSASSignatureValues.js +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/sas/DataLakeSASPermissions.js +39 -41
- package/dist/browser/sas/DataLakeSASPermissions.js.map +1 -1
- package/dist/browser/sas/DataLakeSASSignatureValues.d.ts +1 -1
- package/dist/browser/sas/DataLakeSASSignatureValues.js +4 -3
- package/dist/browser/sas/DataLakeSASSignatureValues.js.map +1 -1
- package/dist/browser/sas/DirectorySASPermissions.d.ts +1 -1
- package/dist/browser/sas/DirectorySASPermissions.js +44 -46
- package/dist/browser/sas/DirectorySASPermissions.js.map +1 -1
- package/dist/browser/sas/FileSystemSASPermissions.d.ts +1 -1
- package/dist/browser/sas/FileSystemSASPermissions.js +44 -46
- package/dist/browser/sas/FileSystemSASPermissions.js.map +1 -1
- package/dist/browser/sas/SASQueryParameters.d.ts +2 -2
- package/dist/browser/sas/SASQueryParameters.js +131 -2
- package/dist/browser/sas/SASQueryParameters.js.map +1 -1
- package/dist/browser/transforms.js +8 -1
- package/dist/browser/transforms.js.map +1 -1
- package/dist/browser/utils/Batch.js +29 -21
- package/dist/browser/utils/Batch.js.map +1 -1
- package/dist/browser/utils/BufferScheduler.js +70 -44
- package/dist/browser/utils/BufferScheduler.js.map +1 -1
- package/dist/browser/utils/DataLakeAclChangeFailedError.js +8 -0
- package/dist/browser/utils/DataLakeAclChangeFailedError.js.map +1 -1
- package/dist/browser/utils/PathClientInternal.js +4 -0
- package/dist/browser/utils/PathClientInternal.js.map +1 -1
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.d.ts +2 -2
- package/dist/browser/utils/utils.common.js +5 -7
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/commonjs/DataLakeFileSystemClient.d.ts +13 -13
- package/dist/commonjs/DataLakeFileSystemClient.js +136 -93
- package/dist/commonjs/DataLakeFileSystemClient.js.map +1 -1
- package/dist/commonjs/DataLakeLeaseClient.js +1 -0
- package/dist/commonjs/DataLakeLeaseClient.js.map +1 -1
- package/dist/commonjs/DataLakeServiceClient.d.ts +6 -6
- package/dist/commonjs/DataLakeServiceClient.js +28 -11
- package/dist/commonjs/DataLakeServiceClient.js.map +1 -1
- package/dist/commonjs/Pipeline.js +32 -23
- package/dist/commonjs/Pipeline.js.map +1 -1
- package/dist/commonjs/StorageClient.js +43 -3
- package/dist/commonjs/StorageClient.js.map +1 -1
- package/dist/commonjs/StorageContextClient.js +2 -3
- package/dist/commonjs/StorageContextClient.js.map +1 -1
- package/dist/commonjs/clients.d.ts +33 -33
- package/dist/commonjs/clients.js +269 -89
- package/dist/commonjs/clients.js.map +1 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js +13 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js +1 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operations/pathOperations.js +1 -0
- package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +1 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +15 -4
- package/dist/commonjs/generated/src/storageClient.js.map +1 -1
- package/dist/commonjs/models.d.ts +1 -1
- package/dist/commonjs/models.js.map +1 -1
- package/dist/commonjs/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/commonjs/sas/AccountSASPermissions.js +34 -36
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.js +13 -15
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/sas/AccountSASServices.js +16 -18
- package/dist/commonjs/sas/AccountSASServices.js.map +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/commonjs/sas/AccountSASSignatureValues.js +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/DataLakeSASPermissions.js +39 -41
- package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/DataLakeSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js +4 -3
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/DirectorySASPermissions.d.ts +1 -1
- package/dist/commonjs/sas/DirectorySASPermissions.js +44 -46
- package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -1
- package/dist/commonjs/sas/FileSystemSASPermissions.d.ts +1 -1
- package/dist/commonjs/sas/FileSystemSASPermissions.js +44 -46
- package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/SASQueryParameters.d.ts +2 -2
- package/dist/commonjs/sas/SASQueryParameters.js +131 -2
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/transforms.js +8 -1
- package/dist/commonjs/transforms.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/utils/Batch.js +29 -21
- package/dist/commonjs/utils/Batch.js.map +1 -1
- package/dist/commonjs/utils/BufferScheduler.js +70 -44
- package/dist/commonjs/utils/BufferScheduler.js.map +1 -1
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +8 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -1
- package/dist/commonjs/utils/PathClientInternal.js +4 -0
- package/dist/commonjs/utils/PathClientInternal.js.map +1 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +1 -1
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/commonjs/utils/utils.common.d.ts +2 -2
- package/dist/commonjs/utils/utils.common.js +5 -7
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/commonjs/utils/utils.d.ts +1 -1
- package/dist/commonjs/utils/utils.d.ts.map +1 -1
- package/dist/commonjs/utils/utils.js +4 -4
- package/dist/commonjs/utils/utils.js.map +1 -1
- package/dist/esm/DataLakeFileSystemClient.d.ts +13 -13
- package/dist/esm/DataLakeFileSystemClient.js +136 -93
- package/dist/esm/DataLakeFileSystemClient.js.map +1 -1
- package/dist/esm/DataLakeLeaseClient.js +1 -0
- package/dist/esm/DataLakeLeaseClient.js.map +1 -1
- package/dist/esm/DataLakeServiceClient.d.ts +6 -6
- package/dist/esm/DataLakeServiceClient.js +28 -11
- package/dist/esm/DataLakeServiceClient.js.map +1 -1
- package/dist/esm/Pipeline.js +24 -15
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/StorageClient.js +43 -3
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/StorageContextClient.js +2 -3
- package/dist/esm/StorageContextClient.js.map +1 -1
- package/dist/esm/clients.d.ts +33 -33
- package/dist/esm/clients.js +269 -89
- package/dist/esm/clients.js.map +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js +13 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/esm/generated/src/operations/fileSystemOperations.js +1 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.js.map +1 -1
- package/dist/esm/generated/src/operations/pathOperations.js +1 -0
- package/dist/esm/generated/src/operations/pathOperations.js.map +1 -1
- package/dist/esm/generated/src/operations/service.js +1 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +15 -4
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/models.d.ts +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/esm/sas/AccountSASPermissions.js +34 -36
- package/dist/esm/sas/AccountSASPermissions.js.map +1 -1
- package/dist/esm/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/esm/sas/AccountSASResourceTypes.js +13 -15
- package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/esm/sas/AccountSASServices.js +16 -18
- package/dist/esm/sas/AccountSASServices.js.map +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/esm/sas/AccountSASSignatureValues.js +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/sas/DataLakeSASPermissions.js +39 -41
- package/dist/esm/sas/DataLakeSASPermissions.js.map +1 -1
- package/dist/esm/sas/DataLakeSASSignatureValues.d.ts +1 -1
- package/dist/esm/sas/DataLakeSASSignatureValues.js +4 -3
- package/dist/esm/sas/DataLakeSASSignatureValues.js.map +1 -1
- package/dist/esm/sas/DirectorySASPermissions.d.ts +1 -1
- package/dist/esm/sas/DirectorySASPermissions.js +44 -46
- package/dist/esm/sas/DirectorySASPermissions.js.map +1 -1
- package/dist/esm/sas/FileSystemSASPermissions.d.ts +1 -1
- package/dist/esm/sas/FileSystemSASPermissions.js +44 -46
- package/dist/esm/sas/FileSystemSASPermissions.js.map +1 -1
- package/dist/esm/sas/SASQueryParameters.d.ts +2 -2
- package/dist/esm/sas/SASQueryParameters.js +131 -2
- package/dist/esm/sas/SASQueryParameters.js.map +1 -1
- package/dist/esm/transforms.js +8 -1
- package/dist/esm/transforms.js.map +1 -1
- package/dist/esm/utils/Batch.js +29 -21
- package/dist/esm/utils/Batch.js.map +1 -1
- package/dist/esm/utils/BufferScheduler.js +70 -44
- package/dist/esm/utils/BufferScheduler.js.map +1 -1
- package/dist/esm/utils/DataLakeAclChangeFailedError.js +8 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.js.map +1 -1
- package/dist/esm/utils/PathClientInternal.js +4 -0
- package/dist/esm/utils/PathClientInternal.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.d.ts +2 -2
- package/dist/esm/utils/utils.common.js +5 -7
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/esm/utils/utils.d.ts +1 -1
- package/dist/esm/utils/utils.d.ts.map +1 -1
- package/dist/esm/utils/utils.js +2 -2
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/react-native/DataLakeFileSystemClient.d.ts +13 -13
- package/dist/react-native/DataLakeFileSystemClient.js +136 -93
- package/dist/react-native/DataLakeFileSystemClient.js.map +1 -1
- package/dist/react-native/DataLakeLeaseClient.js +1 -0
- package/dist/react-native/DataLakeLeaseClient.js.map +1 -1
- package/dist/react-native/DataLakeServiceClient.d.ts +6 -6
- package/dist/react-native/DataLakeServiceClient.js +28 -11
- package/dist/react-native/DataLakeServiceClient.js.map +1 -1
- package/dist/react-native/Pipeline.js +24 -15
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/StorageClient.js +43 -3
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/StorageContextClient.js +2 -3
- package/dist/react-native/StorageContextClient.js.map +1 -1
- package/dist/react-native/clients.d.ts +33 -33
- package/dist/react-native/clients.js +269 -89
- package/dist/react-native/clients.js.map +1 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.js +13 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/react-native/generated/src/operations/fileSystemOperations.js +1 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.js.map +1 -1
- package/dist/react-native/generated/src/operations/pathOperations.js +1 -0
- package/dist/react-native/generated/src/operations/pathOperations.js.map +1 -1
- package/dist/react-native/generated/src/operations/service.js +1 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +15 -4
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/models.d.ts +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/react-native/sas/AccountSASPermissions.js +34 -36
- package/dist/react-native/sas/AccountSASPermissions.js.map +1 -1
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/react-native/sas/AccountSASResourceTypes.js +13 -15
- package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/react-native/sas/AccountSASServices.js +16 -18
- package/dist/react-native/sas/AccountSASServices.js.map +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/react-native/sas/AccountSASSignatureValues.js +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/sas/DataLakeSASPermissions.js +39 -41
- package/dist/react-native/sas/DataLakeSASPermissions.js.map +1 -1
- package/dist/react-native/sas/DataLakeSASSignatureValues.d.ts +1 -1
- package/dist/react-native/sas/DataLakeSASSignatureValues.js +4 -3
- package/dist/react-native/sas/DataLakeSASSignatureValues.js.map +1 -1
- package/dist/react-native/sas/DirectorySASPermissions.d.ts +1 -1
- package/dist/react-native/sas/DirectorySASPermissions.js +44 -46
- package/dist/react-native/sas/DirectorySASPermissions.js.map +1 -1
- package/dist/react-native/sas/FileSystemSASPermissions.d.ts +1 -1
- package/dist/react-native/sas/FileSystemSASPermissions.js +44 -46
- package/dist/react-native/sas/FileSystemSASPermissions.js.map +1 -1
- package/dist/react-native/sas/SASQueryParameters.d.ts +2 -2
- package/dist/react-native/sas/SASQueryParameters.js +131 -2
- package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
- package/dist/react-native/transforms.js +8 -1
- package/dist/react-native/transforms.js.map +1 -1
- package/dist/react-native/utils/Batch.js +29 -21
- package/dist/react-native/utils/Batch.js.map +1 -1
- package/dist/react-native/utils/BufferScheduler.js +70 -44
- package/dist/react-native/utils/BufferScheduler.js.map +1 -1
- package/dist/react-native/utils/DataLakeAclChangeFailedError.js +8 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.js.map +1 -1
- package/dist/react-native/utils/PathClientInternal.js +4 -0
- package/dist/react-native/utils/PathClientInternal.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.d.ts +2 -2
- package/dist/react-native/utils/utils.common.js +5 -7
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/dist/react-native/utils/utils.d.ts +1 -1
- package/dist/react-native/utils/utils.d.ts.map +1 -1
- package/dist/react-native/utils/utils.js +2 -2
- package/dist/react-native/utils/utils.js.map +1 -1
- package/package.json +8 -8
package/dist/commonjs/clients.js
CHANGED
|
@@ -25,6 +25,15 @@ const utils_js_1 = require("./utils/utils.js");
|
|
|
25
25
|
* A DataLakePathClient represents a URL to the Azure Storage path (directory or file).
|
|
26
26
|
*/
|
|
27
27
|
class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
28
|
+
/**
|
|
29
|
+
* pathContext provided by protocol layer.
|
|
30
|
+
*/
|
|
31
|
+
pathContext;
|
|
32
|
+
/**
|
|
33
|
+
* blobClient provided by `@azure/storage-blob` package.
|
|
34
|
+
*/
|
|
35
|
+
blobClient;
|
|
36
|
+
isTokenCredential;
|
|
28
37
|
/**
|
|
29
38
|
* SetAccessControlRecursiveInternal operation sets the Access Control on a path and sub paths.
|
|
30
39
|
*
|
|
@@ -50,14 +59,19 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
50
59
|
continuationToken: undefined,
|
|
51
60
|
};
|
|
52
61
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-setAccessControlRecursiveInternal", options, async (updatedOptions) => {
|
|
53
|
-
var _a, _b, _c, _d, _e, _f;
|
|
54
62
|
let continuationToken = options.continuationToken;
|
|
55
63
|
let batchCounter = 0;
|
|
56
64
|
let reachMaxBatches = false;
|
|
57
65
|
do {
|
|
58
66
|
let response;
|
|
59
67
|
try {
|
|
60
|
-
response = await this.pathContext.setAccessControlRecursive(mode,
|
|
68
|
+
response = await this.pathContext.setAccessControlRecursive(mode, {
|
|
69
|
+
...updatedOptions,
|
|
70
|
+
acl: (0, transforms_js_1.toAclString)(acl),
|
|
71
|
+
maxRecords: options.batchSize,
|
|
72
|
+
continuation: continuationToken,
|
|
73
|
+
forceFlag: options.continueOnFailure,
|
|
74
|
+
});
|
|
61
75
|
}
|
|
62
76
|
catch (e) {
|
|
63
77
|
throw new DataLakeAclChangeFailedError_js_1.DataLakeAclChangeFailedError(e, continuationToken);
|
|
@@ -66,17 +80,17 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
66
80
|
continuationToken = response.continuation;
|
|
67
81
|
// Update result
|
|
68
82
|
result.continuationToken = continuationToken;
|
|
69
|
-
result.counters.failedChangesCount +=
|
|
70
|
-
result.counters.changedDirectoriesCount +=
|
|
71
|
-
result.counters.changedFilesCount +=
|
|
83
|
+
result.counters.failedChangesCount += response.failureCount ?? 0;
|
|
84
|
+
result.counters.changedDirectoriesCount += response.directoriesSuccessful ?? 0;
|
|
85
|
+
result.counters.changedFilesCount += response.filesSuccessful ?? 0;
|
|
72
86
|
// Progress event call back
|
|
73
87
|
if (options.onProgress) {
|
|
74
88
|
const progress = {
|
|
75
89
|
batchFailures: (0, transforms_js_1.toAccessControlChangeFailureArray)(response.failedEntries),
|
|
76
90
|
batchCounters: {
|
|
77
|
-
failedChangesCount:
|
|
78
|
-
changedDirectoriesCount:
|
|
79
|
-
changedFilesCount:
|
|
91
|
+
failedChangesCount: response.failureCount ?? 0,
|
|
92
|
+
changedDirectoriesCount: response.directoriesSuccessful ?? 0,
|
|
93
|
+
changedFilesCount: response.filesSuccessful ?? 0,
|
|
80
94
|
},
|
|
81
95
|
aggregateCounters: result.counters,
|
|
82
96
|
continuationToken: continuationToken,
|
|
@@ -155,7 +169,7 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
155
169
|
/**
|
|
156
170
|
* Create a directory or path.
|
|
157
171
|
*
|
|
158
|
-
* @see https://learn.microsoft.com/
|
|
172
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/create
|
|
159
173
|
*
|
|
160
174
|
* @param resourceType - Resource type, "directory" or "file".
|
|
161
175
|
* @param options - Optional. Options when creating path.
|
|
@@ -177,29 +191,48 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
177
191
|
else if (options.expiresOn) {
|
|
178
192
|
throw new Error(`Value for expiresOn is invalid: ${options.expiresOn}`);
|
|
179
193
|
}
|
|
180
|
-
return (0, utils_common_js_1.assertResponse)(await this.pathContext.create(
|
|
181
|
-
|
|
194
|
+
return (0, utils_common_js_1.assertResponse)(await this.pathContext.create({
|
|
195
|
+
...updatedOptions,
|
|
196
|
+
resource: resourceType,
|
|
197
|
+
leaseAccessConditions: options.conditions,
|
|
198
|
+
modifiedAccessConditions: options.conditions,
|
|
199
|
+
properties: (0, transforms_js_1.toProperties)(options.metadata),
|
|
200
|
+
cpkInfo: options.customerProvidedKey,
|
|
201
|
+
acl: options.acl ? (0, transforms_js_1.toAclString)(options.acl) : undefined,
|
|
202
|
+
expiryOptions,
|
|
203
|
+
expiresOn,
|
|
204
|
+
}));
|
|
182
205
|
});
|
|
183
206
|
}
|
|
184
207
|
/**
|
|
185
208
|
* Create a directory or file. If the resource already exists, it is not changed.
|
|
186
209
|
*
|
|
187
|
-
* @see https://learn.microsoft.com/
|
|
210
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/create
|
|
188
211
|
*
|
|
189
212
|
* @param resourceType - Resource type, "directory" or "file".
|
|
190
213
|
* @param options -
|
|
191
214
|
*/
|
|
192
215
|
async createIfNotExists(resourceType, options = {}) {
|
|
193
216
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-createIfNotExists", options, async (updatedOptions) => {
|
|
194
|
-
var _a, _b;
|
|
195
217
|
try {
|
|
196
218
|
const conditions = { ifNoneMatch: constants_js_1.ETagAny };
|
|
197
|
-
const res = await this.create(resourceType,
|
|
198
|
-
|
|
219
|
+
const res = await this.create(resourceType, {
|
|
220
|
+
...options,
|
|
221
|
+
conditions,
|
|
222
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
223
|
+
});
|
|
224
|
+
return {
|
|
225
|
+
succeeded: true,
|
|
226
|
+
...res,
|
|
227
|
+
};
|
|
199
228
|
}
|
|
200
229
|
catch (e) {
|
|
201
|
-
if (
|
|
202
|
-
return
|
|
230
|
+
if (e.details?.errorCode === "PathAlreadyExists") {
|
|
231
|
+
return {
|
|
232
|
+
succeeded: false,
|
|
233
|
+
...e.response?.parsedHeaders,
|
|
234
|
+
_response: e.response,
|
|
235
|
+
};
|
|
203
236
|
}
|
|
204
237
|
throw e;
|
|
205
238
|
}
|
|
@@ -216,13 +249,16 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
216
249
|
*/
|
|
217
250
|
async exists(options = {}) {
|
|
218
251
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-exists", options, async (updatedOptions) => {
|
|
219
|
-
return this.blobClient.exists(
|
|
252
|
+
return this.blobClient.exists({
|
|
253
|
+
...updatedOptions,
|
|
254
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(updatedOptions.customerProvidedKey),
|
|
255
|
+
});
|
|
220
256
|
});
|
|
221
257
|
}
|
|
222
258
|
/**
|
|
223
259
|
* Delete current path (directory or file).
|
|
224
260
|
*
|
|
225
|
-
* @see https://learn.microsoft.com/
|
|
261
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/delete
|
|
226
262
|
*
|
|
227
263
|
* @param recursive - Required and valid only when the resource is a directory. If "true", all paths beneath the directory will be deleted.
|
|
228
264
|
* @param options - Optional. Options when deleting path.
|
|
@@ -246,8 +282,15 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
246
282
|
let response;
|
|
247
283
|
// How to handle long delete loop?
|
|
248
284
|
do {
|
|
249
|
-
response = (0, utils_common_js_1.assertResponse)(await this.pathContext.delete(
|
|
250
|
-
|
|
285
|
+
response = (0, utils_common_js_1.assertResponse)(await this.pathContext.delete({
|
|
286
|
+
...updatedOptions,
|
|
287
|
+
continuation,
|
|
288
|
+
recursive,
|
|
289
|
+
leaseAccessConditions: options.conditions,
|
|
290
|
+
modifiedAccessConditions: options.conditions,
|
|
291
|
+
abortSignal: options.abortSignal,
|
|
292
|
+
paginated,
|
|
293
|
+
}));
|
|
251
294
|
continuation = response.continuation;
|
|
252
295
|
} while (continuation);
|
|
253
296
|
return response;
|
|
@@ -256,7 +299,7 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
256
299
|
/**
|
|
257
300
|
* Delete current path (directory or file) if it exists.
|
|
258
301
|
*
|
|
259
|
-
* @see https://learn.microsoft.com/
|
|
302
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/delete
|
|
260
303
|
*
|
|
261
304
|
* @param recursive - Required and valid only when the resource is a directory. If "true", all paths beneath the directory will be deleted.
|
|
262
305
|
* @param options -
|
|
@@ -264,14 +307,20 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
264
307
|
async deleteIfExists(recursive, options = {}) {
|
|
265
308
|
options.conditions = options.conditions || {};
|
|
266
309
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-deleteIfExists", options, async (updatedOptions) => {
|
|
267
|
-
var _a, _b;
|
|
268
310
|
try {
|
|
269
311
|
const res = await this.delete(recursive, updatedOptions);
|
|
270
|
-
return
|
|
312
|
+
return {
|
|
313
|
+
succeeded: true,
|
|
314
|
+
...res,
|
|
315
|
+
};
|
|
271
316
|
}
|
|
272
317
|
catch (e) {
|
|
273
|
-
if (
|
|
274
|
-
return
|
|
318
|
+
if (e.details?.errorCode === "PathNotFound") {
|
|
319
|
+
return {
|
|
320
|
+
succeeded: false,
|
|
321
|
+
...e.response?.parsedHeaders,
|
|
322
|
+
_response: e.response,
|
|
323
|
+
};
|
|
275
324
|
}
|
|
276
325
|
throw e;
|
|
277
326
|
}
|
|
@@ -280,21 +329,33 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
280
329
|
/**
|
|
281
330
|
* Returns the access control data for a path (directory of file).
|
|
282
331
|
*
|
|
283
|
-
* @see https://learn.microsoft.com/
|
|
332
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/getproperties
|
|
284
333
|
*
|
|
285
334
|
* @param options - Optional. Options when getting file access control.
|
|
286
335
|
*/
|
|
287
336
|
async getAccessControl(options = {}) {
|
|
288
337
|
options.conditions = options.conditions || {};
|
|
289
338
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-getAccessControl", options, async (updatedOptions) => {
|
|
290
|
-
const response = (0, utils_common_js_1.assertResponse)(await this.pathContext.getProperties(
|
|
291
|
-
|
|
339
|
+
const response = (0, utils_common_js_1.assertResponse)(await this.pathContext.getProperties({
|
|
340
|
+
...updatedOptions,
|
|
341
|
+
action: "getAccessControl",
|
|
342
|
+
upn: options.userPrincipalName,
|
|
343
|
+
leaseAccessConditions: options.conditions,
|
|
344
|
+
modifiedAccessConditions: options.conditions,
|
|
345
|
+
abortSignal: options.abortSignal,
|
|
346
|
+
}));
|
|
347
|
+
return {
|
|
348
|
+
...response,
|
|
349
|
+
_response: response._response,
|
|
350
|
+
permissions: (0, transforms_js_1.toPermissions)(response.permissions),
|
|
351
|
+
acl: (0, transforms_js_1.toAcl)(response.acl),
|
|
352
|
+
};
|
|
292
353
|
});
|
|
293
354
|
}
|
|
294
355
|
/**
|
|
295
356
|
* Set the access control data for a path (directory of file).
|
|
296
357
|
*
|
|
297
|
-
* @see https://learn.microsoft.com/
|
|
358
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/update
|
|
298
359
|
*
|
|
299
360
|
* @param acl - The POSIX access control list for the file or directory.
|
|
300
361
|
* @param options - Optional. Options when setting path access control.
|
|
@@ -302,13 +363,18 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
302
363
|
async setAccessControl(acl, options = {}) {
|
|
303
364
|
options.conditions = options.conditions || {};
|
|
304
365
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-setAccessControl", options, async (updatedOptions) => {
|
|
305
|
-
return (0, utils_common_js_1.assertResponse)(await this.pathContext.setAccessControl(
|
|
366
|
+
return (0, utils_common_js_1.assertResponse)(await this.pathContext.setAccessControl({
|
|
367
|
+
...updatedOptions,
|
|
368
|
+
acl: (0, transforms_js_1.toAclString)(acl),
|
|
369
|
+
leaseAccessConditions: options.conditions,
|
|
370
|
+
modifiedAccessConditions: options.conditions,
|
|
371
|
+
}));
|
|
306
372
|
});
|
|
307
373
|
}
|
|
308
374
|
/**
|
|
309
375
|
* Sets the Access Control on a path and sub paths.
|
|
310
376
|
*
|
|
311
|
-
* @see https://learn.microsoft.com/
|
|
377
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/update
|
|
312
378
|
*
|
|
313
379
|
* @param acl - The POSIX access control list for the file or directory.
|
|
314
380
|
* @param options - Optional. Options
|
|
@@ -321,7 +387,7 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
321
387
|
/**
|
|
322
388
|
* Modifies the Access Control on a path and sub paths.
|
|
323
389
|
*
|
|
324
|
-
* @see https://learn.microsoft.com/
|
|
390
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/update
|
|
325
391
|
*
|
|
326
392
|
* @param acl - The POSIX access control list for the file or directory.
|
|
327
393
|
* @param options - Optional. Options
|
|
@@ -334,7 +400,7 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
334
400
|
/**
|
|
335
401
|
* Removes the Access Control on a path and sub paths.
|
|
336
402
|
*
|
|
337
|
-
* @see https://learn.microsoft.com/
|
|
403
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/update
|
|
338
404
|
*
|
|
339
405
|
* @param acl - The POSIX access control list for the file or directory.
|
|
340
406
|
* @param options - Optional. Options
|
|
@@ -347,7 +413,7 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
347
413
|
/**
|
|
348
414
|
* Sets the file permissions on a path.
|
|
349
415
|
*
|
|
350
|
-
* @see https://learn.microsoft.com/
|
|
416
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/update
|
|
351
417
|
*
|
|
352
418
|
* @param permissions - The POSIX access permissions for the file owner, the file owning group, and others.
|
|
353
419
|
* @param options - Optional. Options when setting path permissions.
|
|
@@ -355,7 +421,12 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
355
421
|
async setPermissions(permissions, options = {}) {
|
|
356
422
|
options.conditions = options.conditions || {};
|
|
357
423
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-setPermissions", options, async (updatedOptions) => {
|
|
358
|
-
return (0, utils_common_js_1.assertResponse)(await this.pathContext.setAccessControl(
|
|
424
|
+
return (0, utils_common_js_1.assertResponse)(await this.pathContext.setAccessControl({
|
|
425
|
+
...updatedOptions,
|
|
426
|
+
permissions: (0, transforms_js_1.toPermissionsString)(permissions),
|
|
427
|
+
leaseAccessConditions: options.conditions,
|
|
428
|
+
modifiedAccessConditions: options.conditions,
|
|
429
|
+
}));
|
|
359
430
|
});
|
|
360
431
|
}
|
|
361
432
|
/**
|
|
@@ -367,13 +438,17 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
367
438
|
* the methods of {@link DataLakeFileSystemClient} that list paths using the `includeMetadata` option, which
|
|
368
439
|
* will retain their original casing.
|
|
369
440
|
*
|
|
370
|
-
* @see https://learn.microsoft.com/
|
|
441
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties
|
|
371
442
|
*
|
|
372
443
|
* @param options - Optional. Options when getting path properties.
|
|
373
444
|
*/
|
|
374
445
|
async getProperties(options = {}) {
|
|
375
446
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-getProperties", options, async (updatedOptions) => {
|
|
376
|
-
const response = await this.blobClient.getProperties(
|
|
447
|
+
const response = await this.blobClient.getProperties({
|
|
448
|
+
...options,
|
|
449
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(options.customerProvidedKey),
|
|
450
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
451
|
+
});
|
|
377
452
|
return (0, utils_common_js_1.ParsePathGetPropertiesExtraHeaderValues)(response);
|
|
378
453
|
});
|
|
379
454
|
}
|
|
@@ -382,7 +457,7 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
382
457
|
*
|
|
383
458
|
* If no value provided, or no value provided for the specified blob HTTP headers,
|
|
384
459
|
* these blob HTTP headers without a value will be cleared.
|
|
385
|
-
* @see https://learn.microsoft.com/
|
|
460
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties
|
|
386
461
|
*
|
|
387
462
|
* @param httpHeaders -
|
|
388
463
|
* @param options -
|
|
@@ -405,7 +480,7 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
405
480
|
* If no option provided, or no metadata defined in the parameter, the path
|
|
406
481
|
* metadata will be removed.
|
|
407
482
|
*
|
|
408
|
-
* @see https://learn.microsoft.com/
|
|
483
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata
|
|
409
484
|
*
|
|
410
485
|
* @param metadata - Optional. Replace existing metadata with this value.
|
|
411
486
|
* If no value provided the existing metadata will be removed.
|
|
@@ -413,7 +488,11 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
413
488
|
*/
|
|
414
489
|
async setMetadata(metadata, options = {}) {
|
|
415
490
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-setMetadata", options, async (updatedOptions) => {
|
|
416
|
-
return this.blobClient.setMetadata(metadata,
|
|
491
|
+
return this.blobClient.setMetadata(metadata, {
|
|
492
|
+
...options,
|
|
493
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(options.customerProvidedKey),
|
|
494
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
495
|
+
});
|
|
417
496
|
});
|
|
418
497
|
}
|
|
419
498
|
async move(destinationPathOrFileSystem, destinationPathOrOptions, options) {
|
|
@@ -423,10 +502,10 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
423
502
|
if (typeof destinationPathOrOptions === "string") {
|
|
424
503
|
destinationFileSystem = destinationPathOrFileSystem;
|
|
425
504
|
destinationPath = destinationPathOrOptions;
|
|
426
|
-
pathMoveOptions = options
|
|
505
|
+
pathMoveOptions = options ?? {};
|
|
427
506
|
}
|
|
428
507
|
else {
|
|
429
|
-
pathMoveOptions = destinationPathOrOptions
|
|
508
|
+
pathMoveOptions = destinationPathOrOptions ?? {};
|
|
430
509
|
}
|
|
431
510
|
const renameSource = (0, utils_common_js_1.getURLPathAndQuery)(this.dfsEndpointUrl);
|
|
432
511
|
const split = destinationPath.split("?");
|
|
@@ -445,14 +524,21 @@ class DataLakePathClient extends StorageClient_js_1.StorageClient {
|
|
|
445
524
|
}
|
|
446
525
|
const destPathClient = new DataLakePathClient(destinationUrl, this.pipeline);
|
|
447
526
|
return tracing_js_1.tracingClient.withSpan("DataLakePathClient-move", pathMoveOptions, async (updatedOptions) => {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
527
|
+
return (0, utils_common_js_1.assertResponse)(await destPathClient.pathContext.create({
|
|
528
|
+
...updatedOptions,
|
|
529
|
+
mode: "legacy", // By default
|
|
530
|
+
renameSource,
|
|
531
|
+
sourceLeaseId: pathMoveOptions.conditions?.leaseId,
|
|
532
|
+
leaseAccessConditions: pathMoveOptions.destinationConditions,
|
|
533
|
+
sourceModifiedAccessConditions: {
|
|
534
|
+
sourceIfMatch: pathMoveOptions.conditions?.ifMatch,
|
|
535
|
+
sourceIfNoneMatch: pathMoveOptions.conditions?.ifNoneMatch,
|
|
536
|
+
sourceIfModifiedSince: pathMoveOptions.conditions?.ifModifiedSince,
|
|
537
|
+
sourceIfUnmodifiedSince: pathMoveOptions.conditions?.ifUnmodifiedSince,
|
|
538
|
+
},
|
|
539
|
+
modifiedAccessConditions: pathMoveOptions.destinationConditions,
|
|
540
|
+
abortSignal: pathMoveOptions.abortSignal,
|
|
541
|
+
}));
|
|
456
542
|
});
|
|
457
543
|
}
|
|
458
544
|
}
|
|
@@ -470,7 +556,7 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
470
556
|
pathCreateOptions = options;
|
|
471
557
|
}
|
|
472
558
|
else {
|
|
473
|
-
pathCreateOptions = resourceTypeOrOptions
|
|
559
|
+
pathCreateOptions = resourceTypeOrOptions ?? {};
|
|
474
560
|
}
|
|
475
561
|
return tracing_js_1.tracingClient.withSpan("DataLakeDirectoryClient-create", pathCreateOptions, async (updatedOptions) => {
|
|
476
562
|
return super.create("directory", updatedOptions);
|
|
@@ -484,7 +570,9 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
484
570
|
options = resourceTypeOrOptions || {};
|
|
485
571
|
}
|
|
486
572
|
return tracing_js_1.tracingClient.withSpan("DataLakeDirectoryClient-createIfNotExists", options, async (updatedOptions) => {
|
|
487
|
-
return super.createIfNotExists("directory",
|
|
573
|
+
return super.createIfNotExists("directory", {
|
|
574
|
+
...updatedOptions,
|
|
575
|
+
});
|
|
488
576
|
});
|
|
489
577
|
}
|
|
490
578
|
/**
|
|
@@ -511,7 +599,7 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
511
599
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
512
600
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
513
601
|
*
|
|
514
|
-
* @see https://learn.microsoft.com/
|
|
602
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
515
603
|
*
|
|
516
604
|
* @param options - Optional parameters.
|
|
517
605
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -521,7 +609,12 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
521
609
|
if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
|
|
522
610
|
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
523
611
|
}
|
|
524
|
-
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)(
|
|
612
|
+
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)({
|
|
613
|
+
fileSystemName: this.fileSystemName,
|
|
614
|
+
pathName: this.name,
|
|
615
|
+
isDirectory: true,
|
|
616
|
+
...options,
|
|
617
|
+
}, this.credential).toString();
|
|
525
618
|
resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
|
|
526
619
|
});
|
|
527
620
|
}
|
|
@@ -529,7 +622,7 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
529
622
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
530
623
|
* and parameters passed in.
|
|
531
624
|
*
|
|
532
|
-
* @see https://learn.microsoft.com/
|
|
625
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
533
626
|
*
|
|
534
627
|
* @param options - Optional parameters.
|
|
535
628
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -539,13 +632,18 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
539
632
|
if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
|
|
540
633
|
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
541
634
|
}
|
|
542
|
-
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)(
|
|
635
|
+
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)({
|
|
636
|
+
fileSystemName: this.fileSystemName,
|
|
637
|
+
pathName: this.name,
|
|
638
|
+
isDirectory: true,
|
|
639
|
+
...options,
|
|
640
|
+
}, this.credential).stringToSign;
|
|
543
641
|
}
|
|
544
642
|
/**
|
|
545
643
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
546
644
|
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
547
645
|
*
|
|
548
|
-
* @see https://learn.microsoft.com/
|
|
646
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
549
647
|
*
|
|
550
648
|
* @param options - Optional parameters.
|
|
551
649
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
@@ -553,7 +651,12 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
553
651
|
*/
|
|
554
652
|
generateUserDelegationSasUrl(options, userDelegationKey) {
|
|
555
653
|
return new Promise((resolve) => {
|
|
556
|
-
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)(
|
|
654
|
+
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)({
|
|
655
|
+
fileSystemName: this.fileSystemName,
|
|
656
|
+
pathName: this.name,
|
|
657
|
+
isDirectory: true,
|
|
658
|
+
...options,
|
|
659
|
+
}, userDelegationKey, this.accountName).toString();
|
|
557
660
|
resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
|
|
558
661
|
});
|
|
559
662
|
}
|
|
@@ -561,14 +664,19 @@ class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
561
664
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
562
665
|
* and parameters passed in The SAS is signed by the input user delegation key.
|
|
563
666
|
*
|
|
564
|
-
* @see https://learn.microsoft.com/
|
|
667
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
565
668
|
*
|
|
566
669
|
* @param options - Optional parameters.
|
|
567
670
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
568
671
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
569
672
|
*/
|
|
570
673
|
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
|
571
|
-
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)(
|
|
674
|
+
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)({
|
|
675
|
+
fileSystemName: this.fileSystemName,
|
|
676
|
+
pathName: this.name,
|
|
677
|
+
isDirectory: true,
|
|
678
|
+
...options,
|
|
679
|
+
}, userDelegationKey, this.accountName).stringToSign;
|
|
572
680
|
}
|
|
573
681
|
}
|
|
574
682
|
exports.DataLakeDirectoryClient = DataLakeDirectoryClient;
|
|
@@ -576,6 +684,18 @@ exports.DataLakeDirectoryClient = DataLakeDirectoryClient;
|
|
|
576
684
|
* A DataLakeFileClient represents a URL to the Azure Storage file.
|
|
577
685
|
*/
|
|
578
686
|
class DataLakeFileClient extends DataLakePathClient {
|
|
687
|
+
/**
|
|
688
|
+
* pathContextInternal provided by protocol layer.
|
|
689
|
+
*/
|
|
690
|
+
pathContextInternal;
|
|
691
|
+
/**
|
|
692
|
+
* pathContextInternal provided by protocol layer, with its url pointing to the Blob endpoint.
|
|
693
|
+
*/
|
|
694
|
+
pathContextInternalToBlobEndpoint;
|
|
695
|
+
/**
|
|
696
|
+
* blockBlobClientInternal provided by `@azure/storage-blob` package.
|
|
697
|
+
*/
|
|
698
|
+
blockBlobClientInternal;
|
|
579
699
|
constructor(url, credentialOrPipeline,
|
|
580
700
|
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
581
701
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
@@ -607,7 +727,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
607
727
|
pathCreateOptions = options;
|
|
608
728
|
}
|
|
609
729
|
else {
|
|
610
|
-
pathCreateOptions = resourceTypeOrOptions
|
|
730
|
+
pathCreateOptions = resourceTypeOrOptions ?? {};
|
|
611
731
|
}
|
|
612
732
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-create", pathCreateOptions, async (updatedOptions) => {
|
|
613
733
|
return super.create("file", updatedOptions);
|
|
@@ -630,7 +750,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
630
750
|
* * In Node.js, data returns in a Readable stream readableStreamBody
|
|
631
751
|
* * In browsers, data returns in a promise contentAsBlob
|
|
632
752
|
*
|
|
633
|
-
* @see https://learn.microsoft.com/
|
|
753
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob
|
|
634
754
|
*
|
|
635
755
|
* * Example usage (Node.js):
|
|
636
756
|
*
|
|
@@ -704,7 +824,10 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
704
824
|
*/
|
|
705
825
|
async read(offset = 0, count, options = {}) {
|
|
706
826
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-read", options, async (updatedOptions) => {
|
|
707
|
-
const rawResponse = await this.blockBlobClientInternal.download(offset, count,
|
|
827
|
+
const rawResponse = await this.blockBlobClientInternal.download(offset, count, {
|
|
828
|
+
...updatedOptions,
|
|
829
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(updatedOptions.customerProvidedKey),
|
|
830
|
+
});
|
|
708
831
|
const response = (0, utils_common_js_1.ParsePathGetPropertiesExtraHeaderValues)(rawResponse);
|
|
709
832
|
if (!core_util_1.isNodeLike && !response.contentAsBlob) {
|
|
710
833
|
response.contentAsBlob = rawResponse.blobBody;
|
|
@@ -721,7 +844,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
721
844
|
* Uploads data to be appended to a file. Data can only be appended to a file.
|
|
722
845
|
* To apply perviously uploaded data to a file, call flush.
|
|
723
846
|
*
|
|
724
|
-
* @see https://learn.microsoft.com/
|
|
847
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/update
|
|
725
848
|
*
|
|
726
849
|
* @param body - Content to be uploaded.
|
|
727
850
|
* @param offset - Append offset in bytes.
|
|
@@ -732,11 +855,24 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
732
855
|
options.conditions = options.conditions || {};
|
|
733
856
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-append", options, async (updatedOptions) => {
|
|
734
857
|
(0, utils_common_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
|
735
|
-
return (0, utils_common_js_1.assertResponse)(await this.pathContextInternal.appendData(body,
|
|
858
|
+
return (0, utils_common_js_1.assertResponse)(await this.pathContextInternal.appendData(body, {
|
|
859
|
+
...updatedOptions,
|
|
860
|
+
pathHttpHeaders: {
|
|
736
861
|
contentMD5: options.transactionalContentMD5,
|
|
737
|
-
},
|
|
862
|
+
},
|
|
863
|
+
abortSignal: options.abortSignal,
|
|
864
|
+
position: offset,
|
|
865
|
+
contentLength: length,
|
|
866
|
+
leaseAccessConditions: options.conditions,
|
|
867
|
+
requestOptions: {
|
|
738
868
|
onUploadProgress: options.onProgress,
|
|
739
|
-
},
|
|
869
|
+
},
|
|
870
|
+
cpkInfo: options.customerProvidedKey,
|
|
871
|
+
flush: options.flush,
|
|
872
|
+
proposedLeaseId: options.proposedLeaseId,
|
|
873
|
+
leaseDuration: options.leaseDurationInSeconds,
|
|
874
|
+
leaseAction: options.leaseAction,
|
|
875
|
+
}));
|
|
740
876
|
});
|
|
741
877
|
}
|
|
742
878
|
/**
|
|
@@ -755,7 +891,17 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
755
891
|
options.conditions = options.conditions || {};
|
|
756
892
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-flush", options, async (updatedOptions) => {
|
|
757
893
|
(0, utils_common_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
|
758
|
-
return (0, utils_common_js_1.assertResponse)(await this.pathContextInternal.flushData(
|
|
894
|
+
return (0, utils_common_js_1.assertResponse)(await this.pathContextInternal.flushData({
|
|
895
|
+
...updatedOptions,
|
|
896
|
+
position,
|
|
897
|
+
contentLength: 0,
|
|
898
|
+
leaseAccessConditions: options.conditions,
|
|
899
|
+
modifiedAccessConditions: options.conditions,
|
|
900
|
+
cpkInfo: options.customerProvidedKey,
|
|
901
|
+
proposedLeaseId: options.proposedLeaseId,
|
|
902
|
+
leaseDuration: options.leaseDurationInSeconds,
|
|
903
|
+
leaseAction: options.leaseAction,
|
|
904
|
+
}));
|
|
759
905
|
});
|
|
760
906
|
}
|
|
761
907
|
// high level functions
|
|
@@ -812,7 +958,6 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
812
958
|
}
|
|
813
959
|
async uploadSeekableInternal(bodyFactory, size, options = {}) {
|
|
814
960
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-uploadData", options, async (updatedOptions) => {
|
|
815
|
-
var _a;
|
|
816
961
|
if (size > constants_js_1.FILE_MAX_SIZE_BYTES) {
|
|
817
962
|
throw new RangeError(`size must be <= ${constants_js_1.FILE_MAX_SIZE_BYTES}.`);
|
|
818
963
|
}
|
|
@@ -836,7 +981,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
836
981
|
await createRes;
|
|
837
982
|
}
|
|
838
983
|
// After the File is Create, Lease ID is the only valid request parameter.
|
|
839
|
-
options.conditions = { leaseId:
|
|
984
|
+
options.conditions = { leaseId: options.conditions?.leaseId };
|
|
840
985
|
if (!options.chunkSize) {
|
|
841
986
|
options.chunkSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS);
|
|
842
987
|
if (options.chunkSize < constants_js_1.FILE_UPLOAD_DEFAULT_CHUNK_SIZE) {
|
|
@@ -929,7 +1074,6 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
929
1074
|
*/
|
|
930
1075
|
async uploadStream(stream, options = {}) {
|
|
931
1076
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-uploadStream", options, async (updatedOptions) => {
|
|
932
|
-
var _a;
|
|
933
1077
|
// Create the file
|
|
934
1078
|
await this.create({
|
|
935
1079
|
abortSignal: options.abortSignal,
|
|
@@ -943,7 +1087,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
943
1087
|
encryptionContext: updatedOptions.encryptionContext,
|
|
944
1088
|
});
|
|
945
1089
|
// After the File is Create, Lease ID is the only valid request parameter.
|
|
946
|
-
options.conditions = { leaseId:
|
|
1090
|
+
options.conditions = { leaseId: options.conditions?.leaseId };
|
|
947
1091
|
if (!options.chunkSize) {
|
|
948
1092
|
options.chunkSize = constants_js_1.FILE_UPLOAD_DEFAULT_CHUNK_SIZE;
|
|
949
1093
|
}
|
|
@@ -1003,10 +1147,22 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1003
1147
|
}
|
|
1004
1148
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-readToBuffer", options, async (updatedOptions) => {
|
|
1005
1149
|
if (buffer) {
|
|
1006
|
-
return this.blockBlobClientInternal.downloadToBuffer(buffer, offset, count,
|
|
1150
|
+
return this.blockBlobClientInternal.downloadToBuffer(buffer, offset, count, {
|
|
1151
|
+
...options,
|
|
1152
|
+
maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk,
|
|
1153
|
+
blockSize: options.chunkSize,
|
|
1154
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(options.customerProvidedKey),
|
|
1155
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
1156
|
+
});
|
|
1007
1157
|
}
|
|
1008
1158
|
else {
|
|
1009
|
-
return this.blockBlobClientInternal.downloadToBuffer(offset, count,
|
|
1159
|
+
return this.blockBlobClientInternal.downloadToBuffer(offset, count, {
|
|
1160
|
+
...options,
|
|
1161
|
+
maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk,
|
|
1162
|
+
blockSize: options.chunkSize,
|
|
1163
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(options.customerProvidedKey),
|
|
1164
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
1165
|
+
});
|
|
1010
1166
|
}
|
|
1011
1167
|
});
|
|
1012
1168
|
}
|
|
@@ -1028,7 +1184,10 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1028
1184
|
*/
|
|
1029
1185
|
async readToFile(filePath, offset = 0, count, options = {}) {
|
|
1030
1186
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-readToFile", options, async (updatedOptions) => {
|
|
1031
|
-
const rawResposne = await this.blockBlobClientInternal.downloadToFile(filePath, offset, count,
|
|
1187
|
+
const rawResposne = await this.blockBlobClientInternal.downloadToFile(filePath, offset, count, {
|
|
1188
|
+
...updatedOptions,
|
|
1189
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(options.customerProvidedKey),
|
|
1190
|
+
});
|
|
1032
1191
|
const response = (0, utils_common_js_1.ParsePathGetPropertiesExtraHeaderValues)(rawResposne);
|
|
1033
1192
|
return response;
|
|
1034
1193
|
});
|
|
@@ -1079,7 +1238,10 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1079
1238
|
*/
|
|
1080
1239
|
async query(query, options = {}) {
|
|
1081
1240
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-query", options, async (updatedOptions) => {
|
|
1082
|
-
const rawResponse = await this.blockBlobClientInternal.query(query,
|
|
1241
|
+
const rawResponse = await this.blockBlobClientInternal.query(query, {
|
|
1242
|
+
...updatedOptions,
|
|
1243
|
+
customerProvidedKey: (0, transforms_js_1.toBlobCpkInfo)(options.customerProvidedKey),
|
|
1244
|
+
});
|
|
1083
1245
|
const response = rawResponse;
|
|
1084
1246
|
if (!core_util_1.isNodeLike && !response.contentAsBlob) {
|
|
1085
1247
|
response.contentAsBlob = rawResponse.blobBody;
|
|
@@ -1100,7 +1262,6 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1100
1262
|
*/
|
|
1101
1263
|
async setExpiry(mode, options = {}) {
|
|
1102
1264
|
return tracing_js_1.tracingClient.withSpan("DataLakeFileClient-setExpiry", options, async (updatedOptions) => {
|
|
1103
|
-
var _a;
|
|
1104
1265
|
let expiresOn = undefined;
|
|
1105
1266
|
if (mode === "RelativeToNow" || mode === "RelativeToCreation") {
|
|
1106
1267
|
if (!options.timeToExpireInMs) {
|
|
@@ -1115,12 +1276,15 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1115
1276
|
}
|
|
1116
1277
|
const now = new Date();
|
|
1117
1278
|
if (!(options.expiresOn.getTime() > now.getTime())) {
|
|
1118
|
-
throw new Error(`options.expiresOn should be later than now: ${now.toUTCString()} when using mode ${mode}, but is ${
|
|
1279
|
+
throw new Error(`options.expiresOn should be later than now: ${now.toUTCString()} when using mode ${mode}, but is ${options.expiresOn?.toUTCString()}`);
|
|
1119
1280
|
}
|
|
1120
1281
|
expiresOn = options.expiresOn.toUTCString();
|
|
1121
1282
|
}
|
|
1122
|
-
const adaptedOptions =
|
|
1123
|
-
return (0, utils_common_js_1.assertResponse)(await this.pathContextInternalToBlobEndpoint.setExpiry(mode,
|
|
1283
|
+
const adaptedOptions = { ...options, expiresOn };
|
|
1284
|
+
return (0, utils_common_js_1.assertResponse)(await this.pathContextInternalToBlobEndpoint.setExpiry(mode, {
|
|
1285
|
+
...adaptedOptions,
|
|
1286
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
1287
|
+
}));
|
|
1124
1288
|
});
|
|
1125
1289
|
}
|
|
1126
1290
|
/**
|
|
@@ -1129,7 +1293,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1129
1293
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1130
1294
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
1131
1295
|
*
|
|
1132
|
-
* @see https://learn.microsoft.com/
|
|
1296
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
1133
1297
|
*
|
|
1134
1298
|
* @param options - Optional parameters.
|
|
1135
1299
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -1139,7 +1303,11 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1139
1303
|
if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
|
|
1140
1304
|
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
1141
1305
|
}
|
|
1142
|
-
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)(
|
|
1306
|
+
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)({
|
|
1307
|
+
fileSystemName: this.fileSystemName,
|
|
1308
|
+
pathName: this.name,
|
|
1309
|
+
...options,
|
|
1310
|
+
}, this.credential).toString();
|
|
1143
1311
|
resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
|
|
1144
1312
|
});
|
|
1145
1313
|
}
|
|
@@ -1149,7 +1317,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1149
1317
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1150
1318
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
1151
1319
|
*
|
|
1152
|
-
* @see https://learn.microsoft.com/
|
|
1320
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
1153
1321
|
*
|
|
1154
1322
|
* @param options - Optional parameters.
|
|
1155
1323
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -1159,13 +1327,17 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1159
1327
|
if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
|
|
1160
1328
|
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
|
1161
1329
|
}
|
|
1162
|
-
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)(
|
|
1330
|
+
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)({
|
|
1331
|
+
fileSystemName: this.fileSystemName,
|
|
1332
|
+
pathName: this.name,
|
|
1333
|
+
...options,
|
|
1334
|
+
}, this.credential).stringToSign;
|
|
1163
1335
|
}
|
|
1164
1336
|
/**
|
|
1165
1337
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1166
1338
|
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
1167
1339
|
*
|
|
1168
|
-
* @see https://learn.microsoft.com/
|
|
1340
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
1169
1341
|
*
|
|
1170
1342
|
* @param options - Optional parameters.
|
|
1171
1343
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
@@ -1173,7 +1345,11 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1173
1345
|
*/
|
|
1174
1346
|
generateUserDelegationSasUrl(options, userDelegationKey) {
|
|
1175
1347
|
return new Promise((resolve) => {
|
|
1176
|
-
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)(
|
|
1348
|
+
const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)({
|
|
1349
|
+
fileSystemName: this.fileSystemName,
|
|
1350
|
+
pathName: this.name,
|
|
1351
|
+
...options,
|
|
1352
|
+
}, userDelegationKey, this.accountName).toString();
|
|
1177
1353
|
resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
|
|
1178
1354
|
});
|
|
1179
1355
|
}
|
|
@@ -1181,14 +1357,18 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1181
1357
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1182
1358
|
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
1183
1359
|
*
|
|
1184
|
-
* @see https://learn.microsoft.com/
|
|
1360
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
1185
1361
|
*
|
|
1186
1362
|
* @param options - Optional parameters.
|
|
1187
1363
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
1188
1364
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
1189
1365
|
*/
|
|
1190
1366
|
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
|
1191
|
-
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)(
|
|
1367
|
+
return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)({
|
|
1368
|
+
fileSystemName: this.fileSystemName,
|
|
1369
|
+
pathName: this.name,
|
|
1370
|
+
...options,
|
|
1371
|
+
}, userDelegationKey, this.accountName).stringToSign;
|
|
1192
1372
|
}
|
|
1193
1373
|
}
|
|
1194
1374
|
exports.DataLakeFileClient = DataLakeFileClient;
|