@azure/storage-file-share 12.29.1 → 12.30.0-alpha.20251128.2
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/Clients.d.ts +52 -2
- package/dist/browser/Clients.d.ts.map +1 -1
- package/dist/browser/Clients.js +72 -0
- package/dist/browser/Clients.js.map +1 -1
- package/dist/browser/FileSASSignatureValues.d.ts +18 -17
- package/dist/browser/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/FileSASSignatureValues.js +82 -4
- package/dist/browser/FileSASSignatureValues.js.map +1 -1
- package/dist/browser/SASQueryParameters.d.ts +38 -1
- package/dist/browser/SASQueryParameters.d.ts.map +1 -1
- package/dist/browser/SASQueryParameters.js +74 -1
- package/dist/browser/SASQueryParameters.js.map +1 -1
- package/dist/browser/ShareServiceClient.d.ts +23 -1
- package/dist/browser/ShareServiceClient.d.ts.map +1 -1
- package/dist/browser/ShareServiceClient.js +41 -1
- package/dist/browser/ShareServiceClient.js.map +1 -1
- package/dist/browser/generated/src/models/index.d.ts +115 -18
- package/dist/browser/generated/src/models/index.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.js +8 -0
- package/dist/browser/generated/src/models/index.js.map +1 -1
- package/dist/browser/generated/src/models/mappers.d.ts +7 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/browser/generated/src/models/mappers.js +222 -0
- package/dist/browser/generated/src/models/mappers.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.d.ts +21 -17
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +103 -68
- package/dist/browser/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/operations/directory.js +5 -4
- package/dist/browser/generated/src/operations/directory.js.map +1 -1
- package/dist/browser/generated/src/operations/file.js +28 -21
- package/dist/browser/generated/src/operations/file.js.map +1 -1
- package/dist/browser/generated/src/operations/service.d.ts +8 -1
- package/dist/browser/generated/src/operations/service.d.ts.map +1 -1
- package/dist/browser/generated/src/operations/service.js +40 -0
- package/dist/browser/generated/src/operations/service.js.map +1 -1
- package/dist/browser/generated/src/operations/share.js +16 -16
- package/dist/browser/generated/src/operations/share.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts +8 -1
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +2 -2
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/generatedModels.d.ts +7 -2
- package/dist/browser/generatedModels.d.ts.map +1 -1
- package/dist/browser/generatedModels.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/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +2 -2
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/commonjs/Clients.d.ts +52 -2
- package/dist/commonjs/Clients.d.ts.map +1 -1
- package/dist/commonjs/Clients.js +72 -0
- package/dist/commonjs/Clients.js.map +1 -1
- package/dist/commonjs/FileSASSignatureValues.d.ts +18 -17
- package/dist/commonjs/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/FileSASSignatureValues.js +84 -4
- package/dist/commonjs/FileSASSignatureValues.js.map +1 -1
- package/dist/commonjs/SASQueryParameters.d.ts +38 -1
- package/dist/commonjs/SASQueryParameters.d.ts.map +1 -1
- package/dist/commonjs/SASQueryParameters.js +74 -1
- package/dist/commonjs/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/ShareServiceClient.d.ts +23 -1
- package/dist/commonjs/ShareServiceClient.d.ts.map +1 -1
- package/dist/commonjs/ShareServiceClient.js +40 -0
- package/dist/commonjs/ShareServiceClient.js.map +1 -1
- package/dist/commonjs/generated/src/models/index.d.ts +115 -18
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +9 -1
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts +7 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +225 -3
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts +21 -17
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +105 -70
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/operations/directory.js +5 -4
- package/dist/commonjs/generated/src/operations/directory.js.map +1 -1
- package/dist/commonjs/generated/src/operations/file.js +28 -21
- package/dist/commonjs/generated/src/operations/file.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.d.ts +8 -1
- package/dist/commonjs/generated/src/operations/service.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +40 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/operations/share.js +16 -16
- package/dist/commonjs/generated/src/operations/share.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts +8 -1
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +2 -2
- package/dist/commonjs/generated/src/storageClient.js.map +1 -1
- package/dist/commonjs/generatedModels.d.ts +7 -2
- package/dist/commonjs/generatedModels.d.ts.map +1 -1
- package/dist/commonjs/generatedModels.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +2 -2
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/esm/Clients.d.ts +52 -2
- package/dist/esm/Clients.d.ts.map +1 -1
- package/dist/esm/Clients.js +72 -0
- package/dist/esm/Clients.js.map +1 -1
- package/dist/esm/FileSASSignatureValues.d.ts +18 -17
- package/dist/esm/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/FileSASSignatureValues.js +82 -4
- package/dist/esm/FileSASSignatureValues.js.map +1 -1
- package/dist/esm/SASQueryParameters.d.ts +38 -1
- package/dist/esm/SASQueryParameters.d.ts.map +1 -1
- package/dist/esm/SASQueryParameters.js +74 -1
- package/dist/esm/SASQueryParameters.js.map +1 -1
- package/dist/esm/ShareServiceClient.d.ts +23 -1
- package/dist/esm/ShareServiceClient.d.ts.map +1 -1
- package/dist/esm/ShareServiceClient.js +41 -1
- package/dist/esm/ShareServiceClient.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +115 -18
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js +8 -0
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts +7 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +222 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.d.ts +21 -17
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +103 -68
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/operations/directory.js +5 -4
- package/dist/esm/generated/src/operations/directory.js.map +1 -1
- package/dist/esm/generated/src/operations/file.js +28 -21
- package/dist/esm/generated/src/operations/file.js.map +1 -1
- package/dist/esm/generated/src/operations/service.d.ts +8 -1
- package/dist/esm/generated/src/operations/service.d.ts.map +1 -1
- package/dist/esm/generated/src/operations/service.js +40 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -1
- package/dist/esm/generated/src/operations/share.js +16 -16
- package/dist/esm/generated/src/operations/share.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts +8 -1
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +2 -2
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/generatedModels.d.ts +7 -2
- package/dist/esm/generatedModels.d.ts.map +1 -1
- package/dist/esm/generatedModels.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +2 -2
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/react-native/Clients.d.ts +52 -2
- package/dist/react-native/Clients.d.ts.map +1 -1
- package/dist/react-native/Clients.js +72 -0
- package/dist/react-native/Clients.js.map +1 -1
- package/dist/react-native/FileSASSignatureValues.d.ts +18 -17
- package/dist/react-native/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/FileSASSignatureValues.js +82 -4
- package/dist/react-native/FileSASSignatureValues.js.map +1 -1
- package/dist/react-native/SASQueryParameters.d.ts +38 -1
- package/dist/react-native/SASQueryParameters.d.ts.map +1 -1
- package/dist/react-native/SASQueryParameters.js +74 -1
- package/dist/react-native/SASQueryParameters.js.map +1 -1
- package/dist/react-native/ShareServiceClient.d.ts +23 -1
- package/dist/react-native/ShareServiceClient.d.ts.map +1 -1
- package/dist/react-native/ShareServiceClient.js +41 -1
- package/dist/react-native/ShareServiceClient.js.map +1 -1
- package/dist/react-native/generated/src/models/index.d.ts +115 -18
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.js +8 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -1
- package/dist/react-native/generated/src/models/mappers.d.ts +7 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/mappers.js +222 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.d.ts +21 -17
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +103 -68
- package/dist/react-native/generated/src/models/parameters.js.map +1 -1
- package/dist/react-native/generated/src/operations/directory.js +5 -4
- package/dist/react-native/generated/src/operations/directory.js.map +1 -1
- package/dist/react-native/generated/src/operations/file.js +28 -21
- package/dist/react-native/generated/src/operations/file.js.map +1 -1
- package/dist/react-native/generated/src/operations/service.d.ts +8 -1
- package/dist/react-native/generated/src/operations/service.d.ts.map +1 -1
- package/dist/react-native/generated/src/operations/service.js +40 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -1
- package/dist/react-native/generated/src/operations/share.js +16 -16
- package/dist/react-native/generated/src/operations/share.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts +8 -1
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +2 -2
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/generatedModels.d.ts +7 -2
- package/dist/react-native/generatedModels.d.ts.map +1 -1
- package/dist/react-native/generatedModels.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -1
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +2 -2
- package/dist/react-native/utils/constants.js.map +1 -1
- package/package.json +27 -26
|
@@ -490,6 +490,46 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
|
490
490
|
...options,
|
|
491
491
|
}, this.credential).stringToSign;
|
|
492
492
|
}
|
|
493
|
+
/**
|
|
494
|
+
* ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).
|
|
495
|
+
*
|
|
496
|
+
* Retrieves a user delegation key for the File service. This is only a valid operation when using
|
|
497
|
+
* bearer token authentication.
|
|
498
|
+
*
|
|
499
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key
|
|
500
|
+
*
|
|
501
|
+
* @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time
|
|
502
|
+
* @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time
|
|
503
|
+
*/
|
|
504
|
+
async getUserDelegationKey(startsOn, expiresOn, options = {}) {
|
|
505
|
+
return tracing_js_1.tracingClient.withSpan("ShareServiceClient-getUserDelegationKey", options, async (updatedOptions) => {
|
|
506
|
+
const response = (0, utils_common_js_1.assertResponse)(await this.serviceContext.getUserDelegationKey({
|
|
507
|
+
start: (0, utils_common_js_1.truncatedISO8061Date)(startsOn, false),
|
|
508
|
+
expiry: (0, utils_common_js_1.truncatedISO8061Date)(expiresOn, false),
|
|
509
|
+
}, {
|
|
510
|
+
abortSignal: options.abortSignal,
|
|
511
|
+
tracingOptions: updatedOptions.tracingOptions,
|
|
512
|
+
}));
|
|
513
|
+
const userDelegationKey = {
|
|
514
|
+
signedObjectId: response.signedOid,
|
|
515
|
+
signedTenantId: response.signedTid,
|
|
516
|
+
signedStartsOn: new Date(response.signedStart),
|
|
517
|
+
signedExpiresOn: new Date(response.signedExpiry),
|
|
518
|
+
signedService: response.signedService,
|
|
519
|
+
signedVersion: response.signedVersion,
|
|
520
|
+
value: response.value,
|
|
521
|
+
};
|
|
522
|
+
const res = {
|
|
523
|
+
_response: response._response,
|
|
524
|
+
requestId: response.requestId,
|
|
525
|
+
clientRequestId: response.clientRequestId,
|
|
526
|
+
version: response.version,
|
|
527
|
+
date: response.date,
|
|
528
|
+
...userDelegationKey,
|
|
529
|
+
};
|
|
530
|
+
return res;
|
|
531
|
+
});
|
|
532
|
+
}
|
|
493
533
|
}
|
|
494
534
|
exports.ShareServiceClient = ShareServiceClient;
|
|
495
535
|
//# sourceMappingURL=ShareServiceClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareServiceClient.js","sourceRoot":"","sources":["../../src/ShareServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAkBlC,+CAA4D;AAE5D,yDAAmD;AACnD,qEAA+D;AAE/D,6CAA2C;AAE3C,6DAKiC;AACjC,0DAAmD;AACnD,0DAAmE;AACnE,0DAA4D;AAE5D,gDAA8C;AAC9C,mDAAmD;AAEnD,2CAA+C;AAC/C,yEAAmE;AACnE,iFAGwC;AACxC,mEAA6D;AAG7D,6DAA2D;AAE3D,gDAAqD;AAuKrD;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,gCAAa;IACnD;;OAEG;IACK,cAAc,CAAU;IAExB,iBAAiB,CAAqB;IAE9C;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,oBAAoB,CAChC,gBAAwB;IACxB,2FAA2F;IAC3F,iEAAiE;IACjE,OAA4B;QAE5B,MAAM,cAAc,GAAG,IAAA,8CAA4B,EAAC,gBAAgB,CAAC,CAAC;QACtE,IAAI,cAAc,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YAChD,IAAI,sBAAU,EAAE,CAAC;gBACf,MAAM,mBAAmB,GAAG,IAAI,2CAA0B,CACxD,cAAc,CAAC,WAAY,EAC3B,cAAc,CAAC,UAAU,CAC1B,CAAC;gBACF,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;gBAC3D,OAAO,IAAI,kBAAkB,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YACvE,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;YACxF,CAAC;QACH,CAAC;aAAM,IAAI,cAAc,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;Y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d,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,IAAA,wEAAyC,EAC9C;YACE,WAAW;YACX,SAAS;YACT,aAAa;YACb,QAAQ,EAAE,0CAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YAClD,GAAG,OAAO;SACX,EACD,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF;AA5mBD,gDA4mBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n FileServiceProperties,\n ListSharesIncludeType,\n ShareCreateResponse,\n ShareDeleteResponse,\n ServiceGetPropertiesResponse,\n ServiceSetPropertiesResponse,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel,\n SharePropertiesInternal,\n ServiceSetPropertiesHeaders,\n ServiceGetPropertiesHeaders,\n} from \"./generatedModels.js\";\nimport type { Service } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { Pipeline } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { ShareClientInternal } from \"./ShareClientInternal.js\";\nimport type { ShareCreateOptions, ShareDeleteMethodOptions } from \"./Clients.js\";\nimport { ShareClient } from \"./Clients.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n assertResponse,\n removeEmptyString,\n} from \"./utils/utils.common.js\";\nimport { Credential } from \"@azure/storage-common\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport { AnonymousCredential } from \"@azure/storage-common\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { ShareClientConfig, ShareClientOptions, ShareProtocols } from \"./models.js\";\nimport { toShareProtocols } from \"./models.js\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { appendToURLQuery } from \"./utils/utils.common.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\n/**\n * Options to configure Share - List Shares Segment operations.\n *\n * See:\n * - {@link ShareServiceClient.listSegments}\n * - {@link ShareServiceClient.listItems}\n * - {@link ShareServiceClient.listSharesSegment}\n */\ninterface ServiceListSharesSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of entries to\n * return. If the request does not specify maxResults, or specifies a value\n * greater than 5,000, the server will return up to 5,000 items.\n */\n maxResults?: number;\n\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListSharesIncludeType[];\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.listShares} operation.\n */\nexport interface ServiceListSharesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies that share snapshots should be included in the enumeration. Share Snapshots are listed from oldest to newest in the response.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies that share snapshot should be returned in the response.\n */\n includeSnapshots?: boolean;\n\n /**\n * Specifies that share soft deleted should be returned in the response.\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.getProperties} operation.\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.setProperties} operation.\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.undelete} operation.\n */\nexport interface ServiceUndeleteShareOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Properties of a share.\n */\nexport type ShareProperties = SharePropertiesInternal & {\n /**\n * The protocols that have been enabled on the share.\n */\n protocols?: ShareProtocols;\n};\n\n/**\n * A listed Azure Storage share item.\n */\nexport interface ShareItem {\n name: string;\n snapshot?: string;\n deleted?: boolean;\n version?: string;\n properties: ShareProperties;\n metadata?: { [propertyName: string]: string };\n}\n\n/**\n * An enumeration of shares.\n */\nexport interface ListSharesResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxResults?: number;\n shareItems?: ShareItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link ShareServiceClient.listShares} operation.\n */\nexport type ServiceListSharesSegmentResponse = WithResponse<\n ListSharesResponse & ServiceListSharesSegmentHeaders,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n>;\n\n/**\n * Options to configure {@link ShareServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * A ShareServiceClient represents a URL to the Azure Storage File service allowing you\n * to manipulate file shares.\n */\nexport class ShareServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n private shareClientConfig?: ShareClientConfig;\n\n /**\n *\n * Creates an instance of ShareServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new ShareServiceClient from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ): ShareServiceClient {\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNodeLike) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new ShareServiceClient(extractedCreds.url, pipeline, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new ShareServiceClient(\n extractedCreds.url + \"?\" + extractedCreds.accountSas,\n pipeline,\n options,\n );\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential, or TokenCredential,\n * If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n\n constructor(\n url: string,\n credential?: Credential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n );\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);\n constructor(\n url: string,\n credentialOrPipeline?: Credential | TokenCredential | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n credentialOrPipeline instanceof Credential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n\n super(url, pipeline);\n this.shareClientConfig = options;\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a ShareClient object.\n *\n * @param shareName - Name of a share.\n * @returns The ShareClient object for the given share name.\n *\n * Example usage:\n *\n * ```ts snippet:ReadmeSampleCreateShareClient\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareName = \"<share name>\";\n * const shareClient = serviceClient.getShareClient(shareName);\n * await shareClient.create();\n * ```\n */\n public getShareClient(shareName: string): ShareClient {\n return new ShareClient(\n appendToURLPath(this.url, shareName),\n this.pipeline,\n this.shareClientConfig,\n );\n }\n\n /**\n * Creates a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share creation response and the corresponding share client.\n */\n public async createShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareCreateOptions = {},\n ): Promise<{ shareCreateResponse: ShareCreateResponse; shareClient: ShareClient }> {\n return tracingClient.withSpan(\n \"ShareServiceClient-createShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n const shareCreateResponse = await shareClient.create(updatedOptions);\n return {\n shareCreateResponse,\n shareClient,\n };\n },\n );\n }\n\n /**\n * Deletes a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share deletion response and the corresponding share client.\n */\n public async deleteShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareDeleteMethodOptions = {},\n ): Promise<ShareDeleteResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-deleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n return shareClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s file service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-file-service-properties\n *\n * @param options - Options to Get Properties operation.\n * @returns Response data for the Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n >(\n await this.serviceContext.getProperties({\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s file service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/rest/api/storageservices/set-file-service-properties\n *\n * @param properties -\n * @param options - Options to Set Properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: FileServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListSharesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of shares to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all shares remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list shares operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listSharesSegmentResponse;\n do {\n listSharesSegmentResponse = await this.listSharesSegment(marker, options);\n marker = listSharesSegmentResponse.continuationToken;\n yield await listSharesSegmentResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for share items\n *\n * @param options - Options to list shares operation.\n */\n private async *listItems(\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ShareItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.shareItems) {\n yield* segment.shareItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the shares\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the shares in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListShares\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const share of serviceClient.listShares()) {\n * console.log(`Share${i++}: ${share.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListShares_Iterator\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareIter = serviceClient.listShares();\n * let i = 1;\n * let { value, done } = await shareIter.next();\n * while (!done) {\n * console.log(`Share ${i++}: ${value.name}`);\n * ({ value, done } = await shareIter.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListShares_ByPage\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const response of serviceClient.listShares().byPage({ maxPageSize: 20 })) {\n * console.log(`Page ${i++}:`);\n * for (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListShares_Continuation\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let iterator = serviceClient.listShares().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n * iterator = serviceClient.listShares().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * ```\n *\n * @param options - Options to list shares operation.\n *\n * An asyncIterableIterator that supports paging.\n */\n public listShares(\n options: ServiceListSharesOptions = {},\n ): PagedAsyncIterableIterator<ShareItem, ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListSharesIncludeType[] = [];\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n\n const updatedOptions: ServiceListSharesSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(removeEmptyString(settings.continuationToken), {\n maxResults: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account's File service, including properties for Storage\n * Analytics metrics and CORS (Cross-Origin Resource Sharing) rules.\n *\n * @param marker - A string value that identifies the portion of\n * the list to be returned with the next list operation. The operation\n * returns a marker value within the response body if the list returned was\n * not complete. The marker value may then be used in a subsequent call to\n * request the next set of list items. The marker value is opaque to the\n * client.\n * @param options - Options to List Shares Segment operation.\n * @returns Response data for the List Shares Segment operation.\n */\n private async listSharesSegment(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): Promise<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n return tracingClient.withSpan(\n \"ShareServiceClient-listSharesSegment\",\n options,\n async (updatedOptions) => {\n const res = assertResponse<\n ServiceListSharesSegmentHeaders & ListSharesResponseModel,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n >(\n await this.serviceContext.listSharesSegment({\n ...updatedOptions,\n ...this.shareClientConfig,\n marker,\n }),\n );\n\n // parse protocols\n if (res.shareItems) {\n for (let i = 0; i < res.shareItems.length; i++) {\n const protocolsStr = res.shareItems[i].properties.enabledProtocols;\n (res.shareItems[i].properties as any).protocols = toShareProtocols(protocolsStr);\n }\n }\n\n return res;\n },\n );\n }\n\n /**\n * Restores a previously deleted share.\n * This API is only functional if Share Soft Delete is enabled\n * for the storage account associated with the share.\n *\n * @param deletedShareName - The name of the previously deleted share.\n * @param deletedShareVersion - The version of the previously deleted share.\n * @param options - Options to Share undelete operation.\n * @returns Restored share.\n */\n public async undeleteShare(\n deletedShareName: string,\n deletedShareVersion: string,\n options: ServiceUndeleteShareOptions = {},\n ): Promise<ShareClient> {\n return tracingClient.withSpan(\n \"ShareServiceClient-undeleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(deletedShareName);\n await new ShareClientInternal(shareClient.url, this.pipeline).restore({\n ...updatedOptions,\n ...this.shareClientConfig,\n deletedShareName: deletedShareName,\n deletedShareVersion: deletedShareVersion,\n });\n return shareClient;\n },\n );\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ShareServiceClient.js","sourceRoot":"","sources":["../../src/ShareServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAsBlC,+CAA4D;AAE5D,yDAAmD;AACnD,qEAA+D;AAE/D,6CAA2C;AAE3C,6DAMiC;AACjC,0DAAmD;AACnD,0DAAmE;AACnE,0DAA4D;AAE5D,gDAA8C;AAC9C,mDAAmD;AAEnD,2CAA+C;AAC/C,yEAAmE;AACnE,iFAGwC;AACxC,mEAA6D;AAG7D,6DAA2D;AAE3D,gDAAqD;AAkLrD;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,gCAAa;IACnD;;OAEG;IAC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abort-controller\";\nimport type {\n FileServiceProperties,\n ListSharesIncludeType,\n ShareCreateResponse,\n ShareDeleteResponse,\n ServiceGetPropertiesResponse,\n ServiceSetPropertiesResponse,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel,\n SharePropertiesInternal,\n ServiceSetPropertiesHeaders,\n ServiceGetPropertiesHeaders,\n ServiceGetUserDelegationKeyResponse,\n ServiceGetUserDelegationKeyHeaders,\n ServiceGetUserDelegationKeyResponseModel,\n UserDelegationKeyModel,\n} from \"./generatedModels.js\";\nimport type { Service } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { Pipeline } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { ShareClientInternal } from \"./ShareClientInternal.js\";\nimport type { ShareCreateOptions, ShareDeleteMethodOptions } from \"./Clients.js\";\nimport { ShareClient } from \"./Clients.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n assertResponse,\n removeEmptyString,\n truncatedISO8061Date,\n} from \"./utils/utils.common.js\";\nimport { Credential } from \"@azure/storage-common\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport { AnonymousCredential } from \"@azure/storage-common\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { ShareClientConfig, ShareClientOptions, ShareProtocols } from \"./models.js\";\nimport { toShareProtocols } from \"./models.js\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { appendToURLQuery } from \"./utils/utils.common.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\n/**\n * Options to configure Share - List Shares Segment operations.\n *\n * See:\n * - {@link ShareServiceClient.listSegments}\n * - {@link ShareServiceClient.listItems}\n * - {@link ShareServiceClient.listSharesSegment}\n */\ninterface ServiceListSharesSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of entries to\n * return. If the request does not specify maxResults, or specifies a value\n * greater than 5,000, the server will return up to 5,000 items.\n */\n maxResults?: number;\n\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListSharesIncludeType[];\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.listShares} operation.\n */\nexport interface ServiceListSharesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies that share snapshots should be included in the enumeration. Share Snapshots are listed from oldest to newest in the response.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies that share snapshot should be returned in the response.\n */\n includeSnapshots?: boolean;\n\n /**\n * Specifies that share soft deleted should be returned in the response.\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.getProperties} operation.\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.setProperties} operation.\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.undelete} operation.\n */\nexport interface ServiceUndeleteShareOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Properties of a share.\n */\nexport type ShareProperties = SharePropertiesInternal & {\n /**\n * The protocols that have been enabled on the share.\n */\n protocols?: ShareProtocols;\n};\n\n/**\n * A listed Azure Storage share item.\n */\nexport interface ShareItem {\n name: string;\n snapshot?: string;\n deleted?: boolean;\n version?: string;\n properties: ShareProperties;\n metadata?: { [propertyName: string]: string };\n}\n\n/**\n * An enumeration of shares.\n */\nexport interface ListSharesResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxResults?: number;\n shareItems?: ShareItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link ShareServiceClient.listShares} operation.\n */\nexport type ServiceListSharesSegmentResponse = WithResponse<\n ListSharesResponse & ServiceListSharesSegmentHeaders,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n>;\n\n/**\n * Options to configure {@link ShareServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * Options to configure the Service - Get User Delegation Key.\n */\nexport interface ServiceGetUserDelegationKeyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * A ShareServiceClient represents a URL to the Azure Storage File service allowing you\n * to manipulate file shares.\n */\nexport class ShareServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n private shareClientConfig?: ShareClientConfig;\n\n /**\n *\n * Creates an instance of ShareServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new ShareServiceClient from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ): ShareServiceClient {\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNodeLike) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new ShareServiceClient(extractedCreds.url, pipeline, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new ShareServiceClient(\n extractedCreds.url + \"?\" + extractedCreds.accountSas,\n pipeline,\n options,\n );\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential, or TokenCredential,\n * If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n\n constructor(\n url: string,\n credential?: Credential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n );\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);\n constructor(\n url: string,\n credentialOrPipeline?: Credential | TokenCredential | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n credentialOrPipeline instanceof Credential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n\n super(url, pipeline);\n this.shareClientConfig = options;\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a ShareClient object.\n *\n * @param shareName - Name of a share.\n * @returns The ShareClient object for the given share name.\n *\n * Example usage:\n *\n * ```ts snippet:ReadmeSampleCreateShareClient\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareName = \"<share name>\";\n * const shareClient = serviceClient.getShareClient(shareName);\n * await shareClient.create();\n * ```\n */\n public getShareClient(shareName: string): ShareClient {\n return new ShareClient(\n appendToURLPath(this.url, shareName),\n this.pipeline,\n this.shareClientConfig,\n );\n }\n\n /**\n * Creates a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share creation response and the corresponding share client.\n */\n public async createShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareCreateOptions = {},\n ): Promise<{ shareCreateResponse: ShareCreateResponse; shareClient: ShareClient }> {\n return tracingClient.withSpan(\n \"ShareServiceClient-createShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n const shareCreateResponse = await shareClient.create(updatedOptions);\n return {\n shareCreateResponse,\n shareClient,\n };\n },\n );\n }\n\n /**\n * Deletes a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share deletion response and the corresponding share client.\n */\n public async deleteShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareDeleteMethodOptions = {},\n ): Promise<ShareDeleteResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-deleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n return shareClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s file service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-file-service-properties\n *\n * @param options - Options to Get Properties operation.\n * @returns Response data for the Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n >(\n await this.serviceContext.getProperties({\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s file service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/rest/api/storageservices/set-file-service-properties\n *\n * @param properties -\n * @param options - Options to Set Properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: FileServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListSharesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of shares to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all shares remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list shares operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listSharesSegmentResponse;\n do {\n listSharesSegmentResponse = await this.listSharesSegment(marker, options);\n marker = listSharesSegmentResponse.continuationToken;\n yield await listSharesSegmentResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for share items\n *\n * @param options - Options to list shares operation.\n */\n private async *listItems(\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ShareItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.shareItems) {\n yield* segment.shareItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the shares\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the shares in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListShares\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const share of serviceClient.listShares()) {\n * console.log(`Share${i++}: ${share.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListShares_Iterator\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareIter = serviceClient.listShares();\n * let i = 1;\n * let { value, done } = await shareIter.next();\n * while (!done) {\n * console.log(`Share ${i++}: ${value.name}`);\n * ({ value, done } = await shareIter.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListShares_ByPage\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const response of serviceClient.listShares().byPage({ maxPageSize: 20 })) {\n * console.log(`Page ${i++}:`);\n * for (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListShares_Continuation\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let iterator = serviceClient.listShares().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n * iterator = serviceClient.listShares().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * ```\n *\n * @param options - Options to list shares operation.\n *\n * An asyncIterableIterator that supports paging.\n */\n public listShares(\n options: ServiceListSharesOptions = {},\n ): PagedAsyncIterableIterator<ShareItem, ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListSharesIncludeType[] = [];\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n\n const updatedOptions: ServiceListSharesSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(removeEmptyString(settings.continuationToken), {\n maxResults: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account's File service, including properties for Storage\n * Analytics metrics and CORS (Cross-Origin Resource Sharing) rules.\n *\n * @param marker - A string value that identifies the portion of\n * the list to be returned with the next list operation. The operation\n * returns a marker value within the response body if the list returned was\n * not complete. The marker value may then be used in a subsequent call to\n * request the next set of list items. The marker value is opaque to the\n * client.\n * @param options - Options to List Shares Segment operation.\n * @returns Response data for the List Shares Segment operation.\n */\n private async listSharesSegment(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): Promise<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n return tracingClient.withSpan(\n \"ShareServiceClient-listSharesSegment\",\n options,\n async (updatedOptions) => {\n const res = assertResponse<\n ServiceListSharesSegmentHeaders & ListSharesResponseModel,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n >(\n await this.serviceContext.listSharesSegment({\n ...updatedOptions,\n ...this.shareClientConfig,\n marker,\n }),\n );\n\n // parse protocols\n if (res.shareItems) {\n for (let i = 0; i < res.shareItems.length; i++) {\n const protocolsStr = res.shareItems[i].properties.enabledProtocols;\n (res.shareItems[i].properties as any).protocols = toShareProtocols(protocolsStr);\n }\n }\n\n return res;\n },\n );\n }\n\n /**\n * Restores a previously deleted share.\n * This API is only functional if Share Soft Delete is enabled\n * for the storage account associated with the share.\n *\n * @param deletedShareName - The name of the previously deleted share.\n * @param deletedShareVersion - The version of the previously deleted share.\n * @param options - Options to Share undelete operation.\n * @returns Restored share.\n */\n public async undeleteShare(\n deletedShareName: string,\n deletedShareVersion: string,\n options: ServiceUndeleteShareOptions = {},\n ): Promise<ShareClient> {\n return tracingClient.withSpan(\n \"ShareServiceClient-undeleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(deletedShareName);\n await new ShareClientInternal(shareClient.url, this.pipeline).restore({\n ...updatedOptions,\n ...this.shareClientConfig,\n deletedShareName: deletedShareName,\n deletedShareVersion: deletedShareVersion,\n });\n return shareClient;\n },\n );\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the File service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key\n *\n * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time\n * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time\n */\n public async getUserDelegationKey(\n startsOn: Date,\n expiresOn: Date,\n options: ServiceGetUserDelegationKeyOptions = {},\n ): Promise<ServiceGetUserDelegationKeyResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-getUserDelegationKey\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<\n ServiceGetUserDelegationKeyResponseModel,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKeyModel\n >(\n await this.serviceContext.getUserDelegationKey(\n {\n start: truncatedISO8061Date(startsOn, false),\n expiry: truncatedISO8061Date(expiresOn, false),\n },\n {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n },\n ),\n );\n\n const userDelegationKey = {\n signedObjectId: response.signedOid,\n signedTenantId: response.signedTid,\n signedStartsOn: new Date(response.signedStart),\n signedExpiresOn: new Date(response.signedExpiry),\n signedService: response.signedService,\n signedVersion: response.signedVersion,\n value: response.value,\n };\n\n const res: ServiceGetUserDelegationKeyResponse = {\n _response: response._response,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n version: response.version,\n date: response.date,\n ...userDelegationKey,\n };\n\n return res;\n },\n );\n }\n}\n"]}
|
|
@@ -47,17 +47,36 @@ export interface CorsRule {
|
|
|
47
47
|
export interface ShareProtocolSettings {
|
|
48
48
|
/** Settings for SMB protocol. */
|
|
49
49
|
smb?: ShareSmbSettings;
|
|
50
|
+
/** Settings for NFS protocol. */
|
|
51
|
+
nfs?: ShareNfsSettings;
|
|
50
52
|
}
|
|
51
53
|
/** Settings for SMB protocol. */
|
|
52
54
|
export interface ShareSmbSettings {
|
|
53
55
|
/** Settings for SMB Multichannel. */
|
|
54
56
|
multichannel?: SmbMultichannel;
|
|
57
|
+
/** Enable or disable encryption in transit. */
|
|
58
|
+
encryptionInTransit?: ShareSmbSettingsEncryptionInTransit;
|
|
55
59
|
}
|
|
56
60
|
/** Settings for SMB multichannel */
|
|
57
61
|
export interface SmbMultichannel {
|
|
58
62
|
/** If SMB multichannel is enabled. */
|
|
59
63
|
enabled?: boolean;
|
|
60
64
|
}
|
|
65
|
+
/** Enable or disable encryption in transit. */
|
|
66
|
+
export interface ShareSmbSettingsEncryptionInTransit {
|
|
67
|
+
/** If encryption in transit is required */
|
|
68
|
+
required?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** Settings for SMB protocol. */
|
|
71
|
+
export interface ShareNfsSettings {
|
|
72
|
+
/** Enable or disable encryption in transit. */
|
|
73
|
+
encryptionInTransit?: ShareNfsSettingsEncryptionInTransit;
|
|
74
|
+
}
|
|
75
|
+
/** Enable or disable encryption in transit. */
|
|
76
|
+
export interface ShareNfsSettingsEncryptionInTransit {
|
|
77
|
+
/** If encryption in transit is required */
|
|
78
|
+
required?: boolean;
|
|
79
|
+
}
|
|
61
80
|
export interface StorageError {
|
|
62
81
|
message?: string;
|
|
63
82
|
copySourceStatusCode?: number;
|
|
@@ -120,6 +139,30 @@ export interface SharePropertiesInternal {
|
|
|
120
139
|
nextAllowedProvisionedIopsDowngradeTime?: Date;
|
|
121
140
|
nextAllowedProvisionedBandwidthDowngradeTime?: Date;
|
|
122
141
|
}
|
|
142
|
+
/** Key information */
|
|
143
|
+
export interface KeyInfo {
|
|
144
|
+
/** The date-time the key is active in ISO 8601 UTC time */
|
|
145
|
+
start?: string;
|
|
146
|
+
/** The date-time the key expires in ISO 8601 UTC time */
|
|
147
|
+
expiry: string;
|
|
148
|
+
}
|
|
149
|
+
/** A user delegation key */
|
|
150
|
+
export interface UserDelegationKey {
|
|
151
|
+
/** The Azure Active Directory object ID in GUID format. */
|
|
152
|
+
signedOid: string;
|
|
153
|
+
/** The Azure Active Directory tenant ID in GUID format */
|
|
154
|
+
signedTid: string;
|
|
155
|
+
/** The date-time the key is active */
|
|
156
|
+
signedStart: Date;
|
|
157
|
+
/** The date-time the key expires */
|
|
158
|
+
signedExpiry: Date;
|
|
159
|
+
/** Abbreviation of the Azure Storage service that accepts the key */
|
|
160
|
+
signedService: string;
|
|
161
|
+
/** The service version that created the key */
|
|
162
|
+
signedVersion: string;
|
|
163
|
+
/** The key as a base64 string */
|
|
164
|
+
value: string;
|
|
165
|
+
}
|
|
123
166
|
/** A permission (a security descriptor) at the share level. */
|
|
124
167
|
export interface SharePermission {
|
|
125
168
|
/** The permission in the Security Descriptor Definition Language (SDDL). */
|
|
@@ -281,6 +324,21 @@ export interface ServiceListSharesSegmentHeaders {
|
|
|
281
324
|
export interface ServiceListSharesSegmentExceptionHeaders {
|
|
282
325
|
errorCode?: string;
|
|
283
326
|
}
|
|
327
|
+
/** Defines headers for Service_getUserDelegationKey operation. */
|
|
328
|
+
export interface ServiceGetUserDelegationKeyHeaders {
|
|
329
|
+
/** If a client request id header is sent in the request, this header will be present in the response with the same value. */
|
|
330
|
+
clientRequestId?: string;
|
|
331
|
+
/** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
|
|
332
|
+
requestId?: string;
|
|
333
|
+
/** Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above. */
|
|
334
|
+
version?: string;
|
|
335
|
+
/** UTC date/time value generated by the service that indicates the time at which the response was initiated */
|
|
336
|
+
date?: Date;
|
|
337
|
+
}
|
|
338
|
+
/** Defines headers for Service_getUserDelegationKey operation. */
|
|
339
|
+
export interface ServiceGetUserDelegationKeyExceptionHeaders {
|
|
340
|
+
errorCode?: string;
|
|
341
|
+
}
|
|
284
342
|
/** Defines headers for Share_create operation. */
|
|
285
343
|
export interface ShareCreateHeaders {
|
|
286
344
|
/** The ETag contains a value which represents the version of the share, in quotes. */
|
|
@@ -983,6 +1041,10 @@ export interface FileCreateHeaders {
|
|
|
983
1041
|
group?: string;
|
|
984
1042
|
/** NFS only. Type of the file or directory. */
|
|
985
1043
|
nfsFileType?: NfsFileType;
|
|
1044
|
+
/** If the file has an MD5 hash and the request is to read the full file, this response header is returned so that the client can check for message content integrity. If the request is to read a specified range and the 'x-ms-range-get-content-md5' is set to true, then the request returns an MD5 hash for the range, as long as the range size is less than or equal to 4 MB. If neither of these sets of conditions is true, then no value is returned for the 'Content-MD5' header. */
|
|
1045
|
+
contentMD5?: Uint8Array;
|
|
1046
|
+
/** The number of bytes present in the response body. */
|
|
1047
|
+
contentLength?: number;
|
|
986
1048
|
/** Error Code */
|
|
987
1049
|
errorCode?: string;
|
|
988
1050
|
}
|
|
@@ -1667,6 +1729,22 @@ export declare enum KnownShareTokenIntent {
|
|
|
1667
1729
|
* **backup**
|
|
1668
1730
|
*/
|
|
1669
1731
|
export type ShareTokenIntent = string;
|
|
1732
|
+
/** Known values of {@link FilePropertySemantics} that the service accepts. */
|
|
1733
|
+
export declare enum KnownFilePropertySemantics {
|
|
1734
|
+
/** New */
|
|
1735
|
+
New = "New",
|
|
1736
|
+
/** Restore */
|
|
1737
|
+
Restore = "Restore"
|
|
1738
|
+
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Defines values for FilePropertySemantics. \
|
|
1741
|
+
* {@link KnownFilePropertySemantics} can be used interchangeably with FilePropertySemantics,
|
|
1742
|
+
* this enum contains the known values that the service supports.
|
|
1743
|
+
* ### Known values supported by the service
|
|
1744
|
+
* **New** \
|
|
1745
|
+
* **Restore**
|
|
1746
|
+
*/
|
|
1747
|
+
export type FilePropertySemantics = string;
|
|
1670
1748
|
/** Known values of {@link NfsFileType} that the service accepts. */
|
|
1671
1749
|
export declare enum KnownNfsFileType {
|
|
1672
1750
|
/** Regular */
|
|
@@ -1974,6 +2052,15 @@ export interface ServiceListSharesSegmentOptionalParams extends coreClient.Opera
|
|
|
1974
2052
|
/** Contains response data for the listSharesSegment operation. */
|
|
1975
2053
|
export type ServiceListSharesSegmentResponse = ServiceListSharesSegmentHeaders & ListSharesResponse;
|
|
1976
2054
|
/** Optional parameters. */
|
|
2055
|
+
export interface ServiceGetUserDelegationKeyOptionalParams extends coreClient.OperationOptions {
|
|
2056
|
+
/** The timeout parameter is expressed in seconds. For more information, see <a href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting Timeouts for File Service Operations.</a> */
|
|
2057
|
+
timeoutInSeconds?: number;
|
|
2058
|
+
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2059
|
+
requestId?: string;
|
|
2060
|
+
}
|
|
2061
|
+
/** Contains response data for the getUserDelegationKey operation. */
|
|
2062
|
+
export type ServiceGetUserDelegationKeyResponse = ServiceGetUserDelegationKeyHeaders & UserDelegationKey;
|
|
2063
|
+
/** Optional parameters. */
|
|
1977
2064
|
export interface ShareCreateOptionalParams extends coreClient.OperationOptions {
|
|
1978
2065
|
/** The timeout parameter is expressed in seconds. For more information, see <a href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting Timeouts for File Service Operations.</a> */
|
|
1979
2066
|
timeoutInSeconds?: number;
|
|
@@ -2039,14 +2126,14 @@ export interface ShareAcquireLeaseOptionalParams extends coreClient.OperationOpt
|
|
|
2039
2126
|
timeoutInSeconds?: number;
|
|
2040
2127
|
/** Valid value is backup */
|
|
2041
2128
|
fileRequestIntent?: ShareTokenIntent;
|
|
2129
|
+
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2130
|
+
requestId?: string;
|
|
2042
2131
|
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2043
2132
|
shareSnapshot?: string;
|
|
2044
2133
|
/** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */
|
|
2045
2134
|
duration?: number;
|
|
2046
2135
|
/** Proposed lease ID, in a GUID string format. The File service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. */
|
|
2047
2136
|
proposedLeaseId?: string;
|
|
2048
|
-
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2049
|
-
requestId?: string;
|
|
2050
2137
|
}
|
|
2051
2138
|
/** Contains response data for the acquireLease operation. */
|
|
2052
2139
|
export type ShareAcquireLeaseResponse = ShareAcquireLeaseHeaders;
|
|
@@ -2056,10 +2143,10 @@ export interface ShareReleaseLeaseOptionalParams extends coreClient.OperationOpt
|
|
|
2056
2143
|
timeoutInSeconds?: number;
|
|
2057
2144
|
/** Valid value is backup */
|
|
2058
2145
|
fileRequestIntent?: ShareTokenIntent;
|
|
2059
|
-
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2060
|
-
shareSnapshot?: string;
|
|
2061
2146
|
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2062
2147
|
requestId?: string;
|
|
2148
|
+
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2149
|
+
shareSnapshot?: string;
|
|
2063
2150
|
}
|
|
2064
2151
|
/** Contains response data for the releaseLease operation. */
|
|
2065
2152
|
export type ShareReleaseLeaseResponse = ShareReleaseLeaseHeaders;
|
|
@@ -2069,12 +2156,12 @@ export interface ShareChangeLeaseOptionalParams extends coreClient.OperationOpti
|
|
|
2069
2156
|
timeoutInSeconds?: number;
|
|
2070
2157
|
/** Valid value is backup */
|
|
2071
2158
|
fileRequestIntent?: ShareTokenIntent;
|
|
2159
|
+
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2160
|
+
requestId?: string;
|
|
2072
2161
|
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2073
2162
|
shareSnapshot?: string;
|
|
2074
2163
|
/** Proposed lease ID, in a GUID string format. The File service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. */
|
|
2075
2164
|
proposedLeaseId?: string;
|
|
2076
|
-
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2077
|
-
requestId?: string;
|
|
2078
2165
|
}
|
|
2079
2166
|
/** Contains response data for the changeLease operation. */
|
|
2080
2167
|
export type ShareChangeLeaseResponse = ShareChangeLeaseHeaders;
|
|
@@ -2084,10 +2171,10 @@ export interface ShareRenewLeaseOptionalParams extends coreClient.OperationOptio
|
|
|
2084
2171
|
timeoutInSeconds?: number;
|
|
2085
2172
|
/** Valid value is backup */
|
|
2086
2173
|
fileRequestIntent?: ShareTokenIntent;
|
|
2087
|
-
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2088
|
-
shareSnapshot?: string;
|
|
2089
2174
|
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2090
2175
|
requestId?: string;
|
|
2176
|
+
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2177
|
+
shareSnapshot?: string;
|
|
2091
2178
|
}
|
|
2092
2179
|
/** Contains response data for the renewLease operation. */
|
|
2093
2180
|
export type ShareRenewLeaseResponse = ShareRenewLeaseHeaders;
|
|
@@ -2099,10 +2186,10 @@ export interface ShareBreakLeaseOptionalParams extends coreClient.OperationOptio
|
|
|
2099
2186
|
timeoutInSeconds?: number;
|
|
2100
2187
|
/** Valid value is backup */
|
|
2101
2188
|
fileRequestIntent?: ShareTokenIntent;
|
|
2102
|
-
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2103
|
-
shareSnapshot?: string;
|
|
2104
2189
|
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2105
2190
|
requestId?: string;
|
|
2191
|
+
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2192
|
+
shareSnapshot?: string;
|
|
2106
2193
|
/** For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. */
|
|
2107
2194
|
breakPeriod?: number;
|
|
2108
2195
|
}
|
|
@@ -2266,6 +2353,8 @@ export interface DirectoryCreateOptionalParams extends coreClient.OperationOptio
|
|
|
2266
2353
|
group?: string;
|
|
2267
2354
|
/** Optional, NFS only. The file mode of the file or directory */
|
|
2268
2355
|
fileMode?: string;
|
|
2356
|
+
/** SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. Restore will apply changes without further modification. */
|
|
2357
|
+
filePropertySemantics?: FilePropertySemantics;
|
|
2269
2358
|
}
|
|
2270
2359
|
/** Contains response data for the create operation. */
|
|
2271
2360
|
export type DirectoryCreateResponse = DirectoryCreateHeaders;
|
|
@@ -2467,8 +2556,16 @@ export interface FileCreateOptionalParams extends coreClient.OperationOptions {
|
|
|
2467
2556
|
group?: string;
|
|
2468
2557
|
/** Optional, NFS only. The file mode of the file or directory */
|
|
2469
2558
|
fileMode?: string;
|
|
2559
|
+
/** SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. Restore will apply changes without further modification. */
|
|
2560
|
+
filePropertySemantics?: FilePropertySemantics;
|
|
2561
|
+
/** Initial data. */
|
|
2562
|
+
body?: coreRestPipeline.RequestBodyType;
|
|
2470
2563
|
/** Optional, NFS only. Type of the file or directory. */
|
|
2471
2564
|
nfsFileType?: NfsFileType;
|
|
2565
|
+
/** An MD5 hash of the content. This hash is used to verify the integrity of the data during transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error code 400 (Bad Request). */
|
|
2566
|
+
contentMD5?: Uint8Array;
|
|
2567
|
+
/** Specifies the number of bytes being transmitted in the request body. When the x-ms-write header is set to clear, the value of this header must be set to zero. */
|
|
2568
|
+
contentLength?: number;
|
|
2472
2569
|
}
|
|
2473
2570
|
/** Contains response data for the create operation. */
|
|
2474
2571
|
export type FileCreateResponse = FileCreateHeaders;
|
|
@@ -2592,12 +2689,12 @@ export interface FileAcquireLeaseOptionalParams extends coreClient.OperationOpti
|
|
|
2592
2689
|
timeoutInSeconds?: number;
|
|
2593
2690
|
/** Valid value is backup */
|
|
2594
2691
|
fileRequestIntent?: ShareTokenIntent;
|
|
2692
|
+
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2693
|
+
requestId?: string;
|
|
2595
2694
|
/** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */
|
|
2596
2695
|
duration?: number;
|
|
2597
2696
|
/** Proposed lease ID, in a GUID string format. The File service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. */
|
|
2598
2697
|
proposedLeaseId?: string;
|
|
2599
|
-
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2600
|
-
requestId?: string;
|
|
2601
2698
|
/** If true, the trailing dot will not be trimmed from the target URI. */
|
|
2602
2699
|
allowTrailingDot?: boolean;
|
|
2603
2700
|
}
|
|
@@ -2622,10 +2719,10 @@ export interface FileChangeLeaseOptionalParams extends coreClient.OperationOptio
|
|
|
2622
2719
|
timeoutInSeconds?: number;
|
|
2623
2720
|
/** Valid value is backup */
|
|
2624
2721
|
fileRequestIntent?: ShareTokenIntent;
|
|
2625
|
-
/** Proposed lease ID, in a GUID string format. The File service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. */
|
|
2626
|
-
proposedLeaseId?: string;
|
|
2627
2722
|
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2628
2723
|
requestId?: string;
|
|
2724
|
+
/** Proposed lease ID, in a GUID string format. The File service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats. */
|
|
2725
|
+
proposedLeaseId?: string;
|
|
2629
2726
|
/** If true, the trailing dot will not be trimmed from the target URI. */
|
|
2630
2727
|
allowTrailingDot?: boolean;
|
|
2631
2728
|
}
|
|
@@ -2836,12 +2933,12 @@ export interface FileCreateSymbolicLinkOptionalParams extends coreClient.Operati
|
|
|
2836
2933
|
timeoutInSeconds?: number;
|
|
2837
2934
|
/** Valid value is backup */
|
|
2838
2935
|
fileRequestIntent?: ShareTokenIntent;
|
|
2936
|
+
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2937
|
+
requestId?: string;
|
|
2839
2938
|
/** A name-value pair to associate with a file storage object. */
|
|
2840
2939
|
metadata?: {
|
|
2841
2940
|
[propertyName: string]: string;
|
|
2842
2941
|
};
|
|
2843
|
-
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2844
|
-
requestId?: string;
|
|
2845
2942
|
/** Creation time for the file/directory. Default value: Now. */
|
|
2846
2943
|
fileCreatedOn?: string;
|
|
2847
2944
|
/** Last write time for the file/directory. Default value: Now. */
|
|
@@ -2859,10 +2956,10 @@ export interface FileGetSymbolicLinkOptionalParams extends coreClient.OperationO
|
|
|
2859
2956
|
timeoutInSeconds?: number;
|
|
2860
2957
|
/** Valid value is backup */
|
|
2861
2958
|
fileRequestIntent?: ShareTokenIntent;
|
|
2862
|
-
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2863
|
-
shareSnapshot?: string;
|
|
2864
2959
|
/** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */
|
|
2865
2960
|
requestId?: string;
|
|
2961
|
+
/** The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. */
|
|
2962
|
+
shareSnapshot?: string;
|
|
2866
2963
|
}
|
|
2867
2964
|
/** Contains response data for the getSymbolicLink operation. */
|
|
2868
2965
|
export type FileGetSymbolicLinkResponse = FileGetSymbolicLinkHeaders;
|