@azure/storage-file-share 12.24.1-alpha.20240807.2 → 12.25.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +298 -73
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +27 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +19 -1
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +19 -1
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +2 -2
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/index.js +2 -2
- package/dist-esm/storage-blob/src/index.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +8 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +27 -6
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +2 -2
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js +8 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/Clients.js +65 -20
- package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js +8 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js +31 -5
- package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/mappers.js +50 -0
- package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/parameters.js +52 -11
- package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/directory.js +12 -9
- package/dist-esm/storage-file-share/src/generated/src/operations/directory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/file.js +21 -18
- package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/service.js +12 -3
- package/dist-esm/storage-file-share/src/generated/src/operations/service.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/share.js +26 -4
- package/dist-esm/storage-file-share/src/generated/src/operations/share.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js +2 -2
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.js +2 -2
- package/dist-esm/storage-file-share/src/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/models.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/constants.js +2 -2
- package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js +12 -0
- package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
- package/package.json +3 -3
- package/types/latest/storage-file-share.d.ts +225 -41
package/dist/index.js
CHANGED
@@ -336,8 +336,8 @@ function ipRangeToString(ipRange) {
|
|
336
336
|
|
337
337
|
// Copyright (c) Microsoft Corporation.
|
338
338
|
// Licensed under the MIT license.
|
339
|
-
const SDK_VERSION = "12.
|
340
|
-
const SERVICE_VERSION = "2024-
|
339
|
+
const SDK_VERSION = "12.25.0-beta.1";
|
340
|
+
const SERVICE_VERSION = "2024-11-04";
|
341
341
|
const FILE_MAX_SIZE_BYTES = 4 * 1024 * 1024 * 1024 * 1024; // 4TB
|
342
342
|
const FILE_RANGE_MAX_SIZE_BYTES = 4 * 1024 * 1024; // 4MB
|
343
343
|
const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;
|
@@ -914,6 +914,18 @@ function ConvertInternalResponseOfListHandles(internalResponse) {
|
|
914
914
|
function removeEmptyString(value) {
|
915
915
|
return value ? value : undefined;
|
916
916
|
}
|
917
|
+
function asSharePermission(value) {
|
918
|
+
const castSharePermission = value;
|
919
|
+
if (castSharePermission["permission"] !== undefined) {
|
920
|
+
return {
|
921
|
+
permission: castSharePermission.permission,
|
922
|
+
format: castSharePermission.format,
|
923
|
+
};
|
924
|
+
}
|
925
|
+
return {
|
926
|
+
permission: value,
|
927
|
+
};
|
928
|
+
}
|
917
929
|
|
918
930
|
// Copyright (c) Microsoft Corporation.
|
919
931
|
// Licensed under the MIT license.
|
@@ -1103,6 +1115,10 @@ class SASQueryParameters {
|
|
1103
1115
|
* @param sharedKeyCredential -
|
1104
1116
|
*/
|
1105
1117
|
function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) {
|
1118
|
+
return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential)
|
1119
|
+
.sasQueryParameters;
|
1120
|
+
}
|
1121
|
+
function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) {
|
1106
1122
|
const version = accountSASSignatureValues.version
|
1107
1123
|
? accountSASSignatureValues.version
|
1108
1124
|
: SERVICE_VERSION;
|
@@ -1144,7 +1160,10 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|
1144
1160
|
].join("\n");
|
1145
1161
|
}
|
1146
1162
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
1147
|
-
return
|
1163
|
+
return {
|
1164
|
+
sasQueryParameters: new SASQueryParameters(version, signature, parsedPermissions, parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange),
|
1165
|
+
stringToSign: stringToSign,
|
1166
|
+
};
|
1148
1167
|
}
|
1149
1168
|
|
1150
1169
|
// Copyright (c) Microsoft Corporation.
|
@@ -1339,6 +1358,10 @@ class ShareSASPermissions {
|
|
1339
1358
|
* @param sharedKeyCredential -
|
1340
1359
|
*/
|
1341
1360
|
function generateFileSASQueryParameters(fileSASSignatureValues, sharedKeyCredential) {
|
1361
|
+
return generateFileSASQueryParametersInternal(fileSASSignatureValues, sharedKeyCredential)
|
1362
|
+
.sasQueryParameters;
|
1363
|
+
}
|
1364
|
+
function generateFileSASQueryParametersInternal(fileSASSignatureValues, sharedKeyCredential) {
|
1342
1365
|
if (!fileSASSignatureValues.identifier &&
|
1343
1366
|
!(fileSASSignatureValues.permissions && fileSASSignatureValues.expiresOn)) {
|
1344
1367
|
throw new RangeError("Must provide 'permissions' and 'expiresOn' for File SAS generation when 'identifier' is not provided.");
|
@@ -1379,7 +1402,10 @@ function generateFileSASQueryParameters(fileSASSignatureValues, sharedKeyCredent
|
|
1379
1402
|
fileSASSignatureValues.contentType,
|
1380
1403
|
].join("\n");
|
1381
1404
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
1382
|
-
return
|
1405
|
+
return {
|
1406
|
+
sasQueryParameters: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, fileSASSignatureValues.protocol, fileSASSignatureValues.startsOn, fileSASSignatureValues.expiresOn, fileSASSignatureValues.ipRange, fileSASSignatureValues.identifier, resource, fileSASSignatureValues.cacheControl, fileSASSignatureValues.contentDisposition, fileSASSignatureValues.contentEncoding, fileSASSignatureValues.contentLanguage, fileSASSignatureValues.contentType),
|
1407
|
+
stringToSign: stringToSign,
|
1408
|
+
};
|
1383
1409
|
}
|
1384
1410
|
function getCanonicalName(accountName, shareName, filePath) {
|
1385
1411
|
// Share: "/file/account/sharename"
|
@@ -3310,6 +3336,27 @@ const SharePropertiesInternal = {
|
|
3310
3336
|
type: {
|
3311
3337
|
name: "Boolean"
|
3312
3338
|
}
|
3339
|
+
},
|
3340
|
+
paidBurstingEnabled: {
|
3341
|
+
serializedName: "PaidBurstingEnabled",
|
3342
|
+
xmlName: "PaidBurstingEnabled",
|
3343
|
+
type: {
|
3344
|
+
name: "Boolean"
|
3345
|
+
}
|
3346
|
+
},
|
3347
|
+
paidBurstingMaxIops: {
|
3348
|
+
serializedName: "PaidBurstingMaxIops",
|
3349
|
+
xmlName: "PaidBurstingMaxIops",
|
3350
|
+
type: {
|
3351
|
+
name: "Number"
|
3352
|
+
}
|
3353
|
+
},
|
3354
|
+
paidBurstingMaxBandwidthMibps: {
|
3355
|
+
serializedName: "PaidBurstingMaxBandwidthMibps",
|
3356
|
+
xmlName: "PaidBurstingMaxBandwidthMibps",
|
3357
|
+
type: {
|
3358
|
+
name: "Number"
|
3359
|
+
}
|
3313
3360
|
}
|
3314
3361
|
}
|
3315
3362
|
}
|
@@ -3327,6 +3374,14 @@ const SharePermission = {
|
|
3327
3374
|
type: {
|
3328
3375
|
name: "String"
|
3329
3376
|
}
|
3377
|
+
},
|
3378
|
+
format: {
|
3379
|
+
serializedName: "format",
|
3380
|
+
xmlName: "format",
|
3381
|
+
type: {
|
3382
|
+
name: "Enum",
|
3383
|
+
allowedValues: ["Sddl", "Binary"]
|
3384
|
+
}
|
3330
3385
|
}
|
3331
3386
|
}
|
3332
3387
|
}
|
@@ -4306,6 +4361,27 @@ const ShareGetPropertiesHeaders = {
|
|
4306
4361
|
name: "Boolean"
|
4307
4362
|
}
|
4308
4363
|
},
|
4364
|
+
paidBurstingEnabled: {
|
4365
|
+
serializedName: "x-ms-share-paid-bursting-enabled",
|
4366
|
+
xmlName: "x-ms-share-paid-bursting-enabled",
|
4367
|
+
type: {
|
4368
|
+
name: "Boolean"
|
4369
|
+
}
|
4370
|
+
},
|
4371
|
+
paidBurstingMaxIops: {
|
4372
|
+
serializedName: "x-ms-share-paid-bursting-max-iops",
|
4373
|
+
xmlName: "x-ms-share-paid-bursting-max-iops",
|
4374
|
+
type: {
|
4375
|
+
name: "Number"
|
4376
|
+
}
|
4377
|
+
},
|
4378
|
+
paidBurstingMaxBandwidthMibps: {
|
4379
|
+
serializedName: "x-ms-share-paid-bursting-max-bandwidth-mibps",
|
4380
|
+
xmlName: "x-ms-share-paid-bursting-max-bandwidth-mibps",
|
4381
|
+
type: {
|
4382
|
+
name: "Number"
|
4383
|
+
}
|
4384
|
+
},
|
4309
4385
|
errorCode: {
|
4310
4386
|
serializedName: "x-ms-error-code",
|
4311
4387
|
xmlName: "x-ms-error-code",
|
@@ -8186,7 +8262,7 @@ const timeoutInSeconds = {
|
|
8186
8262
|
const version = {
|
8187
8263
|
parameterPath: "version",
|
8188
8264
|
mapper: {
|
8189
|
-
defaultValue: "2024-
|
8265
|
+
defaultValue: "2024-11-04",
|
8190
8266
|
isConstant: true,
|
8191
8267
|
serializedName: "x-ms-version",
|
8192
8268
|
type: {
|
@@ -8194,6 +8270,16 @@ const version = {
|
|
8194
8270
|
}
|
8195
8271
|
}
|
8196
8272
|
};
|
8273
|
+
const fileRequestIntent = {
|
8274
|
+
parameterPath: ["options", "fileRequestIntent"],
|
8275
|
+
mapper: {
|
8276
|
+
serializedName: "x-ms-file-request-intent",
|
8277
|
+
xmlName: "x-ms-file-request-intent",
|
8278
|
+
type: {
|
8279
|
+
name: "String"
|
8280
|
+
}
|
8281
|
+
}
|
8282
|
+
};
|
8197
8283
|
const accept1 = {
|
8198
8284
|
parameterPath: "accept",
|
8199
8285
|
mapper: {
|
@@ -8345,6 +8431,36 @@ const enableSnapshotVirtualDirectoryAccess = {
|
|
8345
8431
|
}
|
8346
8432
|
}
|
8347
8433
|
};
|
8434
|
+
const paidBurstingEnabled = {
|
8435
|
+
parameterPath: ["options", "paidBurstingEnabled"],
|
8436
|
+
mapper: {
|
8437
|
+
serializedName: "x-ms-share-paid-bursting-enabled",
|
8438
|
+
xmlName: "x-ms-share-paid-bursting-enabled",
|
8439
|
+
type: {
|
8440
|
+
name: "Boolean"
|
8441
|
+
}
|
8442
|
+
}
|
8443
|
+
};
|
8444
|
+
const paidBurstingMaxBandwidthMibps = {
|
8445
|
+
parameterPath: ["options", "paidBurstingMaxBandwidthMibps"],
|
8446
|
+
mapper: {
|
8447
|
+
serializedName: "x-ms-share-paid-bursting-max-bandwidth-mibps",
|
8448
|
+
xmlName: "x-ms-share-paid-bursting-max-bandwidth-mibps",
|
8449
|
+
type: {
|
8450
|
+
name: "Number"
|
8451
|
+
}
|
8452
|
+
}
|
8453
|
+
};
|
8454
|
+
const paidBurstingMaxIops = {
|
8455
|
+
parameterPath: ["options", "paidBurstingMaxIops"],
|
8456
|
+
mapper: {
|
8457
|
+
serializedName: "x-ms-share-paid-bursting-max-iops",
|
8458
|
+
xmlName: "x-ms-share-paid-bursting-max-iops",
|
8459
|
+
type: {
|
8460
|
+
name: "Number"
|
8461
|
+
}
|
8462
|
+
}
|
8463
|
+
};
|
8348
8464
|
const shareSnapshot = {
|
8349
8465
|
parameterPath: ["options", "shareSnapshot"],
|
8350
8466
|
mapper: {
|
@@ -8530,16 +8646,6 @@ const comp4 = {
|
|
8530
8646
|
}
|
8531
8647
|
}
|
8532
8648
|
};
|
8533
|
-
const fileRequestIntent = {
|
8534
|
-
parameterPath: ["options", "fileRequestIntent"],
|
8535
|
-
mapper: {
|
8536
|
-
serializedName: "x-ms-file-request-intent",
|
8537
|
-
xmlName: "x-ms-file-request-intent",
|
8538
|
-
type: {
|
8539
|
-
name: "String"
|
8540
|
-
}
|
8541
|
-
}
|
8542
|
-
};
|
8543
8649
|
const accept2 = {
|
8544
8650
|
parameterPath: "accept",
|
8545
8651
|
mapper: {
|
@@ -8562,6 +8668,17 @@ const filePermissionKey = {
|
|
8562
8668
|
}
|
8563
8669
|
}
|
8564
8670
|
};
|
8671
|
+
const filePermissionFormat = {
|
8672
|
+
parameterPath: ["options", "filePermissionFormat"],
|
8673
|
+
mapper: {
|
8674
|
+
serializedName: "x-ms-file-permission-format",
|
8675
|
+
xmlName: "x-ms-file-permission-format",
|
8676
|
+
type: {
|
8677
|
+
name: "Enum",
|
8678
|
+
allowedValues: ["Sddl", "Binary"]
|
8679
|
+
}
|
8680
|
+
}
|
8681
|
+
};
|
8565
8682
|
const comp5 = {
|
8566
8683
|
parameterPath: "comp",
|
8567
8684
|
mapper: {
|
@@ -9366,7 +9483,8 @@ const setPropertiesOperationSpec$2 = {
|
|
9366
9483
|
headerParameters: [
|
9367
9484
|
contentType,
|
9368
9485
|
accept,
|
9369
|
-
version
|
9486
|
+
version,
|
9487
|
+
fileRequestIntent
|
9370
9488
|
],
|
9371
9489
|
isXML: true,
|
9372
9490
|
contentType: "application/xml; charset=utf-8",
|
@@ -9392,7 +9510,11 @@ const getPropertiesOperationSpec$3 = {
|
|
9392
9510
|
timeoutInSeconds
|
9393
9511
|
],
|
9394
9512
|
urlParameters: [url],
|
9395
|
-
headerParameters: [
|
9513
|
+
headerParameters: [
|
9514
|
+
version,
|
9515
|
+
fileRequestIntent,
|
9516
|
+
accept1
|
9517
|
+
],
|
9396
9518
|
isXML: true,
|
9397
9519
|
serializer: xmlSerializer$3
|
9398
9520
|
};
|
@@ -9418,7 +9540,11 @@ const listSharesSegmentOperationSpec = {
|
|
9418
9540
|
include
|
9419
9541
|
],
|
9420
9542
|
urlParameters: [url],
|
9421
|
-
headerParameters: [
|
9543
|
+
headerParameters: [
|
9544
|
+
version,
|
9545
|
+
fileRequestIntent,
|
9546
|
+
accept1
|
9547
|
+
],
|
9422
9548
|
isXML: true,
|
9423
9549
|
serializer: xmlSerializer$3
|
9424
9550
|
};
|
@@ -9591,13 +9717,17 @@ const createOperationSpec$2 = {
|
|
9591
9717
|
urlParameters: [url],
|
9592
9718
|
headerParameters: [
|
9593
9719
|
version,
|
9720
|
+
fileRequestIntent,
|
9594
9721
|
accept1,
|
9595
9722
|
metadata,
|
9596
9723
|
quota,
|
9597
9724
|
accessTier,
|
9598
9725
|
enabledProtocols,
|
9599
9726
|
rootSquash,
|
9600
|
-
enableSnapshotVirtualDirectoryAccess
|
9727
|
+
enableSnapshotVirtualDirectoryAccess,
|
9728
|
+
paidBurstingEnabled,
|
9729
|
+
paidBurstingMaxBandwidthMibps,
|
9730
|
+
paidBurstingMaxIops
|
9601
9731
|
],
|
9602
9732
|
isXML: true,
|
9603
9733
|
serializer: xmlSerializer$2
|
@@ -9622,6 +9752,7 @@ const getPropertiesOperationSpec$2 = {
|
|
9622
9752
|
urlParameters: [url],
|
9623
9753
|
headerParameters: [
|
9624
9754
|
version,
|
9755
|
+
fileRequestIntent,
|
9625
9756
|
accept1,
|
9626
9757
|
leaseId
|
9627
9758
|
],
|
@@ -9648,6 +9779,7 @@ const deleteOperationSpec$2 = {
|
|
9648
9779
|
urlParameters: [url],
|
9649
9780
|
headerParameters: [
|
9650
9781
|
version,
|
9782
|
+
fileRequestIntent,
|
9651
9783
|
accept1,
|
9652
9784
|
leaseId,
|
9653
9785
|
deleteSnapshots
|
@@ -9676,6 +9808,7 @@ const acquireLeaseOperationSpec$1 = {
|
|
9676
9808
|
urlParameters: [url],
|
9677
9809
|
headerParameters: [
|
9678
9810
|
version,
|
9811
|
+
fileRequestIntent,
|
9679
9812
|
accept1,
|
9680
9813
|
action,
|
9681
9814
|
duration,
|
@@ -9706,6 +9839,7 @@ const releaseLeaseOperationSpec$1 = {
|
|
9706
9839
|
urlParameters: [url],
|
9707
9840
|
headerParameters: [
|
9708
9841
|
version,
|
9842
|
+
fileRequestIntent,
|
9709
9843
|
accept1,
|
9710
9844
|
requestId,
|
9711
9845
|
action1,
|
@@ -9735,6 +9869,7 @@ const changeLeaseOperationSpec$1 = {
|
|
9735
9869
|
urlParameters: [url],
|
9736
9870
|
headerParameters: [
|
9737
9871
|
version,
|
9872
|
+
fileRequestIntent,
|
9738
9873
|
accept1,
|
9739
9874
|
proposedLeaseId,
|
9740
9875
|
requestId,
|
@@ -9765,6 +9900,7 @@ const renewLeaseOperationSpec = {
|
|
9765
9900
|
urlParameters: [url],
|
9766
9901
|
headerParameters: [
|
9767
9902
|
version,
|
9903
|
+
fileRequestIntent,
|
9768
9904
|
accept1,
|
9769
9905
|
requestId,
|
9770
9906
|
leaseId1,
|
@@ -9794,6 +9930,7 @@ const breakLeaseOperationSpec$1 = {
|
|
9794
9930
|
urlParameters: [url],
|
9795
9931
|
headerParameters: [
|
9796
9932
|
version,
|
9933
|
+
fileRequestIntent,
|
9797
9934
|
accept1,
|
9798
9935
|
leaseId,
|
9799
9936
|
requestId,
|
@@ -9823,6 +9960,7 @@ const createSnapshotOperationSpec = {
|
|
9823
9960
|
urlParameters: [url],
|
9824
9961
|
headerParameters: [
|
9825
9962
|
version,
|
9963
|
+
fileRequestIntent,
|
9826
9964
|
accept1,
|
9827
9965
|
metadata
|
9828
9966
|
],
|
@@ -9850,9 +9988,9 @@ const createPermissionOperationSpec = {
|
|
9850
9988
|
urlParameters: [url],
|
9851
9989
|
headerParameters: [
|
9852
9990
|
version,
|
9991
|
+
fileRequestIntent,
|
9853
9992
|
accept1,
|
9854
|
-
contentType1
|
9855
|
-
fileRequestIntent
|
9993
|
+
contentType1
|
9856
9994
|
],
|
9857
9995
|
mediaType: "json",
|
9858
9996
|
serializer
|
@@ -9880,7 +10018,8 @@ const getPermissionOperationSpec = {
|
|
9880
10018
|
version,
|
9881
10019
|
fileRequestIntent,
|
9882
10020
|
accept2,
|
9883
|
-
filePermissionKey
|
10021
|
+
filePermissionKey,
|
10022
|
+
filePermissionFormat
|
9884
10023
|
],
|
9885
10024
|
serializer
|
9886
10025
|
};
|
@@ -9904,11 +10043,15 @@ const setPropertiesOperationSpec$1 = {
|
|
9904
10043
|
urlParameters: [url],
|
9905
10044
|
headerParameters: [
|
9906
10045
|
version,
|
10046
|
+
fileRequestIntent,
|
9907
10047
|
accept1,
|
9908
10048
|
quota,
|
9909
10049
|
accessTier,
|
9910
10050
|
rootSquash,
|
9911
10051
|
enableSnapshotVirtualDirectoryAccess,
|
10052
|
+
paidBurstingEnabled,
|
10053
|
+
paidBurstingMaxBandwidthMibps,
|
10054
|
+
paidBurstingMaxIops,
|
9912
10055
|
leaseId
|
9913
10056
|
],
|
9914
10057
|
isXML: true,
|
@@ -9934,6 +10077,7 @@ const setMetadataOperationSpec$2 = {
|
|
9934
10077
|
urlParameters: [url],
|
9935
10078
|
headerParameters: [
|
9936
10079
|
version,
|
10080
|
+
fileRequestIntent,
|
9937
10081
|
accept1,
|
9938
10082
|
metadata,
|
9939
10083
|
leaseId
|
@@ -9973,6 +10117,7 @@ const getAccessPolicyOperationSpec = {
|
|
9973
10117
|
urlParameters: [url],
|
9974
10118
|
headerParameters: [
|
9975
10119
|
version,
|
10120
|
+
fileRequestIntent,
|
9976
10121
|
accept1,
|
9977
10122
|
leaseId
|
9978
10123
|
],
|
@@ -10002,6 +10147,7 @@ const setAccessPolicyOperationSpec = {
|
|
10002
10147
|
contentType,
|
10003
10148
|
accept,
|
10004
10149
|
version,
|
10150
|
+
fileRequestIntent,
|
10005
10151
|
leaseId
|
10006
10152
|
],
|
10007
10153
|
isXML: true,
|
@@ -10030,6 +10176,7 @@ const getStatisticsOperationSpec = {
|
|
10030
10176
|
urlParameters: [url],
|
10031
10177
|
headerParameters: [
|
10032
10178
|
version,
|
10179
|
+
fileRequestIntent,
|
10033
10180
|
accept1,
|
10034
10181
|
leaseId
|
10035
10182
|
],
|
@@ -10056,6 +10203,7 @@ const restoreOperationSpec = {
|
|
10056
10203
|
urlParameters: [url],
|
10057
10204
|
headerParameters: [
|
10058
10205
|
version,
|
10206
|
+
fileRequestIntent,
|
10059
10207
|
accept1,
|
10060
10208
|
requestId,
|
10061
10209
|
deletedShareName,
|
@@ -10174,9 +10322,10 @@ const createOperationSpec$1 = {
|
|
10174
10322
|
urlParameters: [url],
|
10175
10323
|
headerParameters: [
|
10176
10324
|
version,
|
10325
|
+
fileRequestIntent,
|
10177
10326
|
accept1,
|
10178
10327
|
metadata,
|
10179
|
-
|
10328
|
+
filePermissionFormat,
|
10180
10329
|
allowTrailingDot,
|
10181
10330
|
filePermission,
|
10182
10331
|
filePermissionKey1,
|
@@ -10208,8 +10357,8 @@ const getPropertiesOperationSpec$1 = {
|
|
10208
10357
|
urlParameters: [url],
|
10209
10358
|
headerParameters: [
|
10210
10359
|
version,
|
10211
|
-
accept1,
|
10212
10360
|
fileRequestIntent,
|
10361
|
+
accept1,
|
10213
10362
|
allowTrailingDot
|
10214
10363
|
],
|
10215
10364
|
isXML: true,
|
@@ -10231,8 +10380,8 @@ const deleteOperationSpec$1 = {
|
|
10231
10380
|
urlParameters: [url],
|
10232
10381
|
headerParameters: [
|
10233
10382
|
version,
|
10234
|
-
accept1,
|
10235
10383
|
fileRequestIntent,
|
10384
|
+
accept1,
|
10236
10385
|
allowTrailingDot
|
10237
10386
|
],
|
10238
10387
|
isXML: true,
|
@@ -10258,8 +10407,9 @@ const setPropertiesOperationSpec = {
|
|
10258
10407
|
urlParameters: [url],
|
10259
10408
|
headerParameters: [
|
10260
10409
|
version,
|
10261
|
-
accept1,
|
10262
10410
|
fileRequestIntent,
|
10411
|
+
accept1,
|
10412
|
+
filePermissionFormat,
|
10263
10413
|
allowTrailingDot,
|
10264
10414
|
filePermission,
|
10265
10415
|
filePermissionKey1,
|
@@ -10291,9 +10441,9 @@ const setMetadataOperationSpec$1 = {
|
|
10291
10441
|
urlParameters: [url],
|
10292
10442
|
headerParameters: [
|
10293
10443
|
version,
|
10444
|
+
fileRequestIntent,
|
10294
10445
|
accept1,
|
10295
10446
|
metadata,
|
10296
|
-
fileRequestIntent,
|
10297
10447
|
allowTrailingDot
|
10298
10448
|
],
|
10299
10449
|
isXML: true,
|
@@ -10325,8 +10475,8 @@ const listFilesAndDirectoriesSegmentOperationSpec = {
|
|
10325
10475
|
urlParameters: [url],
|
10326
10476
|
headerParameters: [
|
10327
10477
|
version,
|
10328
|
-
accept1,
|
10329
10478
|
fileRequestIntent,
|
10479
|
+
accept1,
|
10330
10480
|
allowTrailingDot,
|
10331
10481
|
includeExtendedInfo
|
10332
10482
|
],
|
@@ -10356,8 +10506,8 @@ const listHandlesOperationSpec$1 = {
|
|
10356
10506
|
urlParameters: [url],
|
10357
10507
|
headerParameters: [
|
10358
10508
|
version,
|
10359
|
-
accept1,
|
10360
10509
|
fileRequestIntent,
|
10510
|
+
accept1,
|
10361
10511
|
allowTrailingDot,
|
10362
10512
|
recursive
|
10363
10513
|
],
|
@@ -10385,8 +10535,8 @@ const forceCloseHandlesOperationSpec$1 = {
|
|
10385
10535
|
urlParameters: [url],
|
10386
10536
|
headerParameters: [
|
10387
10537
|
version,
|
10388
|
-
accept1,
|
10389
10538
|
fileRequestIntent,
|
10539
|
+
accept1,
|
10390
10540
|
allowTrailingDot,
|
10391
10541
|
recursive,
|
10392
10542
|
handleId
|
@@ -10414,9 +10564,10 @@ const renameOperationSpec$1 = {
|
|
10414
10564
|
urlParameters: [url],
|
10415
10565
|
headerParameters: [
|
10416
10566
|
version,
|
10567
|
+
fileRequestIntent,
|
10417
10568
|
accept1,
|
10418
10569
|
metadata,
|
10419
|
-
|
10570
|
+
filePermissionFormat,
|
10420
10571
|
allowTrailingDot,
|
10421
10572
|
filePermission,
|
10422
10573
|
filePermissionKey1,
|
@@ -10641,10 +10792,11 @@ const createOperationSpec = {
|
|
10641
10792
|
urlParameters: [url],
|
10642
10793
|
headerParameters: [
|
10643
10794
|
version,
|
10795
|
+
fileRequestIntent,
|
10644
10796
|
accept1,
|
10645
10797
|
metadata,
|
10646
10798
|
leaseId,
|
10647
|
-
|
10799
|
+
filePermissionFormat,
|
10648
10800
|
allowTrailingDot,
|
10649
10801
|
filePermission,
|
10650
10802
|
filePermissionKey1,
|
@@ -10691,9 +10843,9 @@ const downloadOperationSpec = {
|
|
10691
10843
|
urlParameters: [url],
|
10692
10844
|
headerParameters: [
|
10693
10845
|
version,
|
10846
|
+
fileRequestIntent,
|
10694
10847
|
accept1,
|
10695
10848
|
leaseId,
|
10696
|
-
fileRequestIntent,
|
10697
10849
|
allowTrailingDot,
|
10698
10850
|
range,
|
10699
10851
|
rangeGetContentMD5
|
@@ -10717,9 +10869,9 @@ const getPropertiesOperationSpec = {
|
|
10717
10869
|
urlParameters: [url],
|
10718
10870
|
headerParameters: [
|
10719
10871
|
version,
|
10872
|
+
fileRequestIntent,
|
10720
10873
|
accept1,
|
10721
10874
|
leaseId,
|
10722
|
-
fileRequestIntent,
|
10723
10875
|
allowTrailingDot
|
10724
10876
|
],
|
10725
10877
|
isXML: true,
|
@@ -10741,9 +10893,9 @@ const deleteOperationSpec = {
|
|
10741
10893
|
urlParameters: [url],
|
10742
10894
|
headerParameters: [
|
10743
10895
|
version,
|
10896
|
+
fileRequestIntent,
|
10744
10897
|
accept1,
|
10745
10898
|
leaseId,
|
10746
|
-
fileRequestIntent,
|
10747
10899
|
allowTrailingDot
|
10748
10900
|
],
|
10749
10901
|
isXML: true,
|
@@ -10765,9 +10917,10 @@ const setHttpHeadersOperationSpec = {
|
|
10765
10917
|
urlParameters: [url],
|
10766
10918
|
headerParameters: [
|
10767
10919
|
version,
|
10920
|
+
fileRequestIntent,
|
10768
10921
|
accept1,
|
10769
10922
|
leaseId,
|
10770
|
-
|
10923
|
+
filePermissionFormat,
|
10771
10924
|
allowTrailingDot,
|
10772
10925
|
filePermission,
|
10773
10926
|
filePermissionKey1,
|
@@ -10802,10 +10955,10 @@ const setMetadataOperationSpec = {
|
|
10802
10955
|
urlParameters: [url],
|
10803
10956
|
headerParameters: [
|
10804
10957
|
version,
|
10958
|
+
fileRequestIntent,
|
10805
10959
|
accept1,
|
10806
10960
|
metadata,
|
10807
10961
|
leaseId,
|
10808
|
-
fileRequestIntent,
|
10809
10962
|
allowTrailingDot
|
10810
10963
|
],
|
10811
10964
|
isXML: true,
|
@@ -10827,12 +10980,12 @@ const acquireLeaseOperationSpec = {
|
|
10827
10980
|
urlParameters: [url],
|
10828
10981
|
headerParameters: [
|
10829
10982
|
version,
|
10983
|
+
fileRequestIntent,
|
10830
10984
|
accept1,
|
10831
10985
|
action,
|
10832
10986
|
duration,
|
10833
10987
|
proposedLeaseId,
|
10834
10988
|
requestId,
|
10835
|
-
fileRequestIntent,
|
10836
10989
|
allowTrailingDot
|
10837
10990
|
],
|
10838
10991
|
isXML: true,
|
@@ -10854,11 +11007,11 @@ const releaseLeaseOperationSpec = {
|
|
10854
11007
|
urlParameters: [url],
|
10855
11008
|
headerParameters: [
|
10856
11009
|
version,
|
11010
|
+
fileRequestIntent,
|
10857
11011
|
accept1,
|
10858
11012
|
requestId,
|
10859
11013
|
action1,
|
10860
11014
|
leaseId1,
|
10861
|
-
fileRequestIntent,
|
10862
11015
|
allowTrailingDot
|
10863
11016
|
],
|
10864
11017
|
isXML: true,
|
@@ -10880,12 +11033,12 @@ const changeLeaseOperationSpec = {
|
|
10880
11033
|
urlParameters: [url],
|
10881
11034
|
headerParameters: [
|
10882
11035
|
version,
|
11036
|
+
fileRequestIntent,
|
10883
11037
|
accept1,
|
10884
11038
|
proposedLeaseId,
|
10885
11039
|
requestId,
|
10886
11040
|
leaseId1,
|
10887
11041
|
action2,
|
10888
|
-
fileRequestIntent,
|
10889
11042
|
allowTrailingDot
|
10890
11043
|
],
|
10891
11044
|
isXML: true,
|
@@ -10907,11 +11060,11 @@ const breakLeaseOperationSpec = {
|
|
10907
11060
|
urlParameters: [url],
|
10908
11061
|
headerParameters: [
|
10909
11062
|
version,
|
11063
|
+
fileRequestIntent,
|
10910
11064
|
accept1,
|
10911
11065
|
leaseId,
|
10912
11066
|
requestId,
|
10913
11067
|
action4,
|
10914
|
-
fileRequestIntent,
|
10915
11068
|
allowTrailingDot
|
10916
11069
|
],
|
10917
11070
|
isXML: true,
|
@@ -10934,8 +11087,8 @@ const uploadRangeOperationSpec = {
|
|
10934
11087
|
urlParameters: [url],
|
10935
11088
|
headerParameters: [
|
10936
11089
|
version,
|
10937
|
-
leaseId,
|
10938
11090
|
fileRequestIntent,
|
11091
|
+
leaseId,
|
10939
11092
|
allowTrailingDot,
|
10940
11093
|
contentType2,
|
10941
11094
|
accept3,
|
@@ -10966,9 +11119,9 @@ const uploadRangeFromURLOperationSpec = {
|
|
10966
11119
|
urlParameters: [url],
|
10967
11120
|
headerParameters: [
|
10968
11121
|
version,
|
11122
|
+
fileRequestIntent,
|
10969
11123
|
accept1,
|
10970
11124
|
leaseId,
|
10971
|
-
fileRequestIntent,
|
10972
11125
|
allowTrailingDot,
|
10973
11126
|
allowSourceTrailingDot,
|
10974
11127
|
range1,
|
@@ -11007,9 +11160,9 @@ const getRangeListOperationSpec = {
|
|
11007
11160
|
urlParameters: [url],
|
11008
11161
|
headerParameters: [
|
11009
11162
|
version,
|
11163
|
+
fileRequestIntent,
|
11010
11164
|
accept1,
|
11011
11165
|
leaseId,
|
11012
|
-
fileRequestIntent,
|
11013
11166
|
allowTrailingDot,
|
11014
11167
|
range,
|
11015
11168
|
supportRename
|
@@ -11033,10 +11186,10 @@ const startCopyOperationSpec = {
|
|
11033
11186
|
urlParameters: [url],
|
11034
11187
|
headerParameters: [
|
11035
11188
|
version,
|
11189
|
+
fileRequestIntent,
|
11036
11190
|
accept1,
|
11037
11191
|
metadata,
|
11038
11192
|
leaseId,
|
11039
|
-
fileRequestIntent,
|
11040
11193
|
allowTrailingDot,
|
11041
11194
|
filePermission,
|
11042
11195
|
filePermissionKey1,
|
@@ -11073,9 +11226,9 @@ const abortCopyOperationSpec = {
|
|
11073
11226
|
urlParameters: [url],
|
11074
11227
|
headerParameters: [
|
11075
11228
|
version,
|
11229
|
+
fileRequestIntent,
|
11076
11230
|
accept1,
|
11077
11231
|
leaseId,
|
11078
|
-
fileRequestIntent,
|
11079
11232
|
allowTrailingDot,
|
11080
11233
|
copyActionAbortConstant
|
11081
11234
|
],
|
@@ -11105,8 +11258,8 @@ const listHandlesOperationSpec = {
|
|
11105
11258
|
urlParameters: [url],
|
11106
11259
|
headerParameters: [
|
11107
11260
|
version,
|
11108
|
-
accept1,
|
11109
11261
|
fileRequestIntent,
|
11262
|
+
accept1,
|
11110
11263
|
allowTrailingDot
|
11111
11264
|
],
|
11112
11265
|
isXML: true,
|
@@ -11133,8 +11286,8 @@ const forceCloseHandlesOperationSpec = {
|
|
11133
11286
|
urlParameters: [url],
|
11134
11287
|
headerParameters: [
|
11135
11288
|
version,
|
11136
|
-
accept1,
|
11137
11289
|
fileRequestIntent,
|
11290
|
+
accept1,
|
11138
11291
|
allowTrailingDot,
|
11139
11292
|
handleId
|
11140
11293
|
],
|
@@ -11157,9 +11310,10 @@ const renameOperationSpec = {
|
|
11157
11310
|
urlParameters: [url],
|
11158
11311
|
headerParameters: [
|
11159
11312
|
version,
|
11313
|
+
fileRequestIntent,
|
11160
11314
|
accept1,
|
11161
11315
|
metadata,
|
11162
|
-
|
11316
|
+
filePermissionFormat,
|
11163
11317
|
allowTrailingDot,
|
11164
11318
|
filePermission,
|
11165
11319
|
filePermissionKey1,
|
@@ -11205,7 +11359,7 @@ let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.Exte
|
|
11205
11359
|
const defaults = {
|
11206
11360
|
requestContentType: "application/json; charset=utf-8"
|
11207
11361
|
};
|
11208
|
-
const packageDetails = `azsdk-js-azure-storage-file-share/12.
|
11362
|
+
const packageDetails = `azsdk-js-azure-storage-file-share/12.25.0-beta.1`;
|
11209
11363
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
11210
11364
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
11211
11365
|
: `${packageDetails}`;
|
@@ -11216,7 +11370,7 @@ let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.Exte
|
|
11216
11370
|
// Parameter assignments
|
11217
11371
|
this.url = url;
|
11218
11372
|
// Assigning values to Constant parameters
|
11219
|
-
this.version = options.version || "2024-
|
11373
|
+
this.version = options.version || "2024-11-04";
|
11220
11374
|
this.fileRangeWriteFromUrl = options.fileRangeWriteFromUrl || "update";
|
11221
11375
|
this.service = new ServiceImpl(this);
|
11222
11376
|
this.share = new ShareImpl(this);
|
@@ -12569,7 +12723,7 @@ class ShareClient extends StorageClient {
|
|
12569
12723
|
*/
|
12570
12724
|
async create(options = {}) {
|
12571
12725
|
return tracingClient.withSpan("ShareClient-create", options, async (updatedOptions) => {
|
12572
|
-
return assertResponse(await this.context.create(Object.assign(Object.assign({}, updatedOptions), { enabledProtocols: toShareProtocolsString(updatedOptions.protocols) })));
|
12726
|
+
return assertResponse(await this.context.create(Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { enabledProtocols: toShareProtocolsString(updatedOptions.protocols) })));
|
12573
12727
|
});
|
12574
12728
|
}
|
12575
12729
|
/**
|
@@ -12735,7 +12889,7 @@ class ShareClient extends StorageClient {
|
|
12735
12889
|
async getProperties(options = {}) {
|
12736
12890
|
return tracingClient.withSpan("ShareClient-getProperties", options, async (updatedOptions) => {
|
12737
12891
|
const res = assertResponse(await this.context.getProperties(updatedOptions));
|
12738
|
-
return Object.assign(Object.assign({}, res), { protocols: toShareProtocols(res.enabledProtocols) });
|
12892
|
+
return Object.assign(Object.assign(Object.assign({}, res), this.shareClientConfig), { protocols: toShareProtocols(res.enabledProtocols) });
|
12739
12893
|
});
|
12740
12894
|
}
|
12741
12895
|
/**
|
@@ -12748,7 +12902,7 @@ class ShareClient extends StorageClient {
|
|
12748
12902
|
*/
|
12749
12903
|
async delete(options = {}) {
|
12750
12904
|
return tracingClient.withSpan("ShareClient-delete", options, async (updatedOptions) => {
|
12751
|
-
return assertResponse(await this.context.delete(Object.assign({}, updatedOptions)));
|
12905
|
+
return assertResponse(await this.context.delete(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
12752
12906
|
});
|
12753
12907
|
}
|
12754
12908
|
/**
|
@@ -12786,7 +12940,7 @@ class ShareClient extends StorageClient {
|
|
12786
12940
|
*/
|
12787
12941
|
async setMetadata(metadata, options = {}) {
|
12788
12942
|
return tracingClient.withSpan("ShareClient-setMetadata", options, async (updatedOptions) => {
|
12789
|
-
return assertResponse(await this.context.setMetadata(Object.assign(Object.assign({}, updatedOptions), { metadata })));
|
12943
|
+
return assertResponse(await this.context.setMetadata(Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { metadata })));
|
12790
12944
|
});
|
12791
12945
|
}
|
12792
12946
|
/**
|
@@ -12803,7 +12957,7 @@ class ShareClient extends StorageClient {
|
|
12803
12957
|
*/
|
12804
12958
|
async getAccessPolicy(options = {}) {
|
12805
12959
|
return tracingClient.withSpan("ShareClient-getAccessPolicy", options, async (updatedOptions) => {
|
12806
|
-
const response = assertResponse(await this.context.getAccessPolicy(Object.assign({}, updatedOptions)));
|
12960
|
+
const response = assertResponse(await this.context.getAccessPolicy(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
12807
12961
|
const res = {
|
12808
12962
|
_response: response._response,
|
12809
12963
|
date: response.date,
|
@@ -12869,7 +13023,7 @@ class ShareClient extends StorageClient {
|
|
12869
13023
|
id: identifier.id,
|
12870
13024
|
});
|
12871
13025
|
}
|
12872
|
-
return assertResponse(await this.context.setAccessPolicy(Object.assign(Object.assign({}, updatedOptions), { shareAcl: acl })));
|
13026
|
+
return assertResponse(await this.context.setAccessPolicy(Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { shareAcl: acl })));
|
12873
13027
|
});
|
12874
13028
|
}
|
12875
13029
|
/**
|
@@ -12880,7 +13034,7 @@ class ShareClient extends StorageClient {
|
|
12880
13034
|
*/
|
12881
13035
|
async createSnapshot(options = {}) {
|
12882
13036
|
return tracingClient.withSpan("ShareClient-createSnapshot", options, async (updatedOptions) => {
|
12883
|
-
return assertResponse(await this.context.createSnapshot(updatedOptions));
|
13037
|
+
return assertResponse(await this.context.createSnapshot(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
12884
13038
|
});
|
12885
13039
|
}
|
12886
13040
|
/**
|
@@ -12894,7 +13048,7 @@ class ShareClient extends StorageClient {
|
|
12894
13048
|
*/
|
12895
13049
|
async setQuota(quotaInGB, options = {}) {
|
12896
13050
|
return tracingClient.withSpan("ShareClient-setQuota", options, async (updatedOptions) => {
|
12897
|
-
return assertResponse(await this.context.setProperties(Object.assign(Object.assign({}, updatedOptions), { quota: quotaInGB })));
|
13051
|
+
return assertResponse(await this.context.setProperties(Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { quota: quotaInGB })));
|
12898
13052
|
});
|
12899
13053
|
}
|
12900
13054
|
/**
|
@@ -12905,7 +13059,7 @@ class ShareClient extends StorageClient {
|
|
12905
13059
|
*/
|
12906
13060
|
async setProperties(options = {}) {
|
12907
13061
|
return tracingClient.withSpan("ShareClient-setProperties", options, async (updatedOptions) => {
|
12908
|
-
return assertResponse(await this.context.setProperties(Object.assign(Object.assign({}, options), { quota: options.quotaInGB, tracingOptions: updatedOptions.tracingOptions })));
|
13062
|
+
return assertResponse(await this.context.setProperties(Object.assign(Object.assign(Object.assign({}, options), this.shareClientConfig), { quota: options.quotaInGB, tracingOptions: updatedOptions.tracingOptions })));
|
12909
13063
|
});
|
12910
13064
|
}
|
12911
13065
|
/**
|
@@ -12916,7 +13070,7 @@ class ShareClient extends StorageClient {
|
|
12916
13070
|
*/
|
12917
13071
|
async getStatistics(options = {}) {
|
12918
13072
|
return tracingClient.withSpan("ShareClient-getStatistics", options, async (updatedOptions) => {
|
12919
|
-
const response = assertResponse(await this.context.getStatistics(updatedOptions));
|
13073
|
+
const response = assertResponse(await this.context.getStatistics(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
12920
13074
|
const GBBytes = 1024 * 1024 * 1024;
|
12921
13075
|
return Object.assign(Object.assign({}, response), { shareUsage: Math.ceil(response.shareUsageBytes / GBBytes) });
|
12922
13076
|
});
|
@@ -12931,9 +13085,7 @@ class ShareClient extends StorageClient {
|
|
12931
13085
|
*/
|
12932
13086
|
async createPermission(filePermission, options = {}) {
|
12933
13087
|
return tracingClient.withSpan("ShareClient-createPermission", options, async (updatedOptions) => {
|
12934
|
-
return assertResponse(await this.context.createPermission({
|
12935
|
-
permission: filePermission,
|
12936
|
-
}, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
13088
|
+
return assertResponse(await this.context.createPermission(asSharePermission(filePermission), Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
12937
13089
|
});
|
12938
13090
|
}
|
12939
13091
|
/**
|
@@ -12949,6 +13101,15 @@ class ShareClient extends StorageClient {
|
|
12949
13101
|
return assertResponse(await this.context.getPermission(filePermissionKey, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
12950
13102
|
});
|
12951
13103
|
}
|
13104
|
+
/**
|
13105
|
+
* Get a {@link ShareLeaseClient} that manages leases on the file.
|
13106
|
+
*
|
13107
|
+
* @param proposeLeaseId - Initial proposed lease Id.
|
13108
|
+
* @returns A new ShareLeaseClient object for managing leases on the file.
|
13109
|
+
*/
|
13110
|
+
getShareLeaseClient(proposeLeaseId) {
|
13111
|
+
return new ShareLeaseClient(this, proposeLeaseId);
|
13112
|
+
}
|
12952
13113
|
/**
|
12953
13114
|
* Only available for ShareClient constructed with a shared key credential.
|
12954
13115
|
*
|
@@ -12967,6 +13128,24 @@ class ShareClient extends StorageClient {
|
|
12967
13128
|
const sas = generateFileSASQueryParameters(Object.assign({ shareName: this.name }, options), this.credential).toString();
|
12968
13129
|
return appendToURLQuery(this.url, sas);
|
12969
13130
|
}
|
13131
|
+
/**
|
13132
|
+
* Only available for ShareClient constructed with a shared key credential.
|
13133
|
+
*
|
13134
|
+
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
13135
|
+
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
13136
|
+
*
|
13137
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
13138
|
+
*
|
13139
|
+
* @param options - Optional parameters.
|
13140
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
13141
|
+
*/
|
13142
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
13143
|
+
generateSasStringToSign(options) {
|
13144
|
+
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
13145
|
+
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
13146
|
+
}
|
13147
|
+
return generateFileSASQueryParametersInternal(Object.assign({ shareName: this.name }, options), this.credential).stringToSign;
|
13148
|
+
}
|
12970
13149
|
}
|
12971
13150
|
/**
|
12972
13151
|
* A ShareDirectoryClient represents a URL to the Azure Storage directory allowing you to manipulate its files and directories.
|
@@ -14813,6 +14992,24 @@ class ShareFileClient extends StorageClient {
|
|
14813
14992
|
const sas = generateFileSASQueryParameters(Object.assign({ shareName: this.shareName, filePath: this.path }, options), this.credential).toString();
|
14814
14993
|
return appendToURLQuery(this.url, sas);
|
14815
14994
|
}
|
14995
|
+
/**
|
14996
|
+
* Only available for clients constructed with a shared key credential.
|
14997
|
+
*
|
14998
|
+
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
14999
|
+
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
15000
|
+
*
|
15001
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
15002
|
+
*
|
15003
|
+
* @param options - Optional parameters.
|
15004
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
15005
|
+
*/
|
15006
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
15007
|
+
generateSasStringToSign(options) {
|
15008
|
+
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
15009
|
+
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
15010
|
+
}
|
15011
|
+
return generateFileSASQueryParametersInternal(Object.assign({ shareName: this.shareName, filePath: this.path }, options), this.credential).stringToSign;
|
15012
|
+
}
|
14816
15013
|
/**
|
14817
15014
|
* Renames a file.
|
14818
15015
|
* This API only supports renaming a file in the same share.
|
@@ -14901,9 +15098,11 @@ class ShareLeaseClient {
|
|
14901
15098
|
const clientContext = client["storageClientContext"];
|
14902
15099
|
if (client instanceof ShareClient) {
|
14903
15100
|
this.fileOrShare = clientContext.share;
|
15101
|
+
this.shareClientConfig = client["shareClientConfig"];
|
14904
15102
|
}
|
14905
15103
|
else {
|
14906
15104
|
this.fileOrShare = clientContext.file;
|
15105
|
+
this.shareClientConfig = client["shareClientConfig"];
|
14907
15106
|
}
|
14908
15107
|
this._url = client.url;
|
14909
15108
|
if (!leaseId) {
|
@@ -14920,7 +15119,7 @@ class ShareLeaseClient {
|
|
14920
15119
|
*/
|
14921
15120
|
async acquireLease(duration = -1, options = {}) {
|
14922
15121
|
return tracingClient.withSpan("ShareLeaseClient-acquireLease", options, async (updatedOptions) => {
|
14923
|
-
return assertResponse(await this.fileOrShare.acquireLease(Object.assign(Object.assign({}, updatedOptions), { duration, proposedLeaseId: this._leaseId })));
|
15122
|
+
return assertResponse(await this.fileOrShare.acquireLease(Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { duration, proposedLeaseId: this._leaseId })));
|
14924
15123
|
});
|
14925
15124
|
}
|
14926
15125
|
/**
|
@@ -14932,7 +15131,7 @@ class ShareLeaseClient {
|
|
14932
15131
|
*/
|
14933
15132
|
async changeLease(proposedLeaseId, options = {}) {
|
14934
15133
|
return tracingClient.withSpan("ShareLeaseClient-changeLease", options, async (updatedOptions) => {
|
14935
|
-
const response = assertResponse(await this.fileOrShare.changeLease(this._leaseId, Object.assign(Object.assign({}, updatedOptions), { proposedLeaseId })));
|
15134
|
+
const response = assertResponse(await this.fileOrShare.changeLease(this._leaseId, Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { proposedLeaseId })));
|
14936
15135
|
this._leaseId = proposedLeaseId;
|
14937
15136
|
return response;
|
14938
15137
|
});
|
@@ -14946,7 +15145,7 @@ class ShareLeaseClient {
|
|
14946
15145
|
*/
|
14947
15146
|
async releaseLease(options = {}) {
|
14948
15147
|
return tracingClient.withSpan("ShareLeaseClient-releaseLease", options, async (updatedOptions) => {
|
14949
|
-
return assertResponse(await this.fileOrShare.releaseLease(this._leaseId, updatedOptions));
|
15148
|
+
return assertResponse(await this.fileOrShare.releaseLease(this._leaseId, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
14950
15149
|
});
|
14951
15150
|
}
|
14952
15151
|
/**
|
@@ -14957,7 +15156,7 @@ class ShareLeaseClient {
|
|
14957
15156
|
*/
|
14958
15157
|
async breakLease(options = {}) {
|
14959
15158
|
return tracingClient.withSpan("ShareLeaseClient-breakLease", options, async (updatedOptions) => {
|
14960
|
-
return assertResponse(await this.fileOrShare.breakLease(updatedOptions));
|
15159
|
+
return assertResponse(await this.fileOrShare.breakLease(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
14961
15160
|
});
|
14962
15161
|
}
|
14963
15162
|
/**
|
@@ -14973,7 +15172,7 @@ class ShareLeaseClient {
|
|
14973
15172
|
if (isFile(this.fileOrShare)) {
|
14974
15173
|
throw new RangeError("The renewLease operation is not available for lease on file.");
|
14975
15174
|
}
|
14976
|
-
return assertResponse(await this.fileOrShare.renewLease(this._leaseId, updatedOptions));
|
15175
|
+
return assertResponse(await this.fileOrShare.renewLease(this._leaseId, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
14977
15176
|
});
|
14978
15177
|
}
|
14979
15178
|
}
|
@@ -15119,7 +15318,7 @@ class ShareServiceClient extends StorageClient {
|
|
15119
15318
|
*/
|
15120
15319
|
async getProperties(options = {}) {
|
15121
15320
|
return tracingClient.withSpan("ShareServiceClient-getProperties", options, async (updatedOptions) => {
|
15122
|
-
return assertResponse(await this.serviceContext.getProperties(updatedOptions));
|
15321
|
+
return assertResponse(await this.serviceContext.getProperties(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
15123
15322
|
});
|
15124
15323
|
}
|
15125
15324
|
/**
|
@@ -15133,7 +15332,7 @@ class ShareServiceClient extends StorageClient {
|
|
15133
15332
|
*/
|
15134
15333
|
async setProperties(properties, options = {}) {
|
15135
15334
|
return tracingClient.withSpan("ShareServiceClient-setProperties", options, async (updatedOptions) => {
|
15136
|
-
return assertResponse(await this.serviceContext.setProperties(properties, updatedOptions));
|
15335
|
+
return assertResponse(await this.serviceContext.setProperties(properties, Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig)));
|
15137
15336
|
});
|
15138
15337
|
}
|
15139
15338
|
/**
|
@@ -15322,7 +15521,7 @@ class ShareServiceClient extends StorageClient {
|
|
15322
15521
|
options.prefix = undefined;
|
15323
15522
|
}
|
15324
15523
|
return tracingClient.withSpan("ShareServiceClient-listSharesSegment", options, async (updatedOptions) => {
|
15325
|
-
const res = assertResponse(await this.serviceContext.listSharesSegment(Object.assign(Object.assign({}, updatedOptions), { marker })));
|
15524
|
+
const res = assertResponse(await this.serviceContext.listSharesSegment(Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { marker })));
|
15326
15525
|
// parse protocols
|
15327
15526
|
if (res.shareItems) {
|
15328
15527
|
for (let i = 0; i < res.shareItems.length; i++) {
|
@@ -15346,7 +15545,7 @@ class ShareServiceClient extends StorageClient {
|
|
15346
15545
|
async undeleteShare(deletedShareName, deletedShareVersion, options = {}) {
|
15347
15546
|
return tracingClient.withSpan("ShareServiceClient-undeleteShare", options, async (updatedOptions) => {
|
15348
15547
|
const shareClient = this.getShareClient(deletedShareName);
|
15349
|
-
await new ShareClientInternal(shareClient.url, this.pipeline).restore(Object.assign(Object.assign({}, updatedOptions), { deletedShareName: deletedShareName, deletedShareVersion: deletedShareVersion }));
|
15548
|
+
await new ShareClientInternal(shareClient.url, this.pipeline).restore(Object.assign(Object.assign(Object.assign({}, updatedOptions), this.shareClientConfig), { deletedShareName: deletedShareName, deletedShareVersion: deletedShareVersion }));
|
15350
15549
|
return shareClient;
|
15351
15550
|
});
|
15352
15551
|
}
|
@@ -15377,6 +15576,32 @@ class ShareServiceClient extends StorageClient {
|
|
15377
15576
|
resourceTypes, services: AccountSASServices.parse("f").toString() }, options), this.credential).toString();
|
15378
15577
|
return appendToURLQuery(this.url, sas);
|
15379
15578
|
}
|
15579
|
+
/**
|
15580
|
+
* Only available for ShareServiceClient constructed with a shared key credential.
|
15581
|
+
*
|
15582
|
+
* Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties
|
15583
|
+
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
15584
|
+
*
|
15585
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas
|
15586
|
+
*
|
15587
|
+
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
15588
|
+
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
15589
|
+
* @param resourceTypes - Specifies the resource types associated with the shared access signature.
|
15590
|
+
* @param options - Optional parameters.
|
15591
|
+
* @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
15592
|
+
*/
|
15593
|
+
generateSasStringToSign(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
|
15594
|
+
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
15595
|
+
throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
|
15596
|
+
}
|
15597
|
+
if (expiresOn === undefined) {
|
15598
|
+
const now = new Date();
|
15599
|
+
expiresOn = new Date(now.getTime() + 3600 * 1000);
|
15600
|
+
}
|
15601
|
+
return generateAccountSASQueryParametersInternal(Object.assign({ permissions,
|
15602
|
+
expiresOn,
|
15603
|
+
resourceTypes, services: AccountSASServices.parse("f").toString() }, options), this.credential).stringToSign;
|
15604
|
+
}
|
15380
15605
|
}
|
15381
15606
|
|
15382
15607
|
// Copyright (c) Microsoft Corporation.
|