@azure/storage-blob 12.28.0-beta.2 → 12.29.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/BatchResponseParser.js +1 -1
- package/dist/browser/BatchResponseParser.js.map +1 -1
- package/dist/browser/BlobBatch.d.ts +8 -8
- package/dist/browser/BlobBatch.js +1 -1
- package/dist/browser/BlobBatch.js.map +1 -1
- package/dist/browser/BlobBatchClient.d.ts +10 -10
- package/dist/browser/BlobBatchClient.js +2 -2
- package/dist/browser/BlobBatchClient.js.map +1 -1
- package/dist/browser/BlobLeaseClient.d.ts +10 -10
- package/dist/browser/BlobLeaseClient.js +10 -10
- package/dist/browser/BlobLeaseClient.js.map +1 -1
- package/dist/browser/BlobServiceClient.d.ts +11 -11
- package/dist/browser/BlobServiceClient.js +11 -11
- package/dist/browser/BlobServiceClient.js.map +1 -1
- package/dist/browser/Clients.d.ts +36 -36
- package/dist/browser/Clients.js +23 -23
- package/dist/browser/Clients.js.map +1 -1
- package/dist/browser/ContainerClient.d.ts +16 -16
- package/dist/browser/ContainerClient.js +15 -15
- package/dist/browser/ContainerClient.js.map +1 -1
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +2 -1
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/Range.d.ts +1 -1
- package/dist/browser/Range.js.map +1 -1
- package/dist/browser/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/browser/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/browser/generated/src/models/index.d.ts +97 -82
- package/dist/browser/generated/src/models/index.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.js.map +1 -1
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/browser/generated/src/models/mappers.js +105 -0
- package/dist/browser/generated/src/models/mappers.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +1 -1
- package/dist/browser/generated/src/models/parameters.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/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/browser/policies/StorageRetryPolicy.js +15 -16
- package/dist/browser/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/browser/policies/StorageRetryPolicyV2.js +15 -16
- package/dist/browser/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js +2 -2
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist/browser/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/browser/sas/AccountSASPermissions.js +2 -2
- package/dist/browser/sas/AccountSASPermissions.js.map +1 -1
- package/dist/browser/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/browser/sas/AccountSASResourceTypes.js +1 -1
- package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/browser/sas/AccountSASSignatureValues.js +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.js +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/browser/sas/ContainerSASPermissions.d.ts +1 -1
- package/dist/browser/sas/ContainerSASPermissions.js +1 -1
- package/dist/browser/sas/ContainerSASPermissions.js.map +1 -1
- package/dist/browser/sas/SASQueryParameters.d.ts +2 -2
- package/dist/browser/sas/SASQueryParameters.js.map +1 -1
- package/dist/browser/utils/constants.js +2 -2
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.d.ts +2 -2
- package/dist/browser/utils/utils.common.js +3 -3
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/commonjs/BatchResponseParser.js +1 -1
- package/dist/commonjs/BatchResponseParser.js.map +1 -1
- package/dist/commonjs/BlobBatch.d.ts +8 -8
- package/dist/commonjs/BlobBatch.js +1 -1
- package/dist/commonjs/BlobBatch.js.map +1 -1
- package/dist/commonjs/BlobBatchClient.d.ts +10 -10
- package/dist/commonjs/BlobBatchClient.js +2 -2
- package/dist/commonjs/BlobBatchClient.js.map +1 -1
- package/dist/commonjs/BlobLeaseClient.d.ts +10 -10
- package/dist/commonjs/BlobLeaseClient.js +10 -10
- package/dist/commonjs/BlobLeaseClient.js.map +1 -1
- package/dist/commonjs/BlobServiceClient.d.ts +11 -11
- package/dist/commonjs/BlobServiceClient.js +11 -11
- package/dist/commonjs/BlobServiceClient.js.map +1 -1
- package/dist/commonjs/Clients.d.ts +36 -36
- package/dist/commonjs/Clients.js +23 -23
- package/dist/commonjs/Clients.js.map +1 -1
- package/dist/commonjs/ContainerClient.d.ts +16 -16
- package/dist/commonjs/ContainerClient.js +15 -15
- package/dist/commonjs/ContainerClient.js.map +1 -1
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +1 -0
- package/dist/commonjs/Pipeline.js.map +1 -1
- package/dist/commonjs/Range.d.ts +1 -1
- package/dist/commonjs/Range.js.map +1 -1
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/commonjs/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/commonjs/generated/src/models/index.d.ts +97 -82
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +105 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +1 -1
- package/dist/commonjs/generated/src/models/parameters.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/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicy.js +14 -15
- package/dist/commonjs/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.js +14 -15
- package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +2 -2
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist/commonjs/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/commonjs/sas/AccountSASPermissions.js +2 -2
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.js +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/commonjs/sas/AccountSASSignatureValues.js +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.js +1 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/ContainerSASPermissions.d.ts +1 -1
- package/dist/commonjs/sas/ContainerSASPermissions.js +1 -1
- package/dist/commonjs/sas/ContainerSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/SASQueryParameters.d.ts +2 -2
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/utils/constants.js +2 -2
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/commonjs/utils/utils.common.d.ts +2 -2
- package/dist/commonjs/utils/utils.common.js +3 -3
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/esm/BatchResponseParser.js +1 -1
- package/dist/esm/BatchResponseParser.js.map +1 -1
- package/dist/esm/BlobBatch.d.ts +8 -8
- package/dist/esm/BlobBatch.js +1 -1
- package/dist/esm/BlobBatch.js.map +1 -1
- package/dist/esm/BlobBatchClient.d.ts +10 -10
- package/dist/esm/BlobBatchClient.js +2 -2
- package/dist/esm/BlobBatchClient.js.map +1 -1
- package/dist/esm/BlobLeaseClient.d.ts +10 -10
- package/dist/esm/BlobLeaseClient.js +10 -10
- package/dist/esm/BlobLeaseClient.js.map +1 -1
- package/dist/esm/BlobServiceClient.d.ts +11 -11
- package/dist/esm/BlobServiceClient.js +11 -11
- package/dist/esm/BlobServiceClient.js.map +1 -1
- package/dist/esm/Clients.d.ts +36 -36
- package/dist/esm/Clients.js +23 -23
- package/dist/esm/Clients.js.map +1 -1
- package/dist/esm/ContainerClient.d.ts +16 -16
- package/dist/esm/ContainerClient.js +15 -15
- package/dist/esm/ContainerClient.js.map +1 -1
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +2 -1
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/Range.d.ts +1 -1
- package/dist/esm/Range.js.map +1 -1
- package/dist/esm/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/esm/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +97 -82
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +105 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +1 -1
- package/dist/esm/generated/src/models/parameters.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/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/esm/policies/StorageRetryPolicy.js +15 -16
- package/dist/esm/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/esm/policies/StorageRetryPolicyV2.js +15 -16
- package/dist/esm/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js +2 -2
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist/esm/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/esm/sas/AccountSASPermissions.js +2 -2
- package/dist/esm/sas/AccountSASPermissions.js.map +1 -1
- package/dist/esm/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/esm/sas/AccountSASResourceTypes.js +1 -1
- package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/esm/sas/AccountSASSignatureValues.js +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.js +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/esm/sas/ContainerSASPermissions.d.ts +1 -1
- package/dist/esm/sas/ContainerSASPermissions.js +1 -1
- package/dist/esm/sas/ContainerSASPermissions.js.map +1 -1
- package/dist/esm/sas/SASQueryParameters.d.ts +2 -2
- package/dist/esm/sas/SASQueryParameters.js.map +1 -1
- package/dist/esm/utils/constants.js +2 -2
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.d.ts +2 -2
- package/dist/esm/utils/utils.common.js +3 -3
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/react-native/BatchResponseParser.js +1 -1
- package/dist/react-native/BatchResponseParser.js.map +1 -1
- package/dist/react-native/BlobBatch.d.ts +8 -8
- package/dist/react-native/BlobBatch.js +1 -1
- package/dist/react-native/BlobBatch.js.map +1 -1
- package/dist/react-native/BlobBatchClient.d.ts +10 -10
- package/dist/react-native/BlobBatchClient.js +2 -2
- package/dist/react-native/BlobBatchClient.js.map +1 -1
- package/dist/react-native/BlobLeaseClient.d.ts +10 -10
- package/dist/react-native/BlobLeaseClient.js +10 -10
- package/dist/react-native/BlobLeaseClient.js.map +1 -1
- package/dist/react-native/BlobServiceClient.d.ts +11 -11
- package/dist/react-native/BlobServiceClient.js +11 -11
- package/dist/react-native/BlobServiceClient.js.map +1 -1
- package/dist/react-native/Clients.d.ts +36 -36
- package/dist/react-native/Clients.js +23 -23
- package/dist/react-native/Clients.js.map +1 -1
- package/dist/react-native/ContainerClient.d.ts +16 -16
- package/dist/react-native/ContainerClient.js +15 -15
- package/dist/react-native/ContainerClient.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +2 -1
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/Range.d.ts +1 -1
- package/dist/react-native/Range.js.map +1 -1
- package/dist/react-native/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/react-native/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/react-native/generated/src/models/index.d.ts +97 -82
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.js.map +1 -1
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/mappers.js +105 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +1 -1
- package/dist/react-native/generated/src/models/parameters.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/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicy.js +15 -16
- package/dist/react-native/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.js +15 -16
- package/dist/react-native/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js +2 -2
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist/react-native/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/react-native/sas/AccountSASPermissions.js +2 -2
- package/dist/react-native/sas/AccountSASPermissions.js.map +1 -1
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/react-native/sas/AccountSASResourceTypes.js +1 -1
- package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/react-native/sas/AccountSASSignatureValues.js +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.js +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/react-native/sas/ContainerSASPermissions.d.ts +1 -1
- package/dist/react-native/sas/ContainerSASPermissions.js +1 -1
- package/dist/react-native/sas/ContainerSASPermissions.js.map +1 -1
- package/dist/react-native/sas/SASQueryParameters.d.ts +2 -2
- package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
- package/dist/react-native/utils/constants.js +2 -2
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.d.ts +2 -2
- package/dist/react-native/utils/utils.common.js +3 -3
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/package.json +4 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BlobLeaseClient.js","sourceRoot":"","sources":["../../src/BlobLeaseClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AA8EzD;;GAEG;AACH,MAAM,OAAO,eAAe;IAM1B;;;;OAIG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACH,YAAY,MAAoC,EAAE,OAAgB;QAChE,MAAM,aAAa,GAAI,MAAc,CAAC,oBA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,kCACnB,OAAO,CAAC,UAAU,KACrB,MAAM,EAAE,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,GAC1C;gBACD,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC;YACF,OAAO,cAAc,CACnB,MAAM,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAClE,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { randomUUID } from \"@azure/core-util\";\nimport type { ContainerBreakLeaseOptionalParams } from \"./generatedModels.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { Blob as StorageBlob, Container } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { ModifiedAccessConditions } from \"./models.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { ETagNone } from \"./utils/constants.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { BlobClient } from \"./Clients.js\";\nimport type { ContainerClient } from \"./ContainerClient.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport { assertResponse } from \"./utils/utils.common.js\";\nimport type {\n ContainerAcquireLeaseHeaders,\n ContainerBreakLeaseHeaders,\n ContainerReleaseLeaseHeaders,\n} from \"./generated/src/index.js\";\n\n/**\n * The details for a specific lease.\n */\nexport interface Lease {\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally. If the request version is 2011-08-18 or\n * newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was\n * last modified. Any operation that modifies the blob, including an update\n * of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * Approximate time remaining in the lease\n * period, in seconds.\n */\n leaseTime?: number;\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used\n * to execute the request. This header is returned for requests made against\n * version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that\n * indicates the time at which the response was initiated\n */\n date?: Date;\n /**\n * Error code if any associated with the response that returned\n * the Lease information.\n */\n errorCode?: string;\n}\n\n/**\n * Contains the response data for operations that create, modify, or delete a lease.\n *\n * See {@link BlobLeaseClient}.\n */\nexport type LeaseOperationResponse = WithResponse<Lease, Lease>;\n\n/**\n * Configures lease operations.\n */\nexport interface LeaseOperationOptions 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 * Conditions to meet when changing the lease.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.\n */\nexport class BlobLeaseClient {\n private _leaseId: string;\n private _url: string;\n private _containerOrBlobOperation: Container | StorageBlob;\n private _isContainer: boolean;\n\n /**\n * Gets the lease Id.\n *\n * @readonly\n */\n public get leaseId(): string {\n return this._leaseId;\n }\n\n /**\n * Gets the url.\n *\n * @readonly\n */\n public get url(): string {\n return this._url;\n }\n\n /**\n * Creates an instance of BlobLeaseClient.\n * @param client - The client to make the lease operation requests.\n * @param leaseId - Initial proposed lease id.\n */\n constructor(client: ContainerClient | BlobClient, leaseId?: string) {\n const clientContext = (client as any).storageClientContext;\n this._url = client.url;\n\n if ((client as BlobClient).name === undefined) {\n this._isContainer = true;\n this._containerOrBlobOperation = clientContext.container;\n } else {\n this._isContainer = false;\n this._containerOrBlobOperation = clientContext.blob;\n }\n\n if (!leaseId) {\n leaseId = randomUUID();\n }\n this._leaseId = leaseId;\n }\n\n /**\n * Establishes and manages a lock on a container for delete operations, or on a blob\n * for write and delete operations.\n * The lock duration can be 15 to 60 seconds, or can be infinite.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param duration - Must be between 15 to 60 seconds, or infinite (-1)\n * @param options - option to configure lease management operations.\n * @returns Response data for acquire lease operation.\n */\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n return tracingClient.withSpan(\n \"BlobLeaseClient-acquireLease\",\n options,\n async (updatedOptions) => {\n return assertResponse<ContainerAcquireLeaseHeaders, ContainerAcquireLeaseHeaders>(\n await this._containerOrBlobOperation.acquireLease({\n abortSignal: options.abortSignal,\n duration,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n proposedLeaseId: this._leaseId,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * To change the ID of the lease.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param proposedLeaseId - the proposed new lease Id.\n * @param options - option to configure lease management operations.\n * @returns Response data for change lease operation.\n */\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n\n return tracingClient.withSpan(\n \"BlobLeaseClient-changeLease\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<Lease, Lease>(\n await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n this._leaseId = proposedLeaseId;\n return response;\n },\n );\n }\n\n /**\n * To free the lease if it is no longer needed so that another client may\n * immediately acquire a lease against the container or the blob.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - option to configure lease management operations.\n * @returns Response data for release lease operation.\n */\n public async releaseLease(options: LeaseOperationOptions = {}): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n return tracingClient.withSpan(\n \"BlobLeaseClient-releaseLease\",\n options,\n async (updatedOptions) => {\n return assertResponse<ContainerReleaseLeaseHeaders, ContainerReleaseLeaseHeaders>(\n await this._containerOrBlobOperation.releaseLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * To renew the lease.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - Optional option to configure lease management operations.\n * @returns Response data for renew lease operation.\n */\n public async renewLease(options: LeaseOperationOptions = {}): Promise<Lease> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n return tracingClient.withSpan(\"BlobLeaseClient-renewLease\", options, async (updatedOptions) => {\n return this._containerOrBlobOperation.renewLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n });\n });\n }\n\n /**\n * To end the lease but ensure that another client cannot acquire a new lease\n * until the current lease period has expired.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param breakPeriod - Break period\n * @param options - Optional options to configure lease management operations.\n * @returns Response data for break lease operation.\n */\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n\n return tracingClient.withSpan(\"BlobLeaseClient-breakLease\", options, async (updatedOptions) => {\n const operationOptions: ContainerBreakLeaseOptionalParams = {\n abortSignal: options.abortSignal,\n breakPeriod,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n };\n return assertResponse<ContainerBreakLeaseHeaders, ContainerBreakLeaseHeaders>(\n await this._containerOrBlobOperation.breakLease(operationOptions),\n );\n });\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"BlobLeaseClient.js","sourceRoot":"","sources":["../../src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MAAA,OAAO,CAAC,UAAU,0CAAE,OAAO,KAAI,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,OAAO,MAAK,QAAQ,CAAC;gBACxE,CAAC,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,WAAW,KAAI,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,WAAW,MAAK,QAAQ,CAAC;iBACjF,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,CAAA,CAAC,EACpC,CAAC;YACD,MAAM,IAAI,UAAU,CAClB,yJAAyJ,CAC1J,CAAC;QACJ,CAAC;QAED,OAAO,aAAa,CAAC,QAAQ,CAAC,4BAA4B,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;;YAC5F,MAAM,gBAAgB,GAAsC;gBAC1D,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,WAAW;gBACX,wBAAwB,kCACnB,OAAO,CAAC,UAAU,KACrB,MAAM,EAAE,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,GAC1C;gBACD,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC;YACF,OAAO,cAAc,CACnB,MAAM,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAClE,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { randomUUID } from \"@azure/core-util\";\nimport type { ContainerBreakLeaseOptionalParams } from \"./generatedModels.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { Blob as StorageBlob, Container } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { ModifiedAccessConditions } from \"./models.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { ETagNone } from \"./utils/constants.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { BlobClient } from \"./Clients.js\";\nimport type { ContainerClient } from \"./ContainerClient.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport { assertResponse } from \"./utils/utils.common.js\";\nimport type {\n ContainerAcquireLeaseHeaders,\n ContainerBreakLeaseHeaders,\n ContainerReleaseLeaseHeaders,\n} from \"./generated/src/index.js\";\n\n/**\n * The details for a specific lease.\n */\nexport interface Lease {\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally. If the request version is 2011-08-18 or\n * newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was\n * last modified. Any operation that modifies the blob, including an update\n * of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * Approximate time remaining in the lease\n * period, in seconds.\n */\n leaseTime?: number;\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used\n * to execute the request. This header is returned for requests made against\n * version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that\n * indicates the time at which the response was initiated\n */\n date?: Date;\n /**\n * Error code if any associated with the response that returned\n * the Lease information.\n */\n errorCode?: string;\n}\n\n/**\n * Contains the response data for operations that create, modify, or delete a lease.\n *\n * See {@link BlobLeaseClient}.\n */\nexport type LeaseOperationResponse = WithResponse<Lease, Lease>;\n\n/**\n * Configures lease operations.\n */\nexport interface LeaseOperationOptions 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 * Conditions to meet when changing the lease.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.\n */\nexport class BlobLeaseClient {\n private _leaseId: string;\n private _url: string;\n private _containerOrBlobOperation: Container | StorageBlob;\n private _isContainer: boolean;\n\n /**\n * Gets the lease Id.\n *\n * @readonly\n */\n public get leaseId(): string {\n return this._leaseId;\n }\n\n /**\n * Gets the url.\n *\n * @readonly\n */\n public get url(): string {\n return this._url;\n }\n\n /**\n * Creates an instance of BlobLeaseClient.\n * @param client - The client to make the lease operation requests.\n * @param leaseId - Initial proposed lease id.\n */\n constructor(client: ContainerClient | BlobClient, leaseId?: string) {\n const clientContext = (client as any).storageClientContext;\n this._url = client.url;\n\n if ((client as BlobClient).name === undefined) {\n this._isContainer = true;\n this._containerOrBlobOperation = clientContext.container;\n } else {\n this._isContainer = false;\n this._containerOrBlobOperation = clientContext.blob;\n }\n\n if (!leaseId) {\n leaseId = randomUUID();\n }\n this._leaseId = leaseId;\n }\n\n /**\n * Establishes and manages a lock on a container for delete operations, or on a blob\n * for write and delete operations.\n * The lock duration can be 15 to 60 seconds, or can be infinite.\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob\n *\n * @param duration - Must be between 15 to 60 seconds, or infinite (-1)\n * @param options - option to configure lease management operations.\n * @returns Response data for acquire lease operation.\n */\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n return tracingClient.withSpan(\n \"BlobLeaseClient-acquireLease\",\n options,\n async (updatedOptions) => {\n return assertResponse<ContainerAcquireLeaseHeaders, ContainerAcquireLeaseHeaders>(\n await this._containerOrBlobOperation.acquireLease({\n abortSignal: options.abortSignal,\n duration,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n proposedLeaseId: this._leaseId,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * To change the ID of the lease.\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob\n *\n * @param proposedLeaseId - the proposed new lease Id.\n * @param options - option to configure lease management operations.\n * @returns Response data for change lease operation.\n */\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n\n return tracingClient.withSpan(\n \"BlobLeaseClient-changeLease\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<Lease, Lease>(\n await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n this._leaseId = proposedLeaseId;\n return response;\n },\n );\n }\n\n /**\n * To free the lease if it is no longer needed so that another client may\n * immediately acquire a lease against the container or the blob.\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob\n *\n * @param options - option to configure lease management operations.\n * @returns Response data for release lease operation.\n */\n public async releaseLease(options: LeaseOperationOptions = {}): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n return tracingClient.withSpan(\n \"BlobLeaseClient-releaseLease\",\n options,\n async (updatedOptions) => {\n return assertResponse<ContainerReleaseLeaseHeaders, ContainerReleaseLeaseHeaders>(\n await this._containerOrBlobOperation.releaseLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * To renew the lease.\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob\n *\n * @param options - Optional option to configure lease management operations.\n * @returns Response data for renew lease operation.\n */\n public async renewLease(options: LeaseOperationOptions = {}): Promise<Lease> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n return tracingClient.withSpan(\"BlobLeaseClient-renewLease\", options, async (updatedOptions) => {\n return this._containerOrBlobOperation.renewLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n });\n });\n }\n\n /**\n * To end the lease but ensure that another client cannot acquire a new lease\n * until the current lease period has expired.\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-container\n * and\n * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob\n *\n * @param breakPeriod - Break period\n * @param options - Optional options to configure lease management operations.\n * @returns Response data for break lease operation.\n */\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\",\n );\n }\n\n return tracingClient.withSpan(\"BlobLeaseClient-breakLease\", options, async (updatedOptions) => {\n const operationOptions: ContainerBreakLeaseOptionalParams = {\n abortSignal: options.abortSignal,\n breakPeriod,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n };\n return assertResponse<ContainerBreakLeaseHeaders, ContainerBreakLeaseHeaders>(\n await this._containerOrBlobOperation.breakLease(operationOptions),\n );\n });\n }\n}\n"]}
|
@@ -297,7 +297,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
297
297
|
*/
|
298
298
|
getContainerClient(containerName: string): ContainerClient;
|
299
299
|
/**
|
300
|
-
* Create a Blob container. @see https://learn.microsoft.com/
|
300
|
+
* Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container
|
301
301
|
*
|
302
302
|
* @param containerName - Name of the container to create.
|
303
303
|
* @param options - Options to configure Container Create operation.
|
@@ -331,7 +331,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
331
331
|
/**
|
332
332
|
* Gets the properties of a storage account’s Blob service, including properties
|
333
333
|
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
334
|
-
* @see https://learn.microsoft.com/
|
334
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties
|
335
335
|
*
|
336
336
|
* @param options - Options to the Service Get Properties operation.
|
337
337
|
* @returns Response data for the Service Get Properties operation.
|
@@ -340,7 +340,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
340
340
|
/**
|
341
341
|
* Sets properties for a storage account’s Blob service endpoint, including properties
|
342
342
|
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
|
343
|
-
* @see https://learn.microsoft.com/
|
343
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties
|
344
344
|
*
|
345
345
|
* @param properties -
|
346
346
|
* @param options - Options to the Service Set Properties operation.
|
@@ -351,7 +351,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
351
351
|
* Retrieves statistics related to replication for the Blob service. It is only
|
352
352
|
* available on the secondary location endpoint when read-access geo-redundant
|
353
353
|
* replication is enabled for the storage account.
|
354
|
-
* @see https://learn.microsoft.com/
|
354
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats
|
355
355
|
*
|
356
356
|
* @param options - Options to the Service Get Statistics operation.
|
357
357
|
* @returns Response data for the Service Get Statistics operation.
|
@@ -362,7 +362,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
362
362
|
* for the specified account.
|
363
363
|
* The Get Account Information operation is available on service versions beginning
|
364
364
|
* with version 2018-03-28.
|
365
|
-
* @see https://learn.microsoft.com/
|
365
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-account-information
|
366
366
|
*
|
367
367
|
* @param options - Options to the Service Get Account Info operation.
|
368
368
|
* @returns Response data for the Service Get Account Info operation.
|
@@ -370,7 +370,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
370
370
|
getAccountInfo(options?: ServiceGetAccountInfoOptions): Promise<ServiceGetAccountInfoResponse>;
|
371
371
|
/**
|
372
372
|
* Returns a list of the containers under the specified account.
|
373
|
-
* @see https://learn.microsoft.com/
|
373
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/list-containers2
|
374
374
|
*
|
375
375
|
* @param marker - A string value that identifies the portion of
|
376
376
|
* the list of containers to be returned with the next listing operation. The
|
@@ -435,7 +435,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
435
435
|
*
|
436
436
|
* .byPage() returns an async iterable iterator to list the blobs in pages.
|
437
437
|
*
|
438
|
-
* @see https://learn.microsoft.com/
|
438
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties
|
439
439
|
*
|
440
440
|
* ```ts snippet:BlobServiceClientFindBlobsByTags
|
441
441
|
* import { BlobServiceClient } from "@azure/storage-blob";
|
@@ -601,7 +601,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
601
601
|
* Retrieves a user delegation key for the Blob service. This is only a valid operation when using
|
602
602
|
* bearer token authentication.
|
603
603
|
*
|
604
|
-
* @see https://learn.microsoft.com/
|
604
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key
|
605
605
|
*
|
606
606
|
* @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time
|
607
607
|
* @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time
|
@@ -610,7 +610,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
610
610
|
/**
|
611
611
|
* Creates a BlobBatchClient object to conduct batch operations.
|
612
612
|
*
|
613
|
-
* @see https://learn.microsoft.com/
|
613
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/blob-batch
|
614
614
|
*
|
615
615
|
* @returns A new BlobBatchClient object for this service.
|
616
616
|
*/
|
@@ -621,7 +621,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
621
621
|
* Generates a Blob account Shared Access Signature (SAS) URI based on the client properties
|
622
622
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
623
623
|
*
|
624
|
-
* @see https://learn.microsoft.com/
|
624
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
625
625
|
*
|
626
626
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
|
627
627
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -636,7 +636,7 @@ export declare class BlobServiceClient extends StorageClient {
|
|
636
636
|
* Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on
|
637
637
|
* the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
|
638
638
|
*
|
639
|
-
* @see https://learn.microsoft.com/
|
639
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
640
640
|
*
|
641
641
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
|
642
642
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -103,7 +103,7 @@ export class BlobServiceClient extends StorageClient {
|
|
103
103
|
return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline);
|
104
104
|
}
|
105
105
|
/**
|
106
|
-
* Create a Blob container. @see https://learn.microsoft.com/
|
106
|
+
* Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container
|
107
107
|
*
|
108
108
|
* @param containerName - Name of the container to create.
|
109
109
|
* @param options - Options to configure Container Create operation.
|
@@ -157,7 +157,7 @@ export class BlobServiceClient extends StorageClient {
|
|
157
157
|
/**
|
158
158
|
* Gets the properties of a storage account’s Blob service, including properties
|
159
159
|
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
160
|
-
* @see https://learn.microsoft.com/
|
160
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties
|
161
161
|
*
|
162
162
|
* @param options - Options to the Service Get Properties operation.
|
163
163
|
* @returns Response data for the Service Get Properties operation.
|
@@ -173,7 +173,7 @@ export class BlobServiceClient extends StorageClient {
|
|
173
173
|
/**
|
174
174
|
* Sets properties for a storage account’s Blob service endpoint, including properties
|
175
175
|
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
|
176
|
-
* @see https://learn.microsoft.com/
|
176
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties
|
177
177
|
*
|
178
178
|
* @param properties -
|
179
179
|
* @param options - Options to the Service Set Properties operation.
|
@@ -191,7 +191,7 @@ export class BlobServiceClient extends StorageClient {
|
|
191
191
|
* Retrieves statistics related to replication for the Blob service. It is only
|
192
192
|
* available on the secondary location endpoint when read-access geo-redundant
|
193
193
|
* replication is enabled for the storage account.
|
194
|
-
* @see https://learn.microsoft.com/
|
194
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats
|
195
195
|
*
|
196
196
|
* @param options - Options to the Service Get Statistics operation.
|
197
197
|
* @returns Response data for the Service Get Statistics operation.
|
@@ -209,7 +209,7 @@ export class BlobServiceClient extends StorageClient {
|
|
209
209
|
* for the specified account.
|
210
210
|
* The Get Account Information operation is available on service versions beginning
|
211
211
|
* with version 2018-03-28.
|
212
|
-
* @see https://learn.microsoft.com/
|
212
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-account-information
|
213
213
|
*
|
214
214
|
* @param options - Options to the Service Get Account Info operation.
|
215
215
|
* @returns Response data for the Service Get Account Info operation.
|
@@ -224,7 +224,7 @@ export class BlobServiceClient extends StorageClient {
|
|
224
224
|
}
|
225
225
|
/**
|
226
226
|
* Returns a list of the containers under the specified account.
|
227
|
-
* @see https://learn.microsoft.com/
|
227
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/list-containers2
|
228
228
|
*
|
229
229
|
* @param marker - A string value that identifies the portion of
|
230
230
|
* the list of containers to be returned with the next listing operation. The
|
@@ -344,7 +344,7 @@ export class BlobServiceClient extends StorageClient {
|
|
344
344
|
*
|
345
345
|
* .byPage() returns an async iterable iterator to list the blobs in pages.
|
346
346
|
*
|
347
|
-
* @see https://learn.microsoft.com/
|
347
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties
|
348
348
|
*
|
349
349
|
* ```ts snippet:BlobServiceClientFindBlobsByTags
|
350
350
|
* import { BlobServiceClient } from "@azure/storage-blob";
|
@@ -604,7 +604,7 @@ export class BlobServiceClient extends StorageClient {
|
|
604
604
|
* Retrieves a user delegation key for the Blob service. This is only a valid operation when using
|
605
605
|
* bearer token authentication.
|
606
606
|
*
|
607
|
-
* @see https://learn.microsoft.com/
|
607
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key
|
608
608
|
*
|
609
609
|
* @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time
|
610
610
|
* @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time
|
@@ -634,7 +634,7 @@ export class BlobServiceClient extends StorageClient {
|
|
634
634
|
/**
|
635
635
|
* Creates a BlobBatchClient object to conduct batch operations.
|
636
636
|
*
|
637
|
-
* @see https://learn.microsoft.com/
|
637
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/blob-batch
|
638
638
|
*
|
639
639
|
* @returns A new BlobBatchClient object for this service.
|
640
640
|
*/
|
@@ -647,7 +647,7 @@ export class BlobServiceClient extends StorageClient {
|
|
647
647
|
* Generates a Blob account Shared Access Signature (SAS) URI based on the client properties
|
648
648
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
649
649
|
*
|
650
|
-
* @see https://learn.microsoft.com/
|
650
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
651
651
|
*
|
652
652
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
|
653
653
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -674,7 +674,7 @@ export class BlobServiceClient extends StorageClient {
|
|
674
674
|
* Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on
|
675
675
|
* the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
|
676
676
|
*
|
677
|
-
* @see https://learn.microsoft.com/
|
677
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
678
678
|
*
|
679
679
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
|
680
680
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BlobServiceClient.js","sourceRoot":"","sources":["../../src/BlobServiceClient.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA0B9C,OAAO,EAAE,W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Content":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n ServiceGetUserDelegationKeyHeaders,\n ContainerCreateResponse,\n ContainerDeleteResponse,\n ServiceGetPropertiesResponse,\n BlobServiceProperties,\n ServiceSetPropertiesResponse,\n ServiceGetStatisticsResponse,\n ServiceGetAccountInfoResponse,\n ServiceListContainersSegmentResponse,\n ContainerItem,\n UserDelegationKeyModel,\n ContainerUndeleteResponse,\n FilterBlobSegmentModel,\n ServiceFilterBlobsHeaders,\n LeaseAccessConditions,\n FilterBlobSegment,\n FilterBlobItem,\n ServiceGetPropertiesResponseInternal,\n ServiceGetStatisticsResponseInternal,\n ServiceListContainersSegmentResponseInternal,\n} from \"./generatedModels.js\";\nimport type { Service } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { StoragePipelineOptions, PipelineLike } from \"./Pipeline.js\";\nimport { newPipeline, isPipelineLike } from \"./Pipeline.js\";\nimport type { ContainerCreateOptions, ContainerDeleteMethodOptions } from \"./ContainerClient.js\";\nimport { ContainerClient } from \"./ContainerClient.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\n toTags,\n} from \"./utils/utils.common.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential.js\";\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { truncatedISO8061Date, assertResponse } from \"./utils/utils.common.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport { BlobBatchClient } from \"./BlobBatchClient.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { AccountSASPermissions } from \"./sas/AccountSASPermissions.js\";\nimport type { SASProtocol } from \"./sas/SASQueryParameters.js\";\nimport type { SasIPRange } from \"./sas/SasIPRange.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./sas/AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./sas/AccountSASServices.js\";\nimport type {\n ContainerRestoreHeaders,\n ListContainersIncludeType,\n ServiceFilterBlobsResponse,\n ServiceGetAccountInfoHeaders,\n ServiceGetPropertiesHeaders,\n ServiceGetStatisticsHeaders,\n ServiceGetUserDelegationKeyResponse as ServiceGetUserDelegationKeyResponseModel,\n ServiceListContainersSegmentHeaders,\n ServiceSetPropertiesHeaders,\n} from \"./generated/src/index.js\";\n\n/**\n * Options to configure the {@link BlobServiceClient.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 BlobServiceClient.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 BlobServiceClient.getAccountInfo} operation.\n */\nexport interface ServiceGetAccountInfoOptions 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 BlobServiceClient.getStatistics} operation.\n */\nexport interface ServiceGetStatisticsOptions 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 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 * Options to configure the {@link BlobServiceClient.listContainerSegment} operation.\n */\ninterface ServiceListContainersSegmentOptions 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 containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify that the container's metadata be returned as part of the response\n * body. Possible values include: 'metadata'\n */\n include?: ListContainersIncludeType | ListContainersIncludeType[];\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.listContainers} operation.\n */\nexport interface ServiceListContainersOptions 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 containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies whether the container's metadata\n * should be returned as part of the response body.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies whether soft deleted containers should be included in the response.\n */\n includeDeleted?: boolean;\n /**\n * Specifies whether system containers should be included in the response.\n */\n includeSystem?: boolean;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTagsSegment} operation.\n */\ninterface ServiceFindBlobsByTagsSegmentOptions 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 * Specifies the maximum number of blobs\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation.\n */\nexport interface ServiceFindBlobByTagsOptions 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 * The response of {@link BlobServiceClient.findBlobsByTags} operation.\n */\nexport type ServiceFindBlobsByTagsSegmentResponse = WithResponse<\n FilterBlobSegment & ServiceFilterBlobsHeaders,\n ServiceFilterBlobsHeaders,\n FilterBlobSegmentModel\n>;\n\n/**\n * A user delegation key.\n */\nexport interface UserDelegationKey {\n /**\n * The Azure Active Directory object ID in GUID format.\n */\n signedObjectId: string;\n /**\n * The Azure Active Directory tenant ID in GUID format.\n */\n signedTenantId: string;\n /**\n * The date-time the key is active.\n */\n signedStartsOn: Date;\n /**\n * The date-time the key expires.\n */\n signedExpiresOn: Date;\n /**\n * Abbreviation of the Azure Storage service that accepts the key.\n */\n signedService: string;\n /**\n * The service version that created the key.\n */\n signedVersion: string;\n /**\n * The key as a base64 string.\n */\n value: string;\n}\n\n/**\n * Contains response data for the {@link getUserDelegationKey} operation.\n */\nexport declare type ServiceGetUserDelegationKeyResponse = WithResponse<\n UserDelegationKey & ServiceGetUserDelegationKeyHeaders,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKeyModel\n>;\n\n/**\n * Options to configure {@link BlobServiceClient.undeleteContainer} operation.\n */\nexport interface ServiceUndeleteContainerOptions 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 * Optional. Specifies the new name of the restored container.\n * Will use its original name if this is not specified.\n * @deprecated Restore container to a different name is not supported by service anymore.\n */\n destinationContainerName?: string;\n}\n\n/**\n * Options to configure {@link BlobServiceClient.renameContainer} operation.\n */\nexport interface ServiceRenameContainerOptions 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 * Condition to meet for the source container.\n */\n sourceCondition?: LeaseAccessConditions;\n}\n\n/**\n * Options to configure {@link BlobServiceClient.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 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n}\n\n/**\n * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you\n * to manipulate blob containers.\n */\nexport class BlobServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n /**\n *\n * Creates an instance of BlobServiceClient 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 - Optional. Options to configure the HTTP pipeline.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions,\n ): BlobServiceClient {\n options = options || {};\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\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new BlobServiceClient(extractedCreds.url, pipeline);\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 BlobServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\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 BlobServiceClient.\n *\n * @param url - A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n *\n * Example using DefaultAzureCredential from `@azure/identity`:\n *\n * ```ts snippet:ReadmeSampleCreateClient_DefaultAzureCredential\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n *\n * // Enter your storage account name\n * const account = \"<account>\";\n * const defaultAzureCredential = new DefaultAzureCredential();\n *\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * defaultAzureCredential,\n * );\n * ```\n *\n * Example using an account name/key:\n *\n * ```ts snippet:ReadmeSampleCreateClient_StorageSharedKeyCredential\n * import { StorageSharedKeyCredential, BlobServiceClient } from \"@azure/storage-blob\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * // Use StorageSharedKeyCredential with storage account and account key\n * // StorageSharedKeyCredential is only available in Node.js runtime, not in browsers\n * const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey);\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * sharedKeyCredential,\n * );\n * ```\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions,\n );\n /**\n * Creates an instance of BlobServiceClient.\n *\n * @param url - A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: PipelineLike);\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | PipelineLike,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions,\n ) {\n let pipeline: PipelineLike;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n (isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\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 super(url, pipeline);\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a {@link ContainerClient} object\n *\n * @param containerName - A container name\n * @returns A new ContainerClient object for the given container name.\n *\n * Example usage:\n *\n * ```ts snippet:BlobServiceClientGetContainerClient\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const containerClient = blobServiceClient.getContainerClient(\"<container name>\");\n * ```\n */\n public getContainerClient(containerName: string): ContainerClient {\n return new ContainerClient(\n appendToURLPath(this.url, encodeURIComponent(containerName)),\n this.pipeline,\n );\n }\n\n /**\n * Create a Blob container. @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param containerName - Name of the container to create.\n * @param options - Options to configure Container Create operation.\n * @returns Container creation response and the corresponding container client.\n */\n public async createContainer(\n containerName: string,\n options: ContainerCreateOptions = {},\n ): Promise<{\n containerClient: ContainerClient;\n containerCreateResponse: ContainerCreateResponse;\n }> {\n return tracingClient.withSpan(\n \"BlobServiceClient-createContainer\",\n options,\n async (updatedOptions) => {\n const containerClient = this.getContainerClient(containerName);\n const containerCreateResponse = await containerClient.create(updatedOptions);\n return {\n containerClient,\n containerCreateResponse,\n };\n },\n );\n }\n\n /**\n * Deletes a Blob container.\n *\n * @param containerName - Name of the container to delete.\n * @param options - Options to configure Container Delete operation.\n * @returns Container deletion response.\n */\n public async deleteContainer(\n containerName: string,\n options: ContainerDeleteMethodOptions = {},\n ): Promise<ContainerDeleteResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-deleteContainer\",\n options,\n async (updatedOptions) => {\n const containerClient = this.getContainerClient(containerName);\n return containerClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Restore a previously deleted Blob container.\n * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.\n *\n * @param deletedContainerName - Name of the previously deleted container.\n * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container.\n * @param options - Options to configure Container Restore operation.\n * @returns Container deletion response.\n */\n public async undeleteContainer(\n deletedContainerName: string,\n deletedContainerVersion: string,\n options: ServiceUndeleteContainerOptions = {},\n ): Promise<{\n containerClient: ContainerClient;\n containerUndeleteResponse: ContainerUndeleteResponse;\n }> {\n return tracingClient.withSpan(\n \"BlobServiceClient-undeleteContainer\",\n options,\n async (updatedOptions) => {\n const containerClient = this.getContainerClient(\n options.destinationContainerName || deletedContainerName,\n );\n // Hack to access a protected member.\n const containerContext = containerClient[\"storageClientContext\"].container;\n const containerUndeleteResponse = assertResponse<\n ContainerRestoreHeaders,\n ContainerRestoreHeaders\n >(\n await containerContext.restore({\n deletedContainerName,\n deletedContainerVersion,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n return { containerClient, containerUndeleteResponse };\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s Blob service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * @param options - Options to the Service Get Properties operation.\n * @returns Response data for the Service Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceGetPropertiesResponseInternal, ServiceGetPropertiesHeaders>(\n await this.serviceContext.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s Blob service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties\n *\n * @param properties -\n * @param options - Options to the Service Set Properties operation.\n * @returns Response data for the Service Set Properties operation.\n */\n public async setProperties(\n properties: BlobServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * Retrieves statistics related to replication for the Blob service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats\n *\n * @param options - Options to the Service Get Statistics operation.\n * @returns Response data for the Service Get Statistics operation.\n */\n public async getStatistics(\n options: ServiceGetStatisticsOptions = {},\n ): Promise<ServiceGetStatisticsResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-getStatistics\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceGetStatisticsResponseInternal, ServiceGetStatisticsHeaders>(\n await this.serviceContext.getStatistics({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * The Get Account Information operation returns the sku name and account kind\n * for the specified account.\n * The Get Account Information operation is available on service versions beginning\n * with version 2018-03-28.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information\n *\n * @param options - Options to the Service Get Account Info operation.\n * @returns Response data for the Service Get Account Info operation.\n */\n public async getAccountInfo(\n options: ServiceGetAccountInfoOptions = {},\n ): Promise<ServiceGetAccountInfoResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-getAccountInfo\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceGetAccountInfoHeaders, ServiceGetAccountInfoHeaders>(\n await this.serviceContext.getAccountInfo({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * Returns a list of the containers under the specified account.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers 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 containers 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 the Service List Container Segment operation.\n * @returns Response data for the Service List Container Segment operation.\n */\n private async listContainersSegment(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {},\n ): Promise<ServiceListContainersSegmentResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-listContainersSegment\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceListContainersSegmentResponseInternal,\n ServiceListContainersSegmentHeaders\n >(\n await this.serviceContext.listContainersSegment({\n abortSignal: options.abortSignal,\n marker,\n ...options,\n include: typeof options.include === \"string\" ? [options.include] : options.include,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags\n * match a given search expression. Filter blobs searches across all containers within a\n * storage account but can be scoped within the expression to a single container.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs 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 blobs 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 find blobs by tags.\n */\n private async findBlobsByTagsSegment(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {},\n ): Promise<ServiceFindBlobsByTagsSegmentResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-findBlobsByTagsSegment\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<\n ServiceFilterBlobsResponse,\n ServiceFilterBlobsHeaders,\n FilterBlobSegmentModel\n >(\n await this.serviceContext.filterBlobs({\n abortSignal: options.abortSignal,\n where: tagFilterSqlExpression,\n marker,\n maxPageSize: options.maxPageSize,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n\n const wrappedResponse: ServiceFindBlobsByTagsSegmentResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n blobs: response.blobs.map((blob) => {\n let tagValue = \"\";\n if (blob.tags?.blobTagSet.length === 1) {\n tagValue = blob.tags.blobTagSet[0].value;\n }\n return { ...blob, tags: toTags(blob.tags), tagValue };\n }),\n };\n return wrappedResponse;\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs 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 blobs 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 find blobs by tags.\n */\n private async *findBlobsByTagsSegments(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {},\n ): AsyncIterableIterator<ServiceFindBlobsByTagsSegmentResponse> {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options);\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield response;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to findBlobsByTagsItems.\n */\n private async *findBlobsByTagsItems(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {},\n ): AsyncIterableIterator<FilterBlobItem> {\n let marker: string | undefined;\n for await (const segment of this.findBlobsByTagsSegments(\n tagFilterSqlExpression,\n marker,\n options,\n )) {\n yield* segment.blobs;\n }\n }\n\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * ```ts snippet:BlobServiceClientFindBlobsByTags\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * // Use for await to iterate the blobs\n * let i = 1;\n * for await (const blob of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n *\n * // Use iter.next() to iterate the blobs\n * i = 1;\n * const iter = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let { value, done } = await iter.next();\n * while (!done) {\n * console.log(`Blob ${i++}: ${value.name}`);\n * ({ value, done } = await iter.next());\n * }\n *\n * // Use byPage() to iterate the blobs\n * i = 1;\n * for await (const page of blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ maxPageSize: 20 })) {\n * for (const blob of page.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Use paging with a marker\n * i = 1;\n * let iterator = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to find blobs by tags.\n */\n public findBlobsByTags(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobByTagsOptions = {},\n ): PagedAsyncIterableIterator<FilterBlobItem, ServiceFindBlobsByTagsSegmentResponse> {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions: ServiceFindBlobsByTagsSegmentOptions = {\n ...options,\n };\n\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\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.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions,\n });\n },\n };\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers 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 containers 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 containers operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListContainersSegmentResponse> {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = await this.listContainersSegment(marker, options);\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield await listContainersSegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for Container Items\n *\n * @param options - Options to list containers operation.\n */\n private async *listItems(\n options: ServiceListContainersSegmentOptions = {},\n ): AsyncIterableIterator<ContainerItem> {\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n yield* segment.containerItems;\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the containers\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the containers in pages.\n *\n * ```ts snippet:BlobServiceClientListContainers\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * // Use for await to iterate the containers\n * let i = 1;\n * for await (const container of blobServiceClient.listContainers()) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n *\n * // Use iter.next() to iterate the containers\n * i = 1;\n * const iter = blobServiceClient.listContainers();\n * let { value, done } = await iter.next();\n * while (!done) {\n * console.log(`Container ${i++}: ${value.name}`);\n * ({ value, done } = await iter.next());\n * }\n *\n * // Use byPage() to iterate the containers\n * i = 1;\n * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {\n * for (const container of page.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Use paging with a marker\n * i = 1;\n * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .listContainers()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list containers.\n * @returns An asyncIterableIterator that supports paging.\n */\n public listContainers(\n options: ServiceListContainersOptions = {},\n ): PagedAsyncIterableIterator<ContainerItem, ServiceListContainersSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListContainersIncludeType[] = [];\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSystem) {\n include.push(\"system\");\n }\n\n // AsyncIterableIterator to iterate over containers\n const listSegmentOptions: ServiceListContainersSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include } : {}),\n };\n\n const iter = this.listItems(listSegmentOptions);\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(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions,\n });\n },\n };\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @see https://learn.microsoft.com/en-us/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 \"BlobServiceClient-getUserDelegationKey\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<\n ServiceGetUserDelegationKeyResponseModel,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKeyModel\n >(\n await this.serviceContext.getUserDelegationKey(\n {\n startsOn: truncatedISO8061Date(startsOn, false),\n expiresOn: truncatedISO8061Date(expiresOn, false),\n },\n {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n },\n ),\n );\n\n const userDelegationKey = {\n signedObjectId: response.signedObjectId,\n signedTenantId: response.signedTenantId,\n signedStartsOn: new Date(response.signedStartsOn),\n signedExpiresOn: new Date(response.signedExpiresOn),\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 errorCode: response.errorCode,\n ...userDelegationKey,\n };\n\n return res;\n },\n );\n }\n\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @returns A new BlobBatchClient object for this service.\n */\n public getBlobBatchClient(): BlobBatchClient {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n\n /**\n * Only available for BlobServiceClient constructed with a shared key credential.\n *\n * Generates a Blob 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/en-us/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 provided.\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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for BlobServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on\n * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/en-us/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 provided.\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 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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"BlobServiceClient.js","sourceRoot":"","sources":["../../src/BlobServiceClient.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA0B9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,MAAM,GACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,OAAO,EACL,iCAAiC,EACjC,yCAAyC,GAC1C,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AA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AEjD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,+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,yCAAyC,iBAE5C,WAAW;YACX,SAAS;YACT,aAAa,EACb,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n ServiceGetUserDelegationKeyHeaders,\n ContainerCreateResponse,\n ContainerDeleteResponse,\n ServiceGetPropertiesResponse,\n BlobServiceProperties,\n ServiceSetPropertiesResponse,\n ServiceGetStatisticsResponse,\n ServiceGetAccountInfoResponse,\n ServiceListContainersSegmentResponse,\n ContainerItem,\n UserDelegationKeyModel,\n ContainerUndeleteResponse,\n FilterBlobSegmentModel,\n ServiceFilterBlobsHeaders,\n LeaseAccessConditions,\n FilterBlobSegment,\n FilterBlobItem,\n ServiceGetPropertiesResponseInternal,\n ServiceGetStatisticsResponseInternal,\n ServiceListContainersSegmentResponseInternal,\n} from \"./generatedModels.js\";\nimport type { Service } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { StoragePipelineOptions, PipelineLike } from \"./Pipeline.js\";\nimport { newPipeline, isPipelineLike } from \"./Pipeline.js\";\nimport type { ContainerCreateOptions, ContainerDeleteMethodOptions } from \"./ContainerClient.js\";\nimport { ContainerClient } from \"./ContainerClient.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\n toTags,\n} from \"./utils/utils.common.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential.js\";\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { truncatedISO8061Date, assertResponse } from \"./utils/utils.common.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport { BlobBatchClient } from \"./BlobBatchClient.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { AccountSASPermissions } from \"./sas/AccountSASPermissions.js\";\nimport type { SASProtocol } from \"./sas/SASQueryParameters.js\";\nimport type { SasIPRange } from \"./sas/SasIPRange.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./sas/AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./sas/AccountSASServices.js\";\nimport type {\n ContainerRestoreHeaders,\n ListContainersIncludeType,\n ServiceFilterBlobsResponse,\n ServiceGetAccountInfoHeaders,\n ServiceGetPropertiesHeaders,\n ServiceGetStatisticsHeaders,\n ServiceGetUserDelegationKeyResponse as ServiceGetUserDelegationKeyResponseModel,\n ServiceListContainersSegmentHeaders,\n ServiceSetPropertiesHeaders,\n} from \"./generated/src/index.js\";\n\n/**\n * Options to configure the {@link BlobServiceClient.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 BlobServiceClient.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 BlobServiceClient.getAccountInfo} operation.\n */\nexport interface ServiceGetAccountInfoOptions 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 BlobServiceClient.getStatistics} operation.\n */\nexport interface ServiceGetStatisticsOptions 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 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 * Options to configure the {@link BlobServiceClient.listContainerSegment} operation.\n */\ninterface ServiceListContainersSegmentOptions 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 containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify that the container's metadata be returned as part of the response\n * body. Possible values include: 'metadata'\n */\n include?: ListContainersIncludeType | ListContainersIncludeType[];\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.listContainers} operation.\n */\nexport interface ServiceListContainersOptions 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 containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies whether the container's metadata\n * should be returned as part of the response body.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies whether soft deleted containers should be included in the response.\n */\n includeDeleted?: boolean;\n /**\n * Specifies whether system containers should be included in the response.\n */\n includeSystem?: boolean;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTagsSegment} operation.\n */\ninterface ServiceFindBlobsByTagsSegmentOptions 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 * Specifies the maximum number of blobs\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation.\n */\nexport interface ServiceFindBlobByTagsOptions 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 * The response of {@link BlobServiceClient.findBlobsByTags} operation.\n */\nexport type ServiceFindBlobsByTagsSegmentResponse = WithResponse<\n FilterBlobSegment & ServiceFilterBlobsHeaders,\n ServiceFilterBlobsHeaders,\n FilterBlobSegmentModel\n>;\n\n/**\n * A user delegation key.\n */\nexport interface UserDelegationKey {\n /**\n * The Azure Active Directory object ID in GUID format.\n */\n signedObjectId: string;\n /**\n * The Azure Active Directory tenant ID in GUID format.\n */\n signedTenantId: string;\n /**\n * The date-time the key is active.\n */\n signedStartsOn: Date;\n /**\n * The date-time the key expires.\n */\n signedExpiresOn: Date;\n /**\n * Abbreviation of the Azure Storage service that accepts the key.\n */\n signedService: string;\n /**\n * The service version that created the key.\n */\n signedVersion: string;\n /**\n * The key as a base64 string.\n */\n value: string;\n}\n\n/**\n * Contains response data for the {@link getUserDelegationKey} operation.\n */\nexport declare type ServiceGetUserDelegationKeyResponse = WithResponse<\n UserDelegationKey & ServiceGetUserDelegationKeyHeaders,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKeyModel\n>;\n\n/**\n * Options to configure {@link BlobServiceClient.undeleteContainer} operation.\n */\nexport interface ServiceUndeleteContainerOptions 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 * Optional. Specifies the new name of the restored container.\n * Will use its original name if this is not specified.\n * @deprecated Restore container to a different name is not supported by service anymore.\n */\n destinationContainerName?: string;\n}\n\n/**\n * Options to configure {@link BlobServiceClient.renameContainer} operation.\n */\nexport interface ServiceRenameContainerOptions 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 * Condition to meet for the source container.\n */\n sourceCondition?: LeaseAccessConditions;\n}\n\n/**\n * Options to configure {@link BlobServiceClient.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 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n}\n\n/**\n * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you\n * to manipulate blob containers.\n */\nexport class BlobServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n /**\n *\n * Creates an instance of BlobServiceClient 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 - Optional. Options to configure the HTTP pipeline.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions,\n ): BlobServiceClient {\n options = options || {};\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\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new BlobServiceClient(extractedCreds.url, pipeline);\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 BlobServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\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 BlobServiceClient.\n *\n * @param url - A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n *\n * Example using DefaultAzureCredential from `@azure/identity`:\n *\n * ```ts snippet:ReadmeSampleCreateClient_DefaultAzureCredential\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n *\n * // Enter your storage account name\n * const account = \"<account>\";\n * const defaultAzureCredential = new DefaultAzureCredential();\n *\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * defaultAzureCredential,\n * );\n * ```\n *\n * Example using an account name/key:\n *\n * ```ts snippet:ReadmeSampleCreateClient_StorageSharedKeyCredential\n * import { StorageSharedKeyCredential, BlobServiceClient } from \"@azure/storage-blob\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * // Use StorageSharedKeyCredential with storage account and account key\n * // StorageSharedKeyCredential is only available in Node.js runtime, not in browsers\n * const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey);\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * sharedKeyCredential,\n * );\n * ```\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions,\n );\n /**\n * Creates an instance of BlobServiceClient.\n *\n * @param url - A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: PipelineLike);\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | PipelineLike,\n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options?: StoragePipelineOptions,\n ) {\n let pipeline: PipelineLike;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n (isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\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 super(url, pipeline);\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a {@link ContainerClient} object\n *\n * @param containerName - A container name\n * @returns A new ContainerClient object for the given container name.\n *\n * Example usage:\n *\n * ```ts snippet:BlobServiceClientGetContainerClient\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const containerClient = blobServiceClient.getContainerClient(\"<container name>\");\n * ```\n */\n public getContainerClient(containerName: string): ContainerClient {\n return new ContainerClient(\n appendToURLPath(this.url, encodeURIComponent(containerName)),\n this.pipeline,\n );\n }\n\n /**\n * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param containerName - Name of the container to create.\n * @param options - Options to configure Container Create operation.\n * @returns Container creation response and the corresponding container client.\n */\n public async createContainer(\n containerName: string,\n options: ContainerCreateOptions = {},\n ): Promise<{\n containerClient: ContainerClient;\n containerCreateResponse: ContainerCreateResponse;\n }> {\n return tracingClient.withSpan(\n \"BlobServiceClient-createContainer\",\n options,\n async (updatedOptions) => {\n const containerClient = this.getContainerClient(containerName);\n const containerCreateResponse = await containerClient.create(updatedOptions);\n return {\n containerClient,\n containerCreateResponse,\n };\n },\n );\n }\n\n /**\n * Deletes a Blob container.\n *\n * @param containerName - Name of the container to delete.\n * @param options - Options to configure Container Delete operation.\n * @returns Container deletion response.\n */\n public async deleteContainer(\n containerName: string,\n options: ContainerDeleteMethodOptions = {},\n ): Promise<ContainerDeleteResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-deleteContainer\",\n options,\n async (updatedOptions) => {\n const containerClient = this.getContainerClient(containerName);\n return containerClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Restore a previously deleted Blob container.\n * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.\n *\n * @param deletedContainerName - Name of the previously deleted container.\n * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container.\n * @param options - Options to configure Container Restore operation.\n * @returns Container deletion response.\n */\n public async undeleteContainer(\n deletedContainerName: string,\n deletedContainerVersion: string,\n options: ServiceUndeleteContainerOptions = {},\n ): Promise<{\n containerClient: ContainerClient;\n containerUndeleteResponse: ContainerUndeleteResponse;\n }> {\n return tracingClient.withSpan(\n \"BlobServiceClient-undeleteContainer\",\n options,\n async (updatedOptions) => {\n const containerClient = this.getContainerClient(\n options.destinationContainerName || deletedContainerName,\n );\n // Hack to access a protected member.\n const containerContext = containerClient[\"storageClientContext\"].container;\n const containerUndeleteResponse = assertResponse<\n ContainerRestoreHeaders,\n ContainerRestoreHeaders\n >(\n await containerContext.restore({\n deletedContainerName,\n deletedContainerVersion,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n return { containerClient, containerUndeleteResponse };\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s Blob service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties\n *\n * @param options - Options to the Service Get Properties operation.\n * @returns Response data for the Service Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceGetPropertiesResponseInternal, ServiceGetPropertiesHeaders>(\n await this.serviceContext.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s Blob 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-blob-service-properties\n *\n * @param properties -\n * @param options - Options to the Service Set Properties operation.\n * @returns Response data for the Service Set Properties operation.\n */\n public async setProperties(\n properties: BlobServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * Retrieves statistics related to replication for the Blob service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats\n *\n * @param options - Options to the Service Get Statistics operation.\n * @returns Response data for the Service Get Statistics operation.\n */\n public async getStatistics(\n options: ServiceGetStatisticsOptions = {},\n ): Promise<ServiceGetStatisticsResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-getStatistics\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceGetStatisticsResponseInternal, ServiceGetStatisticsHeaders>(\n await this.serviceContext.getStatistics({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * The Get Account Information operation returns the sku name and account kind\n * for the specified account.\n * The Get Account Information operation is available on service versions beginning\n * with version 2018-03-28.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information\n *\n * @param options - Options to the Service Get Account Info operation.\n * @returns Response data for the Service Get Account Info operation.\n */\n public async getAccountInfo(\n options: ServiceGetAccountInfoOptions = {},\n ): Promise<ServiceGetAccountInfoResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-getAccountInfo\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceGetAccountInfoHeaders, ServiceGetAccountInfoHeaders>(\n await this.serviceContext.getAccountInfo({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * Returns a list of the containers under the specified account.\n * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers 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 containers 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 the Service List Container Segment operation.\n * @returns Response data for the Service List Container Segment operation.\n */\n private async listContainersSegment(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {},\n ): Promise<ServiceListContainersSegmentResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-listContainersSegment\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceListContainersSegmentResponseInternal,\n ServiceListContainersSegmentHeaders\n >(\n await this.serviceContext.listContainersSegment({\n abortSignal: options.abortSignal,\n marker,\n ...options,\n include: typeof options.include === \"string\" ? [options.include] : options.include,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n },\n );\n }\n\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags\n * match a given search expression. Filter blobs searches across all containers within a\n * storage account but can be scoped within the expression to a single container.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs 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 blobs 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 find blobs by tags.\n */\n private async findBlobsByTagsSegment(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {},\n ): Promise<ServiceFindBlobsByTagsSegmentResponse> {\n return tracingClient.withSpan(\n \"BlobServiceClient-findBlobsByTagsSegment\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<\n ServiceFilterBlobsResponse,\n ServiceFilterBlobsHeaders,\n FilterBlobSegmentModel\n >(\n await this.serviceContext.filterBlobs({\n abortSignal: options.abortSignal,\n where: tagFilterSqlExpression,\n marker,\n maxPageSize: options.maxPageSize,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n\n const wrappedResponse: ServiceFindBlobsByTagsSegmentResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n blobs: response.blobs.map((blob) => {\n let tagValue = \"\";\n if (blob.tags?.blobTagSet.length === 1) {\n tagValue = blob.tags.blobTagSet[0].value;\n }\n return { ...blob, tags: toTags(blob.tags), tagValue };\n }),\n };\n return wrappedResponse;\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs 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 blobs 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 find blobs by tags.\n */\n private async *findBlobsByTagsSegments(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {},\n ): AsyncIterableIterator<ServiceFindBlobsByTagsSegmentResponse> {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options);\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield response;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to findBlobsByTagsItems.\n */\n private async *findBlobsByTagsItems(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {},\n ): AsyncIterableIterator<FilterBlobItem> {\n let marker: string | undefined;\n for await (const segment of this.findBlobsByTagsSegments(\n tagFilterSqlExpression,\n marker,\n options,\n )) {\n yield* segment.blobs;\n }\n }\n\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties\n *\n * ```ts snippet:BlobServiceClientFindBlobsByTags\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * // Use for await to iterate the blobs\n * let i = 1;\n * for await (const blob of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n *\n * // Use iter.next() to iterate the blobs\n * i = 1;\n * const iter = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let { value, done } = await iter.next();\n * while (!done) {\n * console.log(`Blob ${i++}: ${value.name}`);\n * ({ value, done } = await iter.next());\n * }\n *\n * // Use byPage() to iterate the blobs\n * i = 1;\n * for await (const page of blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ maxPageSize: 20 })) {\n * for (const blob of page.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Use paging with a marker\n * i = 1;\n * let iterator = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to find blobs by tags.\n */\n public findBlobsByTags(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobByTagsOptions = {},\n ): PagedAsyncIterableIterator<FilterBlobItem, ServiceFindBlobsByTagsSegmentResponse> {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions: ServiceFindBlobsByTagsSegmentOptions = {\n ...options,\n };\n\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\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.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions,\n });\n },\n };\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers 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 containers 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 containers operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListContainersSegmentResponse> {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = await this.listContainersSegment(marker, options);\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield await listContainersSegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for Container Items\n *\n * @param options - Options to list containers operation.\n */\n private async *listItems(\n options: ServiceListContainersSegmentOptions = {},\n ): AsyncIterableIterator<ContainerItem> {\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n yield* segment.containerItems;\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the containers\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the containers in pages.\n *\n * ```ts snippet:BlobServiceClientListContainers\n * import { BlobServiceClient } from \"@azure/storage-blob\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * // Use for await to iterate the containers\n * let i = 1;\n * for await (const container of blobServiceClient.listContainers()) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n *\n * // Use iter.next() to iterate the containers\n * i = 1;\n * const iter = blobServiceClient.listContainers();\n * let { value, done } = await iter.next();\n * while (!done) {\n * console.log(`Container ${i++}: ${value.name}`);\n * ({ value, done } = await iter.next());\n * }\n *\n * // Use byPage() to iterate the containers\n * i = 1;\n * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {\n * for (const container of page.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Use paging with a marker\n * i = 1;\n * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .listContainers()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list containers.\n * @returns An asyncIterableIterator that supports paging.\n */\n public listContainers(\n options: ServiceListContainersOptions = {},\n ): PagedAsyncIterableIterator<ContainerItem, ServiceListContainersSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListContainersIncludeType[] = [];\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSystem) {\n include.push(\"system\");\n }\n\n // AsyncIterableIterator to iterate over containers\n const listSegmentOptions: ServiceListContainersSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include } : {}),\n };\n\n const iter = this.listItems(listSegmentOptions);\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(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions,\n });\n },\n };\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Blob 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 \"BlobServiceClient-getUserDelegationKey\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<\n ServiceGetUserDelegationKeyResponseModel,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKeyModel\n >(\n await this.serviceContext.getUserDelegationKey(\n {\n startsOn: truncatedISO8061Date(startsOn, false),\n expiresOn: truncatedISO8061Date(expiresOn, false),\n },\n {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n },\n ),\n );\n\n const userDelegationKey = {\n signedObjectId: response.signedObjectId,\n signedTenantId: response.signedTenantId,\n signedStartsOn: new Date(response.signedStartsOn),\n signedExpiresOn: new Date(response.signedExpiresOn),\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 errorCode: response.errorCode,\n ...userDelegationKey,\n };\n\n return res;\n },\n );\n }\n\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch\n *\n * @returns A new BlobBatchClient object for this service.\n */\n public getBlobBatchClient(): BlobBatchClient {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n\n /**\n * Only available for BlobServiceClient constructed with a shared key credential.\n *\n * Generates a Blob 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 provided.\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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for BlobServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on\n * the client properties 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 provided.\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 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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|