@azure/storage-blob 12.28.0-beta.2 → 12.28.1-alpha.20250724.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/BatchResponseParser.js +6 -1
- package/dist/browser/BatchResponseParser.js.map +1 -1
- package/dist/browser/BlobBatch.d.ts +8 -8
- package/dist/browser/BlobBatch.js +11 -2
- package/dist/browser/BlobBatch.js.map +1 -1
- package/dist/browser/BlobBatchClient.d.ts +10 -10
- package/dist/browser/BlobBatchClient.js +6 -3
- package/dist/browser/BlobBatchClient.js.map +1 -1
- package/dist/browser/BlobLeaseClient.d.ts +10 -10
- package/dist/browser/BlobLeaseClient.js +49 -40
- package/dist/browser/BlobLeaseClient.js.map +1 -1
- package/dist/browser/BlobQueryResponse-browser.mjs.map +1 -1
- package/dist/browser/BlobQueryResponse.js +1 -0
- package/dist/browser/BlobServiceClient.d.ts +11 -11
- package/dist/browser/BlobServiceClient.js +97 -92
- package/dist/browser/BlobServiceClient.js.map +1 -1
- package/dist/browser/Clients.d.ts +36 -36
- package/dist/browser/Clients.js +374 -219
- package/dist/browser/Clients.js.map +1 -1
- package/dist/browser/ContainerClient.d.ts +16 -16
- package/dist/browser/ContainerClient.js +197 -150
- package/dist/browser/ContainerClient.js.map +1 -1
- package/dist/browser/PageBlobRangeResponse.js +10 -3
- package/dist/browser/PageBlobRangeResponse.js.map +1 -1
- package/dist/browser/Pipeline.js +27 -10
- 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/StorageClient.js +23 -0
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/StorageContextClient.js +1 -1
- package/dist/browser/StorageContextClient.js.map +1 -1
- package/dist/browser/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/browser/StorageRetryPolicyFactory.js +1 -0
- package/dist/browser/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/browser/generated/src/operations/appendBlob.js +1 -0
- package/dist/browser/generated/src/operations/appendBlob.js.map +1 -1
- package/dist/browser/generated/src/operations/blob.js +1 -0
- package/dist/browser/generated/src/operations/blob.js.map +1 -1
- package/dist/browser/generated/src/operations/blockBlob.js +1 -0
- package/dist/browser/generated/src/operations/blockBlob.js.map +1 -1
- package/dist/browser/generated/src/operations/container.js +1 -0
- package/dist/browser/generated/src/operations/container.js.map +1 -1
- package/dist/browser/generated/src/operations/pageBlob.js +1 -0
- package/dist/browser/generated/src/operations/pageBlob.js.map +1 -1
- package/dist/browser/generated/src/operations/service.js +1 -0
- package/dist/browser/generated/src/operations/service.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +16 -4
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/index-browser.d.mts.map +1 -1
- package/dist/browser/index-browser.mjs.map +1 -1
- package/dist/browser/index.d.ts +0 -8
- package/dist/browser/index.js +0 -8
- package/dist/browser/internal-avro/AvroParser.js +7 -1
- package/dist/browser/internal-avro/AvroParser.js.map +1 -1
- package/dist/browser/internal-avro/AvroReadableFromBlob.js +2 -0
- package/dist/browser/internal-avro/AvroReadableFromBlob.js.map +1 -1
- package/dist/browser/internal-avro/AvroReadableFromStream.js +3 -2
- package/dist/browser/internal-avro/AvroReadableFromStream.js.map +1 -1
- package/dist/browser/internal-avro/AvroReader.js +44 -34
- package/dist/browser/internal-avro/AvroReader.js.map +1 -1
- package/dist/browser/policies/RequestPolicy.js +2 -0
- package/dist/browser/policies/RequestPolicy.js.map +1 -1
- package/dist/browser/policies/StorageRetryPolicy.js +5 -1
- package/dist/browser/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/browser/policies/StorageRetryPolicyV2.js +10 -12
- package/dist/browser/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js +6 -2
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist/browser/pollers/BlobStartCopyFromUrlPoller.js +7 -3
- package/dist/browser/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist/browser/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/browser/sas/AccountSASPermissions.js +54 -56
- package/dist/browser/sas/AccountSASPermissions.js.map +1 -1
- package/dist/browser/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/browser/sas/AccountSASResourceTypes.js +13 -15
- package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/browser/sas/AccountSASServices.js +16 -18
- package/dist/browser/sas/AccountSASServices.js.map +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/browser/sas/AccountSASSignatureValues.js +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/sas/BlobSASPermissions.js +44 -46
- package/dist/browser/sas/BlobSASPermissions.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 +53 -55
- package/dist/browser/sas/ContainerSASPermissions.js.map +1 -1
- package/dist/browser/sas/SASQueryParameters.d.ts +2 -2
- package/dist/browser/sas/SASQueryParameters.js +117 -0
- package/dist/browser/sas/SASQueryParameters.js.map +1 -1
- package/dist/browser/utils/Batch.js +29 -21
- package/dist/browser/utils/Batch.js.map +1 -1
- package/dist/browser/utils/BlobQuickQueryStream.js +6 -1
- package/dist/browser/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist/browser/utils/Mutex.js +2 -2
- package/dist/browser/utils/Mutex.js.map +1 -1
- package/dist/browser/utils/RetriableReadableStream.js +70 -62
- package/dist/browser/utils/RetriableReadableStream.js.map +1 -1
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.d.ts +2 -2
- package/dist/browser/utils/utils.common.js +27 -14
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/commonjs/BatchResponseParser.js +6 -1
- package/dist/commonjs/BatchResponseParser.js.map +1 -1
- package/dist/commonjs/BlobBatch.d.ts +8 -8
- package/dist/commonjs/BlobBatch.js +11 -2
- package/dist/commonjs/BlobBatch.js.map +1 -1
- package/dist/commonjs/BlobBatchClient.d.ts +10 -10
- package/dist/commonjs/BlobBatchClient.js +6 -3
- package/dist/commonjs/BlobBatchClient.js.map +1 -1
- package/dist/commonjs/BlobDownloadResponse.js +2 -0
- package/dist/commonjs/BlobDownloadResponse.js.map +1 -1
- package/dist/commonjs/BlobLeaseClient.d.ts +10 -10
- package/dist/commonjs/BlobLeaseClient.js +49 -40
- package/dist/commonjs/BlobLeaseClient.js.map +1 -1
- package/dist/commonjs/BlobQueryResponse.js +2 -0
- package/dist/commonjs/BlobQueryResponse.js.map +1 -1
- package/dist/commonjs/BlobServiceClient.d.ts +11 -11
- package/dist/commonjs/BlobServiceClient.js +97 -92
- package/dist/commonjs/BlobServiceClient.js.map +1 -1
- package/dist/commonjs/Clients.d.ts +36 -36
- package/dist/commonjs/Clients.js +374 -219
- package/dist/commonjs/Clients.js.map +1 -1
- package/dist/commonjs/ContainerClient.d.ts +16 -16
- package/dist/commonjs/ContainerClient.js +197 -150
- package/dist/commonjs/ContainerClient.js.map +1 -1
- package/dist/commonjs/PageBlobRangeResponse.js +10 -3
- package/dist/commonjs/PageBlobRangeResponse.js.map +1 -1
- package/dist/commonjs/Pipeline.js +27 -10
- 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/StorageClient.js +23 -0
- package/dist/commonjs/StorageClient.js.map +1 -1
- package/dist/commonjs/StorageContextClient.js +1 -1
- package/dist/commonjs/StorageContextClient.js.map +1 -1
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/commonjs/StorageRetryPolicyFactory.js +1 -0
- package/dist/commonjs/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +8 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js +13 -1
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/commonjs/generated/src/operations/appendBlob.js +1 -0
- package/dist/commonjs/generated/src/operations/appendBlob.js.map +1 -1
- package/dist/commonjs/generated/src/operations/blob.js +1 -0
- package/dist/commonjs/generated/src/operations/blob.js.map +1 -1
- package/dist/commonjs/generated/src/operations/blockBlob.js +1 -0
- package/dist/commonjs/generated/src/operations/blockBlob.js.map +1 -1
- package/dist/commonjs/generated/src/operations/container.js +1 -0
- package/dist/commonjs/generated/src/operations/container.js.map +1 -1
- package/dist/commonjs/generated/src/operations/pageBlob.js +1 -0
- package/dist/commonjs/generated/src/operations/pageBlob.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +1 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +16 -4
- package/dist/commonjs/generated/src/storageClient.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -8
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -8
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/internal-avro/AvroParser.js +7 -1
- package/dist/commonjs/internal-avro/AvroParser.js.map +1 -1
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.js +2 -0
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.js.map +1 -1
- package/dist/commonjs/internal-avro/AvroReadableFromStream.js +3 -2
- package/dist/commonjs/internal-avro/AvroReadableFromStream.js.map +1 -1
- package/dist/commonjs/internal-avro/AvroReader.js +44 -34
- package/dist/commonjs/internal-avro/AvroReader.js.map +1 -1
- package/dist/commonjs/policies/RequestPolicy.js +2 -0
- package/dist/commonjs/policies/RequestPolicy.js.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicy.js +5 -1
- package/dist/commonjs/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.js +10 -12
- package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +6 -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/pollers/BlobStartCopyFromUrlPoller.js +7 -3
- package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist/commonjs/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/commonjs/sas/AccountSASPermissions.js +54 -56
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.js +13 -15
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/sas/AccountSASServices.js +16 -18
- package/dist/commonjs/sas/AccountSASServices.js.map +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/commonjs/sas/AccountSASSignatureValues.js +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/BlobSASPermissions.js +44 -46
- package/dist/commonjs/sas/BlobSASPermissions.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 +53 -55
- package/dist/commonjs/sas/ContainerSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/SASQueryParameters.d.ts +2 -2
- package/dist/commonjs/sas/SASQueryParameters.js +117 -0
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/utils/Batch.js +29 -21
- package/dist/commonjs/utils/Batch.js.map +1 -1
- package/dist/commonjs/utils/BlobQuickQueryStream.js +6 -1
- package/dist/commonjs/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist/commonjs/utils/Mutex.js +2 -2
- package/dist/commonjs/utils/Mutex.js.map +1 -1
- package/dist/commonjs/utils/RetriableReadableStream.js +70 -62
- package/dist/commonjs/utils/RetriableReadableStream.js.map +1 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +1 -1
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/commonjs/utils/utils.common.d.ts +2 -2
- package/dist/commonjs/utils/utils.common.js +27 -14
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/commonjs/utils/utils.d.ts +1 -1
- package/dist/commonjs/utils/utils.d.ts.map +1 -1
- package/dist/commonjs/utils/utils.js +5 -5
- package/dist/commonjs/utils/utils.js.map +1 -1
- package/dist/esm/BatchResponseParser.js +6 -1
- package/dist/esm/BatchResponseParser.js.map +1 -1
- package/dist/esm/BlobBatch.d.ts +8 -8
- package/dist/esm/BlobBatch.js +11 -2
- package/dist/esm/BlobBatch.js.map +1 -1
- package/dist/esm/BlobBatchClient.d.ts +10 -10
- package/dist/esm/BlobBatchClient.js +6 -3
- package/dist/esm/BlobBatchClient.js.map +1 -1
- package/dist/esm/BlobDownloadResponse.js +2 -0
- package/dist/esm/BlobDownloadResponse.js.map +1 -1
- package/dist/esm/BlobLeaseClient.d.ts +10 -10
- package/dist/esm/BlobLeaseClient.js +49 -40
- package/dist/esm/BlobLeaseClient.js.map +1 -1
- package/dist/esm/BlobQueryResponse.js +2 -0
- package/dist/esm/BlobQueryResponse.js.map +1 -1
- package/dist/esm/BlobServiceClient.d.ts +11 -11
- package/dist/esm/BlobServiceClient.js +97 -92
- package/dist/esm/BlobServiceClient.js.map +1 -1
- package/dist/esm/Clients.d.ts +36 -36
- package/dist/esm/Clients.js +374 -219
- package/dist/esm/Clients.js.map +1 -1
- package/dist/esm/ContainerClient.d.ts +16 -16
- package/dist/esm/ContainerClient.js +197 -150
- package/dist/esm/ContainerClient.js.map +1 -1
- package/dist/esm/PageBlobRangeResponse.js +10 -3
- package/dist/esm/PageBlobRangeResponse.js.map +1 -1
- package/dist/esm/Pipeline.js +27 -10
- 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/StorageClient.js +23 -0
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/StorageContextClient.js +1 -1
- package/dist/esm/StorageContextClient.js.map +1 -1
- package/dist/esm/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/esm/StorageRetryPolicyFactory.js +1 -0
- package/dist/esm/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.js +8 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js +13 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/esm/generated/src/operations/appendBlob.js +1 -0
- package/dist/esm/generated/src/operations/appendBlob.js.map +1 -1
- package/dist/esm/generated/src/operations/blob.js +1 -0
- package/dist/esm/generated/src/operations/blob.js.map +1 -1
- package/dist/esm/generated/src/operations/blockBlob.js +1 -0
- package/dist/esm/generated/src/operations/blockBlob.js.map +1 -1
- package/dist/esm/generated/src/operations/container.js +1 -0
- package/dist/esm/generated/src/operations/container.js.map +1 -1
- package/dist/esm/generated/src/operations/pageBlob.js +1 -0
- package/dist/esm/generated/src/operations/pageBlob.js.map +1 -1
- package/dist/esm/generated/src/operations/service.js +1 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +16 -4
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/index.d.ts +1 -8
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal-avro/AvroParser.js +7 -1
- package/dist/esm/internal-avro/AvroParser.js.map +1 -1
- package/dist/esm/internal-avro/AvroReadableFromBlob.js +2 -0
- package/dist/esm/internal-avro/AvroReadableFromBlob.js.map +1 -1
- package/dist/esm/internal-avro/AvroReadableFromStream.js +3 -2
- package/dist/esm/internal-avro/AvroReadableFromStream.js.map +1 -1
- package/dist/esm/internal-avro/AvroReader.js +44 -34
- package/dist/esm/internal-avro/AvroReader.js.map +1 -1
- package/dist/esm/policies/RequestPolicy.js +2 -0
- package/dist/esm/policies/RequestPolicy.js.map +1 -1
- package/dist/esm/policies/StorageRetryPolicy.js +5 -1
- package/dist/esm/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/esm/policies/StorageRetryPolicyV2.js +10 -12
- package/dist/esm/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js +6 -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/pollers/BlobStartCopyFromUrlPoller.js +7 -3
- package/dist/esm/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist/esm/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/esm/sas/AccountSASPermissions.js +54 -56
- package/dist/esm/sas/AccountSASPermissions.js.map +1 -1
- package/dist/esm/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/esm/sas/AccountSASResourceTypes.js +13 -15
- package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/esm/sas/AccountSASServices.js +16 -18
- package/dist/esm/sas/AccountSASServices.js.map +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/esm/sas/AccountSASSignatureValues.js +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/sas/BlobSASPermissions.js +44 -46
- package/dist/esm/sas/BlobSASPermissions.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 +53 -55
- package/dist/esm/sas/ContainerSASPermissions.js.map +1 -1
- package/dist/esm/sas/SASQueryParameters.d.ts +2 -2
- package/dist/esm/sas/SASQueryParameters.js +117 -0
- package/dist/esm/sas/SASQueryParameters.js.map +1 -1
- package/dist/esm/utils/Batch.js +29 -21
- package/dist/esm/utils/Batch.js.map +1 -1
- package/dist/esm/utils/BlobQuickQueryStream.js +6 -1
- package/dist/esm/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist/esm/utils/Mutex.js +2 -2
- package/dist/esm/utils/Mutex.js.map +1 -1
- package/dist/esm/utils/RetriableReadableStream.js +70 -62
- package/dist/esm/utils/RetriableReadableStream.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.d.ts +2 -2
- package/dist/esm/utils/utils.common.js +27 -14
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/esm/utils/utils.d.ts +1 -1
- package/dist/esm/utils/utils.d.ts.map +1 -1
- package/dist/esm/utils/utils.js +2 -2
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/react-native/BatchResponseParser.js +6 -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 +11 -2
- package/dist/react-native/BlobBatch.js.map +1 -1
- package/dist/react-native/BlobBatchClient.d.ts +10 -10
- package/dist/react-native/BlobBatchClient.js +6 -3
- package/dist/react-native/BlobBatchClient.js.map +1 -1
- package/dist/react-native/BlobDownloadResponse.js +2 -0
- package/dist/react-native/BlobDownloadResponse.js.map +1 -1
- package/dist/react-native/BlobLeaseClient.d.ts +10 -10
- package/dist/react-native/BlobLeaseClient.js +49 -40
- package/dist/react-native/BlobLeaseClient.js.map +1 -1
- package/dist/react-native/BlobQueryResponse.js +2 -0
- package/dist/react-native/BlobQueryResponse.js.map +1 -1
- package/dist/react-native/BlobServiceClient.d.ts +11 -11
- package/dist/react-native/BlobServiceClient.js +97 -92
- package/dist/react-native/BlobServiceClient.js.map +1 -1
- package/dist/react-native/Clients.d.ts +36 -36
- package/dist/react-native/Clients.js +374 -219
- package/dist/react-native/Clients.js.map +1 -1
- package/dist/react-native/ContainerClient.d.ts +16 -16
- package/dist/react-native/ContainerClient.js +197 -150
- package/dist/react-native/ContainerClient.js.map +1 -1
- package/dist/react-native/PageBlobRangeResponse.js +10 -3
- package/dist/react-native/PageBlobRangeResponse.js.map +1 -1
- package/dist/react-native/Pipeline.js +27 -10
- 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/StorageClient.js +23 -0
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/StorageContextClient.js +1 -1
- package/dist/react-native/StorageContextClient.js.map +1 -1
- package/dist/react-native/StorageRetryPolicyFactory.d.ts +2 -2
- package/dist/react-native/StorageRetryPolicyFactory.js +1 -0
- package/dist/react-native/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/react-native/credentials/StorageSharedKeyCredential.js +8 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts +1 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.js +13 -1
- package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist/react-native/generated/src/operations/appendBlob.js +1 -0
- package/dist/react-native/generated/src/operations/appendBlob.js.map +1 -1
- package/dist/react-native/generated/src/operations/blob.js +1 -0
- package/dist/react-native/generated/src/operations/blob.js.map +1 -1
- package/dist/react-native/generated/src/operations/blockBlob.js +1 -0
- package/dist/react-native/generated/src/operations/blockBlob.js.map +1 -1
- package/dist/react-native/generated/src/operations/container.js +1 -0
- package/dist/react-native/generated/src/operations/container.js.map +1 -1
- package/dist/react-native/generated/src/operations/pageBlob.js +1 -0
- package/dist/react-native/generated/src/operations/pageBlob.js.map +1 -1
- package/dist/react-native/generated/src/operations/service.js +1 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +16 -4
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -8
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -8
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/internal-avro/AvroParser.js +7 -1
- package/dist/react-native/internal-avro/AvroParser.js.map +1 -1
- package/dist/react-native/internal-avro/AvroReadableFromBlob.js +2 -0
- package/dist/react-native/internal-avro/AvroReadableFromBlob.js.map +1 -1
- package/dist/react-native/internal-avro/AvroReadableFromStream.js +3 -2
- package/dist/react-native/internal-avro/AvroReadableFromStream.js.map +1 -1
- package/dist/react-native/internal-avro/AvroReader.js +44 -34
- package/dist/react-native/internal-avro/AvroReader.js.map +1 -1
- package/dist/react-native/policies/RequestPolicy.js +2 -0
- package/dist/react-native/policies/RequestPolicy.js.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicy.js +5 -1
- package/dist/react-native/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.js +10 -12
- 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 +6 -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/pollers/BlobStartCopyFromUrlPoller.js +7 -3
- package/dist/react-native/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist/react-native/sas/AccountSASPermissions.d.ts +1 -1
- package/dist/react-native/sas/AccountSASPermissions.js +54 -56
- package/dist/react-native/sas/AccountSASPermissions.js.map +1 -1
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts +1 -1
- package/dist/react-native/sas/AccountSASResourceTypes.js +13 -15
- package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/react-native/sas/AccountSASServices.js +16 -18
- package/dist/react-native/sas/AccountSASServices.js.map +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts +3 -3
- package/dist/react-native/sas/AccountSASSignatureValues.js +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/sas/BlobSASPermissions.js +44 -46
- package/dist/react-native/sas/BlobSASPermissions.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 +53 -55
- 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 +117 -0
- package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
- package/dist/react-native/utils/Batch.js +29 -21
- package/dist/react-native/utils/Batch.js.map +1 -1
- package/dist/react-native/utils/BlobQuickQueryStream.js +6 -1
- package/dist/react-native/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist/react-native/utils/Mutex.js +2 -2
- package/dist/react-native/utils/Mutex.js.map +1 -1
- package/dist/react-native/utils/RetriableReadableStream.js +70 -62
- package/dist/react-native/utils/RetriableReadableStream.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.d.ts +2 -2
- package/dist/react-native/utils/utils.common.js +27 -14
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/dist/react-native/utils/utils.d.ts +1 -1
- package/dist/react-native/utils/utils.d.ts.map +1 -1
- package/dist/react-native/utils/utils.js +2 -2
- package/dist/react-native/utils/utils.js.map +1 -1
- package/package.json +10 -10
@@ -1,6 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
4
3
|
import { getDefaultProxySettings } from "@azure/core-rest-pipeline";
|
5
4
|
import { isTokenCredential } from "@azure/core-auth";
|
6
5
|
import { isNodeLike } from "@azure/core-util";
|
@@ -28,6 +27,14 @@ import { BlobLeaseClient } from "./BlobLeaseClient.js";
|
|
28
27
|
* append blob, or page blob.
|
29
28
|
*/
|
30
29
|
export class BlobClient extends StorageClient {
|
30
|
+
/**
|
31
|
+
* blobContext provided by protocol layer.
|
32
|
+
*/
|
33
|
+
blobContext;
|
34
|
+
_name;
|
35
|
+
_containerName;
|
36
|
+
_versionId;
|
37
|
+
_snapshot;
|
31
38
|
/**
|
32
39
|
* The name of the blob.
|
33
40
|
*/
|
@@ -160,7 +167,7 @@ export class BlobClient extends StorageClient {
|
|
160
167
|
* * In Node.js, data returns in a Readable stream readableStreamBody
|
161
168
|
* * In browsers, data returns in a promise blobBody
|
162
169
|
*
|
163
|
-
* @see https://learn.microsoft.com/
|
170
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob
|
164
171
|
*
|
165
172
|
* @param offset - From which position of the blob to download, greater than or equal to 0
|
166
173
|
* @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
|
@@ -239,11 +246,13 @@ export class BlobClient extends StorageClient {
|
|
239
246
|
options.conditions = options.conditions || {};
|
240
247
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
241
248
|
return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => {
|
242
|
-
var _a;
|
243
249
|
const res = assertResponse(await this.blobContext.download({
|
244
250
|
abortSignal: options.abortSignal,
|
245
251
|
leaseAccessConditions: options.conditions,
|
246
|
-
modifiedAccessConditions:
|
252
|
+
modifiedAccessConditions: {
|
253
|
+
...options.conditions,
|
254
|
+
ifTags: options.conditions?.tagConditions,
|
255
|
+
},
|
247
256
|
requestOptions: {
|
248
257
|
onDownloadProgress: isNodeLike ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
|
249
258
|
},
|
@@ -254,7 +263,12 @@ export class BlobClient extends StorageClient {
|
|
254
263
|
cpkInfo: options.customerProvidedKey,
|
255
264
|
tracingOptions: updatedOptions.tracingOptions,
|
256
265
|
}));
|
257
|
-
const wrappedRes =
|
266
|
+
const wrappedRes = {
|
267
|
+
...res,
|
268
|
+
_response: res._response, // _response is made non-enumerable
|
269
|
+
objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,
|
270
|
+
objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules),
|
271
|
+
};
|
258
272
|
// Return browser response immediately
|
259
273
|
if (!isNodeLike) {
|
260
274
|
return wrappedRes;
|
@@ -275,7 +289,6 @@ export class BlobClient extends StorageClient {
|
|
275
289
|
throw new RangeError(`File download response doesn't contain valid etag header`);
|
276
290
|
}
|
277
291
|
return new BlobDownloadResponse(wrappedRes, async (start) => {
|
278
|
-
var _a;
|
279
292
|
const updatedDownloadOptions = {
|
280
293
|
leaseAccessConditions: options.conditions,
|
281
294
|
modifiedAccessConditions: {
|
@@ -283,7 +296,7 @@ export class BlobClient extends StorageClient {
|
|
283
296
|
ifModifiedSince: options.conditions.ifModifiedSince,
|
284
297
|
ifNoneMatch: options.conditions.ifNoneMatch,
|
285
298
|
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
|
286
|
-
ifTags:
|
299
|
+
ifTags: options.conditions?.tagConditions,
|
287
300
|
},
|
288
301
|
range: rangeToString({
|
289
302
|
count: offset + res.contentLength - start,
|
@@ -300,7 +313,10 @@ export class BlobClient extends StorageClient {
|
|
300
313
|
// updatedOptions.range
|
301
314
|
// }, options: ${JSON.stringify(updatedOptions)}`
|
302
315
|
// );
|
303
|
-
return (await this.blobContext.download(
|
316
|
+
return (await this.blobContext.download({
|
317
|
+
abortSignal: options.abortSignal,
|
318
|
+
...updatedDownloadOptions,
|
319
|
+
})).readableStreamBody;
|
304
320
|
}, offset, res.contentLength, {
|
305
321
|
maxRetryRequests: options.maxRetryRequests,
|
306
322
|
onProgress: options.onProgress,
|
@@ -346,7 +362,7 @@ export class BlobClient extends StorageClient {
|
|
346
362
|
/**
|
347
363
|
* Returns all user-defined metadata, standard HTTP properties, and system properties
|
348
364
|
* for the blob. It does not return the content of the blob.
|
349
|
-
* @see https://learn.microsoft.com/
|
365
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties
|
350
366
|
*
|
351
367
|
* WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
|
352
368
|
* they originally contained uppercase characters. This differs from the metadata keys returned by
|
@@ -359,15 +375,22 @@ export class BlobClient extends StorageClient {
|
|
359
375
|
options.conditions = options.conditions || {};
|
360
376
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
361
377
|
return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => {
|
362
|
-
var _a;
|
363
378
|
const res = assertResponse(await this.blobContext.getProperties({
|
364
379
|
abortSignal: options.abortSignal,
|
365
380
|
leaseAccessConditions: options.conditions,
|
366
|
-
modifiedAccessConditions:
|
381
|
+
modifiedAccessConditions: {
|
382
|
+
...options.conditions,
|
383
|
+
ifTags: options.conditions?.tagConditions,
|
384
|
+
},
|
367
385
|
cpkInfo: options.customerProvidedKey,
|
368
386
|
tracingOptions: updatedOptions.tracingOptions,
|
369
387
|
}));
|
370
|
-
return
|
388
|
+
return {
|
389
|
+
...res,
|
390
|
+
_response: res._response, // _response is made non-enumerable
|
391
|
+
objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,
|
392
|
+
objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules),
|
393
|
+
};
|
371
394
|
});
|
372
395
|
}
|
373
396
|
/**
|
@@ -375,19 +398,21 @@ export class BlobClient extends StorageClient {
|
|
375
398
|
* during garbage collection. Note that in order to delete a blob, you must delete
|
376
399
|
* all of its snapshots. You can delete both at the same time with the Delete
|
377
400
|
* Blob operation.
|
378
|
-
* @see https://learn.microsoft.com/
|
401
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/delete-blob
|
379
402
|
*
|
380
403
|
* @param options - Optional options to Blob Delete operation.
|
381
404
|
*/
|
382
405
|
async delete(options = {}) {
|
383
406
|
options.conditions = options.conditions || {};
|
384
407
|
return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => {
|
385
|
-
var _a;
|
386
408
|
return assertResponse(await this.blobContext.delete({
|
387
409
|
abortSignal: options.abortSignal,
|
388
410
|
deleteSnapshots: options.deleteSnapshots,
|
389
411
|
leaseAccessConditions: options.conditions,
|
390
|
-
modifiedAccessConditions:
|
412
|
+
modifiedAccessConditions: {
|
413
|
+
...options.conditions,
|
414
|
+
ifTags: options.conditions?.tagConditions,
|
415
|
+
},
|
391
416
|
tracingOptions: updatedOptions.tracingOptions,
|
392
417
|
}));
|
393
418
|
});
|
@@ -397,20 +422,27 @@ export class BlobClient extends StorageClient {
|
|
397
422
|
* during garbage collection. Note that in order to delete a blob, you must delete
|
398
423
|
* all of its snapshots. You can delete both at the same time with the Delete
|
399
424
|
* Blob operation.
|
400
|
-
* @see https://learn.microsoft.com/
|
425
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/delete-blob
|
401
426
|
*
|
402
427
|
* @param options - Optional options to Blob Delete operation.
|
403
428
|
*/
|
404
429
|
async deleteIfExists(options = {}) {
|
405
430
|
return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => {
|
406
|
-
var _a, _b;
|
407
431
|
try {
|
408
432
|
const res = assertResponse(await this.delete(updatedOptions));
|
409
|
-
return
|
433
|
+
return {
|
434
|
+
succeeded: true,
|
435
|
+
...res,
|
436
|
+
_response: res._response, // _response is made non-enumerable
|
437
|
+
};
|
410
438
|
}
|
411
439
|
catch (e) {
|
412
|
-
if (
|
413
|
-
return
|
440
|
+
if (e.details?.errorCode === "BlobNotFound") {
|
441
|
+
return {
|
442
|
+
succeeded: false,
|
443
|
+
...e.response?.parsedHeaders,
|
444
|
+
_response: e.response,
|
445
|
+
};
|
414
446
|
}
|
415
447
|
throw e;
|
416
448
|
}
|
@@ -420,7 +452,7 @@ export class BlobClient extends StorageClient {
|
|
420
452
|
* Restores the contents and metadata of soft deleted blob and any associated
|
421
453
|
* soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29
|
422
454
|
* or later.
|
423
|
-
* @see https://learn.microsoft.com/
|
455
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob
|
424
456
|
*
|
425
457
|
* @param options - Optional options to Blob Undelete operation.
|
426
458
|
*/
|
@@ -437,7 +469,7 @@ export class BlobClient extends StorageClient {
|
|
437
469
|
*
|
438
470
|
* If no value provided, or no value provided for the specified blob HTTP headers,
|
439
471
|
* these blob HTTP headers without a value will be cleared.
|
440
|
-
* @see https://learn.microsoft.com/
|
472
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties
|
441
473
|
*
|
442
474
|
* @param blobHTTPHeaders - If no value provided, or no value provided for
|
443
475
|
* the specified blob HTTP headers, these blob HTTP
|
@@ -451,12 +483,14 @@ export class BlobClient extends StorageClient {
|
|
451
483
|
options.conditions = options.conditions || {};
|
452
484
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
453
485
|
return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => {
|
454
|
-
var _a;
|
455
486
|
return assertResponse(await this.blobContext.setHttpHeaders({
|
456
487
|
abortSignal: options.abortSignal,
|
457
488
|
blobHttpHeaders: blobHTTPHeaders,
|
458
489
|
leaseAccessConditions: options.conditions,
|
459
|
-
modifiedAccessConditions:
|
490
|
+
modifiedAccessConditions: {
|
491
|
+
...options.conditions,
|
492
|
+
ifTags: options.conditions?.tagConditions,
|
493
|
+
},
|
460
494
|
// cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger.
|
461
495
|
tracingOptions: updatedOptions.tracingOptions,
|
462
496
|
}));
|
@@ -467,7 +501,7 @@ export class BlobClient extends StorageClient {
|
|
467
501
|
*
|
468
502
|
* If no option provided, or no metadata defined in the parameter, the blob
|
469
503
|
* metadata will be removed.
|
470
|
-
* @see https://learn.microsoft.com/
|
504
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata
|
471
505
|
*
|
472
506
|
* @param metadata - Replace existing metadata with this value.
|
473
507
|
* If no value provided the existing metadata will be removed.
|
@@ -477,12 +511,14 @@ export class BlobClient extends StorageClient {
|
|
477
511
|
options.conditions = options.conditions || {};
|
478
512
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
479
513
|
return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => {
|
480
|
-
var _a;
|
481
514
|
return assertResponse(await this.blobContext.setMetadata({
|
482
515
|
abortSignal: options.abortSignal,
|
483
516
|
leaseAccessConditions: options.conditions,
|
484
517
|
metadata,
|
485
|
-
modifiedAccessConditions:
|
518
|
+
modifiedAccessConditions: {
|
519
|
+
...options.conditions,
|
520
|
+
ifTags: options.conditions?.tagConditions,
|
521
|
+
},
|
486
522
|
cpkInfo: options.customerProvidedKey,
|
487
523
|
encryptionScope: options.encryptionScope,
|
488
524
|
tracingOptions: updatedOptions.tracingOptions,
|
@@ -500,11 +536,13 @@ export class BlobClient extends StorageClient {
|
|
500
536
|
*/
|
501
537
|
async setTags(tags, options = {}) {
|
502
538
|
return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => {
|
503
|
-
var _a;
|
504
539
|
return assertResponse(await this.blobContext.setTags({
|
505
540
|
abortSignal: options.abortSignal,
|
506
541
|
leaseAccessConditions: options.conditions,
|
507
|
-
modifiedAccessConditions:
|
542
|
+
modifiedAccessConditions: {
|
543
|
+
...options.conditions,
|
544
|
+
ifTags: options.conditions?.tagConditions,
|
545
|
+
},
|
508
546
|
tracingOptions: updatedOptions.tracingOptions,
|
509
547
|
tags: toBlobTags(tags),
|
510
548
|
}));
|
@@ -517,14 +555,20 @@ export class BlobClient extends StorageClient {
|
|
517
555
|
*/
|
518
556
|
async getTags(options = {}) {
|
519
557
|
return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => {
|
520
|
-
var _a;
|
521
558
|
const response = assertResponse(await this.blobContext.getTags({
|
522
559
|
abortSignal: options.abortSignal,
|
523
560
|
leaseAccessConditions: options.conditions,
|
524
|
-
modifiedAccessConditions:
|
561
|
+
modifiedAccessConditions: {
|
562
|
+
...options.conditions,
|
563
|
+
ifTags: options.conditions?.tagConditions,
|
564
|
+
},
|
525
565
|
tracingOptions: updatedOptions.tracingOptions,
|
526
566
|
}));
|
527
|
-
const wrappedResponse =
|
567
|
+
const wrappedResponse = {
|
568
|
+
...response,
|
569
|
+
_response: response._response, // _response is made non-enumerable
|
570
|
+
tags: toTags({ blobTagSet: response.blobTagSet }) || {},
|
571
|
+
};
|
528
572
|
return wrappedResponse;
|
529
573
|
});
|
530
574
|
}
|
@@ -539,7 +583,7 @@ export class BlobClient extends StorageClient {
|
|
539
583
|
}
|
540
584
|
/**
|
541
585
|
* Creates a read-only snapshot of a blob.
|
542
|
-
* @see https://learn.microsoft.com/
|
586
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob
|
543
587
|
*
|
544
588
|
* @param options - Optional options to the Blob Create Snapshot operation.
|
545
589
|
*/
|
@@ -547,12 +591,14 @@ export class BlobClient extends StorageClient {
|
|
547
591
|
options.conditions = options.conditions || {};
|
548
592
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
549
593
|
return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => {
|
550
|
-
var _a;
|
551
594
|
return assertResponse(await this.blobContext.createSnapshot({
|
552
595
|
abortSignal: options.abortSignal,
|
553
596
|
leaseAccessConditions: options.conditions,
|
554
597
|
metadata: options.metadata,
|
555
|
-
modifiedAccessConditions:
|
598
|
+
modifiedAccessConditions: {
|
599
|
+
...options.conditions,
|
600
|
+
ifTags: options.conditions?.tagConditions,
|
601
|
+
},
|
556
602
|
cpkInfo: options.customerProvidedKey,
|
557
603
|
encryptionScope: options.encryptionScope,
|
558
604
|
tracingOptions: updatedOptions.tracingOptions,
|
@@ -573,7 +619,7 @@ export class BlobClient extends StorageClient {
|
|
573
619
|
* an Azure file in any Azure storage account.
|
574
620
|
* Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
|
575
621
|
* operation to copy from another storage account.
|
576
|
-
* @see https://learn.microsoft.com/
|
622
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/copy-blob
|
577
623
|
*
|
578
624
|
* ```ts snippet:ClientsBeginCopyFromURL
|
579
625
|
* import { BlobServiceClient } from "@azure/storage-blob";
|
@@ -654,7 +700,7 @@ export class BlobClient extends StorageClient {
|
|
654
700
|
/**
|
655
701
|
* Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero
|
656
702
|
* length and full metadata. Version 2012-02-12 and newer.
|
657
|
-
* @see https://learn.microsoft.com/
|
703
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob
|
658
704
|
*
|
659
705
|
* @param copyId - Id of the Copy From URL operation.
|
660
706
|
* @param options - Optional options to the Blob Abort Copy From URL operation.
|
@@ -671,7 +717,7 @@ export class BlobClient extends StorageClient {
|
|
671
717
|
/**
|
672
718
|
* The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not
|
673
719
|
* return a response until the copy is complete.
|
674
|
-
* @see https://learn.microsoft.com/
|
720
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url
|
675
721
|
*
|
676
722
|
* @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication
|
677
723
|
* @param options -
|
@@ -680,24 +726,26 @@ export class BlobClient extends StorageClient {
|
|
680
726
|
options.conditions = options.conditions || {};
|
681
727
|
options.sourceConditions = options.sourceConditions || {};
|
682
728
|
return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => {
|
683
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
684
729
|
return assertResponse(await this.blobContext.copyFromURL(copySource, {
|
685
730
|
abortSignal: options.abortSignal,
|
686
731
|
metadata: options.metadata,
|
687
732
|
leaseAccessConditions: options.conditions,
|
688
|
-
modifiedAccessConditions:
|
733
|
+
modifiedAccessConditions: {
|
734
|
+
...options.conditions,
|
735
|
+
ifTags: options.conditions?.tagConditions,
|
736
|
+
},
|
689
737
|
sourceModifiedAccessConditions: {
|
690
|
-
sourceIfMatch:
|
691
|
-
sourceIfModifiedSince:
|
692
|
-
sourceIfNoneMatch:
|
693
|
-
sourceIfUnmodifiedSince:
|
738
|
+
sourceIfMatch: options.sourceConditions?.ifMatch,
|
739
|
+
sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince,
|
740
|
+
sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch,
|
741
|
+
sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince,
|
694
742
|
},
|
695
743
|
sourceContentMD5: options.sourceContentMD5,
|
696
744
|
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
|
697
745
|
tier: toAccessTier(options.tier),
|
698
746
|
blobTagsString: toBlobTagsString(options.tags),
|
699
|
-
immutabilityPolicyExpiry:
|
700
|
-
immutabilityPolicyMode:
|
747
|
+
immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,
|
748
|
+
immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,
|
701
749
|
legalHold: options.legalHold,
|
702
750
|
encryptionScope: options.encryptionScope,
|
703
751
|
copySourceTags: options.copySourceTags,
|
@@ -712,25 +760,26 @@ export class BlobClient extends StorageClient {
|
|
712
760
|
* storage only). A premium page blob's tier determines the allowed size, IOPS,
|
713
761
|
* and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive
|
714
762
|
* storage type. This operation does not update the blob's ETag.
|
715
|
-
* @see https://learn.microsoft.com/
|
763
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier
|
716
764
|
*
|
717
765
|
* @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive.
|
718
766
|
* @param options - Optional options to the Blob Set Tier operation.
|
719
767
|
*/
|
720
768
|
async setAccessTier(tier, options = {}) {
|
721
769
|
return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => {
|
722
|
-
var _a;
|
723
770
|
return assertResponse(await this.blobContext.setTier(toAccessTier(tier), {
|
724
771
|
abortSignal: options.abortSignal,
|
725
772
|
leaseAccessConditions: options.conditions,
|
726
|
-
modifiedAccessConditions:
|
773
|
+
modifiedAccessConditions: {
|
774
|
+
...options.conditions,
|
775
|
+
ifTags: options.conditions?.tagConditions,
|
776
|
+
},
|
727
777
|
rehydratePriority: options.rehydratePriority,
|
728
778
|
tracingOptions: updatedOptions.tracingOptions,
|
729
779
|
}));
|
730
780
|
});
|
731
781
|
}
|
732
782
|
async downloadToBuffer(param1, param2, param3, param4 = {}) {
|
733
|
-
var _a;
|
734
783
|
let buffer;
|
735
784
|
let offset = 0;
|
736
785
|
let count = 0;
|
@@ -745,7 +794,7 @@ export class BlobClient extends StorageClient {
|
|
745
794
|
count = typeof param2 === "number" ? param2 : 0;
|
746
795
|
options = param3 || {};
|
747
796
|
}
|
748
|
-
let blockSize =
|
797
|
+
let blockSize = options.blockSize ?? 0;
|
749
798
|
if (blockSize < 0) {
|
750
799
|
throw new RangeError("blockSize option must be >= 0");
|
751
800
|
}
|
@@ -764,7 +813,10 @@ export class BlobClient extends StorageClient {
|
|
764
813
|
return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => {
|
765
814
|
// Customer doesn't specify length, get it
|
766
815
|
if (!count) {
|
767
|
-
const response = await this.getProperties(
|
816
|
+
const response = await this.getProperties({
|
817
|
+
...options,
|
818
|
+
tracingOptions: updatedOptions.tracingOptions,
|
819
|
+
});
|
768
820
|
count = response.contentLength - offset;
|
769
821
|
if (count < 0) {
|
770
822
|
throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`);
|
@@ -831,7 +883,10 @@ export class BlobClient extends StorageClient {
|
|
831
883
|
*/
|
832
884
|
async downloadToFile(filePath, offset = 0, count, options = {}) {
|
833
885
|
return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => {
|
834
|
-
const response = await this.download(offset, count,
|
886
|
+
const response = await this.download(offset, count, {
|
887
|
+
...options,
|
888
|
+
tracingOptions: updatedOptions.tracingOptions,
|
889
|
+
});
|
835
890
|
if (response.readableStreamBody) {
|
836
891
|
await readStreamToLocalFile(response.readableStreamBody, filePath);
|
837
892
|
}
|
@@ -897,21 +952,23 @@ export class BlobClient extends StorageClient {
|
|
897
952
|
* an Azure file in any Azure storage account.
|
898
953
|
* Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
|
899
954
|
* operation to copy from another storage account.
|
900
|
-
* @see https://learn.microsoft.com/
|
955
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/copy-blob
|
901
956
|
*
|
902
957
|
* @param copySource - url to the source Azure Blob/File.
|
903
958
|
* @param options - Optional options to the Blob Start Copy From URL operation.
|
904
959
|
*/
|
905
960
|
async startCopyFromURL(copySource, options = {}) {
|
906
961
|
return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => {
|
907
|
-
var _a, _b, _c;
|
908
962
|
options.conditions = options.conditions || {};
|
909
963
|
options.sourceConditions = options.sourceConditions || {};
|
910
964
|
return assertResponse(await this.blobContext.startCopyFromURL(copySource, {
|
911
965
|
abortSignal: options.abortSignal,
|
912
966
|
leaseAccessConditions: options.conditions,
|
913
967
|
metadata: options.metadata,
|
914
|
-
modifiedAccessConditions:
|
968
|
+
modifiedAccessConditions: {
|
969
|
+
...options.conditions,
|
970
|
+
ifTags: options.conditions?.tagConditions,
|
971
|
+
},
|
915
972
|
sourceModifiedAccessConditions: {
|
916
973
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
917
974
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
@@ -919,8 +976,8 @@ export class BlobClient extends StorageClient {
|
|
919
976
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
920
977
|
sourceIfTags: options.sourceConditions.tagConditions,
|
921
978
|
},
|
922
|
-
immutabilityPolicyExpiry:
|
923
|
-
immutabilityPolicyMode:
|
979
|
+
immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,
|
980
|
+
immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,
|
924
981
|
legalHold: options.legalHold,
|
925
982
|
rehydratePriority: options.rehydratePriority,
|
926
983
|
tier: toAccessTier(options.tier),
|
@@ -936,7 +993,7 @@ export class BlobClient extends StorageClient {
|
|
936
993
|
* Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties
|
937
994
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
938
995
|
*
|
939
|
-
* @see https://learn.microsoft.com/
|
996
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
940
997
|
*
|
941
998
|
* @param options - Optional parameters.
|
942
999
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
@@ -946,7 +1003,13 @@ export class BlobClient extends StorageClient {
|
|
946
1003
|
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
947
1004
|
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
948
1005
|
}
|
949
|
-
const sas = generateBlobSASQueryParameters(
|
1006
|
+
const sas = generateBlobSASQueryParameters({
|
1007
|
+
containerName: this._containerName,
|
1008
|
+
blobName: this._name,
|
1009
|
+
snapshotTime: this._snapshot,
|
1010
|
+
versionId: this._versionId,
|
1011
|
+
...options,
|
1012
|
+
}, this.credential).toString();
|
950
1013
|
resolve(appendToURLQuery(this.url, sas));
|
951
1014
|
});
|
952
1015
|
}
|
@@ -956,7 +1019,7 @@ export class BlobClient extends StorageClient {
|
|
956
1019
|
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
|
957
1020
|
* the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
|
958
1021
|
*
|
959
|
-
* @see https://learn.microsoft.com/
|
1022
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
960
1023
|
*
|
961
1024
|
* @param options - Optional parameters.
|
962
1025
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
@@ -966,14 +1029,20 @@ export class BlobClient extends StorageClient {
|
|
966
1029
|
if (!(this.credential instanceof StorageSharedKeyCredential)) {
|
967
1030
|
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
968
1031
|
}
|
969
|
-
return generateBlobSASQueryParametersInternal(
|
1032
|
+
return generateBlobSASQueryParametersInternal({
|
1033
|
+
containerName: this._containerName,
|
1034
|
+
blobName: this._name,
|
1035
|
+
snapshotTime: this._snapshot,
|
1036
|
+
versionId: this._versionId,
|
1037
|
+
...options,
|
1038
|
+
}, this.credential).stringToSign;
|
970
1039
|
}
|
971
1040
|
/**
|
972
1041
|
*
|
973
1042
|
* Generates a Blob Service Shared Access Signature (SAS) URI based on
|
974
1043
|
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
975
1044
|
*
|
976
|
-
* @see https://learn.microsoft.com/
|
1045
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
977
1046
|
*
|
978
1047
|
* @param options - Optional parameters.
|
979
1048
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
@@ -981,7 +1050,13 @@ export class BlobClient extends StorageClient {
|
|
981
1050
|
*/
|
982
1051
|
generateUserDelegationSasUrl(options, userDelegationKey) {
|
983
1052
|
return new Promise((resolve) => {
|
984
|
-
const sas = generateBlobSASQueryParameters(
|
1053
|
+
const sas = generateBlobSASQueryParameters({
|
1054
|
+
containerName: this._containerName,
|
1055
|
+
blobName: this._name,
|
1056
|
+
snapshotTime: this._snapshot,
|
1057
|
+
versionId: this._versionId,
|
1058
|
+
...options,
|
1059
|
+
}, userDelegationKey, this.accountName).toString();
|
985
1060
|
resolve(appendToURLQuery(this.url, sas));
|
986
1061
|
});
|
987
1062
|
}
|
@@ -991,14 +1066,20 @@ export class BlobClient extends StorageClient {
|
|
991
1066
|
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
|
992
1067
|
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
993
1068
|
*
|
994
|
-
* @see https://learn.microsoft.com/
|
1069
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
995
1070
|
*
|
996
1071
|
* @param options - Optional parameters.
|
997
1072
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
998
1073
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
999
1074
|
*/
|
1000
1075
|
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
1001
|
-
return generateBlobSASQueryParametersInternal(
|
1076
|
+
return generateBlobSASQueryParametersInternal({
|
1077
|
+
containerName: this._containerName,
|
1078
|
+
blobName: this._name,
|
1079
|
+
snapshotTime: this._snapshot,
|
1080
|
+
versionId: this._versionId,
|
1081
|
+
...options,
|
1082
|
+
}, userDelegationKey, this.accountName).stringToSign;
|
1002
1083
|
}
|
1003
1084
|
/**
|
1004
1085
|
* Delete the immutablility policy on the blob.
|
@@ -1043,7 +1124,7 @@ export class BlobClient extends StorageClient {
|
|
1043
1124
|
* for the specified account.
|
1044
1125
|
* The Get Account Information operation is available on service versions beginning
|
1045
1126
|
* with version 2018-03-28.
|
1046
|
-
* @see https://learn.microsoft.com/
|
1127
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-account-information
|
1047
1128
|
*
|
1048
1129
|
* @param options - Options to the Service Get Account Info operation.
|
1049
1130
|
* @returns Response data for the Service Get Account Info operation.
|
@@ -1061,6 +1142,10 @@ export class BlobClient extends StorageClient {
|
|
1061
1142
|
* AppendBlobClient defines a set of operations applicable to append blobs.
|
1062
1143
|
*/
|
1063
1144
|
export class AppendBlobClient extends BlobClient {
|
1145
|
+
/**
|
1146
|
+
* appendBlobsContext provided by protocol layer.
|
1147
|
+
*/
|
1148
|
+
appendBlobContext;
|
1064
1149
|
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
1065
1150
|
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
1066
1151
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
@@ -1170,17 +1255,19 @@ export class AppendBlobClient extends BlobClient {
|
|
1170
1255
|
options.conditions = options.conditions || {};
|
1171
1256
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1172
1257
|
return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => {
|
1173
|
-
var _a, _b, _c;
|
1174
1258
|
return assertResponse(await this.appendBlobContext.create(0, {
|
1175
1259
|
abortSignal: options.abortSignal,
|
1176
1260
|
blobHttpHeaders: options.blobHTTPHeaders,
|
1177
1261
|
leaseAccessConditions: options.conditions,
|
1178
1262
|
metadata: options.metadata,
|
1179
|
-
modifiedAccessConditions:
|
1263
|
+
modifiedAccessConditions: {
|
1264
|
+
...options.conditions,
|
1265
|
+
ifTags: options.conditions?.tagConditions,
|
1266
|
+
},
|
1180
1267
|
cpkInfo: options.customerProvidedKey,
|
1181
1268
|
encryptionScope: options.encryptionScope,
|
1182
|
-
immutabilityPolicyExpiry:
|
1183
|
-
immutabilityPolicyMode:
|
1269
|
+
immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,
|
1270
|
+
immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,
|
1184
1271
|
legalHold: options.legalHold,
|
1185
1272
|
blobTagsString: toBlobTagsString(options.tags),
|
1186
1273
|
tracingOptions: updatedOptions.tracingOptions,
|
@@ -1197,14 +1284,24 @@ export class AppendBlobClient extends BlobClient {
|
|
1197
1284
|
async createIfNotExists(options = {}) {
|
1198
1285
|
const conditions = { ifNoneMatch: ETagAny };
|
1199
1286
|
return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => {
|
1200
|
-
var _a, _b;
|
1201
1287
|
try {
|
1202
|
-
const res = assertResponse(await this.create(
|
1203
|
-
|
1288
|
+
const res = assertResponse(await this.create({
|
1289
|
+
...updatedOptions,
|
1290
|
+
conditions,
|
1291
|
+
}));
|
1292
|
+
return {
|
1293
|
+
succeeded: true,
|
1294
|
+
...res,
|
1295
|
+
_response: res._response, // _response is made non-enumerable
|
1296
|
+
};
|
1204
1297
|
}
|
1205
1298
|
catch (e) {
|
1206
|
-
if (
|
1207
|
-
return
|
1299
|
+
if (e.details?.errorCode === "BlobAlreadyExists") {
|
1300
|
+
return {
|
1301
|
+
succeeded: false,
|
1302
|
+
...e.response?.parsedHeaders,
|
1303
|
+
_response: e.response,
|
1304
|
+
};
|
1208
1305
|
}
|
1209
1306
|
throw e;
|
1210
1307
|
}
|
@@ -1218,12 +1315,14 @@ export class AppendBlobClient extends BlobClient {
|
|
1218
1315
|
async seal(options = {}) {
|
1219
1316
|
options.conditions = options.conditions || {};
|
1220
1317
|
return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => {
|
1221
|
-
var _a;
|
1222
1318
|
return assertResponse(await this.appendBlobContext.seal({
|
1223
1319
|
abortSignal: options.abortSignal,
|
1224
1320
|
appendPositionAccessConditions: options.conditions,
|
1225
1321
|
leaseAccessConditions: options.conditions,
|
1226
|
-
modifiedAccessConditions:
|
1322
|
+
modifiedAccessConditions: {
|
1323
|
+
...options.conditions,
|
1324
|
+
ifTags: options.conditions?.tagConditions,
|
1325
|
+
},
|
1227
1326
|
tracingOptions: updatedOptions.tracingOptions,
|
1228
1327
|
}));
|
1229
1328
|
});
|
@@ -1269,12 +1368,14 @@ export class AppendBlobClient extends BlobClient {
|
|
1269
1368
|
options.conditions = options.conditions || {};
|
1270
1369
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1271
1370
|
return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => {
|
1272
|
-
var _a;
|
1273
1371
|
return assertResponse(await this.appendBlobContext.appendBlock(contentLength, body, {
|
1274
1372
|
abortSignal: options.abortSignal,
|
1275
1373
|
appendPositionAccessConditions: options.conditions,
|
1276
1374
|
leaseAccessConditions: options.conditions,
|
1277
|
-
modifiedAccessConditions:
|
1375
|
+
modifiedAccessConditions: {
|
1376
|
+
...options.conditions,
|
1377
|
+
ifTags: options.conditions?.tagConditions,
|
1378
|
+
},
|
1278
1379
|
requestOptions: {
|
1279
1380
|
onUploadProgress: options.onProgress,
|
1280
1381
|
},
|
@@ -1289,7 +1390,7 @@ export class AppendBlobClient extends BlobClient {
|
|
1289
1390
|
/**
|
1290
1391
|
* The Append Block operation commits a new block of data to the end of an existing append blob
|
1291
1392
|
* where the contents are read from a source url.
|
1292
|
-
* @see https://learn.microsoft.com/
|
1393
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url
|
1293
1394
|
*
|
1294
1395
|
* @param sourceURL -
|
1295
1396
|
* The url to the blob that will be the source of the copy. A source blob in the same storage account can
|
@@ -1305,7 +1406,6 @@ export class AppendBlobClient extends BlobClient {
|
|
1305
1406
|
options.sourceConditions = options.sourceConditions || {};
|
1306
1407
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1307
1408
|
return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => {
|
1308
|
-
var _a, _b, _c, _d, _e;
|
1309
1409
|
return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, {
|
1310
1410
|
abortSignal: options.abortSignal,
|
1311
1411
|
sourceRange: rangeToString({ offset: sourceOffset, count }),
|
@@ -1313,12 +1413,15 @@ export class AppendBlobClient extends BlobClient {
|
|
1313
1413
|
sourceContentCrc64: options.sourceContentCrc64,
|
1314
1414
|
leaseAccessConditions: options.conditions,
|
1315
1415
|
appendPositionAccessConditions: options.conditions,
|
1316
|
-
modifiedAccessConditions:
|
1416
|
+
modifiedAccessConditions: {
|
1417
|
+
...options.conditions,
|
1418
|
+
ifTags: options.conditions?.tagConditions,
|
1419
|
+
},
|
1317
1420
|
sourceModifiedAccessConditions: {
|
1318
|
-
sourceIfMatch:
|
1319
|
-
sourceIfModifiedSince:
|
1320
|
-
sourceIfNoneMatch:
|
1321
|
-
sourceIfUnmodifiedSince:
|
1421
|
+
sourceIfMatch: options.sourceConditions?.ifMatch,
|
1422
|
+
sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince,
|
1423
|
+
sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch,
|
1424
|
+
sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince,
|
1322
1425
|
},
|
1323
1426
|
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
|
1324
1427
|
cpkInfo: options.customerProvidedKey,
|
@@ -1333,6 +1436,17 @@ export class AppendBlobClient extends BlobClient {
|
|
1333
1436
|
* BlockBlobClient defines a set of operations applicable to block blobs.
|
1334
1437
|
*/
|
1335
1438
|
export class BlockBlobClient extends BlobClient {
|
1439
|
+
/**
|
1440
|
+
* blobContext provided by protocol layer.
|
1441
|
+
*
|
1442
|
+
* Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API
|
1443
|
+
* extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient.
|
1444
|
+
*/
|
1445
|
+
_blobContext;
|
1446
|
+
/**
|
1447
|
+
* blockBlobContext provided by protocol layer.
|
1448
|
+
*/
|
1449
|
+
blockBlobContext;
|
1336
1450
|
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
1337
1451
|
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
1338
1452
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
@@ -1468,7 +1582,6 @@ export class BlockBlobClient extends BlobClient {
|
|
1468
1582
|
throw new Error("This operation currently is only supported in Node.js.");
|
1469
1583
|
}
|
1470
1584
|
return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => {
|
1471
|
-
var _a;
|
1472
1585
|
const response = assertResponse(await this._blobContext.query({
|
1473
1586
|
abortSignal: options.abortSignal,
|
1474
1587
|
queryRequest: {
|
@@ -1478,7 +1591,10 @@ export class BlockBlobClient extends BlobClient {
|
|
1478
1591
|
outputSerialization: toQuerySerialization(options.outputTextConfiguration),
|
1479
1592
|
},
|
1480
1593
|
leaseAccessConditions: options.conditions,
|
1481
|
-
modifiedAccessConditions:
|
1594
|
+
modifiedAccessConditions: {
|
1595
|
+
...options.conditions,
|
1596
|
+
ifTags: options.conditions?.tagConditions,
|
1597
|
+
},
|
1482
1598
|
cpkInfo: options.customerProvidedKey,
|
1483
1599
|
tracingOptions: updatedOptions.tracingOptions,
|
1484
1600
|
}));
|
@@ -1534,20 +1650,22 @@ export class BlockBlobClient extends BlobClient {
|
|
1534
1650
|
options.conditions = options.conditions || {};
|
1535
1651
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1536
1652
|
return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => {
|
1537
|
-
var _a, _b, _c;
|
1538
1653
|
return assertResponse(await this.blockBlobContext.upload(contentLength, body, {
|
1539
1654
|
abortSignal: options.abortSignal,
|
1540
1655
|
blobHttpHeaders: options.blobHTTPHeaders,
|
1541
1656
|
leaseAccessConditions: options.conditions,
|
1542
1657
|
metadata: options.metadata,
|
1543
|
-
modifiedAccessConditions:
|
1658
|
+
modifiedAccessConditions: {
|
1659
|
+
...options.conditions,
|
1660
|
+
ifTags: options.conditions?.tagConditions,
|
1661
|
+
},
|
1544
1662
|
requestOptions: {
|
1545
1663
|
onUploadProgress: options.onProgress,
|
1546
1664
|
},
|
1547
1665
|
cpkInfo: options.customerProvidedKey,
|
1548
1666
|
encryptionScope: options.encryptionScope,
|
1549
|
-
immutabilityPolicyExpiry:
|
1550
|
-
immutabilityPolicyMode:
|
1667
|
+
immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,
|
1668
|
+
immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,
|
1551
1669
|
legalHold: options.legalHold,
|
1552
1670
|
tier: toAccessTier(options.tier),
|
1553
1671
|
blobTagsString: toBlobTagsString(options.tags),
|
@@ -1577,14 +1695,29 @@ export class BlockBlobClient extends BlobClient {
|
|
1577
1695
|
options.conditions = options.conditions || {};
|
1578
1696
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1579
1697
|
return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => {
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
},
|
1698
|
+
return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, {
|
1699
|
+
...options,
|
1700
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1701
|
+
leaseAccessConditions: options.conditions,
|
1702
|
+
modifiedAccessConditions: {
|
1703
|
+
...options.conditions,
|
1704
|
+
ifTags: options.conditions?.tagConditions,
|
1705
|
+
},
|
1706
|
+
sourceModifiedAccessConditions: {
|
1707
|
+
sourceIfMatch: options.sourceConditions?.ifMatch,
|
1708
|
+
sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince,
|
1709
|
+
sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch,
|
1710
|
+
sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince,
|
1711
|
+
sourceIfTags: options.sourceConditions?.tagConditions,
|
1712
|
+
},
|
1713
|
+
cpkInfo: options.customerProvidedKey,
|
1714
|
+
copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization),
|
1715
|
+
tier: toAccessTier(options.tier),
|
1716
|
+
blobTagsString: toBlobTagsString(options.tags),
|
1717
|
+
copySourceTags: options.copySourceTags,
|
1718
|
+
fileRequestIntent: options.sourceShareTokenIntent,
|
1719
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1720
|
+
}));
|
1588
1721
|
});
|
1589
1722
|
}
|
1590
1723
|
/**
|
@@ -1619,7 +1752,7 @@ export class BlockBlobClient extends BlobClient {
|
|
1619
1752
|
* The Stage Block From URL operation creates a new block to be committed as part
|
1620
1753
|
* of a blob where the contents are read from a URL.
|
1621
1754
|
* This API is available starting in version 2018-03-28.
|
1622
|
-
* @see https://learn.microsoft.com/
|
1755
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url
|
1623
1756
|
*
|
1624
1757
|
* @param blockId - A 64-byte value that is base64-encoded
|
1625
1758
|
* @param sourceURL - Specifies the URL of the blob. The value
|
@@ -1669,17 +1802,19 @@ export class BlockBlobClient extends BlobClient {
|
|
1669
1802
|
options.conditions = options.conditions || {};
|
1670
1803
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
1671
1804
|
return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => {
|
1672
|
-
var _a, _b, _c;
|
1673
1805
|
return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks }, {
|
1674
1806
|
abortSignal: options.abortSignal,
|
1675
1807
|
blobHttpHeaders: options.blobHTTPHeaders,
|
1676
1808
|
leaseAccessConditions: options.conditions,
|
1677
1809
|
metadata: options.metadata,
|
1678
|
-
modifiedAccessConditions:
|
1810
|
+
modifiedAccessConditions: {
|
1811
|
+
...options.conditions,
|
1812
|
+
ifTags: options.conditions?.tagConditions,
|
1813
|
+
},
|
1679
1814
|
cpkInfo: options.customerProvidedKey,
|
1680
1815
|
encryptionScope: options.encryptionScope,
|
1681
|
-
immutabilityPolicyExpiry:
|
1682
|
-
immutabilityPolicyMode:
|
1816
|
+
immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,
|
1817
|
+
immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,
|
1683
1818
|
legalHold: options.legalHold,
|
1684
1819
|
tier: toAccessTier(options.tier),
|
1685
1820
|
blobTagsString: toBlobTagsString(options.tags),
|
@@ -1699,11 +1834,13 @@ export class BlockBlobClient extends BlobClient {
|
|
1699
1834
|
*/
|
1700
1835
|
async getBlockList(listType, options = {}) {
|
1701
1836
|
return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => {
|
1702
|
-
var _a;
|
1703
1837
|
const res = assertResponse(await this.blockBlobContext.getBlockList(listType, {
|
1704
1838
|
abortSignal: options.abortSignal,
|
1705
1839
|
leaseAccessConditions: options.conditions,
|
1706
|
-
modifiedAccessConditions:
|
1840
|
+
modifiedAccessConditions: {
|
1841
|
+
...options.conditions,
|
1842
|
+
ifTags: options.conditions?.tagConditions,
|
1843
|
+
},
|
1707
1844
|
tracingOptions: updatedOptions.tracingOptions,
|
1708
1845
|
}));
|
1709
1846
|
if (!res.committedBlocks) {
|
@@ -1794,12 +1931,11 @@ export class BlockBlobClient extends BlobClient {
|
|
1794
1931
|
* @returns Response data for the Blob Upload operation.
|
1795
1932
|
*/
|
1796
1933
|
async uploadSeekableInternal(bodyFactory, size, options = {}) {
|
1797
|
-
|
1798
|
-
let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0;
|
1934
|
+
let blockSize = options.blockSize ?? 0;
|
1799
1935
|
if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {
|
1800
1936
|
throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`);
|
1801
1937
|
}
|
1802
|
-
const maxSingleShotSize =
|
1938
|
+
const maxSingleShotSize = options.maxSingleShotSize ?? BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;
|
1803
1939
|
if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) {
|
1804
1940
|
throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`);
|
1805
1941
|
}
|
@@ -1882,7 +2018,10 @@ export class BlockBlobClient extends BlobClient {
|
|
1882
2018
|
end: count ? offset + count - 1 : Infinity,
|
1883
2019
|
start: offset,
|
1884
2020
|
});
|
1885
|
-
}, size,
|
2021
|
+
}, size, {
|
2022
|
+
...options,
|
2023
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2024
|
+
});
|
1886
2025
|
});
|
1887
2026
|
}
|
1888
2027
|
/**
|
@@ -1935,7 +2074,10 @@ export class BlockBlobClient extends BlobClient {
|
|
1935
2074
|
// Outgoing queue shouldn't be empty.
|
1936
2075
|
Math.ceil((maxConcurrency / 4) * 3));
|
1937
2076
|
await scheduler.do();
|
1938
|
-
return assertResponse(await this.commitBlockList(blockList,
|
2077
|
+
return assertResponse(await this.commitBlockList(blockList, {
|
2078
|
+
...options,
|
2079
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2080
|
+
}));
|
1939
2081
|
});
|
1940
2082
|
}
|
1941
2083
|
}
|
@@ -1943,6 +2085,10 @@ export class BlockBlobClient extends BlobClient {
|
|
1943
2085
|
* PageBlobClient defines a set of operations applicable to page blobs.
|
1944
2086
|
*/
|
1945
2087
|
export class PageBlobClient extends BlobClient {
|
2088
|
+
/**
|
2089
|
+
* pageBlobsContext provided by protocol layer.
|
2090
|
+
*/
|
2091
|
+
pageBlobContext;
|
1946
2092
|
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
1947
2093
|
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
1948
2094
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
@@ -2034,18 +2180,20 @@ export class PageBlobClient extends BlobClient {
|
|
2034
2180
|
options.conditions = options.conditions || {};
|
2035
2181
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
2036
2182
|
return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => {
|
2037
|
-
var _a, _b, _c;
|
2038
2183
|
return assertResponse(await this.pageBlobContext.create(0, size, {
|
2039
2184
|
abortSignal: options.abortSignal,
|
2040
2185
|
blobHttpHeaders: options.blobHTTPHeaders,
|
2041
2186
|
blobSequenceNumber: options.blobSequenceNumber,
|
2042
2187
|
leaseAccessConditions: options.conditions,
|
2043
2188
|
metadata: options.metadata,
|
2044
|
-
modifiedAccessConditions:
|
2189
|
+
modifiedAccessConditions: {
|
2190
|
+
...options.conditions,
|
2191
|
+
ifTags: options.conditions?.tagConditions,
|
2192
|
+
},
|
2045
2193
|
cpkInfo: options.customerProvidedKey,
|
2046
2194
|
encryptionScope: options.encryptionScope,
|
2047
|
-
immutabilityPolicyExpiry:
|
2048
|
-
immutabilityPolicyMode:
|
2195
|
+
immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn,
|
2196
|
+
immutabilityPolicyMode: options.immutabilityPolicy?.policyMode,
|
2049
2197
|
legalHold: options.legalHold,
|
2050
2198
|
tier: toAccessTier(options.tier),
|
2051
2199
|
blobTagsString: toBlobTagsString(options.tags),
|
@@ -2064,15 +2212,26 @@ export class PageBlobClient extends BlobClient {
|
|
2064
2212
|
*/
|
2065
2213
|
async createIfNotExists(size, options = {}) {
|
2066
2214
|
return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => {
|
2067
|
-
var _a, _b;
|
2068
2215
|
try {
|
2069
2216
|
const conditions = { ifNoneMatch: ETagAny };
|
2070
|
-
const res = assertResponse(await this.create(size,
|
2071
|
-
|
2217
|
+
const res = assertResponse(await this.create(size, {
|
2218
|
+
...options,
|
2219
|
+
conditions,
|
2220
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2221
|
+
}));
|
2222
|
+
return {
|
2223
|
+
succeeded: true,
|
2224
|
+
...res,
|
2225
|
+
_response: res._response, // _response is made non-enumerable
|
2226
|
+
};
|
2072
2227
|
}
|
2073
2228
|
catch (e) {
|
2074
|
-
if (
|
2075
|
-
return
|
2229
|
+
if (e.details?.errorCode === "BlobAlreadyExists") {
|
2230
|
+
return {
|
2231
|
+
succeeded: false,
|
2232
|
+
...e.response?.parsedHeaders,
|
2233
|
+
_response: e.response,
|
2234
|
+
};
|
2076
2235
|
}
|
2077
2236
|
throw e;
|
2078
2237
|
}
|
@@ -2092,11 +2251,13 @@ export class PageBlobClient extends BlobClient {
|
|
2092
2251
|
options.conditions = options.conditions || {};
|
2093
2252
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
2094
2253
|
return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => {
|
2095
|
-
var _a;
|
2096
2254
|
return assertResponse(await this.pageBlobContext.uploadPages(count, body, {
|
2097
2255
|
abortSignal: options.abortSignal,
|
2098
2256
|
leaseAccessConditions: options.conditions,
|
2099
|
-
modifiedAccessConditions:
|
2257
|
+
modifiedAccessConditions: {
|
2258
|
+
...options.conditions,
|
2259
|
+
ifTags: options.conditions?.tagConditions,
|
2260
|
+
},
|
2100
2261
|
requestOptions: {
|
2101
2262
|
onUploadProgress: options.onProgress,
|
2102
2263
|
},
|
@@ -2113,7 +2274,7 @@ export class PageBlobClient extends BlobClient {
|
|
2113
2274
|
/**
|
2114
2275
|
* The Upload Pages operation writes a range of pages to a page blob where the
|
2115
2276
|
* contents are read from a URL.
|
2116
|
-
* @see https://learn.microsoft.com/
|
2277
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url
|
2117
2278
|
*
|
2118
2279
|
* @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication
|
2119
2280
|
* @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob
|
@@ -2126,19 +2287,21 @@ export class PageBlobClient extends BlobClient {
|
|
2126
2287
|
options.sourceConditions = options.sourceConditions || {};
|
2127
2288
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
2128
2289
|
return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => {
|
2129
|
-
var _a, _b, _c, _d, _e;
|
2130
2290
|
return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), {
|
2131
2291
|
abortSignal: options.abortSignal,
|
2132
2292
|
sourceContentMD5: options.sourceContentMD5,
|
2133
2293
|
sourceContentCrc64: options.sourceContentCrc64,
|
2134
2294
|
leaseAccessConditions: options.conditions,
|
2135
2295
|
sequenceNumberAccessConditions: options.conditions,
|
2136
|
-
modifiedAccessConditions:
|
2296
|
+
modifiedAccessConditions: {
|
2297
|
+
...options.conditions,
|
2298
|
+
ifTags: options.conditions?.tagConditions,
|
2299
|
+
},
|
2137
2300
|
sourceModifiedAccessConditions: {
|
2138
|
-
sourceIfMatch:
|
2139
|
-
sourceIfModifiedSince:
|
2140
|
-
sourceIfNoneMatch:
|
2141
|
-
sourceIfUnmodifiedSince:
|
2301
|
+
sourceIfMatch: options.sourceConditions?.ifMatch,
|
2302
|
+
sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince,
|
2303
|
+
sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch,
|
2304
|
+
sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince,
|
2142
2305
|
},
|
2143
2306
|
cpkInfo: options.customerProvidedKey,
|
2144
2307
|
encryptionScope: options.encryptionScope,
|
@@ -2160,11 +2323,13 @@ export class PageBlobClient extends BlobClient {
|
|
2160
2323
|
async clearPages(offset = 0, count, options = {}) {
|
2161
2324
|
options.conditions = options.conditions || {};
|
2162
2325
|
return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => {
|
2163
|
-
var _a;
|
2164
2326
|
return assertResponse(await this.pageBlobContext.clearPages(0, {
|
2165
2327
|
abortSignal: options.abortSignal,
|
2166
2328
|
leaseAccessConditions: options.conditions,
|
2167
|
-
modifiedAccessConditions:
|
2329
|
+
modifiedAccessConditions: {
|
2330
|
+
...options.conditions,
|
2331
|
+
ifTags: options.conditions?.tagConditions,
|
2332
|
+
},
|
2168
2333
|
range: rangeToString({ offset, count }),
|
2169
2334
|
sequenceNumberAccessConditions: options.conditions,
|
2170
2335
|
cpkInfo: options.customerProvidedKey,
|
@@ -2185,11 +2350,13 @@ export class PageBlobClient extends BlobClient {
|
|
2185
2350
|
async getPageRanges(offset = 0, count, options = {}) {
|
2186
2351
|
options.conditions = options.conditions || {};
|
2187
2352
|
return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => {
|
2188
|
-
var _a;
|
2189
2353
|
const response = assertResponse(await this.pageBlobContext.getPageRanges({
|
2190
2354
|
abortSignal: options.abortSignal,
|
2191
2355
|
leaseAccessConditions: options.conditions,
|
2192
|
-
modifiedAccessConditions:
|
2356
|
+
modifiedAccessConditions: {
|
2357
|
+
...options.conditions,
|
2358
|
+
ifTags: options.conditions?.tagConditions,
|
2359
|
+
},
|
2193
2360
|
range: rangeToString({ offset, count }),
|
2194
2361
|
tracingOptions: updatedOptions.tracingOptions,
|
2195
2362
|
}));
|
@@ -2210,11 +2377,13 @@ export class PageBlobClient extends BlobClient {
|
|
2210
2377
|
*/
|
2211
2378
|
async listPageRangesSegment(offset = 0, count, marker, options = {}) {
|
2212
2379
|
return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => {
|
2213
|
-
var _a;
|
2214
2380
|
return assertResponse(await this.pageBlobContext.getPageRanges({
|
2215
2381
|
abortSignal: options.abortSignal,
|
2216
2382
|
leaseAccessConditions: options.conditions,
|
2217
|
-
modifiedAccessConditions:
|
2383
|
+
modifiedAccessConditions: {
|
2384
|
+
...options.conditions,
|
2385
|
+
ifTags: options.conditions?.tagConditions,
|
2386
|
+
},
|
2218
2387
|
range: rangeToString({ offset, count }),
|
2219
2388
|
marker: marker,
|
2220
2389
|
maxPageSize: options.maxPageSize,
|
@@ -2236,17 +2405,15 @@ export class PageBlobClient extends BlobClient {
|
|
2236
2405
|
* items. The marker value is opaque to the client.
|
2237
2406
|
* @param options - Options to List Page Ranges operation.
|
2238
2407
|
*/
|
2239
|
-
listPageRangeItemSegments() {
|
2240
|
-
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
}
|
2249
|
-
});
|
2408
|
+
async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) {
|
2409
|
+
let getPageRangeItemSegmentsResponse;
|
2410
|
+
if (!!marker || marker === undefined) {
|
2411
|
+
do {
|
2412
|
+
getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options);
|
2413
|
+
marker = getPageRangeItemSegmentsResponse.continuationToken;
|
2414
|
+
yield await getPageRangeItemSegmentsResponse;
|
2415
|
+
} while (marker);
|
2416
|
+
}
|
2250
2417
|
}
|
2251
2418
|
/**
|
2252
2419
|
* Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
|
@@ -2255,26 +2422,11 @@ export class PageBlobClient extends BlobClient {
|
|
2255
2422
|
* @param count - Number of bytes to get.
|
2256
2423
|
* @param options - Options to List Page Ranges operation.
|
2257
2424
|
*/
|
2258
|
-
listPageRangeItems() {
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
for (var _d = true, _e = __asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
2264
|
-
_c = _f.value;
|
2265
|
-
_d = false;
|
2266
|
-
const getPageRangesSegment = _c;
|
2267
|
-
yield __await(yield* __asyncDelegator(__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
|
2268
|
-
}
|
2269
|
-
}
|
2270
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
2271
|
-
finally {
|
2272
|
-
try {
|
2273
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
2274
|
-
}
|
2275
|
-
finally { if (e_1) throw e_1.error; }
|
2276
|
-
}
|
2277
|
-
});
|
2425
|
+
async *listPageRangeItems(offset = 0, count, options = {}) {
|
2426
|
+
let marker;
|
2427
|
+
for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) {
|
2428
|
+
yield* ExtractPageRangeInfoItems(getPageRangesSegment);
|
2429
|
+
}
|
2278
2430
|
}
|
2279
2431
|
/**
|
2280
2432
|
* Returns an async iterable iterator to list of page ranges for a page blob.
|
@@ -2369,7 +2521,10 @@ export class PageBlobClient extends BlobClient {
|
|
2369
2521
|
* Return an AsyncIterableIterator that works a page at a time
|
2370
2522
|
*/
|
2371
2523
|
byPage: (settings = {}) => {
|
2372
|
-
return this.listPageRangeItemSegments(offset, count, settings.continuationToken,
|
2524
|
+
return this.listPageRangeItemSegments(offset, count, settings.continuationToken, {
|
2525
|
+
maxPageSize: settings.maxPageSize,
|
2526
|
+
...options,
|
2527
|
+
});
|
2373
2528
|
},
|
2374
2529
|
};
|
2375
2530
|
}
|
@@ -2386,11 +2541,13 @@ export class PageBlobClient extends BlobClient {
|
|
2386
2541
|
async getPageRangesDiff(offset, count, prevSnapshot, options = {}) {
|
2387
2542
|
options.conditions = options.conditions || {};
|
2388
2543
|
return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => {
|
2389
|
-
var _a;
|
2390
2544
|
const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({
|
2391
2545
|
abortSignal: options.abortSignal,
|
2392
2546
|
leaseAccessConditions: options.conditions,
|
2393
|
-
modifiedAccessConditions:
|
2547
|
+
modifiedAccessConditions: {
|
2548
|
+
...options.conditions,
|
2549
|
+
ifTags: options.conditions?.tagConditions,
|
2550
|
+
},
|
2394
2551
|
prevsnapshot: prevSnapshot,
|
2395
2552
|
range: rangeToString({ offset, count }),
|
2396
2553
|
tracingOptions: updatedOptions.tracingOptions,
|
@@ -2414,18 +2571,20 @@ export class PageBlobClient extends BlobClient {
|
|
2414
2571
|
*/
|
2415
2572
|
async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) {
|
2416
2573
|
return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => {
|
2417
|
-
var _a;
|
2418
2574
|
return assertResponse(await this.pageBlobContext.getPageRangesDiff({
|
2419
|
-
abortSignal: options
|
2420
|
-
leaseAccessConditions: options
|
2421
|
-
modifiedAccessConditions:
|
2575
|
+
abortSignal: options?.abortSignal,
|
2576
|
+
leaseAccessConditions: options?.conditions,
|
2577
|
+
modifiedAccessConditions: {
|
2578
|
+
...options?.conditions,
|
2579
|
+
ifTags: options?.conditions?.tagConditions,
|
2580
|
+
},
|
2422
2581
|
prevsnapshot: prevSnapshotOrUrl,
|
2423
2582
|
range: rangeToString({
|
2424
2583
|
offset: offset,
|
2425
2584
|
count: count,
|
2426
2585
|
}),
|
2427
2586
|
marker: marker,
|
2428
|
-
maxPageSize: options
|
2587
|
+
maxPageSize: options?.maxPageSize,
|
2429
2588
|
tracingOptions: updatedOptions.tracingOptions,
|
2430
2589
|
}));
|
2431
2590
|
});
|
@@ -2446,17 +2605,15 @@ export class PageBlobClient extends BlobClient {
|
|
2446
2605
|
* items. The marker value is opaque to the client.
|
2447
2606
|
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2448
2607
|
*/
|
2449
|
-
listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) {
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
}
|
2459
|
-
});
|
2608
|
+
async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) {
|
2609
|
+
let getPageRangeItemSegmentsResponse;
|
2610
|
+
if (!!marker || marker === undefined) {
|
2611
|
+
do {
|
2612
|
+
getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options);
|
2613
|
+
marker = getPageRangeItemSegmentsResponse.continuationToken;
|
2614
|
+
yield await getPageRangeItemSegmentsResponse;
|
2615
|
+
} while (marker);
|
2616
|
+
}
|
2460
2617
|
}
|
2461
2618
|
/**
|
2462
2619
|
* Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
|
@@ -2466,26 +2623,11 @@ export class PageBlobClient extends BlobClient {
|
|
2466
2623
|
* @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
|
2467
2624
|
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2468
2625
|
*/
|
2469
|
-
listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2473
|
-
|
2474
|
-
for (var _d = true, _e = __asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
2475
|
-
_c = _f.value;
|
2476
|
-
_d = false;
|
2477
|
-
const getPageRangesSegment = _c;
|
2478
|
-
yield __await(yield* __asyncDelegator(__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
|
2479
|
-
}
|
2480
|
-
}
|
2481
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
2482
|
-
finally {
|
2483
|
-
try {
|
2484
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
2485
|
-
}
|
2486
|
-
finally { if (e_2) throw e_2.error; }
|
2487
|
-
}
|
2488
|
-
});
|
2626
|
+
async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {
|
2627
|
+
let marker;
|
2628
|
+
for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) {
|
2629
|
+
yield* ExtractPageRangeInfoItems(getPageRangesSegment);
|
2630
|
+
}
|
2489
2631
|
}
|
2490
2632
|
/**
|
2491
2633
|
* Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.
|
@@ -2572,7 +2714,9 @@ export class PageBlobClient extends BlobClient {
|
|
2572
2714
|
listPageRangesDiff(offset, count, prevSnapshot, options = {}) {
|
2573
2715
|
options.conditions = options.conditions || {};
|
2574
2716
|
// AsyncIterableIterator to iterate over blobs
|
2575
|
-
const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot,
|
2717
|
+
const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, {
|
2718
|
+
...options,
|
2719
|
+
});
|
2576
2720
|
return {
|
2577
2721
|
/**
|
2578
2722
|
* The next method, part of the iteration protocol
|
@@ -2590,7 +2734,10 @@ export class PageBlobClient extends BlobClient {
|
|
2590
2734
|
* Return an AsyncIterableIterator that works a page at a time
|
2591
2735
|
*/
|
2592
2736
|
byPage: (settings = {}) => {
|
2593
|
-
return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken,
|
2737
|
+
return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, {
|
2738
|
+
maxPageSize: settings.maxPageSize,
|
2739
|
+
...options,
|
2740
|
+
});
|
2594
2741
|
},
|
2595
2742
|
};
|
2596
2743
|
}
|
@@ -2607,11 +2754,13 @@ export class PageBlobClient extends BlobClient {
|
|
2607
2754
|
async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) {
|
2608
2755
|
options.conditions = options.conditions || {};
|
2609
2756
|
return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => {
|
2610
|
-
var _a;
|
2611
2757
|
const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({
|
2612
2758
|
abortSignal: options.abortSignal,
|
2613
2759
|
leaseAccessConditions: options.conditions,
|
2614
|
-
modifiedAccessConditions:
|
2760
|
+
modifiedAccessConditions: {
|
2761
|
+
...options.conditions,
|
2762
|
+
ifTags: options.conditions?.tagConditions,
|
2763
|
+
},
|
2615
2764
|
prevSnapshotUrl,
|
2616
2765
|
range: rangeToString({ offset, count }),
|
2617
2766
|
tracingOptions: updatedOptions.tracingOptions,
|
@@ -2630,11 +2779,13 @@ export class PageBlobClient extends BlobClient {
|
|
2630
2779
|
async resize(size, options = {}) {
|
2631
2780
|
options.conditions = options.conditions || {};
|
2632
2781
|
return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => {
|
2633
|
-
var _a;
|
2634
2782
|
return assertResponse(await this.pageBlobContext.resize(size, {
|
2635
2783
|
abortSignal: options.abortSignal,
|
2636
2784
|
leaseAccessConditions: options.conditions,
|
2637
|
-
modifiedAccessConditions:
|
2785
|
+
modifiedAccessConditions: {
|
2786
|
+
...options.conditions,
|
2787
|
+
ifTags: options.conditions?.tagConditions,
|
2788
|
+
},
|
2638
2789
|
encryptionScope: options.encryptionScope,
|
2639
2790
|
tracingOptions: updatedOptions.tracingOptions,
|
2640
2791
|
}));
|
@@ -2642,7 +2793,7 @@ export class PageBlobClient extends BlobClient {
|
|
2642
2793
|
}
|
2643
2794
|
/**
|
2644
2795
|
* Sets a page blob's sequence number.
|
2645
|
-
* @see https://learn.microsoft.com/
|
2796
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties
|
2646
2797
|
*
|
2647
2798
|
* @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number.
|
2648
2799
|
* @param sequenceNumber - Required if sequenceNumberAction is max or update
|
@@ -2652,12 +2803,14 @@ export class PageBlobClient extends BlobClient {
|
|
2652
2803
|
async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) {
|
2653
2804
|
options.conditions = options.conditions || {};
|
2654
2805
|
return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => {
|
2655
|
-
var _a;
|
2656
2806
|
return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, {
|
2657
2807
|
abortSignal: options.abortSignal,
|
2658
2808
|
blobSequenceNumber: sequenceNumber,
|
2659
2809
|
leaseAccessConditions: options.conditions,
|
2660
|
-
modifiedAccessConditions:
|
2810
|
+
modifiedAccessConditions: {
|
2811
|
+
...options.conditions,
|
2812
|
+
ifTags: options.conditions?.tagConditions,
|
2813
|
+
},
|
2661
2814
|
tracingOptions: updatedOptions.tracingOptions,
|
2662
2815
|
}));
|
2663
2816
|
});
|
@@ -2668,7 +2821,7 @@ export class PageBlobClient extends BlobClient {
|
|
2668
2821
|
* copied snapshot are transferred to the destination.
|
2669
2822
|
* The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.
|
2670
2823
|
* @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob
|
2671
|
-
* @see https://learn.microsoft.com/
|
2824
|
+
* @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots
|
2672
2825
|
*
|
2673
2826
|
* @param copySource - Specifies the name of the source page blob snapshot. For example,
|
2674
2827
|
* https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
|
@@ -2677,10 +2830,12 @@ export class PageBlobClient extends BlobClient {
|
|
2677
2830
|
*/
|
2678
2831
|
async startCopyIncremental(copySource, options = {}) {
|
2679
2832
|
return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => {
|
2680
|
-
var _a;
|
2681
2833
|
return assertResponse(await this.pageBlobContext.copyIncremental(copySource, {
|
2682
2834
|
abortSignal: options.abortSignal,
|
2683
|
-
modifiedAccessConditions:
|
2835
|
+
modifiedAccessConditions: {
|
2836
|
+
...options.conditions,
|
2837
|
+
ifTags: options.conditions?.tagConditions,
|
2838
|
+
},
|
2684
2839
|
tracingOptions: updatedOptions.tracingOptions,
|
2685
2840
|
}));
|
2686
2841
|
});
|