@azure/storage-blob 12.27.0 → 12.28.0-beta.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/README.md +116 -173
- package/dist/browser/BatchResponse.d.ts +49 -0
- package/dist/browser/BatchResponse.d.ts.map +1 -0
- package/dist/browser/BatchResponse.js.map +1 -0
- package/dist/browser/BatchResponseParser.d.ts +16 -0
- package/dist/browser/BatchResponseParser.d.ts.map +1 -0
- package/dist/browser/BatchResponseParser.js +137 -0
- package/dist/browser/BatchResponseParser.js.map +1 -0
- package/dist/browser/BatchUtils-browser.d.mts.map +1 -0
- package/dist/browser/BatchUtils-browser.mjs.map +1 -0
- package/dist/browser/BatchUtils.d.ts +4 -0
- package/dist/browser/BatchUtils.js +14 -0
- package/dist/browser/BlobBatch.d.ts +112 -0
- package/dist/browser/BlobBatch.d.ts.map +1 -0
- package/dist/browser/BlobBatch.js +267 -0
- package/dist/browser/BlobBatch.js.map +1 -0
- package/dist/browser/BlobBatchClient.d.ts +181 -0
- package/dist/browser/BlobBatchClient.d.ts.map +1 -0
- package/dist/browser/BlobBatchClient.js +169 -0
- package/dist/browser/BlobBatchClient.js.map +1 -0
- package/dist/browser/BlobDownloadResponse-browser.d.mts.map +1 -0
- package/dist/browser/BlobDownloadResponse-browser.mjs.map +1 -0
- package/dist/browser/BlobDownloadResponse.d.ts +2 -0
- package/dist/browser/BlobDownloadResponse.js +7 -0
- package/dist/browser/BlobLeaseClient.d.ts +159 -0
- package/dist/browser/BlobLeaseClient.d.ts.map +1 -0
- package/dist/browser/BlobLeaseClient.js +192 -0
- package/dist/browser/BlobLeaseClient.js.map +1 -0
- package/dist/browser/BlobQueryResponse-browser.d.mts.map +1 -0
- package/dist/browser/BlobQueryResponse-browser.mjs.map +1 -0
- package/dist/browser/BlobQueryResponse.d.ts +291 -0
- package/dist/browser/BlobQueryResponse.js +362 -0
- package/dist/browser/BlobServiceClient.d.ts +649 -0
- package/dist/browser/BlobServiceClient.d.ts.map +1 -0
- package/dist/browser/BlobServiceClient.js +698 -0
- package/dist/browser/BlobServiceClient.js.map +1 -0
- package/dist/browser/Clients.d.ts +3229 -0
- package/dist/browser/Clients.d.ts.map +1 -0
- package/dist/browser/Clients.js +2689 -0
- package/dist/browser/Clients.js.map +1 -0
- package/dist/browser/ContainerClient.d.ts +1101 -0
- package/dist/browser/ContainerClient.d.ts.map +1 -0
- package/dist/browser/ContainerClient.js +1247 -0
- package/dist/browser/ContainerClient.js.map +1 -0
- package/dist/browser/PageBlobRangeResponse.d.ts +35 -0
- package/dist/browser/PageBlobRangeResponse.d.ts.map +1 -0
- package/dist/browser/PageBlobRangeResponse.js.map +1 -0
- package/dist/browser/Pipeline.d.ts +136 -0
- package/dist/browser/Pipeline.d.ts.map +1 -0
- package/dist/browser/Pipeline.js +261 -0
- package/dist/browser/Pipeline.js.map +1 -0
- package/dist/browser/Range.d.ts +24 -0
- package/dist/browser/Range.d.ts.map +1 -0
- package/dist/browser/Range.js.map +1 -0
- package/dist/browser/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/browser/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/browser/StorageBrowserPolicyFactory.js +19 -0
- package/dist/browser/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/browser/StorageClient.d.ts +51 -0
- package/dist/browser/StorageClient.d.ts.map +1 -0
- package/dist/browser/StorageClient.js +29 -0
- package/dist/browser/StorageClient.js.map +1 -0
- package/dist/browser/StorageContextClient.d.ts +9 -0
- package/dist/browser/StorageContextClient.d.ts.map +1 -0
- package/dist/browser/StorageContextClient.js +17 -0
- package/dist/browser/StorageContextClient.js.map +1 -0
- package/dist/browser/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/browser/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/browser/StorageRetryPolicyFactory.js +27 -0
- package/dist/browser/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/browser/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/browser/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/browser/credentials/AnonymousCredential.js +22 -0
- package/dist/browser/credentials/AnonymousCredential.js.map +1 -0
- package/dist/browser/credentials/Credential.d.ts +20 -0
- package/dist/browser/credentials/Credential.d.ts.map +1 -0
- package/dist/browser/credentials/Credential.js.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential.d.ts +3 -0
- package/dist/browser/credentials/StorageSharedKeyCredential.js +5 -0
- package/dist/browser/credentials/UserDelegationKeyCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/UserDelegationKeyCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/UserDelegationKeyCredential.d.ts +3 -0
- package/dist/browser/credentials/UserDelegationKeyCredential.js +5 -0
- package/dist/browser/generated/src/index.d.ts +4 -0
- package/dist/browser/generated/src/index.d.ts.map +1 -0
- package/dist/browser/generated/src/index.js +11 -0
- package/dist/browser/generated/src/index.js.map +1 -0
- package/dist/browser/generated/src/models/index.d.ts +3944 -0
- package/dist/browser/generated/src/models/index.d.ts.map +1 -0
- package/dist/browser/generated/src/models/index.js +264 -0
- package/dist/browser/generated/src/models/index.js.map +1 -0
- package/dist/browser/generated/src/models/mappers.d.ts +181 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/src/models/mappers.js.map +1 -0
- package/dist/browser/generated/src/models/parameters.d.ts +147 -0
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/browser/generated/src/models/parameters.js +1620 -0
- package/dist/browser/generated/src/models/parameters.js.map +1 -0
- package/dist/browser/generated/src/operations/appendBlob.d.ts +45 -0
- package/dist/browser/generated/src/operations/appendBlob.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/appendBlob.js +222 -0
- package/dist/browser/generated/src/operations/appendBlob.js.map +1 -0
- package/dist/browser/generated/src/operations/blob.d.ts +178 -0
- package/dist/browser/generated/src/operations/blob.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/blob.js +1021 -0
- package/dist/browser/generated/src/operations/blob.js.map +1 -0
- package/dist/browser/generated/src/operations/blockBlob.d.ts +79 -0
- package/dist/browser/generated/src/operations/blockBlob.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/blockBlob.js +367 -0
- package/dist/browser/generated/src/operations/blockBlob.js.map +1 -0
- package/dist/browser/generated/src/operations/container.d.ts +130 -0
- package/dist/browser/generated/src/operations/container.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/container.js +713 -0
- package/dist/browser/generated/src/operations/container.js.map +1 -0
- package/dist/browser/generated/src/operations/index.d.ts +7 -0
- package/dist/browser/generated/src/operations/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/index.js +14 -0
- package/dist/browser/generated/src/operations/index.js.map +1 -0
- package/dist/browser/generated/src/operations/pageBlob.d.ts +87 -0
- package/dist/browser/generated/src/operations/pageBlob.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/pageBlob.js +457 -0
- package/dist/browser/generated/src/operations/pageBlob.js.map +1 -0
- package/dist/browser/generated/src/operations/service.d.ts +67 -0
- package/dist/browser/generated/src/operations/service.d.ts.map +1 -0
- package/dist/browser/generated/src/operations/service.js +323 -0
- package/dist/browser/generated/src/operations/service.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/appendBlob.d.ts +37 -0
- package/dist/browser/generated/src/operationsInterfaces/appendBlob.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/blob.d.ts +170 -0
- package/dist/browser/generated/src/operationsInterfaces/blob.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/blob.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/blockBlob.d.ts +71 -0
- package/dist/browser/generated/src/operationsInterfaces/blockBlob.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/container.d.ts +122 -0
- package/dist/browser/generated/src/operationsInterfaces/container.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/container.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +7 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js +14 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/pageBlob.d.ts +79 -0
- package/dist/browser/generated/src/operationsInterfaces/pageBlob.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts +59 -0
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/browser/generated/src/storageClient.d.ts +21 -0
- package/dist/browser/generated/src/storageClient.d.ts.map +1 -0
- package/dist/browser/generated/src/storageClient.js +49 -0
- package/dist/browser/generated/src/storageClient.js.map +1 -0
- package/dist/browser/generatedModels.d.ts +199 -0
- package/dist/browser/generatedModels.d.ts.map +1 -0
- package/dist/browser/generatedModels.js.map +1 -0
- package/dist/browser/index-browser.d.mts.map +1 -0
- package/dist/browser/index-browser.mjs.map +1 -0
- package/dist/browser/index.d.ts +33 -0
- package/dist/browser/index.js +31 -0
- package/dist/browser/internal-avro/AvroConstants.d.ts +5 -0
- package/dist/browser/internal-avro/AvroConstants.d.ts.map +1 -0
- package/dist/browser/internal-avro/AvroConstants.js.map +1 -0
- package/dist/browser/internal-avro/AvroParser.d.ts +57 -0
- package/dist/browser/internal-avro/AvroParser.d.ts.map +1 -0
- package/dist/browser/internal-avro/AvroParser.js.map +1 -0
- package/dist/browser/internal-avro/AvroReadable.d.ts +16 -0
- package/dist/browser/internal-avro/AvroReadable.d.ts.map +1 -0
- package/dist/browser/internal-avro/AvroReadable.js.map +1 -0
- package/dist/browser/internal-avro/AvroReadableFromBlob.d.ts +10 -0
- package/dist/browser/internal-avro/AvroReadableFromBlob.d.ts.map +1 -0
- package/dist/browser/internal-avro/AvroReadableFromBlob.js +47 -0
- package/dist/browser/internal-avro/AvroReadableFromBlob.js.map +1 -0
- package/dist/browser/internal-avro/AvroReadableFromStream.d.ts +11 -0
- package/dist/browser/internal-avro/AvroReadableFromStream.d.ts.map +1 -0
- package/dist/browser/internal-avro/AvroReadableFromStream.js +85 -0
- package/dist/browser/internal-avro/AvroReadableFromStream.js.map +1 -0
- package/dist/browser/internal-avro/AvroReader.d.ts +32 -0
- package/dist/browser/internal-avro/AvroReader.d.ts.map +1 -0
- package/dist/browser/internal-avro/AvroReader.js +106 -0
- package/dist/browser/internal-avro/AvroReader.js.map +1 -0
- package/dist/browser/internal-avro/index-browser.d.mts.map +1 -0
- package/dist/browser/internal-avro/index-browser.mjs.map +1 -0
- package/dist/browser/internal-avro/index.d.ts +4 -0
- package/dist/browser/internal-avro/index.js +6 -0
- package/dist/browser/internal-avro/utils/utils.common.d.ts +6 -0
- package/dist/browser/internal-avro/utils/utils.common.d.ts.map +1 -0
- package/dist/browser/internal-avro/utils/utils.common.js.map +1 -0
- package/dist/browser/log.d.ts +5 -0
- package/dist/browser/log.d.ts.map +1 -0
- package/dist/browser/log.js.map +1 -0
- package/dist/browser/models.d.ts +333 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js +115 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.js +20 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/browser/policies/CredentialPolicy.d.ts +22 -0
- package/dist/browser/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/browser/policies/CredentialPolicy.js +29 -0
- package/dist/browser/policies/CredentialPolicy.js.map +1 -0
- package/dist/browser/policies/RequestPolicy.d.ts +45 -0
- package/dist/browser/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/browser/policies/RequestPolicy.js.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/browser/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicy.js +47 -0
- package/dist/browser/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.d.mts.map +1 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.mjs.map +1 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy.js +18 -0
- package/dist/browser/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/browser/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/browser/policies/StorageRetryPolicy.js +216 -0
- package/dist/browser/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/browser/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyType.js +17 -0
- package/dist/browser/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyV2.js +167 -0
- package/dist/browser/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js +141 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.d.mts.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.mjs.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.js +18 -0
- package/dist/browser/pollers/BlobStartCopyFromUrlPoller.d.ts +74 -0
- package/dist/browser/pollers/BlobStartCopyFromUrlPoller.d.ts.map +1 -0
- package/dist/browser/pollers/BlobStartCopyFromUrlPoller.js.map +1 -0
- package/dist/browser/sas/AccountSASPermissions.d.ts +146 -0
- package/dist/browser/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASPermissions.js.map +1 -0
- package/dist/browser/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/browser/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/browser/sas/AccountSASServices.d.ts +40 -0
- package/dist/browser/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASServices.js.map +1 -0
- package/dist/browser/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/browser/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASSignatureValues.js +100 -0
- package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/browser/sas/BlobSASPermissions.d.ts +127 -0
- package/dist/browser/sas/BlobSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/BlobSASPermissions.js.map +1 -0
- package/dist/browser/sas/BlobSASSignatureValues.d.ts +284 -0
- package/dist/browser/sas/BlobSASSignatureValues.d.ts.map +1 -0
- package/dist/browser/sas/BlobSASSignatureValues.js +666 -0
- package/dist/browser/sas/BlobSASSignatureValues.js.map +1 -0
- package/dist/browser/sas/ContainerSASPermissions.d.ts +143 -0
- package/dist/browser/sas/ContainerSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/ContainerSASPermissions.js.map +1 -0
- package/dist/browser/sas/SASQueryParameters.d.ts +285 -0
- package/dist/browser/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/browser/sas/SASQueryParameters.js +234 -0
- package/dist/browser/sas/SASQueryParameters.js.map +1 -0
- package/dist/browser/sas/SasIPRange.d.ts +24 -0
- package/dist/browser/sas/SasIPRange.d.ts.map +1 -0
- package/dist/browser/sas/SasIPRange.js.map +1 -0
- package/dist/browser/utils/Batch.d.ts +68 -0
- package/dist/browser/utils/Batch.d.ts.map +1 -0
- package/dist/browser/utils/Batch.js.map +1 -0
- package/dist/browser/utils/BlobQuickQueryStream.d.ts +42 -0
- package/dist/browser/utils/BlobQuickQueryStream.d.ts.map +1 -0
- package/dist/browser/utils/BlobQuickQueryStream.js +111 -0
- package/dist/browser/utils/BlobQuickQueryStream.js.map +1 -0
- package/dist/browser/utils/Mutex.d.ts +23 -0
- package/dist/browser/utils/Mutex.d.ts.map +1 -0
- package/dist/browser/utils/Mutex.js.map +1 -0
- package/dist/browser/utils/RetriableReadableStream.d.ts +62 -0
- package/dist/browser/utils/RetriableReadableStream.d.ts.map +1 -0
- package/dist/browser/utils/RetriableReadableStream.js +119 -0
- package/dist/browser/utils/RetriableReadableStream.js.map +1 -0
- package/dist/browser/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/browser/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/browser/utils/SharedKeyComparator.js.map +1 -0
- package/dist/browser/utils/constants.d.ts +70 -0
- package/dist/browser/utils/constants.d.ts.map +1 -0
- package/dist/browser/utils/constants.js +226 -0
- package/dist/browser/utils/constants.js.map +1 -0
- package/dist/browser/utils/tracing.d.ts +6 -0
- package/dist/browser/utils/tracing.d.ts.map +1 -0
- package/dist/browser/utils/tracing.js +14 -0
- package/dist/browser/utils/tracing.js.map +1 -0
- package/dist/browser/utils/utils-browser.d.mts.map +1 -0
- package/dist/browser/utils/utils-browser.mjs.map +1 -0
- package/dist/browser/utils/utils.common.d.ts +323 -0
- package/dist/browser/utils/utils.common.d.ts.map +1 -0
- package/dist/browser/utils/utils.common.js +756 -0
- package/dist/browser/utils/utils.common.js.map +1 -0
- package/dist/browser/utils/utils.d.ts +18 -0
- package/dist/browser/utils/utils.js +48 -0
- package/dist/commonjs/BatchResponse.d.ts +49 -0
- package/dist/commonjs/BatchResponse.d.ts.map +1 -0
- package/dist/commonjs/BatchResponse.js +5 -0
- package/dist/commonjs/BatchResponse.js.map +1 -0
- package/dist/commonjs/BatchResponseParser.d.ts +16 -0
- package/dist/commonjs/BatchResponseParser.d.ts.map +1 -0
- package/dist/commonjs/BatchResponseParser.js +141 -0
- package/dist/commonjs/BatchResponseParser.js.map +1 -0
- package/dist/commonjs/BatchUtils.d.ts +4 -0
- package/dist/commonjs/BatchUtils.d.ts.map +1 -0
- package/dist/commonjs/BatchUtils.js +19 -0
- package/dist/commonjs/BatchUtils.js.map +1 -0
- package/dist/commonjs/BlobBatch.d.ts +112 -0
- package/dist/commonjs/BlobBatch.d.ts.map +1 -0
- package/dist/commonjs/BlobBatch.js +271 -0
- package/dist/commonjs/BlobBatch.js.map +1 -0
- package/dist/commonjs/BlobBatchClient.d.ts +181 -0
- package/dist/commonjs/BlobBatchClient.d.ts.map +1 -0
- package/dist/commonjs/BlobBatchClient.js +173 -0
- package/dist/commonjs/BlobBatchClient.js.map +1 -0
- package/dist/commonjs/BlobDownloadResponse.d.ts +369 -0
- package/dist/commonjs/BlobDownloadResponse.d.ts.map +1 -0
- package/dist/commonjs/BlobDownloadResponse.js +467 -0
- package/dist/commonjs/BlobDownloadResponse.js.map +1 -0
- package/dist/commonjs/BlobLeaseClient.d.ts +159 -0
- package/dist/commonjs/BlobLeaseClient.d.ts.map +1 -0
- package/dist/commonjs/BlobLeaseClient.js +196 -0
- package/dist/commonjs/BlobLeaseClient.js.map +1 -0
- package/dist/commonjs/BlobQueryResponse.d.ts +294 -0
- package/dist/commonjs/BlobQueryResponse.d.ts.map +1 -0
- package/dist/commonjs/BlobQueryResponse.js +371 -0
- package/dist/commonjs/BlobQueryResponse.js.map +1 -0
- package/dist/commonjs/BlobServiceClient.d.ts +649 -0
- package/dist/commonjs/BlobServiceClient.d.ts.map +1 -0
- package/dist/commonjs/BlobServiceClient.js +702 -0
- package/dist/commonjs/BlobServiceClient.js.map +1 -0
- package/dist/commonjs/Clients.d.ts +3229 -0
- package/dist/commonjs/Clients.d.ts.map +1 -0
- package/dist/commonjs/Clients.js +2696 -0
- package/dist/commonjs/Clients.js.map +1 -0
- package/dist/commonjs/ContainerClient.d.ts +1101 -0
- package/dist/commonjs/ContainerClient.d.ts.map +1 -0
- package/dist/commonjs/ContainerClient.js +1251 -0
- package/dist/commonjs/ContainerClient.js.map +1 -0
- package/dist/commonjs/PageBlobRangeResponse.d.ts +35 -0
- package/dist/commonjs/PageBlobRangeResponse.d.ts.map +1 -0
- package/dist/commonjs/PageBlobRangeResponse.js +27 -0
- package/dist/commonjs/PageBlobRangeResponse.js.map +1 -0
- package/dist/commonjs/Pipeline.d.ts +136 -0
- package/dist/commonjs/Pipeline.d.ts.map +1 -0
- package/dist/commonjs/Pipeline.js +267 -0
- package/dist/commonjs/Pipeline.js.map +1 -0
- package/dist/commonjs/Range.d.ts +24 -0
- package/dist/commonjs/Range.d.ts.map +1 -0
- package/dist/commonjs/Range.js +24 -0
- package/dist/commonjs/Range.js.map +1 -0
- package/dist/commonjs/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/commonjs/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/commonjs/StorageBrowserPolicyFactory.js +23 -0
- package/dist/commonjs/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/commonjs/StorageClient.d.ts +51 -0
- package/dist/commonjs/StorageClient.d.ts.map +1 -0
- package/dist/commonjs/StorageClient.js +33 -0
- package/dist/commonjs/StorageClient.js.map +1 -0
- package/dist/commonjs/StorageContextClient.d.ts +9 -0
- package/dist/commonjs/StorageContextClient.d.ts.map +1 -0
- package/dist/commonjs/StorageContextClient.js +21 -0
- package/dist/commonjs/StorageContextClient.js.map +1 -0
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/commonjs/StorageRetryPolicyFactory.js +32 -0
- package/dist/commonjs/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/commonjs/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/commonjs/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/AnonymousCredential.js +26 -0
- package/dist/commonjs/credentials/AnonymousCredential.js.map +1 -0
- package/dist/commonjs/credentials/Credential.d.ts +20 -0
- package/dist/commonjs/credentials/Credential.d.ts.map +1 -0
- package/dist/commonjs/credentials/Credential.js +22 -0
- package/dist/commonjs/credentials/Credential.js.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts +38 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +44 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js +35 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/commonjs/generated/src/index.d.ts +4 -0
- package/dist/commonjs/generated/src/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.js +16 -0
- package/dist/commonjs/generated/src/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/index.d.ts +3944 -0
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/index.js +267 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts +181 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.js +8231 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts +147 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.js +1625 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/operations/appendBlob.d.ts +45 -0
- package/dist/commonjs/generated/src/operations/appendBlob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/appendBlob.js +227 -0
- package/dist/commonjs/generated/src/operations/appendBlob.js.map +1 -0
- package/dist/commonjs/generated/src/operations/blob.d.ts +178 -0
- package/dist/commonjs/generated/src/operations/blob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/blob.js +1026 -0
- package/dist/commonjs/generated/src/operations/blob.js.map +1 -0
- package/dist/commonjs/generated/src/operations/blockBlob.d.ts +79 -0
- package/dist/commonjs/generated/src/operations/blockBlob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/blockBlob.js +372 -0
- package/dist/commonjs/generated/src/operations/blockBlob.js.map +1 -0
- package/dist/commonjs/generated/src/operations/container.d.ts +130 -0
- package/dist/commonjs/generated/src/operations/container.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/container.js +718 -0
- package/dist/commonjs/generated/src/operations/container.js.map +1 -0
- package/dist/commonjs/generated/src/operations/index.d.ts +7 -0
- package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/index.js +17 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -0
- package/dist/commonjs/generated/src/operations/pageBlob.d.ts +87 -0
- package/dist/commonjs/generated/src/operations/pageBlob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/pageBlob.js +462 -0
- package/dist/commonjs/generated/src/operations/pageBlob.js.map +1 -0
- package/dist/commonjs/generated/src/operations/service.d.ts +67 -0
- package/dist/commonjs/generated/src/operations/service.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/service.js +328 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.d.ts +37 -0
- package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blob.d.ts +170 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blob.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blob.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.d.ts +71 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/container.d.ts +122 -0
- package/dist/commonjs/generated/src/operationsInterfaces/container.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/container.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/container.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +7 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +17 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.d.ts +79 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts +59 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/commonjs/generated/src/storageClient.d.ts +21 -0
- package/dist/commonjs/generated/src/storageClient.d.ts.map +1 -0
- package/dist/commonjs/generated/src/storageClient.js +54 -0
- package/dist/commonjs/generated/src/storageClient.js.map +1 -0
- package/dist/commonjs/generatedModels.d.ts +199 -0
- package/dist/commonjs/generatedModels.d.ts.map +1 -0
- package/dist/commonjs/generatedModels.js +11 -0
- package/dist/commonjs/generatedModels.js.map +1 -0
- package/dist/commonjs/index.d.ts +46 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +57 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/internal-avro/AvroConstants.d.ts +5 -0
- package/dist/commonjs/internal-avro/AvroConstants.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/AvroConstants.js +10 -0
- package/dist/commonjs/internal-avro/AvroConstants.js.map +1 -0
- package/dist/commonjs/internal-avro/AvroParser.d.ts +57 -0
- package/dist/commonjs/internal-avro/AvroParser.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/AvroParser.js +322 -0
- package/dist/commonjs/internal-avro/AvroParser.js.map +1 -0
- package/dist/commonjs/internal-avro/AvroReadable.d.ts +16 -0
- package/dist/commonjs/internal-avro/AvroReadable.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/AvroReadable.js +9 -0
- package/dist/commonjs/internal-avro/AvroReadable.js.map +1 -0
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.d.ts +10 -0
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.js +51 -0
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.js.map +1 -0
- package/dist/commonjs/internal-avro/AvroReadableFromStream.d.ts +11 -0
- package/dist/commonjs/internal-avro/AvroReadableFromStream.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/AvroReadableFromStream.js +89 -0
- package/dist/commonjs/internal-avro/AvroReadableFromStream.js.map +1 -0
- package/dist/commonjs/internal-avro/AvroReader.d.ts +32 -0
- package/dist/commonjs/internal-avro/AvroReader.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/AvroReader.js +110 -0
- package/dist/commonjs/internal-avro/AvroReader.js.map +1 -0
- package/dist/commonjs/internal-avro/index.d.ts +4 -0
- package/dist/commonjs/internal-avro/index.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/index.js +12 -0
- package/dist/commonjs/internal-avro/index.js.map +1 -0
- package/dist/commonjs/internal-avro/utils/utils.common.d.ts +6 -0
- package/dist/commonjs/internal-avro/utils/utils.common.d.ts.map +1 -0
- package/dist/commonjs/internal-avro/utils/utils.common.js +19 -0
- package/dist/commonjs/internal-avro/utils/utils.common.js.map +1 -0
- package/dist/commonjs/log.d.ts +5 -0
- package/dist/commonjs/log.d.ts.map +1 -0
- package/dist/commonjs/log.js +11 -0
- package/dist/commonjs/log.js.map +1 -0
- package/dist/commonjs/models.d.ts +333 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +121 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.js +24 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/commonjs/policies/CredentialPolicy.d.ts +22 -0
- package/dist/commonjs/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/CredentialPolicy.js +33 -0
- package/dist/commonjs/policies/CredentialPolicy.js.map +1 -0
- package/dist/commonjs/policies/RequestPolicy.d.ts +45 -0
- package/dist/commonjs/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/RequestPolicy.js +44 -0
- package/dist/commonjs/policies/RequestPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.js +51 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.js +35 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +31 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicy.js +221 -0
- package/dist/commonjs/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.js +20 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.js +171 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +145 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +136 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.d.ts +74 -0
- package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.d.ts.map +1 -0
- package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +134 -0
- package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js.map +1 -0
- package/dist/commonjs/sas/AccountSASPermissions.d.ts +146 -0
- package/dist/commonjs/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASPermissions.js +231 -0
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js +76 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/commonjs/sas/AccountSASServices.d.ts +40 -0
- package/dist/commonjs/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASServices.js +84 -0
- package/dist/commonjs/sas/AccountSASServices.js.map +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js +104 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/commonjs/sas/BlobSASPermissions.d.ts +127 -0
- package/dist/commonjs/sas/BlobSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/BlobSASPermissions.js +199 -0
- package/dist/commonjs/sas/BlobSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/BlobSASSignatureValues.d.ts +284 -0
- package/dist/commonjs/sas/BlobSASSignatureValues.d.ts.map +1 -0
- package/dist/commonjs/sas/BlobSASSignatureValues.js +670 -0
- package/dist/commonjs/sas/BlobSASSignatureValues.js.map +1 -0
- package/dist/commonjs/sas/ContainerSASPermissions.d.ts +143 -0
- package/dist/commonjs/sas/ContainerSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/ContainerSASPermissions.js +225 -0
- package/dist/commonjs/sas/ContainerSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/SASQueryParameters.d.ts +285 -0
- package/dist/commonjs/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/commonjs/sas/SASQueryParameters.js +238 -0
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -0
- package/dist/commonjs/sas/SasIPRange.d.ts +24 -0
- package/dist/commonjs/sas/SasIPRange.d.ts.map +1 -0
- package/dist/commonjs/sas/SasIPRange.js +16 -0
- package/dist/commonjs/sas/SasIPRange.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils/Batch.d.ts +68 -0
- package/dist/commonjs/utils/Batch.d.ts.map +1 -0
- package/dist/commonjs/utils/Batch.js +126 -0
- package/dist/commonjs/utils/Batch.js.map +1 -0
- package/dist/commonjs/utils/BlobQuickQueryStream.d.ts +42 -0
- package/dist/commonjs/utils/BlobQuickQueryStream.d.ts.map +1 -0
- package/dist/commonjs/utils/BlobQuickQueryStream.js +115 -0
- package/dist/commonjs/utils/BlobQuickQueryStream.js.map +1 -0
- package/dist/commonjs/utils/Mutex.d.ts +23 -0
- package/dist/commonjs/utils/Mutex.d.ts.map +1 -0
- package/dist/commonjs/utils/Mutex.js +69 -0
- package/dist/commonjs/utils/Mutex.js.map +1 -0
- package/dist/commonjs/utils/RetriableReadableStream.d.ts +62 -0
- package/dist/commonjs/utils/RetriableReadableStream.d.ts.map +1 -0
- package/dist/commonjs/utils/RetriableReadableStream.js +123 -0
- package/dist/commonjs/utils/RetriableReadableStream.js.map +1 -0
- package/dist/commonjs/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/commonjs/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/commonjs/utils/SharedKeyComparator.js +76 -0
- package/dist/commonjs/utils/SharedKeyComparator.js.map +1 -0
- package/dist/commonjs/utils/constants.d.ts +70 -0
- package/dist/commonjs/utils/constants.d.ts.map +1 -0
- package/dist/commonjs/utils/constants.js +229 -0
- package/dist/commonjs/utils/constants.js.map +1 -0
- package/dist/commonjs/utils/tracing.d.ts +6 -0
- package/dist/commonjs/utils/tracing.d.ts.map +1 -0
- package/dist/commonjs/utils/tracing.js +17 -0
- package/dist/commonjs/utils/tracing.js.map +1 -0
- package/dist/commonjs/utils/utils.common.d.ts +323 -0
- package/dist/commonjs/utils/utils.common.d.ts.map +1 -0
- package/dist/commonjs/utils/utils.common.js +794 -0
- package/dist/commonjs/utils/utils.common.js.map +1 -0
- package/dist/commonjs/utils/utils.d.ts +46 -0
- package/dist/commonjs/utils/utils.d.ts.map +1 -0
- package/dist/commonjs/utils/utils.js +140 -0
- package/dist/commonjs/utils/utils.js.map +1 -0
- package/dist/esm/BatchResponse.d.ts +49 -0
- package/dist/esm/BatchResponse.d.ts.map +1 -0
- package/dist/esm/BatchResponse.js +4 -0
- package/dist/esm/BatchResponse.js.map +1 -0
- package/dist/esm/BatchResponseParser.d.ts +16 -0
- package/dist/esm/BatchResponseParser.d.ts.map +1 -0
- package/dist/esm/BatchResponseParser.js +137 -0
- package/dist/esm/BatchResponseParser.js.map +1 -0
- package/dist/esm/BatchUtils.d.ts +4 -0
- package/dist/esm/BatchUtils.d.ts.map +1 -0
- package/dist/esm/BatchUtils.js +15 -0
- package/dist/esm/BatchUtils.js.map +1 -0
- package/dist/esm/BlobBatch.d.ts +112 -0
- package/dist/esm/BlobBatch.d.ts.map +1 -0
- package/dist/esm/BlobBatch.js +267 -0
- package/dist/esm/BlobBatch.js.map +1 -0
- package/dist/esm/BlobBatchClient.d.ts +181 -0
- package/dist/esm/BlobBatchClient.d.ts.map +1 -0
- package/dist/esm/BlobBatchClient.js +169 -0
- package/dist/esm/BlobBatchClient.js.map +1 -0
- package/dist/esm/BlobDownloadResponse.d.ts +369 -0
- package/dist/esm/BlobDownloadResponse.d.ts.map +1 -0
- package/dist/esm/BlobDownloadResponse.js +463 -0
- package/dist/esm/BlobDownloadResponse.js.map +1 -0
- package/dist/esm/BlobLeaseClient.d.ts +159 -0
- package/dist/esm/BlobLeaseClient.d.ts.map +1 -0
- package/dist/esm/BlobLeaseClient.js +192 -0
- package/dist/esm/BlobLeaseClient.js.map +1 -0
- package/dist/esm/BlobQueryResponse.d.ts +294 -0
- package/dist/esm/BlobQueryResponse.d.ts.map +1 -0
- package/dist/esm/BlobQueryResponse.js +367 -0
- package/dist/esm/BlobQueryResponse.js.map +1 -0
- package/dist/esm/BlobServiceClient.d.ts +649 -0
- package/dist/esm/BlobServiceClient.d.ts.map +1 -0
- package/dist/esm/BlobServiceClient.js +698 -0
- package/dist/esm/BlobServiceClient.js.map +1 -0
- package/dist/esm/Clients.d.ts +3229 -0
- package/dist/esm/Clients.d.ts.map +1 -0
- package/dist/esm/Clients.js +2689 -0
- package/dist/esm/Clients.js.map +1 -0
- package/dist/esm/ContainerClient.d.ts +1101 -0
- package/dist/esm/ContainerClient.d.ts.map +1 -0
- package/dist/esm/ContainerClient.js +1247 -0
- package/dist/esm/ContainerClient.js.map +1 -0
- package/dist/esm/PageBlobRangeResponse.d.ts +35 -0
- package/dist/esm/PageBlobRangeResponse.d.ts.map +1 -0
- package/dist/esm/PageBlobRangeResponse.js +24 -0
- package/dist/esm/PageBlobRangeResponse.js.map +1 -0
- package/dist/esm/Pipeline.d.ts +136 -0
- package/dist/esm/Pipeline.d.ts.map +1 -0
- package/dist/esm/Pipeline.js +261 -0
- package/dist/esm/Pipeline.js.map +1 -0
- package/dist/esm/Range.d.ts +24 -0
- package/dist/esm/Range.d.ts.map +1 -0
- package/dist/esm/Range.js +21 -0
- package/dist/esm/Range.js.map +1 -0
- package/dist/esm/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/esm/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/esm/StorageBrowserPolicyFactory.js +19 -0
- package/dist/esm/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/esm/StorageClient.d.ts +51 -0
- package/dist/esm/StorageClient.d.ts.map +1 -0
- package/dist/esm/StorageClient.js +29 -0
- package/dist/esm/StorageClient.js.map +1 -0
- package/dist/esm/StorageContextClient.d.ts +9 -0
- package/dist/esm/StorageContextClient.d.ts.map +1 -0
- package/dist/esm/StorageContextClient.js +17 -0
- package/dist/esm/StorageContextClient.js.map +1 -0
- package/dist/esm/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/esm/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/esm/StorageRetryPolicyFactory.js +27 -0
- package/dist/esm/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/esm/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/esm/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/esm/credentials/AnonymousCredential.js +22 -0
- package/dist/esm/credentials/AnonymousCredential.js.map +1 -0
- package/dist/esm/credentials/Credential.d.ts +20 -0
- package/dist/esm/credentials/Credential.d.ts.map +1 -0
- package/dist/esm/credentials/Credential.js +18 -0
- package/dist/esm/credentials/Credential.js.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts +38 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.js +40 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.js +31 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/esm/generated/src/index.d.ts +4 -0
- package/dist/esm/generated/src/index.d.ts.map +1 -0
- package/dist/esm/generated/src/index.js +11 -0
- package/dist/esm/generated/src/index.js.map +1 -0
- package/dist/esm/generated/src/models/index.d.ts +3944 -0
- package/dist/esm/generated/src/models/index.d.ts.map +1 -0
- package/dist/esm/generated/src/models/index.js +264 -0
- package/dist/esm/generated/src/models/index.js.map +1 -0
- package/dist/esm/generated/src/models/mappers.d.ts +181 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/src/models/mappers.js +8225 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -0
- package/dist/esm/generated/src/models/parameters.d.ts +147 -0
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/models/parameters.js +1620 -0
- package/dist/esm/generated/src/models/parameters.js.map +1 -0
- package/dist/esm/generated/src/operations/appendBlob.d.ts +45 -0
- package/dist/esm/generated/src/operations/appendBlob.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/appendBlob.js +222 -0
- package/dist/esm/generated/src/operations/appendBlob.js.map +1 -0
- package/dist/esm/generated/src/operations/blob.d.ts +178 -0
- package/dist/esm/generated/src/operations/blob.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/blob.js +1021 -0
- package/dist/esm/generated/src/operations/blob.js.map +1 -0
- package/dist/esm/generated/src/operations/blockBlob.d.ts +79 -0
- package/dist/esm/generated/src/operations/blockBlob.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/blockBlob.js +367 -0
- package/dist/esm/generated/src/operations/blockBlob.js.map +1 -0
- package/dist/esm/generated/src/operations/container.d.ts +130 -0
- package/dist/esm/generated/src/operations/container.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/container.js +713 -0
- package/dist/esm/generated/src/operations/container.js.map +1 -0
- package/dist/esm/generated/src/operations/index.d.ts +7 -0
- package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/index.js +14 -0
- package/dist/esm/generated/src/operations/index.js.map +1 -0
- package/dist/esm/generated/src/operations/pageBlob.d.ts +87 -0
- package/dist/esm/generated/src/operations/pageBlob.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/pageBlob.js +457 -0
- package/dist/esm/generated/src/operations/pageBlob.js.map +1 -0
- package/dist/esm/generated/src/operations/service.d.ts +67 -0
- package/dist/esm/generated/src/operations/service.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/service.js +323 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/appendBlob.d.ts +37 -0
- package/dist/esm/generated/src/operationsInterfaces/appendBlob.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/appendBlob.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/blob.d.ts +170 -0
- package/dist/esm/generated/src/operationsInterfaces/blob.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/blob.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/blob.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/blockBlob.d.ts +71 -0
- package/dist/esm/generated/src/operationsInterfaces/blockBlob.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/blockBlob.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/container.d.ts +122 -0
- package/dist/esm/generated/src/operationsInterfaces/container.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/container.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/container.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +7 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js +14 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/pageBlob.d.ts +79 -0
- package/dist/esm/generated/src/operationsInterfaces/pageBlob.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/pageBlob.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts +59 -0
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/service.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/esm/generated/src/storageClient.d.ts +21 -0
- package/dist/esm/generated/src/storageClient.d.ts.map +1 -0
- package/dist/esm/generated/src/storageClient.js +49 -0
- package/dist/esm/generated/src/storageClient.js.map +1 -0
- package/dist/esm/generatedModels.d.ts +199 -0
- package/dist/esm/generatedModels.d.ts.map +1 -0
- package/dist/esm/generatedModels.js +8 -0
- package/dist/esm/generatedModels.js.map +1 -0
- package/dist/esm/index.d.ts +46 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +41 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal-avro/AvroConstants.d.ts +5 -0
- package/dist/esm/internal-avro/AvroConstants.d.ts.map +1 -0
- package/dist/esm/internal-avro/AvroConstants.js +7 -0
- package/dist/esm/internal-avro/AvroConstants.js.map +1 -0
- package/dist/esm/internal-avro/AvroParser.d.ts +57 -0
- package/dist/esm/internal-avro/AvroParser.d.ts.map +1 -0
- package/dist/esm/internal-avro/AvroParser.js +317 -0
- package/dist/esm/internal-avro/AvroParser.js.map +1 -0
- package/dist/esm/internal-avro/AvroReadable.d.ts +16 -0
- package/dist/esm/internal-avro/AvroReadable.d.ts.map +1 -0
- package/dist/esm/internal-avro/AvroReadable.js +5 -0
- package/dist/esm/internal-avro/AvroReadable.js.map +1 -0
- package/dist/esm/internal-avro/AvroReadableFromBlob.d.ts +10 -0
- package/dist/esm/internal-avro/AvroReadableFromBlob.d.ts.map +1 -0
- package/dist/esm/internal-avro/AvroReadableFromBlob.js +47 -0
- package/dist/esm/internal-avro/AvroReadableFromBlob.js.map +1 -0
- package/dist/esm/internal-avro/AvroReadableFromStream.d.ts +11 -0
- package/dist/esm/internal-avro/AvroReadableFromStream.d.ts.map +1 -0
- package/dist/esm/internal-avro/AvroReadableFromStream.js +85 -0
- package/dist/esm/internal-avro/AvroReadableFromStream.js.map +1 -0
- package/dist/esm/internal-avro/AvroReader.d.ts +32 -0
- package/dist/esm/internal-avro/AvroReader.d.ts.map +1 -0
- package/dist/esm/internal-avro/AvroReader.js +106 -0
- package/dist/esm/internal-avro/AvroReader.js.map +1 -0
- package/dist/esm/internal-avro/index.d.ts +4 -0
- package/dist/esm/internal-avro/index.d.ts.map +1 -0
- package/dist/esm/internal-avro/index.js +6 -0
- package/dist/esm/internal-avro/index.js.map +1 -0
- package/dist/esm/internal-avro/utils/utils.common.d.ts +6 -0
- package/dist/esm/internal-avro/utils/utils.common.d.ts.map +1 -0
- package/dist/esm/internal-avro/utils/utils.common.js +16 -0
- package/dist/esm/internal-avro/utils/utils.common.js.map +1 -0
- package/dist/esm/log.d.ts +5 -0
- package/dist/esm/log.d.ts.map +1 -0
- package/dist/esm/log.js +8 -0
- package/dist/esm/log.js.map +1 -0
- package/dist/esm/models.d.ts +333 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +115 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.js +20 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/esm/policies/CredentialPolicy.d.ts +22 -0
- package/dist/esm/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/esm/policies/CredentialPolicy.js +29 -0
- package/dist/esm/policies/CredentialPolicy.js.map +1 -0
- package/dist/esm/policies/RequestPolicy.d.ts +45 -0
- package/dist/esm/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/esm/policies/RequestPolicy.js +40 -0
- package/dist/esm/policies/RequestPolicy.js.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/esm/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicy.js +47 -0
- package/dist/esm/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.js +27 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.js.map +1 -0
- package/dist/esm/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/esm/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageRetryPolicy.js +216 -0
- package/dist/esm/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/esm/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyType.js +17 -0
- package/dist/esm/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyV2.js +167 -0
- package/dist/esm/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js +141 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js +132 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist/esm/pollers/BlobStartCopyFromUrlPoller.d.ts +74 -0
- package/dist/esm/pollers/BlobStartCopyFromUrlPoller.d.ts.map +1 -0
- package/dist/esm/pollers/BlobStartCopyFromUrlPoller.js +130 -0
- package/dist/esm/pollers/BlobStartCopyFromUrlPoller.js.map +1 -0
- package/dist/esm/sas/AccountSASPermissions.d.ts +146 -0
- package/dist/esm/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASPermissions.js +227 -0
- package/dist/esm/sas/AccountSASPermissions.js.map +1 -0
- package/dist/esm/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/esm/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASResourceTypes.js +72 -0
- package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/esm/sas/AccountSASServices.d.ts +40 -0
- package/dist/esm/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASServices.js +80 -0
- package/dist/esm/sas/AccountSASServices.js.map +1 -0
- package/dist/esm/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/esm/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASSignatureValues.js +100 -0
- package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/esm/sas/BlobSASPermissions.d.ts +127 -0
- package/dist/esm/sas/BlobSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/BlobSASPermissions.js +195 -0
- package/dist/esm/sas/BlobSASPermissions.js.map +1 -0
- package/dist/esm/sas/BlobSASSignatureValues.d.ts +284 -0
- package/dist/esm/sas/BlobSASSignatureValues.d.ts.map +1 -0
- package/dist/esm/sas/BlobSASSignatureValues.js +666 -0
- package/dist/esm/sas/BlobSASSignatureValues.js.map +1 -0
- package/dist/esm/sas/ContainerSASPermissions.d.ts +143 -0
- package/dist/esm/sas/ContainerSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/ContainerSASPermissions.js +221 -0
- package/dist/esm/sas/ContainerSASPermissions.js.map +1 -0
- package/dist/esm/sas/SASQueryParameters.d.ts +285 -0
- package/dist/esm/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/esm/sas/SASQueryParameters.js +234 -0
- package/dist/esm/sas/SASQueryParameters.js.map +1 -0
- package/dist/esm/sas/SasIPRange.d.ts +24 -0
- package/dist/esm/sas/SasIPRange.d.ts.map +1 -0
- package/dist/esm/sas/SasIPRange.js +13 -0
- package/dist/esm/sas/SasIPRange.js.map +1 -0
- package/dist/esm/utils/Batch.d.ts +68 -0
- package/dist/esm/utils/Batch.d.ts.map +1 -0
- package/dist/esm/utils/Batch.js +122 -0
- package/dist/esm/utils/Batch.js.map +1 -0
- package/dist/esm/utils/BlobQuickQueryStream.d.ts +42 -0
- package/dist/esm/utils/BlobQuickQueryStream.d.ts.map +1 -0
- package/dist/esm/utils/BlobQuickQueryStream.js +111 -0
- package/dist/esm/utils/BlobQuickQueryStream.js.map +1 -0
- package/dist/esm/utils/Mutex.d.ts +23 -0
- package/dist/esm/utils/Mutex.d.ts.map +1 -0
- package/dist/esm/utils/Mutex.js +65 -0
- package/dist/esm/utils/Mutex.js.map +1 -0
- package/dist/esm/utils/RetriableReadableStream.d.ts +62 -0
- package/dist/esm/utils/RetriableReadableStream.d.ts.map +1 -0
- package/dist/esm/utils/RetriableReadableStream.js +119 -0
- package/dist/esm/utils/RetriableReadableStream.js.map +1 -0
- package/dist/esm/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/esm/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/esm/utils/SharedKeyComparator.js +73 -0
- package/dist/esm/utils/SharedKeyComparator.js.map +1 -0
- package/dist/esm/utils/constants.d.ts +70 -0
- package/dist/esm/utils/constants.d.ts.map +1 -0
- package/dist/esm/utils/constants.js +226 -0
- package/dist/esm/utils/constants.js.map +1 -0
- package/dist/esm/utils/tracing.d.ts +6 -0
- package/dist/esm/utils/tracing.d.ts.map +1 -0
- package/dist/esm/utils/tracing.js +14 -0
- package/dist/esm/utils/tracing.js.map +1 -0
- package/dist/esm/utils/utils.common.d.ts +323 -0
- package/dist/esm/utils/utils.common.d.ts.map +1 -0
- package/dist/esm/utils/utils.common.js +756 -0
- package/dist/esm/utils/utils.common.js.map +1 -0
- package/dist/esm/utils/utils.d.ts +46 -0
- package/dist/esm/utils/utils.d.ts.map +1 -0
- package/dist/esm/utils/utils.js +132 -0
- package/dist/esm/utils/utils.js.map +1 -0
- package/dist/react-native/BatchResponse.d.ts +49 -0
- package/dist/react-native/BatchResponse.d.ts.map +1 -0
- package/dist/react-native/BatchResponse.js +4 -0
- package/dist/react-native/BatchResponse.js.map +1 -0
- package/dist/react-native/BatchResponseParser.d.ts +16 -0
- package/dist/react-native/BatchResponseParser.d.ts.map +1 -0
- package/dist/react-native/BatchResponseParser.js +137 -0
- package/dist/react-native/BatchResponseParser.js.map +1 -0
- package/dist/react-native/BatchUtils.d.ts +4 -0
- package/dist/react-native/BatchUtils.d.ts.map +1 -0
- package/dist/react-native/BatchUtils.js +15 -0
- package/dist/react-native/BatchUtils.js.map +1 -0
- package/dist/react-native/BlobBatch.d.ts +112 -0
- package/dist/react-native/BlobBatch.d.ts.map +1 -0
- package/dist/react-native/BlobBatch.js +267 -0
- package/dist/react-native/BlobBatch.js.map +1 -0
- package/dist/react-native/BlobBatchClient.d.ts +181 -0
- package/dist/react-native/BlobBatchClient.d.ts.map +1 -0
- package/dist/react-native/BlobBatchClient.js +169 -0
- package/dist/react-native/BlobBatchClient.js.map +1 -0
- package/dist/react-native/BlobDownloadResponse.d.ts +369 -0
- package/dist/react-native/BlobDownloadResponse.d.ts.map +1 -0
- package/dist/react-native/BlobDownloadResponse.js +463 -0
- package/dist/react-native/BlobDownloadResponse.js.map +1 -0
- package/dist/react-native/BlobLeaseClient.d.ts +159 -0
- package/dist/react-native/BlobLeaseClient.d.ts.map +1 -0
- package/dist/react-native/BlobLeaseClient.js +192 -0
- package/dist/react-native/BlobLeaseClient.js.map +1 -0
- package/dist/react-native/BlobQueryResponse.d.ts +294 -0
- package/dist/react-native/BlobQueryResponse.d.ts.map +1 -0
- package/dist/react-native/BlobQueryResponse.js +367 -0
- package/dist/react-native/BlobQueryResponse.js.map +1 -0
- package/dist/react-native/BlobServiceClient.d.ts +649 -0
- package/dist/react-native/BlobServiceClient.d.ts.map +1 -0
- package/dist/react-native/BlobServiceClient.js +698 -0
- package/dist/react-native/BlobServiceClient.js.map +1 -0
- package/dist/react-native/Clients.d.ts +3229 -0
- package/dist/react-native/Clients.d.ts.map +1 -0
- package/dist/react-native/Clients.js +2689 -0
- package/dist/react-native/Clients.js.map +1 -0
- package/dist/react-native/ContainerClient.d.ts +1101 -0
- package/dist/react-native/ContainerClient.d.ts.map +1 -0
- package/dist/react-native/ContainerClient.js +1247 -0
- package/dist/react-native/ContainerClient.js.map +1 -0
- package/dist/react-native/PageBlobRangeResponse.d.ts +35 -0
- package/dist/react-native/PageBlobRangeResponse.d.ts.map +1 -0
- package/dist/react-native/PageBlobRangeResponse.js +24 -0
- package/dist/react-native/PageBlobRangeResponse.js.map +1 -0
- package/dist/react-native/Pipeline.d.ts +136 -0
- package/dist/react-native/Pipeline.d.ts.map +1 -0
- package/dist/react-native/Pipeline.js +261 -0
- package/dist/react-native/Pipeline.js.map +1 -0
- package/dist/react-native/Range.d.ts +24 -0
- package/dist/react-native/Range.d.ts.map +1 -0
- package/dist/react-native/Range.js +21 -0
- package/dist/react-native/Range.js.map +1 -0
- package/dist/react-native/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/react-native/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/react-native/StorageBrowserPolicyFactory.js +19 -0
- package/dist/react-native/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/react-native/StorageClient.d.ts +51 -0
- package/dist/react-native/StorageClient.d.ts.map +1 -0
- package/dist/react-native/StorageClient.js +29 -0
- package/dist/react-native/StorageClient.js.map +1 -0
- package/dist/react-native/StorageContextClient.d.ts +9 -0
- package/dist/react-native/StorageContextClient.d.ts.map +1 -0
- package/dist/react-native/StorageContextClient.js +17 -0
- package/dist/react-native/StorageContextClient.js.map +1 -0
- package/dist/react-native/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/react-native/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/react-native/StorageRetryPolicyFactory.js +27 -0
- package/dist/react-native/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/react-native/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/react-native/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/AnonymousCredential.js +22 -0
- package/dist/react-native/credentials/AnonymousCredential.js.map +1 -0
- package/dist/react-native/credentials/Credential.d.ts +20 -0
- package/dist/react-native/credentials/Credential.d.ts.map +1 -0
- package/dist/react-native/credentials/Credential.js +18 -0
- package/dist/react-native/credentials/Credential.js.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts +38 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js +40 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.js +31 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/react-native/generated/src/index.d.ts +4 -0
- package/dist/react-native/generated/src/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/index.js +11 -0
- package/dist/react-native/generated/src/index.js.map +1 -0
- package/dist/react-native/generated/src/models/index.d.ts +3944 -0
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/index.js +264 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -0
- package/dist/react-native/generated/src/models/mappers.d.ts +181 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/mappers.js +8225 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -0
- package/dist/react-native/generated/src/models/parameters.d.ts +147 -0
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/parameters.js +1620 -0
- package/dist/react-native/generated/src/models/parameters.js.map +1 -0
- package/dist/react-native/generated/src/operations/appendBlob.d.ts +45 -0
- package/dist/react-native/generated/src/operations/appendBlob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/appendBlob.js +222 -0
- package/dist/react-native/generated/src/operations/appendBlob.js.map +1 -0
- package/dist/react-native/generated/src/operations/blob.d.ts +178 -0
- package/dist/react-native/generated/src/operations/blob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/blob.js +1021 -0
- package/dist/react-native/generated/src/operations/blob.js.map +1 -0
- package/dist/react-native/generated/src/operations/blockBlob.d.ts +79 -0
- package/dist/react-native/generated/src/operations/blockBlob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/blockBlob.js +367 -0
- package/dist/react-native/generated/src/operations/blockBlob.js.map +1 -0
- package/dist/react-native/generated/src/operations/container.d.ts +130 -0
- package/dist/react-native/generated/src/operations/container.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/container.js +713 -0
- package/dist/react-native/generated/src/operations/container.js.map +1 -0
- package/dist/react-native/generated/src/operations/index.d.ts +7 -0
- package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/index.js +14 -0
- package/dist/react-native/generated/src/operations/index.js.map +1 -0
- package/dist/react-native/generated/src/operations/pageBlob.d.ts +87 -0
- package/dist/react-native/generated/src/operations/pageBlob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/pageBlob.js +457 -0
- package/dist/react-native/generated/src/operations/pageBlob.js.map +1 -0
- package/dist/react-native/generated/src/operations/service.d.ts +67 -0
- package/dist/react-native/generated/src/operations/service.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/service.js +323 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/appendBlob.d.ts +37 -0
- package/dist/react-native/generated/src/operationsInterfaces/appendBlob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/appendBlob.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/blob.d.ts +170 -0
- package/dist/react-native/generated/src/operationsInterfaces/blob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/blob.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/blob.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/blockBlob.d.ts +71 -0
- package/dist/react-native/generated/src/operationsInterfaces/blockBlob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/blockBlob.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/container.d.ts +122 -0
- package/dist/react-native/generated/src/operationsInterfaces/container.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/container.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/container.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +7 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js +14 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/pageBlob.d.ts +79 -0
- package/dist/react-native/generated/src/operationsInterfaces/pageBlob.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/pageBlob.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts +59 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/react-native/generated/src/storageClient.d.ts +21 -0
- package/dist/react-native/generated/src/storageClient.d.ts.map +1 -0
- package/dist/react-native/generated/src/storageClient.js +49 -0
- package/dist/react-native/generated/src/storageClient.js.map +1 -0
- package/dist/react-native/generatedModels.d.ts +199 -0
- package/dist/react-native/generatedModels.d.ts.map +1 -0
- package/dist/react-native/generatedModels.js +8 -0
- package/dist/react-native/generatedModels.js.map +1 -0
- package/dist/react-native/index.d.ts +46 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +41 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/internal-avro/AvroConstants.d.ts +5 -0
- package/dist/react-native/internal-avro/AvroConstants.d.ts.map +1 -0
- package/dist/react-native/internal-avro/AvroConstants.js +7 -0
- package/dist/react-native/internal-avro/AvroConstants.js.map +1 -0
- package/dist/react-native/internal-avro/AvroParser.d.ts +57 -0
- package/dist/react-native/internal-avro/AvroParser.d.ts.map +1 -0
- package/dist/react-native/internal-avro/AvroParser.js +317 -0
- package/dist/react-native/internal-avro/AvroParser.js.map +1 -0
- package/dist/react-native/internal-avro/AvroReadable.d.ts +16 -0
- package/dist/react-native/internal-avro/AvroReadable.d.ts.map +1 -0
- package/dist/react-native/internal-avro/AvroReadable.js +5 -0
- package/dist/react-native/internal-avro/AvroReadable.js.map +1 -0
- package/dist/react-native/internal-avro/AvroReadableFromBlob.d.ts +10 -0
- package/dist/react-native/internal-avro/AvroReadableFromBlob.d.ts.map +1 -0
- package/dist/react-native/internal-avro/AvroReadableFromBlob.js +47 -0
- package/dist/react-native/internal-avro/AvroReadableFromBlob.js.map +1 -0
- package/dist/react-native/internal-avro/AvroReadableFromStream.d.ts +11 -0
- package/dist/react-native/internal-avro/AvroReadableFromStream.d.ts.map +1 -0
- package/dist/react-native/internal-avro/AvroReadableFromStream.js +85 -0
- package/dist/react-native/internal-avro/AvroReadableFromStream.js.map +1 -0
- package/dist/react-native/internal-avro/AvroReader.d.ts +32 -0
- package/dist/react-native/internal-avro/AvroReader.d.ts.map +1 -0
- package/dist/react-native/internal-avro/AvroReader.js +106 -0
- package/dist/react-native/internal-avro/AvroReader.js.map +1 -0
- package/dist/react-native/internal-avro/index.d.ts +4 -0
- package/dist/react-native/internal-avro/index.d.ts.map +1 -0
- package/dist/react-native/internal-avro/index.js +6 -0
- package/dist/react-native/internal-avro/index.js.map +1 -0
- package/dist/react-native/internal-avro/utils/utils.common.d.ts +6 -0
- package/dist/react-native/internal-avro/utils/utils.common.d.ts.map +1 -0
- package/dist/react-native/internal-avro/utils/utils.common.js +16 -0
- package/dist/react-native/internal-avro/utils/utils.common.js.map +1 -0
- package/dist/react-native/log.d.ts +5 -0
- package/dist/react-native/log.d.ts.map +1 -0
- package/dist/react-native/log.js +8 -0
- package/dist/react-native/log.js.map +1 -0
- package/dist/react-native/models.d.ts +333 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +115 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.js +20 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/react-native/policies/CredentialPolicy.d.ts +22 -0
- package/dist/react-native/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/CredentialPolicy.js +29 -0
- package/dist/react-native/policies/CredentialPolicy.js.map +1 -0
- package/dist/react-native/policies/RequestPolicy.d.ts +45 -0
- package/dist/react-native/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/RequestPolicy.js +40 -0
- package/dist/react-native/policies/RequestPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/react-native/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicy.js +47 -0
- package/dist/react-native/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.js +27 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/react-native/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicy.js +216 -0
- package/dist/react-native/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/react-native/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyType.js +17 -0
- package/dist/react-native/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.js +167 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js +141 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js +132 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist/react-native/pollers/BlobStartCopyFromUrlPoller.d.ts +74 -0
- package/dist/react-native/pollers/BlobStartCopyFromUrlPoller.d.ts.map +1 -0
- package/dist/react-native/pollers/BlobStartCopyFromUrlPoller.js +130 -0
- package/dist/react-native/pollers/BlobStartCopyFromUrlPoller.js.map +1 -0
- package/dist/react-native/sas/AccountSASPermissions.d.ts +146 -0
- package/dist/react-native/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASPermissions.js +227 -0
- package/dist/react-native/sas/AccountSASPermissions.js.map +1 -0
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASResourceTypes.js +72 -0
- package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/react-native/sas/AccountSASServices.d.ts +40 -0
- package/dist/react-native/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASServices.js +80 -0
- package/dist/react-native/sas/AccountSASServices.js.map +1 -0
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASSignatureValues.js +100 -0
- package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/react-native/sas/BlobSASPermissions.d.ts +127 -0
- package/dist/react-native/sas/BlobSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/BlobSASPermissions.js +195 -0
- package/dist/react-native/sas/BlobSASPermissions.js.map +1 -0
- package/dist/react-native/sas/BlobSASSignatureValues.d.ts +284 -0
- package/dist/react-native/sas/BlobSASSignatureValues.d.ts.map +1 -0
- package/dist/react-native/sas/BlobSASSignatureValues.js +666 -0
- package/dist/react-native/sas/BlobSASSignatureValues.js.map +1 -0
- package/dist/react-native/sas/ContainerSASPermissions.d.ts +143 -0
- package/dist/react-native/sas/ContainerSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/ContainerSASPermissions.js +221 -0
- package/dist/react-native/sas/ContainerSASPermissions.js.map +1 -0
- package/dist/react-native/sas/SASQueryParameters.d.ts +285 -0
- package/dist/react-native/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/react-native/sas/SASQueryParameters.js +234 -0
- package/dist/react-native/sas/SASQueryParameters.js.map +1 -0
- package/dist/react-native/sas/SasIPRange.d.ts +24 -0
- package/dist/react-native/sas/SasIPRange.d.ts.map +1 -0
- package/dist/react-native/sas/SasIPRange.js +13 -0
- package/dist/react-native/sas/SasIPRange.js.map +1 -0
- package/dist/react-native/utils/Batch.d.ts +68 -0
- package/dist/react-native/utils/Batch.d.ts.map +1 -0
- package/dist/react-native/utils/Batch.js +122 -0
- package/dist/react-native/utils/Batch.js.map +1 -0
- package/dist/react-native/utils/BlobQuickQueryStream.d.ts +42 -0
- package/dist/react-native/utils/BlobQuickQueryStream.d.ts.map +1 -0
- package/dist/react-native/utils/BlobQuickQueryStream.js +111 -0
- package/dist/react-native/utils/BlobQuickQueryStream.js.map +1 -0
- package/dist/react-native/utils/Mutex.d.ts +23 -0
- package/dist/react-native/utils/Mutex.d.ts.map +1 -0
- package/dist/react-native/utils/Mutex.js +65 -0
- package/dist/react-native/utils/Mutex.js.map +1 -0
- package/dist/react-native/utils/RetriableReadableStream.d.ts +62 -0
- package/dist/react-native/utils/RetriableReadableStream.d.ts.map +1 -0
- package/dist/react-native/utils/RetriableReadableStream.js +119 -0
- package/dist/react-native/utils/RetriableReadableStream.js.map +1 -0
- package/dist/react-native/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/react-native/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/react-native/utils/SharedKeyComparator.js +73 -0
- package/dist/react-native/utils/SharedKeyComparator.js.map +1 -0
- package/dist/react-native/utils/constants.d.ts +70 -0
- package/dist/react-native/utils/constants.d.ts.map +1 -0
- package/dist/react-native/utils/constants.js +226 -0
- package/dist/react-native/utils/constants.js.map +1 -0
- package/dist/react-native/utils/tracing.d.ts +6 -0
- package/dist/react-native/utils/tracing.d.ts.map +1 -0
- package/dist/react-native/utils/tracing.js +14 -0
- package/dist/react-native/utils/tracing.js.map +1 -0
- package/dist/react-native/utils/utils.common.d.ts +323 -0
- package/dist/react-native/utils/utils.common.d.ts.map +1 -0
- package/dist/react-native/utils/utils.common.js +756 -0
- package/dist/react-native/utils/utils.common.js.map +1 -0
- package/dist/react-native/utils/utils.d.ts +46 -0
- package/dist/react-native/utils/utils.d.ts.map +1 -0
- package/dist/react-native/utils/utils.js +132 -0
- package/dist/react-native/utils/utils.js.map +1 -0
- package/package.json +71 -78
- package/dist/index.js +0 -24988
- package/dist/index.js.map +0 -1
- package/dist-esm/storage-blob/src/BatchResponse.js.map +0 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js +0 -137
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +0 -1
- package/dist-esm/storage-blob/src/BatchUtils.browser.js +0 -11
- package/dist-esm/storage-blob/src/BatchUtils.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/BatchUtils.js +0 -15
- package/dist-esm/storage-blob/src/BatchUtils.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +0 -267
- package/dist-esm/storage-blob/src/BlobBatch.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +0 -140
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js +0 -7
- package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +0 -463
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +0 -192
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +0 -362
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +0 -367
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +0 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +0 -716
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +0 -1
- package/dist-esm/storage-blob/src/Clients.js +0 -2594
- package/dist-esm/storage-blob/src/Clients.js.map +0 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +0 -1209
- package/dist-esm/storage-blob/src/ContainerClient.js.map +0 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +0 -1
- package/dist-esm/storage-blob/src/Pipeline.js +0 -261
- package/dist-esm/storage-blob/src/Pipeline.js.map +0 -1
- package/dist-esm/storage-blob/src/Range.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js +0 -19
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageClient.js +0 -29
- package/dist-esm/storage-blob/src/StorageClient.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js +0 -17
- package/dist-esm/storage-blob/src/StorageContextClient.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js +0 -26
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +0 -1
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js +0 -22
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +0 -1
- package/dist-esm/storage-blob/src/credentials/Credential.js.map +0 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js +0 -5
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js +0 -40
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js +0 -5
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +0 -31
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/index.js +0 -11
- package/dist-esm/storage-blob/src/generated/src/index.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/models/index.js +0 -258
- package/dist-esm/storage-blob/src/generated/src/models/index.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +0 -1610
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js +0 -221
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js +0 -1020
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js +0 -365
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operations/container.js +0 -713
- package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operations/index.js +0 -14
- package/dist-esm/storage-blob/src/generated/src/operations/index.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js +0 -456
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operations/service.js +0 -323
- package/dist-esm/storage-blob/src/generated/src/operations/service.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js +0 -14
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js.map +0 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +0 -49
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +0 -1
- package/dist-esm/storage-blob/src/generatedModels.js.map +0 -1
- package/dist-esm/storage-blob/src/index.browser.js +0 -23
- package/dist-esm/storage-blob/src/index.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/index.js +0 -33
- package/dist-esm/storage-blob/src/index.js.map +0 -1
- package/dist-esm/storage-blob/src/log.js.map +0 -1
- package/dist-esm/storage-blob/src/models.js +0 -115
- package/dist-esm/storage-blob/src/models.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js +0 -20
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +0 -29
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +0 -47
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +0 -31
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js +0 -18
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js +0 -27
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +0 -229
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +0 -180
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +0 -141
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +0 -18
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +0 -132
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/AccountSASServices.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +0 -100
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +0 -576
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +0 -234
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +0 -1
- package/dist-esm/storage-blob/src/sas/SasIPRange.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/Batch.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +0 -111
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +0 -119
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/cache.js +0 -11
- package/dist-esm/storage-blob/src/utils/cache.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/constants.js +0 -226
- package/dist-esm/storage-blob/src/utils/constants.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/tracing.js +0 -14
- package/dist-esm/storage-blob/src/utils/tracing.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/utils.browser.js +0 -48
- package/dist-esm/storage-blob/src/utils/utils.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +0 -756
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js +0 -132
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +0 -1
- package/dist-esm/storage-common/src/BufferScheduler.browser.js +0 -8
- package/dist-esm/storage-common/src/BufferScheduler.browser.js.map +0 -1
- package/dist-esm/storage-common/src/BufferScheduler.js +0 -252
- package/dist-esm/storage-common/src/BufferScheduler.js.map +0 -1
- package/dist-esm/storage-common/src/BuffersStream.js +0 -83
- package/dist-esm/storage-common/src/BuffersStream.js.map +0 -1
- package/dist-esm/storage-common/src/PooledBuffer.js +0 -87
- package/dist-esm/storage-common/src/PooledBuffer.js.map +0 -1
- package/dist-esm/storage-common/src/index.browser.js +0 -4
- package/dist-esm/storage-common/src/index.browser.js.map +0 -1
- package/dist-esm/storage-common/src/index.js +0 -4
- package/dist-esm/storage-common/src/index.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/AvroConstants.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/AvroParser.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/AvroReadable.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js +0 -47
- package/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js +0 -84
- package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/AvroReader.js +0 -106
- package/dist-esm/storage-internal-avro/src/AvroReader.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/index.browser.js +0 -6
- package/dist-esm/storage-internal-avro/src/index.browser.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/index.js +0 -6
- package/dist-esm/storage-internal-avro/src/index.js.map +0 -1
- package/dist-esm/storage-internal-avro/src/utils/utils.common.js.map +0 -1
- package/types/latest/storage-blob.d.ts +0 -11864
- /package/{dist-esm/storage-blob/src → dist/browser}/BatchResponse.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/PageBlobRangeResponse.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/Range.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/credentials/Credential.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generated/src/models/mappers.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generated/src/operationsInterfaces/appendBlob.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generated/src/operationsInterfaces/blob.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generated/src/operationsInterfaces/blockBlob.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generated/src/operationsInterfaces/container.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generated/src/operationsInterfaces/pageBlob.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generated/src/operationsInterfaces/service.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/generatedModels.js +0 -0
- /package/{dist-esm/storage-internal-avro/src → dist/browser/internal-avro}/AvroConstants.js +0 -0
- /package/{dist-esm/storage-internal-avro/src → dist/browser/internal-avro}/AvroParser.js +0 -0
- /package/{dist-esm/storage-internal-avro/src → dist/browser/internal-avro}/AvroReadable.js +0 -0
- /package/{dist-esm/storage-internal-avro/src → dist/browser/internal-avro}/utils/utils.common.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/log.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/policies/RequestPolicy.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/pollers/BlobStartCopyFromUrlPoller.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/sas/AccountSASPermissions.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/sas/AccountSASResourceTypes.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/sas/AccountSASServices.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/sas/BlobSASPermissions.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/sas/ContainerSASPermissions.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/sas/SasIPRange.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/utils/Batch.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/utils/Mutex.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/utils/SharedKeyComparator.js +0 -0
@@ -0,0 +1,2696 @@
|
|
1
|
+
"use strict";
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
3
|
+
// Licensed under the MIT License.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
exports.PageBlobClient = exports.BlockBlobClient = exports.AppendBlobClient = exports.BlobClient = void 0;
|
6
|
+
const tslib_1 = require("tslib");
|
7
|
+
const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
|
8
|
+
const core_auth_1 = require("@azure/core-auth");
|
9
|
+
const core_util_1 = require("@azure/core-util");
|
10
|
+
const core_util_2 = require("@azure/core-util");
|
11
|
+
const BlobDownloadResponse_js_1 = require("./BlobDownloadResponse.js");
|
12
|
+
const BlobQueryResponse_js_1 = require("./BlobQueryResponse.js");
|
13
|
+
const AnonymousCredential_js_1 = require("./credentials/AnonymousCredential.js");
|
14
|
+
const StorageSharedKeyCredential_js_1 = require("./credentials/StorageSharedKeyCredential.js");
|
15
|
+
const models_js_1 = require("./models.js");
|
16
|
+
const PageBlobRangeResponse_js_1 = require("./PageBlobRangeResponse.js");
|
17
|
+
const Pipeline_js_1 = require("./Pipeline.js");
|
18
|
+
const BlobStartCopyFromUrlPoller_js_1 = require("./pollers/BlobStartCopyFromUrlPoller.js");
|
19
|
+
const Range_js_1 = require("./Range.js");
|
20
|
+
const StorageClient_js_1 = require("./StorageClient.js");
|
21
|
+
const Batch_js_1 = require("./utils/Batch.js");
|
22
|
+
const storage_common_1 = require("@azure/storage-common");
|
23
|
+
const constants_js_1 = require("./utils/constants.js");
|
24
|
+
const tracing_js_1 = require("./utils/tracing.js");
|
25
|
+
const utils_common_js_1 = require("./utils/utils.common.js");
|
26
|
+
const utils_js_1 = require("./utils/utils.js");
|
27
|
+
const BlobSASSignatureValues_js_1 = require("./sas/BlobSASSignatureValues.js");
|
28
|
+
const BlobLeaseClient_js_1 = require("./BlobLeaseClient.js");
|
29
|
+
/**
|
30
|
+
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
|
31
|
+
* append blob, or page blob.
|
32
|
+
*/
|
33
|
+
class BlobClient extends StorageClient_js_1.StorageClient {
|
34
|
+
/**
|
35
|
+
* The name of the blob.
|
36
|
+
*/
|
37
|
+
get name() {
|
38
|
+
return this._name;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* The name of the storage container the blob is associated with.
|
42
|
+
*/
|
43
|
+
get containerName() {
|
44
|
+
return this._containerName;
|
45
|
+
}
|
46
|
+
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
47
|
+
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
48
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
49
|
+
options) {
|
50
|
+
options = options || {};
|
51
|
+
let pipeline;
|
52
|
+
let url;
|
53
|
+
if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) {
|
54
|
+
// (url: string, pipeline: Pipeline)
|
55
|
+
url = urlOrConnectionString;
|
56
|
+
pipeline = credentialOrPipelineOrContainerName;
|
57
|
+
}
|
58
|
+
else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) ||
|
59
|
+
credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential ||
|
60
|
+
(0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) {
|
61
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
62
|
+
url = urlOrConnectionString;
|
63
|
+
options = blobNameOrOptions;
|
64
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options);
|
65
|
+
}
|
66
|
+
else if (!credentialOrPipelineOrContainerName &&
|
67
|
+
typeof credentialOrPipelineOrContainerName !== "string") {
|
68
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
69
|
+
// The second parameter is undefined. Use anonymous credential.
|
70
|
+
url = urlOrConnectionString;
|
71
|
+
if (blobNameOrOptions && typeof blobNameOrOptions !== "string") {
|
72
|
+
options = blobNameOrOptions;
|
73
|
+
}
|
74
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
75
|
+
}
|
76
|
+
else if (credentialOrPipelineOrContainerName &&
|
77
|
+
typeof credentialOrPipelineOrContainerName === "string" &&
|
78
|
+
blobNameOrOptions &&
|
79
|
+
typeof blobNameOrOptions === "string") {
|
80
|
+
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
|
81
|
+
const containerName = credentialOrPipelineOrContainerName;
|
82
|
+
const blobName = blobNameOrOptions;
|
83
|
+
const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString);
|
84
|
+
if (extractedCreds.kind === "AccountConnString") {
|
85
|
+
if (core_util_1.isNodeLike) {
|
86
|
+
const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
87
|
+
url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
88
|
+
if (!options.proxyOptions) {
|
89
|
+
options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri);
|
90
|
+
}
|
91
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options);
|
92
|
+
}
|
93
|
+
else {
|
94
|
+
throw new Error("Account connection string is only supported in Node.js environment");
|
95
|
+
}
|
96
|
+
}
|
97
|
+
else if (extractedCreds.kind === "SASConnString") {
|
98
|
+
url =
|
99
|
+
(0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
|
100
|
+
"?" +
|
101
|
+
extractedCreds.accountSas;
|
102
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
106
|
+
}
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
110
|
+
}
|
111
|
+
super(url, pipeline);
|
112
|
+
({ blobName: this._name, containerName: this._containerName } =
|
113
|
+
this.getBlobAndContainerNamesFromUrl());
|
114
|
+
this.blobContext = this.storageClientContext.blob;
|
115
|
+
this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT);
|
116
|
+
this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID);
|
117
|
+
}
|
118
|
+
/**
|
119
|
+
* Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
|
120
|
+
* Provide "" will remove the snapshot and return a Client to the base blob.
|
121
|
+
*
|
122
|
+
* @param snapshot - The snapshot timestamp.
|
123
|
+
* @returns A new BlobClient object identical to the source but with the specified snapshot timestamp
|
124
|
+
*/
|
125
|
+
withSnapshot(snapshot) {
|
126
|
+
return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
|
127
|
+
}
|
128
|
+
/**
|
129
|
+
* Creates a new BlobClient object pointing to a version of this blob.
|
130
|
+
* Provide "" will remove the versionId and return a Client to the base blob.
|
131
|
+
*
|
132
|
+
* @param versionId - The versionId.
|
133
|
+
* @returns A new BlobClient object pointing to the version of this blob.
|
134
|
+
*/
|
135
|
+
withVersion(versionId) {
|
136
|
+
return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline);
|
137
|
+
}
|
138
|
+
/**
|
139
|
+
* Creates a AppendBlobClient object.
|
140
|
+
*
|
141
|
+
*/
|
142
|
+
getAppendBlobClient() {
|
143
|
+
return new AppendBlobClient(this.url, this.pipeline);
|
144
|
+
}
|
145
|
+
/**
|
146
|
+
* Creates a BlockBlobClient object.
|
147
|
+
*
|
148
|
+
*/
|
149
|
+
getBlockBlobClient() {
|
150
|
+
return new BlockBlobClient(this.url, this.pipeline);
|
151
|
+
}
|
152
|
+
/**
|
153
|
+
* Creates a PageBlobClient object.
|
154
|
+
*
|
155
|
+
*/
|
156
|
+
getPageBlobClient() {
|
157
|
+
return new PageBlobClient(this.url, this.pipeline);
|
158
|
+
}
|
159
|
+
/**
|
160
|
+
* Reads or downloads a blob from the system, including its metadata and properties.
|
161
|
+
* You can also call Get Blob to read a snapshot.
|
162
|
+
*
|
163
|
+
* * In Node.js, data returns in a Readable stream readableStreamBody
|
164
|
+
* * In browsers, data returns in a promise blobBody
|
165
|
+
*
|
166
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob
|
167
|
+
*
|
168
|
+
* @param offset - From which position of the blob to download, greater than or equal to 0
|
169
|
+
* @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
|
170
|
+
* @param options - Optional options to Blob Download operation.
|
171
|
+
*
|
172
|
+
*
|
173
|
+
* Example usage (Node.js):
|
174
|
+
*
|
175
|
+
* ```ts snippet:ReadmeSampleDownloadBlob_Node
|
176
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
177
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
178
|
+
*
|
179
|
+
* const account = "<account>";
|
180
|
+
* const blobServiceClient = new BlobServiceClient(
|
181
|
+
* `https://${account}.blob.core.windows.net`,
|
182
|
+
* new DefaultAzureCredential(),
|
183
|
+
* );
|
184
|
+
*
|
185
|
+
* const containerName = "<container name>";
|
186
|
+
* const blobName = "<blob name>";
|
187
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
188
|
+
* const blobClient = containerClient.getBlobClient(blobName);
|
189
|
+
*
|
190
|
+
* // Get blob content from position 0 to the end
|
191
|
+
* // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody
|
192
|
+
* const downloadBlockBlobResponse = await blobClient.download();
|
193
|
+
* if (downloadBlockBlobResponse.readableStreamBody) {
|
194
|
+
* const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody);
|
195
|
+
* console.log(`Downloaded blob content: ${downloaded}`);
|
196
|
+
* }
|
197
|
+
*
|
198
|
+
* async function streamToString(stream: NodeJS.ReadableStream): Promise<string> {
|
199
|
+
* const result = await new Promise<Buffer<ArrayBuffer>>((resolve, reject) => {
|
200
|
+
* const chunks: Buffer[] = [];
|
201
|
+
* stream.on("data", (data) => {
|
202
|
+
* chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data));
|
203
|
+
* });
|
204
|
+
* stream.on("end", () => {
|
205
|
+
* resolve(Buffer.concat(chunks));
|
206
|
+
* });
|
207
|
+
* stream.on("error", reject);
|
208
|
+
* });
|
209
|
+
* return result.toString();
|
210
|
+
* }
|
211
|
+
* ```
|
212
|
+
*
|
213
|
+
* Example usage (browser):
|
214
|
+
*
|
215
|
+
* ```ts snippet:ReadmeSampleDownloadBlob_Browser
|
216
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
217
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
218
|
+
*
|
219
|
+
* const account = "<account>";
|
220
|
+
* const blobServiceClient = new BlobServiceClient(
|
221
|
+
* `https://${account}.blob.core.windows.net`,
|
222
|
+
* new DefaultAzureCredential(),
|
223
|
+
* );
|
224
|
+
*
|
225
|
+
* const containerName = "<container name>";
|
226
|
+
* const blobName = "<blob name>";
|
227
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
228
|
+
* const blobClient = containerClient.getBlobClient(blobName);
|
229
|
+
*
|
230
|
+
* // Get blob content from position 0 to the end
|
231
|
+
* // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody
|
232
|
+
* const downloadBlockBlobResponse = await blobClient.download();
|
233
|
+
* const blobBody = await downloadBlockBlobResponse.blobBody;
|
234
|
+
* if (blobBody) {
|
235
|
+
* const downloaded = await blobBody.text();
|
236
|
+
* console.log(`Downloaded blob content: ${downloaded}`);
|
237
|
+
* }
|
238
|
+
* ```
|
239
|
+
*/
|
240
|
+
async download(offset = 0, count, options = {}) {
|
241
|
+
options.conditions = options.conditions || {};
|
242
|
+
options.conditions = options.conditions || {};
|
243
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
244
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => {
|
245
|
+
var _a;
|
246
|
+
const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({
|
247
|
+
abortSignal: options.abortSignal,
|
248
|
+
leaseAccessConditions: options.conditions,
|
249
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
250
|
+
requestOptions: {
|
251
|
+
onDownloadProgress: core_util_1.isNodeLike ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
|
252
|
+
},
|
253
|
+
range: offset === 0 && !count ? undefined : (0, Range_js_1.rangeToString)({ offset, count }),
|
254
|
+
rangeGetContentMD5: options.rangeGetContentMD5,
|
255
|
+
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
256
|
+
snapshot: options.snapshot,
|
257
|
+
cpkInfo: options.customerProvidedKey,
|
258
|
+
tracingOptions: updatedOptions.tracingOptions,
|
259
|
+
}));
|
260
|
+
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) });
|
261
|
+
// Return browser response immediately
|
262
|
+
if (!core_util_1.isNodeLike) {
|
263
|
+
return wrappedRes;
|
264
|
+
}
|
265
|
+
// We support retrying when download stream unexpected ends in Node.js runtime
|
266
|
+
// Following code shouldn't be bundled into browser build, however some
|
267
|
+
// bundlers may try to bundle following code and "FileReadResponse.ts".
|
268
|
+
// In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts"
|
269
|
+
// The config is in package.json "browser" field
|
270
|
+
if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) {
|
271
|
+
// TODO: Default value or make it a required parameter?
|
272
|
+
options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS;
|
273
|
+
}
|
274
|
+
if (res.contentLength === undefined) {
|
275
|
+
throw new RangeError(`File download response doesn't contain valid content length header`);
|
276
|
+
}
|
277
|
+
if (!res.etag) {
|
278
|
+
throw new RangeError(`File download response doesn't contain valid etag header`);
|
279
|
+
}
|
280
|
+
return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => {
|
281
|
+
var _a;
|
282
|
+
const updatedDownloadOptions = {
|
283
|
+
leaseAccessConditions: options.conditions,
|
284
|
+
modifiedAccessConditions: {
|
285
|
+
ifMatch: options.conditions.ifMatch || res.etag,
|
286
|
+
ifModifiedSince: options.conditions.ifModifiedSince,
|
287
|
+
ifNoneMatch: options.conditions.ifNoneMatch,
|
288
|
+
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
|
289
|
+
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
|
290
|
+
},
|
291
|
+
range: (0, Range_js_1.rangeToString)({
|
292
|
+
count: offset + res.contentLength - start,
|
293
|
+
offset: start,
|
294
|
+
}),
|
295
|
+
rangeGetContentMD5: options.rangeGetContentMD5,
|
296
|
+
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
297
|
+
snapshot: options.snapshot,
|
298
|
+
cpkInfo: options.customerProvidedKey,
|
299
|
+
};
|
300
|
+
// Debug purpose only
|
301
|
+
// console.log(
|
302
|
+
// `Read from internal stream, range: ${
|
303
|
+
// updatedOptions.range
|
304
|
+
// }, options: ${JSON.stringify(updatedOptions)}`
|
305
|
+
// );
|
306
|
+
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
|
307
|
+
}, offset, res.contentLength, {
|
308
|
+
maxRetryRequests: options.maxRetryRequests,
|
309
|
+
onProgress: options.onProgress,
|
310
|
+
});
|
311
|
+
});
|
312
|
+
}
|
313
|
+
/**
|
314
|
+
* Returns true if the Azure blob resource represented by this client exists; false otherwise.
|
315
|
+
*
|
316
|
+
* NOTE: use this function with care since an existing blob might be deleted by other clients or
|
317
|
+
* applications. Vice versa new blobs might be added by other clients or applications after this
|
318
|
+
* function completes.
|
319
|
+
*
|
320
|
+
* @param options - options to Exists operation.
|
321
|
+
*/
|
322
|
+
async exists(options = {}) {
|
323
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => {
|
324
|
+
try {
|
325
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
326
|
+
await this.getProperties({
|
327
|
+
abortSignal: options.abortSignal,
|
328
|
+
customerProvidedKey: options.customerProvidedKey,
|
329
|
+
conditions: options.conditions,
|
330
|
+
tracingOptions: updatedOptions.tracingOptions,
|
331
|
+
});
|
332
|
+
return true;
|
333
|
+
}
|
334
|
+
catch (e) {
|
335
|
+
if (e.statusCode === 404) {
|
336
|
+
// Expected exception when checking blob existence
|
337
|
+
return false;
|
338
|
+
}
|
339
|
+
else if (e.statusCode === 409 &&
|
340
|
+
(e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg ||
|
341
|
+
e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) {
|
342
|
+
// Expected exception when checking blob existence
|
343
|
+
return true;
|
344
|
+
}
|
345
|
+
throw e;
|
346
|
+
}
|
347
|
+
});
|
348
|
+
}
|
349
|
+
/**
|
350
|
+
* Returns all user-defined metadata, standard HTTP properties, and system properties
|
351
|
+
* for the blob. It does not return the content of the blob.
|
352
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties
|
353
|
+
*
|
354
|
+
* WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
|
355
|
+
* they originally contained uppercase characters. This differs from the metadata keys returned by
|
356
|
+
* the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which
|
357
|
+
* will retain their original casing.
|
358
|
+
*
|
359
|
+
* @param options - Optional options to Get Properties operation.
|
360
|
+
*/
|
361
|
+
async getProperties(options = {}) {
|
362
|
+
options.conditions = options.conditions || {};
|
363
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
364
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => {
|
365
|
+
var _a;
|
366
|
+
const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({
|
367
|
+
abortSignal: options.abortSignal,
|
368
|
+
leaseAccessConditions: options.conditions,
|
369
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
370
|
+
cpkInfo: options.customerProvidedKey,
|
371
|
+
tracingOptions: updatedOptions.tracingOptions,
|
372
|
+
}));
|
373
|
+
return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) });
|
374
|
+
});
|
375
|
+
}
|
376
|
+
/**
|
377
|
+
* Marks the specified blob or snapshot for deletion. The blob is later deleted
|
378
|
+
* during garbage collection. Note that in order to delete a blob, you must delete
|
379
|
+
* all of its snapshots. You can delete both at the same time with the Delete
|
380
|
+
* Blob operation.
|
381
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob
|
382
|
+
*
|
383
|
+
* @param options - Optional options to Blob Delete operation.
|
384
|
+
*/
|
385
|
+
async delete(options = {}) {
|
386
|
+
options.conditions = options.conditions || {};
|
387
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => {
|
388
|
+
var _a;
|
389
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({
|
390
|
+
abortSignal: options.abortSignal,
|
391
|
+
deleteSnapshots: options.deleteSnapshots,
|
392
|
+
leaseAccessConditions: options.conditions,
|
393
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
394
|
+
tracingOptions: updatedOptions.tracingOptions,
|
395
|
+
}));
|
396
|
+
});
|
397
|
+
}
|
398
|
+
/**
|
399
|
+
* Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted
|
400
|
+
* during garbage collection. Note that in order to delete a blob, you must delete
|
401
|
+
* all of its snapshots. You can delete both at the same time with the Delete
|
402
|
+
* Blob operation.
|
403
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob
|
404
|
+
*
|
405
|
+
* @param options - Optional options to Blob Delete operation.
|
406
|
+
*/
|
407
|
+
async deleteIfExists(options = {}) {
|
408
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => {
|
409
|
+
var _a, _b;
|
410
|
+
try {
|
411
|
+
const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions));
|
412
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
413
|
+
}
|
414
|
+
catch (e) {
|
415
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
416
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
417
|
+
}
|
418
|
+
throw e;
|
419
|
+
}
|
420
|
+
});
|
421
|
+
}
|
422
|
+
/**
|
423
|
+
* Restores the contents and metadata of soft deleted blob and any associated
|
424
|
+
* soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29
|
425
|
+
* or later.
|
426
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/undelete-blob
|
427
|
+
*
|
428
|
+
* @param options - Optional options to Blob Undelete operation.
|
429
|
+
*/
|
430
|
+
async undelete(options = {}) {
|
431
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => {
|
432
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({
|
433
|
+
abortSignal: options.abortSignal,
|
434
|
+
tracingOptions: updatedOptions.tracingOptions,
|
435
|
+
}));
|
436
|
+
});
|
437
|
+
}
|
438
|
+
/**
|
439
|
+
* Sets system properties on the blob.
|
440
|
+
*
|
441
|
+
* If no value provided, or no value provided for the specified blob HTTP headers,
|
442
|
+
* these blob HTTP headers without a value will be cleared.
|
443
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
|
444
|
+
*
|
445
|
+
* @param blobHTTPHeaders - If no value provided, or no value provided for
|
446
|
+
* the specified blob HTTP headers, these blob HTTP
|
447
|
+
* headers without a value will be cleared.
|
448
|
+
* A common header to set is `blobContentType`
|
449
|
+
* enabling the browser to provide functionality
|
450
|
+
* based on file type.
|
451
|
+
* @param options - Optional options to Blob Set HTTP Headers operation.
|
452
|
+
*/
|
453
|
+
async setHTTPHeaders(blobHTTPHeaders, options = {}) {
|
454
|
+
options.conditions = options.conditions || {};
|
455
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
456
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => {
|
457
|
+
var _a;
|
458
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({
|
459
|
+
abortSignal: options.abortSignal,
|
460
|
+
blobHttpHeaders: blobHTTPHeaders,
|
461
|
+
leaseAccessConditions: options.conditions,
|
462
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
463
|
+
// cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger.
|
464
|
+
tracingOptions: updatedOptions.tracingOptions,
|
465
|
+
}));
|
466
|
+
});
|
467
|
+
}
|
468
|
+
/**
|
469
|
+
* Sets user-defined metadata for the specified blob as one or more name-value pairs.
|
470
|
+
*
|
471
|
+
* If no option provided, or no metadata defined in the parameter, the blob
|
472
|
+
* metadata will be removed.
|
473
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata
|
474
|
+
*
|
475
|
+
* @param metadata - Replace existing metadata with this value.
|
476
|
+
* If no value provided the existing metadata will be removed.
|
477
|
+
* @param options - Optional options to Set Metadata operation.
|
478
|
+
*/
|
479
|
+
async setMetadata(metadata, options = {}) {
|
480
|
+
options.conditions = options.conditions || {};
|
481
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
482
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => {
|
483
|
+
var _a;
|
484
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({
|
485
|
+
abortSignal: options.abortSignal,
|
486
|
+
leaseAccessConditions: options.conditions,
|
487
|
+
metadata,
|
488
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
489
|
+
cpkInfo: options.customerProvidedKey,
|
490
|
+
encryptionScope: options.encryptionScope,
|
491
|
+
tracingOptions: updatedOptions.tracingOptions,
|
492
|
+
}));
|
493
|
+
});
|
494
|
+
}
|
495
|
+
/**
|
496
|
+
* Sets tags on the underlying blob.
|
497
|
+
* A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters.
|
498
|
+
* Valid tag key and value characters include lower and upper case letters, digits (0-9),
|
499
|
+
* space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').
|
500
|
+
*
|
501
|
+
* @param tags -
|
502
|
+
* @param options -
|
503
|
+
*/
|
504
|
+
async setTags(tags, options = {}) {
|
505
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => {
|
506
|
+
var _a;
|
507
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({
|
508
|
+
abortSignal: options.abortSignal,
|
509
|
+
leaseAccessConditions: options.conditions,
|
510
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
511
|
+
tracingOptions: updatedOptions.tracingOptions,
|
512
|
+
tags: (0, utils_common_js_1.toBlobTags)(tags),
|
513
|
+
}));
|
514
|
+
});
|
515
|
+
}
|
516
|
+
/**
|
517
|
+
* Gets the tags associated with the underlying blob.
|
518
|
+
*
|
519
|
+
* @param options -
|
520
|
+
*/
|
521
|
+
async getTags(options = {}) {
|
522
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => {
|
523
|
+
var _a;
|
524
|
+
const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({
|
525
|
+
abortSignal: options.abortSignal,
|
526
|
+
leaseAccessConditions: options.conditions,
|
527
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
528
|
+
tracingOptions: updatedOptions.tracingOptions,
|
529
|
+
}));
|
530
|
+
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} });
|
531
|
+
return wrappedResponse;
|
532
|
+
});
|
533
|
+
}
|
534
|
+
/**
|
535
|
+
* Get a {@link BlobLeaseClient} that manages leases on the blob.
|
536
|
+
*
|
537
|
+
* @param proposeLeaseId - Initial proposed lease Id.
|
538
|
+
* @returns A new BlobLeaseClient object for managing leases on the blob.
|
539
|
+
*/
|
540
|
+
getBlobLeaseClient(proposeLeaseId) {
|
541
|
+
return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId);
|
542
|
+
}
|
543
|
+
/**
|
544
|
+
* Creates a read-only snapshot of a blob.
|
545
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/snapshot-blob
|
546
|
+
*
|
547
|
+
* @param options - Optional options to the Blob Create Snapshot operation.
|
548
|
+
*/
|
549
|
+
async createSnapshot(options = {}) {
|
550
|
+
options.conditions = options.conditions || {};
|
551
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
552
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => {
|
553
|
+
var _a;
|
554
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({
|
555
|
+
abortSignal: options.abortSignal,
|
556
|
+
leaseAccessConditions: options.conditions,
|
557
|
+
metadata: options.metadata,
|
558
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
559
|
+
cpkInfo: options.customerProvidedKey,
|
560
|
+
encryptionScope: options.encryptionScope,
|
561
|
+
tracingOptions: updatedOptions.tracingOptions,
|
562
|
+
}));
|
563
|
+
});
|
564
|
+
}
|
565
|
+
/**
|
566
|
+
* Asynchronously copies a blob to a destination within the storage account.
|
567
|
+
* This method returns a long running operation poller that allows you to wait
|
568
|
+
* indefinitely until the copy is completed.
|
569
|
+
* You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.
|
570
|
+
* Note that the onProgress callback will not be invoked if the operation completes in the first
|
571
|
+
* request, and attempting to cancel a completed copy will result in an error being thrown.
|
572
|
+
*
|
573
|
+
* In version 2012-02-12 and later, the source for a Copy Blob operation can be
|
574
|
+
* a committed blob in any Azure storage account.
|
575
|
+
* Beginning with version 2015-02-21, the source for a Copy Blob operation can be
|
576
|
+
* an Azure file in any Azure storage account.
|
577
|
+
* Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
|
578
|
+
* operation to copy from another storage account.
|
579
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob
|
580
|
+
*
|
581
|
+
* ```ts snippet:ClientsBeginCopyFromURL
|
582
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
583
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
584
|
+
*
|
585
|
+
* const account = "<account>";
|
586
|
+
* const blobServiceClient = new BlobServiceClient(
|
587
|
+
* `https://${account}.blob.core.windows.net`,
|
588
|
+
* new DefaultAzureCredential(),
|
589
|
+
* );
|
590
|
+
*
|
591
|
+
* const containerName = "<container name>";
|
592
|
+
* const blobName = "<blob name>";
|
593
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
594
|
+
* const blobClient = containerClient.getBlobClient(blobName);
|
595
|
+
*
|
596
|
+
* // Example using automatic polling
|
597
|
+
* const automaticCopyPoller = await blobClient.beginCopyFromURL("url");
|
598
|
+
* const automaticResult = await automaticCopyPoller.pollUntilDone();
|
599
|
+
*
|
600
|
+
* // Example using manual polling
|
601
|
+
* const manualCopyPoller = await blobClient.beginCopyFromURL("url");
|
602
|
+
* while (!manualCopyPoller.isDone()) {
|
603
|
+
* await manualCopyPoller.poll();
|
604
|
+
* }
|
605
|
+
* const manualResult = manualCopyPoller.getResult();
|
606
|
+
*
|
607
|
+
* // Example using progress updates
|
608
|
+
* const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", {
|
609
|
+
* onProgress(state) {
|
610
|
+
* console.log(`Progress: ${state.copyProgress}`);
|
611
|
+
* },
|
612
|
+
* });
|
613
|
+
* const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone();
|
614
|
+
*
|
615
|
+
* // Example using a changing polling interval (default 15 seconds)
|
616
|
+
* const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", {
|
617
|
+
* intervalInMs: 1000, // poll blob every 1 second for copy progress
|
618
|
+
* });
|
619
|
+
* const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone();
|
620
|
+
*
|
621
|
+
* // Example using copy cancellation:
|
622
|
+
* const cancelCopyPoller = await blobClient.beginCopyFromURL("url");
|
623
|
+
* // cancel operation after starting it.
|
624
|
+
* try {
|
625
|
+
* await cancelCopyPoller.cancelOperation();
|
626
|
+
* // calls to get the result now throw PollerCancelledError
|
627
|
+
* cancelCopyPoller.getResult();
|
628
|
+
* } catch (err: any) {
|
629
|
+
* if (err.name === "PollerCancelledError") {
|
630
|
+
* console.log("The copy was cancelled.");
|
631
|
+
* }
|
632
|
+
* }
|
633
|
+
* ```
|
634
|
+
*
|
635
|
+
* @param copySource - url to the source Azure Blob/File.
|
636
|
+
* @param options - Optional options to the Blob Start Copy From URL operation.
|
637
|
+
*/
|
638
|
+
async beginCopyFromURL(copySource, options = {}) {
|
639
|
+
const client = {
|
640
|
+
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
|
641
|
+
getProperties: (...args) => this.getProperties(...args),
|
642
|
+
startCopyFromURL: (...args) => this.startCopyFromURL(...args),
|
643
|
+
};
|
644
|
+
const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({
|
645
|
+
blobClient: client,
|
646
|
+
copySource,
|
647
|
+
intervalInMs: options.intervalInMs,
|
648
|
+
onProgress: options.onProgress,
|
649
|
+
resumeFrom: options.resumeFrom,
|
650
|
+
startCopyFromURLOptions: options,
|
651
|
+
});
|
652
|
+
// Trigger the startCopyFromURL call by calling poll.
|
653
|
+
// Any errors from this method should be surfaced to the user.
|
654
|
+
await poller.poll();
|
655
|
+
return poller;
|
656
|
+
}
|
657
|
+
/**
|
658
|
+
* Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero
|
659
|
+
* length and full metadata. Version 2012-02-12 and newer.
|
660
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob
|
661
|
+
*
|
662
|
+
* @param copyId - Id of the Copy From URL operation.
|
663
|
+
* @param options - Optional options to the Blob Abort Copy From URL operation.
|
664
|
+
*/
|
665
|
+
async abortCopyFromURL(copyId, options = {}) {
|
666
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => {
|
667
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, {
|
668
|
+
abortSignal: options.abortSignal,
|
669
|
+
leaseAccessConditions: options.conditions,
|
670
|
+
tracingOptions: updatedOptions.tracingOptions,
|
671
|
+
}));
|
672
|
+
});
|
673
|
+
}
|
674
|
+
/**
|
675
|
+
* The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not
|
676
|
+
* return a response until the copy is complete.
|
677
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url
|
678
|
+
*
|
679
|
+
* @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication
|
680
|
+
* @param options -
|
681
|
+
*/
|
682
|
+
async syncCopyFromURL(copySource, options = {}) {
|
683
|
+
options.conditions = options.conditions || {};
|
684
|
+
options.sourceConditions = options.sourceConditions || {};
|
685
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => {
|
686
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
687
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, {
|
688
|
+
abortSignal: options.abortSignal,
|
689
|
+
metadata: options.metadata,
|
690
|
+
leaseAccessConditions: options.conditions,
|
691
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
692
|
+
sourceModifiedAccessConditions: {
|
693
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
694
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
695
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
696
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
697
|
+
},
|
698
|
+
sourceContentMD5: options.sourceContentMD5,
|
699
|
+
copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization),
|
700
|
+
tier: (0, models_js_1.toAccessTier)(options.tier),
|
701
|
+
blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags),
|
702
|
+
immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn,
|
703
|
+
immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode,
|
704
|
+
legalHold: options.legalHold,
|
705
|
+
encryptionScope: options.encryptionScope,
|
706
|
+
copySourceTags: options.copySourceTags,
|
707
|
+
fileRequestIntent: options.sourceShareTokenIntent,
|
708
|
+
tracingOptions: updatedOptions.tracingOptions,
|
709
|
+
}));
|
710
|
+
});
|
711
|
+
}
|
712
|
+
/**
|
713
|
+
* Sets the tier on a blob. The operation is allowed on a page blob in a premium
|
714
|
+
* storage account and on a block blob in a blob storage account (locally redundant
|
715
|
+
* storage only). A premium page blob's tier determines the allowed size, IOPS,
|
716
|
+
* and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive
|
717
|
+
* storage type. This operation does not update the blob's ETag.
|
718
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-tier
|
719
|
+
*
|
720
|
+
* @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive.
|
721
|
+
* @param options - Optional options to the Blob Set Tier operation.
|
722
|
+
*/
|
723
|
+
async setAccessTier(tier, options = {}) {
|
724
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => {
|
725
|
+
var _a;
|
726
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), {
|
727
|
+
abortSignal: options.abortSignal,
|
728
|
+
leaseAccessConditions: options.conditions,
|
729
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
730
|
+
rehydratePriority: options.rehydratePriority,
|
731
|
+
tracingOptions: updatedOptions.tracingOptions,
|
732
|
+
}));
|
733
|
+
});
|
734
|
+
}
|
735
|
+
async downloadToBuffer(param1, param2, param3, param4 = {}) {
|
736
|
+
var _a;
|
737
|
+
let buffer;
|
738
|
+
let offset = 0;
|
739
|
+
let count = 0;
|
740
|
+
let options = param4;
|
741
|
+
if (param1 instanceof Buffer) {
|
742
|
+
buffer = param1;
|
743
|
+
offset = param2 || 0;
|
744
|
+
count = typeof param3 === "number" ? param3 : 0;
|
745
|
+
}
|
746
|
+
else {
|
747
|
+
offset = typeof param1 === "number" ? param1 : 0;
|
748
|
+
count = typeof param2 === "number" ? param2 : 0;
|
749
|
+
options = param3 || {};
|
750
|
+
}
|
751
|
+
let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0;
|
752
|
+
if (blockSize < 0) {
|
753
|
+
throw new RangeError("blockSize option must be >= 0");
|
754
|
+
}
|
755
|
+
if (blockSize === 0) {
|
756
|
+
blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;
|
757
|
+
}
|
758
|
+
if (offset < 0) {
|
759
|
+
throw new RangeError("offset option must be >= 0");
|
760
|
+
}
|
761
|
+
if (count && count <= 0) {
|
762
|
+
throw new RangeError("count option must be greater than 0");
|
763
|
+
}
|
764
|
+
if (!options.conditions) {
|
765
|
+
options.conditions = {};
|
766
|
+
}
|
767
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => {
|
768
|
+
// Customer doesn't specify length, get it
|
769
|
+
if (!count) {
|
770
|
+
const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
|
771
|
+
count = response.contentLength - offset;
|
772
|
+
if (count < 0) {
|
773
|
+
throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`);
|
774
|
+
}
|
775
|
+
}
|
776
|
+
// Allocate the buffer of size = count if the buffer is not provided
|
777
|
+
if (!buffer) {
|
778
|
+
try {
|
779
|
+
buffer = Buffer.alloc(count);
|
780
|
+
}
|
781
|
+
catch (error) {
|
782
|
+
throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`);
|
783
|
+
}
|
784
|
+
}
|
785
|
+
if (buffer.length < count) {
|
786
|
+
throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`);
|
787
|
+
}
|
788
|
+
let transferProgress = 0;
|
789
|
+
const batch = new Batch_js_1.Batch(options.concurrency);
|
790
|
+
for (let off = offset; off < offset + count; off = off + blockSize) {
|
791
|
+
batch.addOperation(async () => {
|
792
|
+
// Exclusive chunk end position
|
793
|
+
let chunkEnd = offset + count;
|
794
|
+
if (off + blockSize < chunkEnd) {
|
795
|
+
chunkEnd = off + blockSize;
|
796
|
+
}
|
797
|
+
const response = await this.download(off, chunkEnd - off, {
|
798
|
+
abortSignal: options.abortSignal,
|
799
|
+
conditions: options.conditions,
|
800
|
+
maxRetryRequests: options.maxRetryRequestsPerBlock,
|
801
|
+
customerProvidedKey: options.customerProvidedKey,
|
802
|
+
tracingOptions: updatedOptions.tracingOptions,
|
803
|
+
});
|
804
|
+
const stream = response.readableStreamBody;
|
805
|
+
await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset);
|
806
|
+
// Update progress after block is downloaded, in case of block trying
|
807
|
+
// Could provide finer grained progress updating inside HTTP requests,
|
808
|
+
// only if convenience layer download try is enabled
|
809
|
+
transferProgress += chunkEnd - off;
|
810
|
+
if (options.onProgress) {
|
811
|
+
options.onProgress({ loadedBytes: transferProgress });
|
812
|
+
}
|
813
|
+
});
|
814
|
+
}
|
815
|
+
await batch.do();
|
816
|
+
return buffer;
|
817
|
+
});
|
818
|
+
}
|
819
|
+
/**
|
820
|
+
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
821
|
+
*
|
822
|
+
* Downloads an Azure Blob to a local file.
|
823
|
+
* Fails if the the given file path already exits.
|
824
|
+
* Offset and count are optional, pass 0 and undefined respectively to download the entire blob.
|
825
|
+
*
|
826
|
+
* @param filePath -
|
827
|
+
* @param offset - From which position of the block blob to download.
|
828
|
+
* @param count - How much data to be downloaded. Will download to the end when passing undefined.
|
829
|
+
* @param options - Options to Blob download options.
|
830
|
+
* @returns The response data for blob download operation,
|
831
|
+
* but with readableStreamBody set to undefined since its
|
832
|
+
* content is already read and written into a local file
|
833
|
+
* at the specified path.
|
834
|
+
*/
|
835
|
+
async downloadToFile(filePath, offset = 0, count, options = {}) {
|
836
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => {
|
837
|
+
const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
|
838
|
+
if (response.readableStreamBody) {
|
839
|
+
await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath);
|
840
|
+
}
|
841
|
+
// The stream is no longer accessible so setting it to undefined.
|
842
|
+
response.blobDownloadStream = undefined;
|
843
|
+
return response;
|
844
|
+
});
|
845
|
+
}
|
846
|
+
getBlobAndContainerNamesFromUrl() {
|
847
|
+
let containerName;
|
848
|
+
let blobName;
|
849
|
+
try {
|
850
|
+
// URL may look like the following
|
851
|
+
// "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString";
|
852
|
+
// "https://myaccount.blob.core.windows.net/mycontainer/blob";
|
853
|
+
// "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString";
|
854
|
+
// "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt";
|
855
|
+
// IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`
|
856
|
+
// http://localhost:10001/devstoreaccount1/containername/blob
|
857
|
+
const parsedUrl = new URL(this.url);
|
858
|
+
if (parsedUrl.host.split(".")[1] === "blob") {
|
859
|
+
// "https://myaccount.blob.core.windows.net/containername/blob".
|
860
|
+
// .getPath() -> /containername/blob
|
861
|
+
const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?");
|
862
|
+
containerName = pathComponents[1];
|
863
|
+
blobName = pathComponents[3];
|
864
|
+
}
|
865
|
+
else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) {
|
866
|
+
// IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob
|
867
|
+
// Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob
|
868
|
+
// .getPath() -> /devstoreaccount1/containername/blob
|
869
|
+
const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?");
|
870
|
+
containerName = pathComponents[2];
|
871
|
+
blobName = pathComponents[4];
|
872
|
+
}
|
873
|
+
else {
|
874
|
+
// "https://customdomain.com/containername/blob".
|
875
|
+
// .getPath() -> /containername/blob
|
876
|
+
const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?");
|
877
|
+
containerName = pathComponents[1];
|
878
|
+
blobName = pathComponents[3];
|
879
|
+
}
|
880
|
+
// decode the encoded blobName, containerName - to get all the special characters that might be present in them
|
881
|
+
containerName = decodeURIComponent(containerName);
|
882
|
+
blobName = decodeURIComponent(blobName);
|
883
|
+
// Azure Storage Server will replace "\" with "/" in the blob names
|
884
|
+
// doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName
|
885
|
+
blobName = blobName.replace(/\\/g, "/");
|
886
|
+
if (!containerName) {
|
887
|
+
throw new Error("Provided containerName is invalid.");
|
888
|
+
}
|
889
|
+
return { blobName, containerName };
|
890
|
+
}
|
891
|
+
catch (error) {
|
892
|
+
throw new Error("Unable to extract blobName and containerName with provided information.");
|
893
|
+
}
|
894
|
+
}
|
895
|
+
/**
|
896
|
+
* Asynchronously copies a blob to a destination within the storage account.
|
897
|
+
* In version 2012-02-12 and later, the source for a Copy Blob operation can be
|
898
|
+
* a committed blob in any Azure storage account.
|
899
|
+
* Beginning with version 2015-02-21, the source for a Copy Blob operation can be
|
900
|
+
* an Azure file in any Azure storage account.
|
901
|
+
* Only storage accounts created on or after June 7th, 2012 allow the Copy Blob
|
902
|
+
* operation to copy from another storage account.
|
903
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob
|
904
|
+
*
|
905
|
+
* @param copySource - url to the source Azure Blob/File.
|
906
|
+
* @param options - Optional options to the Blob Start Copy From URL operation.
|
907
|
+
*/
|
908
|
+
async startCopyFromURL(copySource, options = {}) {
|
909
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => {
|
910
|
+
var _a, _b, _c;
|
911
|
+
options.conditions = options.conditions || {};
|
912
|
+
options.sourceConditions = options.sourceConditions || {};
|
913
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, {
|
914
|
+
abortSignal: options.abortSignal,
|
915
|
+
leaseAccessConditions: options.conditions,
|
916
|
+
metadata: options.metadata,
|
917
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
918
|
+
sourceModifiedAccessConditions: {
|
919
|
+
sourceIfMatch: options.sourceConditions.ifMatch,
|
920
|
+
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
921
|
+
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
922
|
+
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
923
|
+
sourceIfTags: options.sourceConditions.tagConditions,
|
924
|
+
},
|
925
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
926
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
927
|
+
legalHold: options.legalHold,
|
928
|
+
rehydratePriority: options.rehydratePriority,
|
929
|
+
tier: (0, models_js_1.toAccessTier)(options.tier),
|
930
|
+
blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags),
|
931
|
+
sealBlob: options.sealBlob,
|
932
|
+
tracingOptions: updatedOptions.tracingOptions,
|
933
|
+
}));
|
934
|
+
});
|
935
|
+
}
|
936
|
+
/**
|
937
|
+
* Only available for BlobClient constructed with a shared key credential.
|
938
|
+
*
|
939
|
+
* Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties
|
940
|
+
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
941
|
+
*
|
942
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
943
|
+
*
|
944
|
+
* @param options - Optional parameters.
|
945
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
946
|
+
*/
|
947
|
+
generateSasUrl(options) {
|
948
|
+
return new Promise((resolve) => {
|
949
|
+
if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
|
950
|
+
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
951
|
+
}
|
952
|
+
const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString();
|
953
|
+
resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
|
954
|
+
});
|
955
|
+
}
|
956
|
+
/**
|
957
|
+
* Only available for BlobClient constructed with a shared key credential.
|
958
|
+
*
|
959
|
+
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
|
960
|
+
* the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
|
961
|
+
*
|
962
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
963
|
+
*
|
964
|
+
* @param options - Optional parameters.
|
965
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
966
|
+
*/
|
967
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
968
|
+
generateSasStringToSign(options) {
|
969
|
+
if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
|
970
|
+
throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
|
971
|
+
}
|
972
|
+
return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign;
|
973
|
+
}
|
974
|
+
/**
|
975
|
+
*
|
976
|
+
* Generates a Blob Service Shared Access Signature (SAS) URI based on
|
977
|
+
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
978
|
+
*
|
979
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
980
|
+
*
|
981
|
+
* @param options - Optional parameters.
|
982
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
983
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
984
|
+
*/
|
985
|
+
generateUserDelegationSasUrl(options, userDelegationKey) {
|
986
|
+
return new Promise((resolve) => {
|
987
|
+
const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).toString();
|
988
|
+
resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
|
989
|
+
});
|
990
|
+
}
|
991
|
+
/**
|
992
|
+
* Only available for BlobClient constructed with a shared key credential.
|
993
|
+
*
|
994
|
+
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
|
995
|
+
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
996
|
+
*
|
997
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
998
|
+
*
|
999
|
+
* @param options - Optional parameters.
|
1000
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
1001
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
1002
|
+
*/
|
1003
|
+
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
1004
|
+
return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).stringToSign;
|
1005
|
+
}
|
1006
|
+
/**
|
1007
|
+
* Delete the immutablility policy on the blob.
|
1008
|
+
*
|
1009
|
+
* @param options - Optional options to delete immutability policy on the blob.
|
1010
|
+
*/
|
1011
|
+
async deleteImmutabilityPolicy(options = {}) {
|
1012
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => {
|
1013
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({
|
1014
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1015
|
+
}));
|
1016
|
+
});
|
1017
|
+
}
|
1018
|
+
/**
|
1019
|
+
* Set immutability policy on the blob.
|
1020
|
+
*
|
1021
|
+
* @param options - Optional options to set immutability policy on the blob.
|
1022
|
+
*/
|
1023
|
+
async setImmutabilityPolicy(immutabilityPolicy, options = {}) {
|
1024
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => {
|
1025
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({
|
1026
|
+
immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn,
|
1027
|
+
immutabilityPolicyMode: immutabilityPolicy.policyMode,
|
1028
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1029
|
+
}));
|
1030
|
+
});
|
1031
|
+
}
|
1032
|
+
/**
|
1033
|
+
* Set legal hold on the blob.
|
1034
|
+
*
|
1035
|
+
* @param options - Optional options to set legal hold on the blob.
|
1036
|
+
*/
|
1037
|
+
async setLegalHold(legalHoldEnabled, options = {}) {
|
1038
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => {
|
1039
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, {
|
1040
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1041
|
+
}));
|
1042
|
+
});
|
1043
|
+
}
|
1044
|
+
/**
|
1045
|
+
* The Get Account Information operation returns the sku name and account kind
|
1046
|
+
* for the specified account.
|
1047
|
+
* The Get Account Information operation is available on service versions beginning
|
1048
|
+
* with version 2018-03-28.
|
1049
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information
|
1050
|
+
*
|
1051
|
+
* @param options - Options to the Service Get Account Info operation.
|
1052
|
+
* @returns Response data for the Service Get Account Info operation.
|
1053
|
+
*/
|
1054
|
+
async getAccountInfo(options = {}) {
|
1055
|
+
return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => {
|
1056
|
+
return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({
|
1057
|
+
abortSignal: options.abortSignal,
|
1058
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1059
|
+
}));
|
1060
|
+
});
|
1061
|
+
}
|
1062
|
+
}
|
1063
|
+
exports.BlobClient = BlobClient;
|
1064
|
+
/**
|
1065
|
+
* AppendBlobClient defines a set of operations applicable to append blobs.
|
1066
|
+
*/
|
1067
|
+
class AppendBlobClient extends BlobClient {
|
1068
|
+
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
1069
|
+
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
1070
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
1071
|
+
options) {
|
1072
|
+
// In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.
|
1073
|
+
// super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);
|
1074
|
+
let pipeline;
|
1075
|
+
let url;
|
1076
|
+
options = options || {};
|
1077
|
+
if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) {
|
1078
|
+
// (url: string, pipeline: Pipeline)
|
1079
|
+
url = urlOrConnectionString;
|
1080
|
+
pipeline = credentialOrPipelineOrContainerName;
|
1081
|
+
}
|
1082
|
+
else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) ||
|
1083
|
+
credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential ||
|
1084
|
+
(0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) {
|
1085
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString;
|
1086
|
+
url = urlOrConnectionString;
|
1087
|
+
options = blobNameOrOptions;
|
1088
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options);
|
1089
|
+
}
|
1090
|
+
else if (!credentialOrPipelineOrContainerName &&
|
1091
|
+
typeof credentialOrPipelineOrContainerName !== "string") {
|
1092
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
1093
|
+
url = urlOrConnectionString;
|
1094
|
+
// The second parameter is undefined. Use anonymous credential.
|
1095
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
1096
|
+
}
|
1097
|
+
else if (credentialOrPipelineOrContainerName &&
|
1098
|
+
typeof credentialOrPipelineOrContainerName === "string" &&
|
1099
|
+
blobNameOrOptions &&
|
1100
|
+
typeof blobNameOrOptions === "string") {
|
1101
|
+
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
|
1102
|
+
const containerName = credentialOrPipelineOrContainerName;
|
1103
|
+
const blobName = blobNameOrOptions;
|
1104
|
+
const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString);
|
1105
|
+
if (extractedCreds.kind === "AccountConnString") {
|
1106
|
+
if (core_util_1.isNodeLike) {
|
1107
|
+
const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
1108
|
+
url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
1109
|
+
if (!options.proxyOptions) {
|
1110
|
+
options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri);
|
1111
|
+
}
|
1112
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options);
|
1113
|
+
}
|
1114
|
+
else {
|
1115
|
+
throw new Error("Account connection string is only supported in Node.js environment");
|
1116
|
+
}
|
1117
|
+
}
|
1118
|
+
else if (extractedCreds.kind === "SASConnString") {
|
1119
|
+
url =
|
1120
|
+
(0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
|
1121
|
+
"?" +
|
1122
|
+
extractedCreds.accountSas;
|
1123
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
1124
|
+
}
|
1125
|
+
else {
|
1126
|
+
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
1127
|
+
}
|
1128
|
+
}
|
1129
|
+
else {
|
1130
|
+
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
1131
|
+
}
|
1132
|
+
super(url, pipeline);
|
1133
|
+
this.appendBlobContext = this.storageClientContext.appendBlob;
|
1134
|
+
}
|
1135
|
+
/**
|
1136
|
+
* Creates a new AppendBlobClient object identical to the source but with the
|
1137
|
+
* specified snapshot timestamp.
|
1138
|
+
* Provide "" will remove the snapshot and return a Client to the base blob.
|
1139
|
+
*
|
1140
|
+
* @param snapshot - The snapshot timestamp.
|
1141
|
+
* @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.
|
1142
|
+
*/
|
1143
|
+
withSnapshot(snapshot) {
|
1144
|
+
return new AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
|
1145
|
+
}
|
1146
|
+
/**
|
1147
|
+
* Creates a 0-length append blob. Call AppendBlock to append data to an append blob.
|
1148
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
|
1149
|
+
*
|
1150
|
+
* @param options - Options to the Append Block Create operation.
|
1151
|
+
*
|
1152
|
+
*
|
1153
|
+
* Example usage:
|
1154
|
+
*
|
1155
|
+
* ```ts snippet:ClientsCreateAppendBlob
|
1156
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
1157
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
1158
|
+
*
|
1159
|
+
* const account = "<account>";
|
1160
|
+
* const blobServiceClient = new BlobServiceClient(
|
1161
|
+
* `https://${account}.blob.core.windows.net`,
|
1162
|
+
* new DefaultAzureCredential(),
|
1163
|
+
* );
|
1164
|
+
*
|
1165
|
+
* const containerName = "<container name>";
|
1166
|
+
* const blobName = "<blob name>";
|
1167
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
1168
|
+
*
|
1169
|
+
* const appendBlobClient = containerClient.getAppendBlobClient(blobName);
|
1170
|
+
* await appendBlobClient.create();
|
1171
|
+
* ```
|
1172
|
+
*/
|
1173
|
+
async create(options = {}) {
|
1174
|
+
options.conditions = options.conditions || {};
|
1175
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1176
|
+
return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => {
|
1177
|
+
var _a, _b, _c;
|
1178
|
+
return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, {
|
1179
|
+
abortSignal: options.abortSignal,
|
1180
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1181
|
+
leaseAccessConditions: options.conditions,
|
1182
|
+
metadata: options.metadata,
|
1183
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1184
|
+
cpkInfo: options.customerProvidedKey,
|
1185
|
+
encryptionScope: options.encryptionScope,
|
1186
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
1187
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
1188
|
+
legalHold: options.legalHold,
|
1189
|
+
blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags),
|
1190
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1191
|
+
}));
|
1192
|
+
});
|
1193
|
+
}
|
1194
|
+
/**
|
1195
|
+
* Creates a 0-length append blob. Call AppendBlock to append data to an append blob.
|
1196
|
+
* If the blob with the same name already exists, the content of the existing blob will remain unchanged.
|
1197
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
|
1198
|
+
*
|
1199
|
+
* @param options -
|
1200
|
+
*/
|
1201
|
+
async createIfNotExists(options = {}) {
|
1202
|
+
const conditions = { ifNoneMatch: constants_js_1.ETagAny };
|
1203
|
+
return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => {
|
1204
|
+
var _a, _b;
|
1205
|
+
try {
|
1206
|
+
const res = (0, utils_common_js_1.assertResponse)(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions })));
|
1207
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
1208
|
+
}
|
1209
|
+
catch (e) {
|
1210
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
1211
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
1212
|
+
}
|
1213
|
+
throw e;
|
1214
|
+
}
|
1215
|
+
});
|
1216
|
+
}
|
1217
|
+
/**
|
1218
|
+
* Seals the append blob, making it read only.
|
1219
|
+
*
|
1220
|
+
* @param options -
|
1221
|
+
*/
|
1222
|
+
async seal(options = {}) {
|
1223
|
+
options.conditions = options.conditions || {};
|
1224
|
+
return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => {
|
1225
|
+
var _a;
|
1226
|
+
return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({
|
1227
|
+
abortSignal: options.abortSignal,
|
1228
|
+
appendPositionAccessConditions: options.conditions,
|
1229
|
+
leaseAccessConditions: options.conditions,
|
1230
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1231
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1232
|
+
}));
|
1233
|
+
});
|
1234
|
+
}
|
1235
|
+
/**
|
1236
|
+
* Commits a new block of data to the end of the existing append blob.
|
1237
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/append-block
|
1238
|
+
*
|
1239
|
+
* @param body - Data to be appended.
|
1240
|
+
* @param contentLength - Length of the body in bytes.
|
1241
|
+
* @param options - Options to the Append Block operation.
|
1242
|
+
*
|
1243
|
+
*
|
1244
|
+
* Example usage:
|
1245
|
+
*
|
1246
|
+
* ```ts snippet:ClientsAppendBlock
|
1247
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
1248
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
1249
|
+
*
|
1250
|
+
* const account = "<account>";
|
1251
|
+
* const blobServiceClient = new BlobServiceClient(
|
1252
|
+
* `https://${account}.blob.core.windows.net`,
|
1253
|
+
* new DefaultAzureCredential(),
|
1254
|
+
* );
|
1255
|
+
*
|
1256
|
+
* const containerName = "<container name>";
|
1257
|
+
* const blobName = "<blob name>";
|
1258
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
1259
|
+
*
|
1260
|
+
* const content = "Hello World!";
|
1261
|
+
*
|
1262
|
+
* // Create a new append blob and append data to the blob.
|
1263
|
+
* const newAppendBlobClient = containerClient.getAppendBlobClient(blobName);
|
1264
|
+
* await newAppendBlobClient.create();
|
1265
|
+
* await newAppendBlobClient.appendBlock(content, content.length);
|
1266
|
+
*
|
1267
|
+
* // Append data to an existing append blob.
|
1268
|
+
* const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName);
|
1269
|
+
* await existingAppendBlobClient.appendBlock(content, content.length);
|
1270
|
+
* ```
|
1271
|
+
*/
|
1272
|
+
async appendBlock(body, contentLength, options = {}) {
|
1273
|
+
options.conditions = options.conditions || {};
|
1274
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1275
|
+
return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => {
|
1276
|
+
var _a;
|
1277
|
+
return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, {
|
1278
|
+
abortSignal: options.abortSignal,
|
1279
|
+
appendPositionAccessConditions: options.conditions,
|
1280
|
+
leaseAccessConditions: options.conditions,
|
1281
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1282
|
+
requestOptions: {
|
1283
|
+
onUploadProgress: options.onProgress,
|
1284
|
+
},
|
1285
|
+
transactionalContentMD5: options.transactionalContentMD5,
|
1286
|
+
transactionalContentCrc64: options.transactionalContentCrc64,
|
1287
|
+
cpkInfo: options.customerProvidedKey,
|
1288
|
+
encryptionScope: options.encryptionScope,
|
1289
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1290
|
+
}));
|
1291
|
+
});
|
1292
|
+
}
|
1293
|
+
/**
|
1294
|
+
* The Append Block operation commits a new block of data to the end of an existing append blob
|
1295
|
+
* where the contents are read from a source url.
|
1296
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/append-block-from-url
|
1297
|
+
*
|
1298
|
+
* @param sourceURL -
|
1299
|
+
* The url to the blob that will be the source of the copy. A source blob in the same storage account can
|
1300
|
+
* be authenticated via Shared Key. However, if the source is a blob in another account, the source blob
|
1301
|
+
* must either be public or must be authenticated via a shared access signature. If the source blob is
|
1302
|
+
* public, no authentication is required to perform the operation.
|
1303
|
+
* @param sourceOffset - Offset in source to be appended
|
1304
|
+
* @param count - Number of bytes to be appended as a block
|
1305
|
+
* @param options -
|
1306
|
+
*/
|
1307
|
+
async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) {
|
1308
|
+
options.conditions = options.conditions || {};
|
1309
|
+
options.sourceConditions = options.sourceConditions || {};
|
1310
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1311
|
+
return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => {
|
1312
|
+
var _a, _b, _c, _d, _e;
|
1313
|
+
return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, {
|
1314
|
+
abortSignal: options.abortSignal,
|
1315
|
+
sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }),
|
1316
|
+
sourceContentMD5: options.sourceContentMD5,
|
1317
|
+
sourceContentCrc64: options.sourceContentCrc64,
|
1318
|
+
leaseAccessConditions: options.conditions,
|
1319
|
+
appendPositionAccessConditions: options.conditions,
|
1320
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1321
|
+
sourceModifiedAccessConditions: {
|
1322
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
1323
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
1324
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
1325
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
1326
|
+
},
|
1327
|
+
copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization),
|
1328
|
+
cpkInfo: options.customerProvidedKey,
|
1329
|
+
encryptionScope: options.encryptionScope,
|
1330
|
+
fileRequestIntent: options.sourceShareTokenIntent,
|
1331
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1332
|
+
}));
|
1333
|
+
});
|
1334
|
+
}
|
1335
|
+
}
|
1336
|
+
exports.AppendBlobClient = AppendBlobClient;
|
1337
|
+
/**
|
1338
|
+
* BlockBlobClient defines a set of operations applicable to block blobs.
|
1339
|
+
*/
|
1340
|
+
class BlockBlobClient extends BlobClient {
|
1341
|
+
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
1342
|
+
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
1343
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
1344
|
+
options) {
|
1345
|
+
// In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.
|
1346
|
+
// super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);
|
1347
|
+
let pipeline;
|
1348
|
+
let url;
|
1349
|
+
options = options || {};
|
1350
|
+
if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) {
|
1351
|
+
// (url: string, pipeline: Pipeline)
|
1352
|
+
url = urlOrConnectionString;
|
1353
|
+
pipeline = credentialOrPipelineOrContainerName;
|
1354
|
+
}
|
1355
|
+
else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) ||
|
1356
|
+
credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential ||
|
1357
|
+
(0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) {
|
1358
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
1359
|
+
url = urlOrConnectionString;
|
1360
|
+
options = blobNameOrOptions;
|
1361
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options);
|
1362
|
+
}
|
1363
|
+
else if (!credentialOrPipelineOrContainerName &&
|
1364
|
+
typeof credentialOrPipelineOrContainerName !== "string") {
|
1365
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
1366
|
+
// The second parameter is undefined. Use anonymous credential.
|
1367
|
+
url = urlOrConnectionString;
|
1368
|
+
if (blobNameOrOptions && typeof blobNameOrOptions !== "string") {
|
1369
|
+
options = blobNameOrOptions;
|
1370
|
+
}
|
1371
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
1372
|
+
}
|
1373
|
+
else if (credentialOrPipelineOrContainerName &&
|
1374
|
+
typeof credentialOrPipelineOrContainerName === "string" &&
|
1375
|
+
blobNameOrOptions &&
|
1376
|
+
typeof blobNameOrOptions === "string") {
|
1377
|
+
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
|
1378
|
+
const containerName = credentialOrPipelineOrContainerName;
|
1379
|
+
const blobName = blobNameOrOptions;
|
1380
|
+
const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString);
|
1381
|
+
if (extractedCreds.kind === "AccountConnString") {
|
1382
|
+
if (core_util_1.isNodeLike) {
|
1383
|
+
const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
1384
|
+
url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
1385
|
+
if (!options.proxyOptions) {
|
1386
|
+
options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri);
|
1387
|
+
}
|
1388
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options);
|
1389
|
+
}
|
1390
|
+
else {
|
1391
|
+
throw new Error("Account connection string is only supported in Node.js environment");
|
1392
|
+
}
|
1393
|
+
}
|
1394
|
+
else if (extractedCreds.kind === "SASConnString") {
|
1395
|
+
url =
|
1396
|
+
(0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
|
1397
|
+
"?" +
|
1398
|
+
extractedCreds.accountSas;
|
1399
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
1400
|
+
}
|
1401
|
+
else {
|
1402
|
+
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
1403
|
+
}
|
1404
|
+
}
|
1405
|
+
else {
|
1406
|
+
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
1407
|
+
}
|
1408
|
+
super(url, pipeline);
|
1409
|
+
this.blockBlobContext = this.storageClientContext.blockBlob;
|
1410
|
+
this._blobContext = this.storageClientContext.blob;
|
1411
|
+
}
|
1412
|
+
/**
|
1413
|
+
* Creates a new BlockBlobClient object identical to the source but with the
|
1414
|
+
* specified snapshot timestamp.
|
1415
|
+
* Provide "" will remove the snapshot and return a URL to the base blob.
|
1416
|
+
*
|
1417
|
+
* @param snapshot - The snapshot timestamp.
|
1418
|
+
* @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.
|
1419
|
+
*/
|
1420
|
+
withSnapshot(snapshot) {
|
1421
|
+
return new BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
|
1422
|
+
}
|
1423
|
+
/**
|
1424
|
+
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
1425
|
+
*
|
1426
|
+
* Quick query for a JSON or CSV formatted blob.
|
1427
|
+
*
|
1428
|
+
* Example usage (Node.js):
|
1429
|
+
*
|
1430
|
+
* ```ts snippet:ClientsQuery
|
1431
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
1432
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
1433
|
+
*
|
1434
|
+
* const account = "<account>";
|
1435
|
+
* const blobServiceClient = new BlobServiceClient(
|
1436
|
+
* `https://${account}.blob.core.windows.net`,
|
1437
|
+
* new DefaultAzureCredential(),
|
1438
|
+
* );
|
1439
|
+
*
|
1440
|
+
* const containerName = "<container name>";
|
1441
|
+
* const blobName = "<blob name>";
|
1442
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
1443
|
+
* const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
1444
|
+
*
|
1445
|
+
* // Query and convert a blob to a string
|
1446
|
+
* const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage");
|
1447
|
+
* if (queryBlockBlobResponse.readableStreamBody) {
|
1448
|
+
* const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody);
|
1449
|
+
* const downloaded = downloadedBuffer.toString();
|
1450
|
+
* console.log(`Query blob content: ${downloaded}`);
|
1451
|
+
* }
|
1452
|
+
*
|
1453
|
+
* async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise<Buffer> {
|
1454
|
+
* return new Promise((resolve, reject) => {
|
1455
|
+
* const chunks: Buffer[] = [];
|
1456
|
+
* readableStream.on("data", (data) => {
|
1457
|
+
* chunks.push(data instanceof Buffer ? data : Buffer.from(data));
|
1458
|
+
* });
|
1459
|
+
* readableStream.on("end", () => {
|
1460
|
+
* resolve(Buffer.concat(chunks));
|
1461
|
+
* });
|
1462
|
+
* readableStream.on("error", reject);
|
1463
|
+
* });
|
1464
|
+
* }
|
1465
|
+
* ```
|
1466
|
+
*
|
1467
|
+
* @param query -
|
1468
|
+
* @param options -
|
1469
|
+
*/
|
1470
|
+
async query(query, options = {}) {
|
1471
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1472
|
+
if (!core_util_1.isNodeLike) {
|
1473
|
+
throw new Error("This operation currently is only supported in Node.js.");
|
1474
|
+
}
|
1475
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => {
|
1476
|
+
var _a;
|
1477
|
+
const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({
|
1478
|
+
abortSignal: options.abortSignal,
|
1479
|
+
queryRequest: {
|
1480
|
+
queryType: "SQL",
|
1481
|
+
expression: query,
|
1482
|
+
inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration),
|
1483
|
+
outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration),
|
1484
|
+
},
|
1485
|
+
leaseAccessConditions: options.conditions,
|
1486
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1487
|
+
cpkInfo: options.customerProvidedKey,
|
1488
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1489
|
+
}));
|
1490
|
+
return new BlobQueryResponse_js_1.BlobQueryResponse(response, {
|
1491
|
+
abortSignal: options.abortSignal,
|
1492
|
+
onProgress: options.onProgress,
|
1493
|
+
onError: options.onError,
|
1494
|
+
});
|
1495
|
+
});
|
1496
|
+
}
|
1497
|
+
/**
|
1498
|
+
* Creates a new block blob, or updates the content of an existing block blob.
|
1499
|
+
* Updating an existing block blob overwrites any existing metadata on the blob.
|
1500
|
+
* Partial updates are not supported; the content of the existing blob is
|
1501
|
+
* overwritten with the new content. To perform a partial update of a block blob's,
|
1502
|
+
* use {@link stageBlock} and {@link commitBlockList}.
|
1503
|
+
*
|
1504
|
+
* This is a non-parallel uploading method, please use {@link uploadFile},
|
1505
|
+
* {@link uploadStream} or {@link uploadBrowserData} for better performance
|
1506
|
+
* with concurrency uploading.
|
1507
|
+
*
|
1508
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
|
1509
|
+
*
|
1510
|
+
* @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function
|
1511
|
+
* which returns a new Readable stream whose offset is from data source beginning.
|
1512
|
+
* @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a
|
1513
|
+
* string including non non-Base64/Hex-encoded characters.
|
1514
|
+
* @param options - Options to the Block Blob Upload operation.
|
1515
|
+
* @returns Response data for the Block Blob Upload operation.
|
1516
|
+
*
|
1517
|
+
* Example usage:
|
1518
|
+
*
|
1519
|
+
* ```ts snippet:ClientsUpload
|
1520
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
1521
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
1522
|
+
*
|
1523
|
+
* const account = "<account>";
|
1524
|
+
* const blobServiceClient = new BlobServiceClient(
|
1525
|
+
* `https://${account}.blob.core.windows.net`,
|
1526
|
+
* new DefaultAzureCredential(),
|
1527
|
+
* );
|
1528
|
+
*
|
1529
|
+
* const containerName = "<container name>";
|
1530
|
+
* const blobName = "<blob name>";
|
1531
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
1532
|
+
* const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
1533
|
+
*
|
1534
|
+
* const content = "Hello world!";
|
1535
|
+
* const uploadBlobResponse = await blockBlobClient.upload(content, content.length);
|
1536
|
+
* ```
|
1537
|
+
*/
|
1538
|
+
async upload(body, contentLength, options = {}) {
|
1539
|
+
options.conditions = options.conditions || {};
|
1540
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1541
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => {
|
1542
|
+
var _a, _b, _c;
|
1543
|
+
return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, {
|
1544
|
+
abortSignal: options.abortSignal,
|
1545
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1546
|
+
leaseAccessConditions: options.conditions,
|
1547
|
+
metadata: options.metadata,
|
1548
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1549
|
+
requestOptions: {
|
1550
|
+
onUploadProgress: options.onProgress,
|
1551
|
+
},
|
1552
|
+
cpkInfo: options.customerProvidedKey,
|
1553
|
+
encryptionScope: options.encryptionScope,
|
1554
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
1555
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
1556
|
+
legalHold: options.legalHold,
|
1557
|
+
tier: (0, models_js_1.toAccessTier)(options.tier),
|
1558
|
+
blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags),
|
1559
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1560
|
+
}));
|
1561
|
+
});
|
1562
|
+
}
|
1563
|
+
/**
|
1564
|
+
* Creates a new Block Blob where the contents of the blob are read from a given URL.
|
1565
|
+
* This API is supported beginning with the 2020-04-08 version. Partial updates
|
1566
|
+
* are not supported with Put Blob from URL; the content of an existing blob is overwritten with
|
1567
|
+
* the content of the new blob. To perform partial updates to a block blob’s contents using a
|
1568
|
+
* source URL, use {@link stageBlockFromURL} and {@link commitBlockList}.
|
1569
|
+
*
|
1570
|
+
* @param sourceURL - Specifies the URL of the blob. The value
|
1571
|
+
* may be a URL of up to 2 KB in length that specifies a blob.
|
1572
|
+
* The value should be URL-encoded as it would appear
|
1573
|
+
* in a request URI. The source blob must either be public
|
1574
|
+
* or must be authenticated via a shared access signature.
|
1575
|
+
* If the source blob is public, no authentication is required
|
1576
|
+
* to perform the operation. Here are some examples of source object URLs:
|
1577
|
+
* - https://myaccount.blob.core.windows.net/mycontainer/myblob
|
1578
|
+
* - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
|
1579
|
+
* @param options - Optional parameters.
|
1580
|
+
*/
|
1581
|
+
async syncUploadFromURL(sourceURL, options = {}) {
|
1582
|
+
options.conditions = options.conditions || {};
|
1583
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1584
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => {
|
1585
|
+
var _a, _b, _c, _d, _e, _f;
|
1586
|
+
return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {
|
1587
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
1588
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
1589
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
1590
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
1591
|
+
sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions,
|
1592
|
+
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), tier: (0, models_js_1.toAccessTier)(options.tier), blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), copySourceTags: options.copySourceTags, fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })));
|
1593
|
+
});
|
1594
|
+
}
|
1595
|
+
/**
|
1596
|
+
* Uploads the specified block to the block blob's "staging area" to be later
|
1597
|
+
* committed by a call to commitBlockList.
|
1598
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-block
|
1599
|
+
*
|
1600
|
+
* @param blockId - A 64-byte value that is base64-encoded
|
1601
|
+
* @param body - Data to upload to the staging area.
|
1602
|
+
* @param contentLength - Number of bytes to upload.
|
1603
|
+
* @param options - Options to the Block Blob Stage Block operation.
|
1604
|
+
* @returns Response data for the Block Blob Stage Block operation.
|
1605
|
+
*/
|
1606
|
+
async stageBlock(blockId, body, contentLength, options = {}) {
|
1607
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1608
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => {
|
1609
|
+
return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, {
|
1610
|
+
abortSignal: options.abortSignal,
|
1611
|
+
leaseAccessConditions: options.conditions,
|
1612
|
+
requestOptions: {
|
1613
|
+
onUploadProgress: options.onProgress,
|
1614
|
+
},
|
1615
|
+
transactionalContentMD5: options.transactionalContentMD5,
|
1616
|
+
transactionalContentCrc64: options.transactionalContentCrc64,
|
1617
|
+
cpkInfo: options.customerProvidedKey,
|
1618
|
+
encryptionScope: options.encryptionScope,
|
1619
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1620
|
+
}));
|
1621
|
+
});
|
1622
|
+
}
|
1623
|
+
/**
|
1624
|
+
* The Stage Block From URL operation creates a new block to be committed as part
|
1625
|
+
* of a blob where the contents are read from a URL.
|
1626
|
+
* This API is available starting in version 2018-03-28.
|
1627
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-from-url
|
1628
|
+
*
|
1629
|
+
* @param blockId - A 64-byte value that is base64-encoded
|
1630
|
+
* @param sourceURL - Specifies the URL of the blob. The value
|
1631
|
+
* may be a URL of up to 2 KB in length that specifies a blob.
|
1632
|
+
* The value should be URL-encoded as it would appear
|
1633
|
+
* in a request URI. The source blob must either be public
|
1634
|
+
* or must be authenticated via a shared access signature.
|
1635
|
+
* If the source blob is public, no authentication is required
|
1636
|
+
* to perform the operation. Here are some examples of source object URLs:
|
1637
|
+
* - https://myaccount.blob.core.windows.net/mycontainer/myblob
|
1638
|
+
* - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
|
1639
|
+
* @param offset - From which position of the blob to download, greater than or equal to 0
|
1640
|
+
* @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined
|
1641
|
+
* @param options - Options to the Block Blob Stage Block From URL operation.
|
1642
|
+
* @returns Response data for the Block Blob Stage Block From URL operation.
|
1643
|
+
*/
|
1644
|
+
async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) {
|
1645
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1646
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => {
|
1647
|
+
return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, {
|
1648
|
+
abortSignal: options.abortSignal,
|
1649
|
+
leaseAccessConditions: options.conditions,
|
1650
|
+
sourceContentMD5: options.sourceContentMD5,
|
1651
|
+
sourceContentCrc64: options.sourceContentCrc64,
|
1652
|
+
sourceRange: offset === 0 && !count ? undefined : (0, Range_js_1.rangeToString)({ offset, count }),
|
1653
|
+
cpkInfo: options.customerProvidedKey,
|
1654
|
+
encryptionScope: options.encryptionScope,
|
1655
|
+
copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization),
|
1656
|
+
fileRequestIntent: options.sourceShareTokenIntent,
|
1657
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1658
|
+
}));
|
1659
|
+
});
|
1660
|
+
}
|
1661
|
+
/**
|
1662
|
+
* Writes a blob by specifying the list of block IDs that make up the blob.
|
1663
|
+
* In order to be written as part of a blob, a block must have been successfully written
|
1664
|
+
* to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to
|
1665
|
+
* update a blob by uploading only those blocks that have changed, then committing the new and existing
|
1666
|
+
* blocks together. Any blocks not specified in the block list and permanently deleted.
|
1667
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-block-list
|
1668
|
+
*
|
1669
|
+
* @param blocks - Array of 64-byte value that is base64-encoded
|
1670
|
+
* @param options - Options to the Block Blob Commit Block List operation.
|
1671
|
+
* @returns Response data for the Block Blob Commit Block List operation.
|
1672
|
+
*/
|
1673
|
+
async commitBlockList(blocks, options = {}) {
|
1674
|
+
options.conditions = options.conditions || {};
|
1675
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
1676
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => {
|
1677
|
+
var _a, _b, _c;
|
1678
|
+
return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, {
|
1679
|
+
abortSignal: options.abortSignal,
|
1680
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
1681
|
+
leaseAccessConditions: options.conditions,
|
1682
|
+
metadata: options.metadata,
|
1683
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1684
|
+
cpkInfo: options.customerProvidedKey,
|
1685
|
+
encryptionScope: options.encryptionScope,
|
1686
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
1687
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
1688
|
+
legalHold: options.legalHold,
|
1689
|
+
tier: (0, models_js_1.toAccessTier)(options.tier),
|
1690
|
+
blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags),
|
1691
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1692
|
+
}));
|
1693
|
+
});
|
1694
|
+
}
|
1695
|
+
/**
|
1696
|
+
* Returns the list of blocks that have been uploaded as part of a block blob
|
1697
|
+
* using the specified block list filter.
|
1698
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-block-list
|
1699
|
+
*
|
1700
|
+
* @param listType - Specifies whether to return the list of committed blocks,
|
1701
|
+
* the list of uncommitted blocks, or both lists together.
|
1702
|
+
* @param options - Options to the Block Blob Get Block List operation.
|
1703
|
+
* @returns Response data for the Block Blob Get Block List operation.
|
1704
|
+
*/
|
1705
|
+
async getBlockList(listType, options = {}) {
|
1706
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => {
|
1707
|
+
var _a;
|
1708
|
+
const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, {
|
1709
|
+
abortSignal: options.abortSignal,
|
1710
|
+
leaseAccessConditions: options.conditions,
|
1711
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
1712
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1713
|
+
}));
|
1714
|
+
if (!res.committedBlocks) {
|
1715
|
+
res.committedBlocks = [];
|
1716
|
+
}
|
1717
|
+
if (!res.uncommittedBlocks) {
|
1718
|
+
res.uncommittedBlocks = [];
|
1719
|
+
}
|
1720
|
+
return res;
|
1721
|
+
});
|
1722
|
+
}
|
1723
|
+
// High level functions
|
1724
|
+
/**
|
1725
|
+
* Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.
|
1726
|
+
*
|
1727
|
+
* When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
|
1728
|
+
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
|
1729
|
+
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
|
1730
|
+
* to commit the block list.
|
1731
|
+
*
|
1732
|
+
* A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is
|
1733
|
+
* `blobContentType`, enabling the browser to provide
|
1734
|
+
* functionality based on file type.
|
1735
|
+
*
|
1736
|
+
* @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView
|
1737
|
+
* @param options -
|
1738
|
+
*/
|
1739
|
+
async uploadData(data, options = {}) {
|
1740
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => {
|
1741
|
+
if (core_util_1.isNodeLike) {
|
1742
|
+
let buffer;
|
1743
|
+
if (data instanceof Buffer) {
|
1744
|
+
buffer = data;
|
1745
|
+
}
|
1746
|
+
else if (data instanceof ArrayBuffer) {
|
1747
|
+
buffer = Buffer.from(data);
|
1748
|
+
}
|
1749
|
+
else {
|
1750
|
+
data = data;
|
1751
|
+
buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
1752
|
+
}
|
1753
|
+
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
|
1754
|
+
}
|
1755
|
+
else {
|
1756
|
+
const browserBlob = new Blob([data]);
|
1757
|
+
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
|
1758
|
+
}
|
1759
|
+
});
|
1760
|
+
}
|
1761
|
+
/**
|
1762
|
+
* ONLY AVAILABLE IN BROWSERS.
|
1763
|
+
*
|
1764
|
+
* Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.
|
1765
|
+
*
|
1766
|
+
* When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.
|
1767
|
+
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call
|
1768
|
+
* {@link commitBlockList} to commit the block list.
|
1769
|
+
*
|
1770
|
+
* A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is
|
1771
|
+
* `blobContentType`, enabling the browser to provide
|
1772
|
+
* functionality based on file type.
|
1773
|
+
*
|
1774
|
+
* @deprecated Use {@link uploadData} instead.
|
1775
|
+
*
|
1776
|
+
* @param browserData - Blob, File, ArrayBuffer or ArrayBufferView
|
1777
|
+
* @param options - Options to upload browser data.
|
1778
|
+
* @returns Response data for the Blob Upload operation.
|
1779
|
+
*/
|
1780
|
+
async uploadBrowserData(browserData, options = {}) {
|
1781
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => {
|
1782
|
+
const browserBlob = new Blob([browserData]);
|
1783
|
+
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
|
1784
|
+
});
|
1785
|
+
}
|
1786
|
+
/**
|
1787
|
+
*
|
1788
|
+
* Uploads data to block blob. Requires a bodyFactory as the data source,
|
1789
|
+
* which need to return a {@link HttpRequestBody} object with the offset and size provided.
|
1790
|
+
*
|
1791
|
+
* When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
|
1792
|
+
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
|
1793
|
+
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
|
1794
|
+
* to commit the block list.
|
1795
|
+
*
|
1796
|
+
* @param bodyFactory -
|
1797
|
+
* @param size - size of the data to upload.
|
1798
|
+
* @param options - Options to Upload to Block Blob operation.
|
1799
|
+
* @returns Response data for the Blob Upload operation.
|
1800
|
+
*/
|
1801
|
+
async uploadSeekableInternal(bodyFactory, size, options = {}) {
|
1802
|
+
var _a, _b;
|
1803
|
+
let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0;
|
1804
|
+
if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {
|
1805
|
+
throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`);
|
1806
|
+
}
|
1807
|
+
const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;
|
1808
|
+
if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) {
|
1809
|
+
throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`);
|
1810
|
+
}
|
1811
|
+
if (blockSize === 0) {
|
1812
|
+
if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) {
|
1813
|
+
throw new RangeError(`${size} is too larger to upload to a block blob.`);
|
1814
|
+
}
|
1815
|
+
if (size > maxSingleShotSize) {
|
1816
|
+
blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS);
|
1817
|
+
if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {
|
1818
|
+
blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;
|
1819
|
+
}
|
1820
|
+
}
|
1821
|
+
}
|
1822
|
+
if (!options.blobHTTPHeaders) {
|
1823
|
+
options.blobHTTPHeaders = {};
|
1824
|
+
}
|
1825
|
+
if (!options.conditions) {
|
1826
|
+
options.conditions = {};
|
1827
|
+
}
|
1828
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => {
|
1829
|
+
if (size <= maxSingleShotSize) {
|
1830
|
+
return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions));
|
1831
|
+
}
|
1832
|
+
const numBlocks = Math.floor((size - 1) / blockSize) + 1;
|
1833
|
+
if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) {
|
1834
|
+
throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` +
|
1835
|
+
`the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`);
|
1836
|
+
}
|
1837
|
+
const blockList = [];
|
1838
|
+
const blockIDPrefix = (0, core_util_2.randomUUID)();
|
1839
|
+
let transferProgress = 0;
|
1840
|
+
const batch = new Batch_js_1.Batch(options.concurrency);
|
1841
|
+
for (let i = 0; i < numBlocks; i++) {
|
1842
|
+
batch.addOperation(async () => {
|
1843
|
+
const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i);
|
1844
|
+
const start = blockSize * i;
|
1845
|
+
const end = i === numBlocks - 1 ? size : start + blockSize;
|
1846
|
+
const contentLength = end - start;
|
1847
|
+
blockList.push(blockID);
|
1848
|
+
await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {
|
1849
|
+
abortSignal: options.abortSignal,
|
1850
|
+
conditions: options.conditions,
|
1851
|
+
encryptionScope: options.encryptionScope,
|
1852
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1853
|
+
});
|
1854
|
+
// Update progress after block is successfully uploaded to server, in case of block trying
|
1855
|
+
// TODO: Hook with convenience layer progress event in finer level
|
1856
|
+
transferProgress += contentLength;
|
1857
|
+
if (options.onProgress) {
|
1858
|
+
options.onProgress({
|
1859
|
+
loadedBytes: transferProgress,
|
1860
|
+
});
|
1861
|
+
}
|
1862
|
+
});
|
1863
|
+
}
|
1864
|
+
await batch.do();
|
1865
|
+
return this.commitBlockList(blockList, updatedOptions);
|
1866
|
+
});
|
1867
|
+
}
|
1868
|
+
/**
|
1869
|
+
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
1870
|
+
*
|
1871
|
+
* Uploads a local file in blocks to a block blob.
|
1872
|
+
*
|
1873
|
+
* When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.
|
1874
|
+
* Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList
|
1875
|
+
* to commit the block list.
|
1876
|
+
*
|
1877
|
+
* @param filePath - Full path of local file
|
1878
|
+
* @param options - Options to Upload to Block Blob operation.
|
1879
|
+
* @returns Response data for the Blob Upload operation.
|
1880
|
+
*/
|
1881
|
+
async uploadFile(filePath, options = {}) {
|
1882
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => {
|
1883
|
+
const size = (await (0, utils_js_1.fsStat)(filePath)).size;
|
1884
|
+
return this.uploadSeekableInternal((offset, count) => {
|
1885
|
+
return () => (0, utils_js_1.fsCreateReadStream)(filePath, {
|
1886
|
+
autoClose: true,
|
1887
|
+
end: count ? offset + count - 1 : Infinity,
|
1888
|
+
start: offset,
|
1889
|
+
});
|
1890
|
+
}, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
|
1891
|
+
});
|
1892
|
+
}
|
1893
|
+
/**
|
1894
|
+
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
1895
|
+
*
|
1896
|
+
* Uploads a Node.js Readable stream into block blob.
|
1897
|
+
*
|
1898
|
+
* PERFORMANCE IMPROVEMENT TIPS:
|
1899
|
+
* * Input stream highWaterMark is better to set a same value with bufferSize
|
1900
|
+
* parameter, which will avoid Buffer.concat() operations.
|
1901
|
+
*
|
1902
|
+
* @param stream - Node.js Readable stream
|
1903
|
+
* @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB
|
1904
|
+
* @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated,
|
1905
|
+
* positive correlation with max uploading concurrency. Default value is 5
|
1906
|
+
* @param options - Options to Upload Stream to Block Blob operation.
|
1907
|
+
* @returns Response data for the Blob Upload operation.
|
1908
|
+
*/
|
1909
|
+
async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) {
|
1910
|
+
if (!options.blobHTTPHeaders) {
|
1911
|
+
options.blobHTTPHeaders = {};
|
1912
|
+
}
|
1913
|
+
if (!options.conditions) {
|
1914
|
+
options.conditions = {};
|
1915
|
+
}
|
1916
|
+
return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => {
|
1917
|
+
let blockNum = 0;
|
1918
|
+
const blockIDPrefix = (0, core_util_2.randomUUID)();
|
1919
|
+
let transferProgress = 0;
|
1920
|
+
const blockList = [];
|
1921
|
+
const scheduler = new storage_common_1.BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => {
|
1922
|
+
const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum);
|
1923
|
+
blockList.push(blockID);
|
1924
|
+
blockNum++;
|
1925
|
+
await this.stageBlock(blockID, body, length, {
|
1926
|
+
customerProvidedKey: options.customerProvidedKey,
|
1927
|
+
conditions: options.conditions,
|
1928
|
+
encryptionScope: options.encryptionScope,
|
1929
|
+
tracingOptions: updatedOptions.tracingOptions,
|
1930
|
+
});
|
1931
|
+
// Update progress after block is successfully uploaded to server, in case of block trying
|
1932
|
+
transferProgress += length;
|
1933
|
+
if (options.onProgress) {
|
1934
|
+
options.onProgress({ loadedBytes: transferProgress });
|
1935
|
+
}
|
1936
|
+
},
|
1937
|
+
// concurrency should set a smaller value than maxConcurrency, which is helpful to
|
1938
|
+
// reduce the possibility when a outgoing handler waits for stream data, in
|
1939
|
+
// this situation, outgoing handlers are blocked.
|
1940
|
+
// Outgoing queue shouldn't be empty.
|
1941
|
+
Math.ceil((maxConcurrency / 4) * 3));
|
1942
|
+
await scheduler.do();
|
1943
|
+
return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })));
|
1944
|
+
});
|
1945
|
+
}
|
1946
|
+
}
|
1947
|
+
exports.BlockBlobClient = BlockBlobClient;
|
1948
|
+
/**
|
1949
|
+
* PageBlobClient defines a set of operations applicable to page blobs.
|
1950
|
+
*/
|
1951
|
+
class PageBlobClient extends BlobClient {
|
1952
|
+
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
1953
|
+
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
1954
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
1955
|
+
options) {
|
1956
|
+
// In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.
|
1957
|
+
// super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);
|
1958
|
+
let pipeline;
|
1959
|
+
let url;
|
1960
|
+
options = options || {};
|
1961
|
+
if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) {
|
1962
|
+
// (url: string, pipeline: Pipeline)
|
1963
|
+
url = urlOrConnectionString;
|
1964
|
+
pipeline = credentialOrPipelineOrContainerName;
|
1965
|
+
}
|
1966
|
+
else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) ||
|
1967
|
+
credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential ||
|
1968
|
+
(0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) {
|
1969
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
1970
|
+
url = urlOrConnectionString;
|
1971
|
+
options = blobNameOrOptions;
|
1972
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options);
|
1973
|
+
}
|
1974
|
+
else if (!credentialOrPipelineOrContainerName &&
|
1975
|
+
typeof credentialOrPipelineOrContainerName !== "string") {
|
1976
|
+
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
1977
|
+
// The second parameter is undefined. Use anonymous credential.
|
1978
|
+
url = urlOrConnectionString;
|
1979
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
1980
|
+
}
|
1981
|
+
else if (credentialOrPipelineOrContainerName &&
|
1982
|
+
typeof credentialOrPipelineOrContainerName === "string" &&
|
1983
|
+
blobNameOrOptions &&
|
1984
|
+
typeof blobNameOrOptions === "string") {
|
1985
|
+
// (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)
|
1986
|
+
const containerName = credentialOrPipelineOrContainerName;
|
1987
|
+
const blobName = blobNameOrOptions;
|
1988
|
+
const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString);
|
1989
|
+
if (extractedCreds.kind === "AccountConnString") {
|
1990
|
+
if (core_util_1.isNodeLike) {
|
1991
|
+
const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
1992
|
+
url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
|
1993
|
+
if (!options.proxyOptions) {
|
1994
|
+
options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri);
|
1995
|
+
}
|
1996
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options);
|
1997
|
+
}
|
1998
|
+
else {
|
1999
|
+
throw new Error("Account connection string is only supported in Node.js environment");
|
2000
|
+
}
|
2001
|
+
}
|
2002
|
+
else if (extractedCreds.kind === "SASConnString") {
|
2003
|
+
url =
|
2004
|
+
(0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +
|
2005
|
+
"?" +
|
2006
|
+
extractedCreds.accountSas;
|
2007
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options);
|
2008
|
+
}
|
2009
|
+
else {
|
2010
|
+
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
2011
|
+
}
|
2012
|
+
}
|
2013
|
+
else {
|
2014
|
+
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
2015
|
+
}
|
2016
|
+
super(url, pipeline);
|
2017
|
+
this.pageBlobContext = this.storageClientContext.pageBlob;
|
2018
|
+
}
|
2019
|
+
/**
|
2020
|
+
* Creates a new PageBlobClient object identical to the source but with the
|
2021
|
+
* specified snapshot timestamp.
|
2022
|
+
* Provide "" will remove the snapshot and return a Client to the base blob.
|
2023
|
+
*
|
2024
|
+
* @param snapshot - The snapshot timestamp.
|
2025
|
+
* @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp.
|
2026
|
+
*/
|
2027
|
+
withSnapshot(snapshot) {
|
2028
|
+
return new PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);
|
2029
|
+
}
|
2030
|
+
/**
|
2031
|
+
* Creates a page blob of the specified length. Call uploadPages to upload data
|
2032
|
+
* data to a page blob.
|
2033
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
|
2034
|
+
*
|
2035
|
+
* @param size - size of the page blob.
|
2036
|
+
* @param options - Options to the Page Blob Create operation.
|
2037
|
+
* @returns Response data for the Page Blob Create operation.
|
2038
|
+
*/
|
2039
|
+
async create(size, options = {}) {
|
2040
|
+
options.conditions = options.conditions || {};
|
2041
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
2042
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => {
|
2043
|
+
var _a, _b, _c;
|
2044
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, {
|
2045
|
+
abortSignal: options.abortSignal,
|
2046
|
+
blobHttpHeaders: options.blobHTTPHeaders,
|
2047
|
+
blobSequenceNumber: options.blobSequenceNumber,
|
2048
|
+
leaseAccessConditions: options.conditions,
|
2049
|
+
metadata: options.metadata,
|
2050
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2051
|
+
cpkInfo: options.customerProvidedKey,
|
2052
|
+
encryptionScope: options.encryptionScope,
|
2053
|
+
immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn,
|
2054
|
+
immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode,
|
2055
|
+
legalHold: options.legalHold,
|
2056
|
+
tier: (0, models_js_1.toAccessTier)(options.tier),
|
2057
|
+
blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags),
|
2058
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2059
|
+
}));
|
2060
|
+
});
|
2061
|
+
}
|
2062
|
+
/**
|
2063
|
+
* Creates a page blob of the specified length. Call uploadPages to upload data
|
2064
|
+
* data to a page blob. If the blob with the same name already exists, the content
|
2065
|
+
* of the existing blob will remain unchanged.
|
2066
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-blob
|
2067
|
+
*
|
2068
|
+
* @param size - size of the page blob.
|
2069
|
+
* @param options -
|
2070
|
+
*/
|
2071
|
+
async createIfNotExists(size, options = {}) {
|
2072
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => {
|
2073
|
+
var _a, _b;
|
2074
|
+
try {
|
2075
|
+
const conditions = { ifNoneMatch: constants_js_1.ETagAny };
|
2076
|
+
const res = (0, utils_common_js_1.assertResponse)(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions })));
|
2077
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
2078
|
+
}
|
2079
|
+
catch (e) {
|
2080
|
+
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
2081
|
+
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
2082
|
+
}
|
2083
|
+
throw e;
|
2084
|
+
}
|
2085
|
+
});
|
2086
|
+
}
|
2087
|
+
/**
|
2088
|
+
* Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.
|
2089
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-page
|
2090
|
+
*
|
2091
|
+
* @param body - Data to upload
|
2092
|
+
* @param offset - Offset of destination page blob
|
2093
|
+
* @param count - Content length of the body, also number of bytes to be uploaded
|
2094
|
+
* @param options - Options to the Page Blob Upload Pages operation.
|
2095
|
+
* @returns Response data for the Page Blob Upload Pages operation.
|
2096
|
+
*/
|
2097
|
+
async uploadPages(body, offset, count, options = {}) {
|
2098
|
+
options.conditions = options.conditions || {};
|
2099
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
2100
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => {
|
2101
|
+
var _a;
|
2102
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, {
|
2103
|
+
abortSignal: options.abortSignal,
|
2104
|
+
leaseAccessConditions: options.conditions,
|
2105
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2106
|
+
requestOptions: {
|
2107
|
+
onUploadProgress: options.onProgress,
|
2108
|
+
},
|
2109
|
+
range: (0, Range_js_1.rangeToString)({ offset, count }),
|
2110
|
+
sequenceNumberAccessConditions: options.conditions,
|
2111
|
+
transactionalContentMD5: options.transactionalContentMD5,
|
2112
|
+
transactionalContentCrc64: options.transactionalContentCrc64,
|
2113
|
+
cpkInfo: options.customerProvidedKey,
|
2114
|
+
encryptionScope: options.encryptionScope,
|
2115
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2116
|
+
}));
|
2117
|
+
});
|
2118
|
+
}
|
2119
|
+
/**
|
2120
|
+
* The Upload Pages operation writes a range of pages to a page blob where the
|
2121
|
+
* contents are read from a URL.
|
2122
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-page-from-url
|
2123
|
+
*
|
2124
|
+
* @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication
|
2125
|
+
* @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob
|
2126
|
+
* @param destOffset - Offset of destination page blob
|
2127
|
+
* @param count - Number of bytes to be uploaded from source page blob
|
2128
|
+
* @param options -
|
2129
|
+
*/
|
2130
|
+
async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) {
|
2131
|
+
options.conditions = options.conditions || {};
|
2132
|
+
options.sourceConditions = options.sourceConditions || {};
|
2133
|
+
(0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps);
|
2134
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => {
|
2135
|
+
var _a, _b, _c, _d, _e;
|
2136
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), {
|
2137
|
+
abortSignal: options.abortSignal,
|
2138
|
+
sourceContentMD5: options.sourceContentMD5,
|
2139
|
+
sourceContentCrc64: options.sourceContentCrc64,
|
2140
|
+
leaseAccessConditions: options.conditions,
|
2141
|
+
sequenceNumberAccessConditions: options.conditions,
|
2142
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2143
|
+
sourceModifiedAccessConditions: {
|
2144
|
+
sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
|
2145
|
+
sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince,
|
2146
|
+
sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch,
|
2147
|
+
sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
|
2148
|
+
},
|
2149
|
+
cpkInfo: options.customerProvidedKey,
|
2150
|
+
encryptionScope: options.encryptionScope,
|
2151
|
+
copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization),
|
2152
|
+
fileRequestIntent: options.sourceShareTokenIntent,
|
2153
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2154
|
+
}));
|
2155
|
+
});
|
2156
|
+
}
|
2157
|
+
/**
|
2158
|
+
* Frees the specified pages from the page blob.
|
2159
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-page
|
2160
|
+
*
|
2161
|
+
* @param offset - Starting byte position of the pages to clear.
|
2162
|
+
* @param count - Number of bytes to clear.
|
2163
|
+
* @param options - Options to the Page Blob Clear Pages operation.
|
2164
|
+
* @returns Response data for the Page Blob Clear Pages operation.
|
2165
|
+
*/
|
2166
|
+
async clearPages(offset = 0, count, options = {}) {
|
2167
|
+
options.conditions = options.conditions || {};
|
2168
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => {
|
2169
|
+
var _a;
|
2170
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, {
|
2171
|
+
abortSignal: options.abortSignal,
|
2172
|
+
leaseAccessConditions: options.conditions,
|
2173
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2174
|
+
range: (0, Range_js_1.rangeToString)({ offset, count }),
|
2175
|
+
sequenceNumberAccessConditions: options.conditions,
|
2176
|
+
cpkInfo: options.customerProvidedKey,
|
2177
|
+
encryptionScope: options.encryptionScope,
|
2178
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2179
|
+
}));
|
2180
|
+
});
|
2181
|
+
}
|
2182
|
+
/**
|
2183
|
+
* Returns the list of valid page ranges for a page blob or snapshot of a page blob.
|
2184
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
|
2185
|
+
*
|
2186
|
+
* @param offset - Starting byte position of the page ranges.
|
2187
|
+
* @param count - Number of bytes to get.
|
2188
|
+
* @param options - Options to the Page Blob Get Ranges operation.
|
2189
|
+
* @returns Response data for the Page Blob Get Ranges operation.
|
2190
|
+
*/
|
2191
|
+
async getPageRanges(offset = 0, count, options = {}) {
|
2192
|
+
options.conditions = options.conditions || {};
|
2193
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => {
|
2194
|
+
var _a;
|
2195
|
+
const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({
|
2196
|
+
abortSignal: options.abortSignal,
|
2197
|
+
leaseAccessConditions: options.conditions,
|
2198
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2199
|
+
range: (0, Range_js_1.rangeToString)({ offset, count }),
|
2200
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2201
|
+
}));
|
2202
|
+
return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response);
|
2203
|
+
});
|
2204
|
+
}
|
2205
|
+
/**
|
2206
|
+
* getPageRangesSegment returns a single segment of page ranges starting from the
|
2207
|
+
* specified Marker. Use an empty Marker to start enumeration from the beginning.
|
2208
|
+
* After getting a segment, process it, and then call getPageRangesSegment again
|
2209
|
+
* (passing the the previously-returned Marker) to get the next segment.
|
2210
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
|
2211
|
+
*
|
2212
|
+
* @param offset - Starting byte position of the page ranges.
|
2213
|
+
* @param count - Number of bytes to get.
|
2214
|
+
* @param marker - A string value that identifies the portion of the list to be returned with the next list operation.
|
2215
|
+
* @param options - Options to PageBlob Get Page Ranges Segment operation.
|
2216
|
+
*/
|
2217
|
+
async listPageRangesSegment(offset = 0, count, marker, options = {}) {
|
2218
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => {
|
2219
|
+
var _a;
|
2220
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({
|
2221
|
+
abortSignal: options.abortSignal,
|
2222
|
+
leaseAccessConditions: options.conditions,
|
2223
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2224
|
+
range: (0, Range_js_1.rangeToString)({ offset, count }),
|
2225
|
+
marker: marker,
|
2226
|
+
maxPageSize: options.maxPageSize,
|
2227
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2228
|
+
}));
|
2229
|
+
});
|
2230
|
+
}
|
2231
|
+
/**
|
2232
|
+
* Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel}
|
2233
|
+
*
|
2234
|
+
* @param offset - Starting byte position of the page ranges.
|
2235
|
+
* @param count - Number of bytes to get.
|
2236
|
+
* @param marker - A string value that identifies the portion of
|
2237
|
+
* the get of page ranges to be returned with the next getting operation. The
|
2238
|
+
* operation returns the ContinuationToken value within the response body if the
|
2239
|
+
* getting operation did not return all page ranges remaining within the current page.
|
2240
|
+
* The ContinuationToken value can be used as the value for
|
2241
|
+
* the marker parameter in a subsequent call to request the next page of get
|
2242
|
+
* items. The marker value is opaque to the client.
|
2243
|
+
* @param options - Options to List Page Ranges operation.
|
2244
|
+
*/
|
2245
|
+
listPageRangeItemSegments() {
|
2246
|
+
return tslib_1.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker, options = {}) {
|
2247
|
+
let getPageRangeItemSegmentsResponse;
|
2248
|
+
if (!!marker || marker === undefined) {
|
2249
|
+
do {
|
2250
|
+
getPageRangeItemSegmentsResponse = yield tslib_1.__await(this.listPageRangesSegment(offset, count, marker, options));
|
2251
|
+
marker = getPageRangeItemSegmentsResponse.continuationToken;
|
2252
|
+
yield yield tslib_1.__await(yield tslib_1.__await(getPageRangeItemSegmentsResponse));
|
2253
|
+
} while (marker);
|
2254
|
+
}
|
2255
|
+
});
|
2256
|
+
}
|
2257
|
+
/**
|
2258
|
+
* Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
|
2259
|
+
*
|
2260
|
+
* @param offset - Starting byte position of the page ranges.
|
2261
|
+
* @param count - Number of bytes to get.
|
2262
|
+
* @param options - Options to List Page Ranges operation.
|
2263
|
+
*/
|
2264
|
+
listPageRangeItems() {
|
2265
|
+
return tslib_1.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) {
|
2266
|
+
var _a, e_1, _b, _c;
|
2267
|
+
let marker;
|
2268
|
+
try {
|
2269
|
+
for (var _d = true, _e = tslib_1.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
2270
|
+
_c = _f.value;
|
2271
|
+
_d = false;
|
2272
|
+
const getPageRangesSegment = _c;
|
2273
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment))));
|
2274
|
+
}
|
2275
|
+
}
|
2276
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
2277
|
+
finally {
|
2278
|
+
try {
|
2279
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
2280
|
+
}
|
2281
|
+
finally { if (e_1) throw e_1.error; }
|
2282
|
+
}
|
2283
|
+
});
|
2284
|
+
}
|
2285
|
+
/**
|
2286
|
+
* Returns an async iterable iterator to list of page ranges for a page blob.
|
2287
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
|
2288
|
+
*
|
2289
|
+
* .byPage() returns an async iterable iterator to list of page ranges for a page blob.
|
2290
|
+
*
|
2291
|
+
* ```ts snippet:ClientsListPageBlobs
|
2292
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
2293
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
2294
|
+
*
|
2295
|
+
* const account = "<account>";
|
2296
|
+
* const blobServiceClient = new BlobServiceClient(
|
2297
|
+
* `https://${account}.blob.core.windows.net`,
|
2298
|
+
* new DefaultAzureCredential(),
|
2299
|
+
* );
|
2300
|
+
*
|
2301
|
+
* const containerName = "<container name>";
|
2302
|
+
* const blobName = "<blob name>";
|
2303
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
2304
|
+
* const pageBlobClient = containerClient.getPageBlobClient(blobName);
|
2305
|
+
*
|
2306
|
+
* // Example using `for await` syntax
|
2307
|
+
* let i = 1;
|
2308
|
+
* for await (const pageRange of pageBlobClient.listPageRanges()) {
|
2309
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2310
|
+
* }
|
2311
|
+
*
|
2312
|
+
* // Example using `iter.next()` syntax
|
2313
|
+
* i = 1;
|
2314
|
+
* const iter = pageBlobClient.listPageRanges();
|
2315
|
+
* let { value, done } = await iter.next();
|
2316
|
+
* while (!done) {
|
2317
|
+
* console.log(`Page range ${i++}: ${value.start} - ${value.end}`);
|
2318
|
+
* ({ value, done } = await iter.next());
|
2319
|
+
* }
|
2320
|
+
*
|
2321
|
+
* // Example using `byPage()` syntax
|
2322
|
+
* i = 1;
|
2323
|
+
* for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) {
|
2324
|
+
* for (const pageRange of page.pageRange || []) {
|
2325
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2326
|
+
* }
|
2327
|
+
* }
|
2328
|
+
*
|
2329
|
+
* // Example using paging with a marker
|
2330
|
+
* i = 1;
|
2331
|
+
* let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 });
|
2332
|
+
* let response = (await iterator.next()).value;
|
2333
|
+
* // Prints 2 page ranges
|
2334
|
+
* if (response.pageRange) {
|
2335
|
+
* for (const pageRange of response.pageRange) {
|
2336
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2337
|
+
* }
|
2338
|
+
* }
|
2339
|
+
* // Gets next marker
|
2340
|
+
* let marker = response.continuationToken;
|
2341
|
+
* // Passing next marker as continuationToken
|
2342
|
+
* iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 });
|
2343
|
+
* response = (await iterator.next()).value;
|
2344
|
+
* // Prints 10 page ranges
|
2345
|
+
* if (response.pageRange) {
|
2346
|
+
* for (const pageRange of response.pageRange) {
|
2347
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2348
|
+
* }
|
2349
|
+
* }
|
2350
|
+
* ```
|
2351
|
+
*
|
2352
|
+
* @param offset - Starting byte position of the page ranges.
|
2353
|
+
* @param count - Number of bytes to get.
|
2354
|
+
* @param options - Options to the Page Blob Get Ranges operation.
|
2355
|
+
* @returns An asyncIterableIterator that supports paging.
|
2356
|
+
*/
|
2357
|
+
listPageRanges(offset = 0, count, options = {}) {
|
2358
|
+
options.conditions = options.conditions || {};
|
2359
|
+
// AsyncIterableIterator to iterate over blobs
|
2360
|
+
const iter = this.listPageRangeItems(offset, count, options);
|
2361
|
+
return {
|
2362
|
+
/**
|
2363
|
+
* The next method, part of the iteration protocol
|
2364
|
+
*/
|
2365
|
+
next() {
|
2366
|
+
return iter.next();
|
2367
|
+
},
|
2368
|
+
/**
|
2369
|
+
* The connection to the async iterator, part of the iteration protocol
|
2370
|
+
*/
|
2371
|
+
[Symbol.asyncIterator]() {
|
2372
|
+
return this;
|
2373
|
+
},
|
2374
|
+
/**
|
2375
|
+
* Return an AsyncIterableIterator that works a page at a time
|
2376
|
+
*/
|
2377
|
+
byPage: (settings = {}) => {
|
2378
|
+
return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));
|
2379
|
+
},
|
2380
|
+
};
|
2381
|
+
}
|
2382
|
+
/**
|
2383
|
+
* Gets the collection of page ranges that differ between a specified snapshot and this page blob.
|
2384
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
|
2385
|
+
*
|
2386
|
+
* @param offset - Starting byte position of the page blob
|
2387
|
+
* @param count - Number of bytes to get ranges diff.
|
2388
|
+
* @param prevSnapshot - Timestamp of snapshot to retrieve the difference.
|
2389
|
+
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2390
|
+
* @returns Response data for the Page Blob Get Page Range Diff operation.
|
2391
|
+
*/
|
2392
|
+
async getPageRangesDiff(offset, count, prevSnapshot, options = {}) {
|
2393
|
+
options.conditions = options.conditions || {};
|
2394
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => {
|
2395
|
+
var _a;
|
2396
|
+
const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({
|
2397
|
+
abortSignal: options.abortSignal,
|
2398
|
+
leaseAccessConditions: options.conditions,
|
2399
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2400
|
+
prevsnapshot: prevSnapshot,
|
2401
|
+
range: (0, Range_js_1.rangeToString)({ offset, count }),
|
2402
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2403
|
+
}));
|
2404
|
+
return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result);
|
2405
|
+
});
|
2406
|
+
}
|
2407
|
+
/**
|
2408
|
+
* getPageRangesDiffSegment returns a single segment of page ranges starting from the
|
2409
|
+
* specified Marker for difference between previous snapshot and the target page blob.
|
2410
|
+
* Use an empty Marker to start enumeration from the beginning.
|
2411
|
+
* After getting a segment, process it, and then call getPageRangesDiffSegment again
|
2412
|
+
* (passing the the previously-returned Marker) to get the next segment.
|
2413
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
|
2414
|
+
*
|
2415
|
+
* @param offset - Starting byte position of the page ranges.
|
2416
|
+
* @param count - Number of bytes to get.
|
2417
|
+
* @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
|
2418
|
+
* @param marker - A string value that identifies the portion of the get to be returned with the next get operation.
|
2419
|
+
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2420
|
+
*/
|
2421
|
+
async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) {
|
2422
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => {
|
2423
|
+
var _a;
|
2424
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({
|
2425
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
2426
|
+
leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions,
|
2427
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2428
|
+
prevsnapshot: prevSnapshotOrUrl,
|
2429
|
+
range: (0, Range_js_1.rangeToString)({
|
2430
|
+
offset: offset,
|
2431
|
+
count: count,
|
2432
|
+
}),
|
2433
|
+
marker: marker,
|
2434
|
+
maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize,
|
2435
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2436
|
+
}));
|
2437
|
+
});
|
2438
|
+
}
|
2439
|
+
/**
|
2440
|
+
* Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel}
|
2441
|
+
*
|
2442
|
+
*
|
2443
|
+
* @param offset - Starting byte position of the page ranges.
|
2444
|
+
* @param count - Number of bytes to get.
|
2445
|
+
* @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
|
2446
|
+
* @param marker - A string value that identifies the portion of
|
2447
|
+
* the get of page ranges to be returned with the next getting operation. The
|
2448
|
+
* operation returns the ContinuationToken value within the response body if the
|
2449
|
+
* getting operation did not return all page ranges remaining within the current page.
|
2450
|
+
* The ContinuationToken value can be used as the value for
|
2451
|
+
* the marker parameter in a subsequent call to request the next page of get
|
2452
|
+
* items. The marker value is opaque to the client.
|
2453
|
+
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2454
|
+
*/
|
2455
|
+
listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) {
|
2456
|
+
return tslib_1.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() {
|
2457
|
+
let getPageRangeItemSegmentsResponse;
|
2458
|
+
if (!!marker || marker === undefined) {
|
2459
|
+
do {
|
2460
|
+
getPageRangeItemSegmentsResponse = yield tslib_1.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options));
|
2461
|
+
marker = getPageRangeItemSegmentsResponse.continuationToken;
|
2462
|
+
yield yield tslib_1.__await(yield tslib_1.__await(getPageRangeItemSegmentsResponse));
|
2463
|
+
} while (marker);
|
2464
|
+
}
|
2465
|
+
});
|
2466
|
+
}
|
2467
|
+
/**
|
2468
|
+
* Returns an AsyncIterableIterator of {@link PageRangeInfo} objects
|
2469
|
+
*
|
2470
|
+
* @param offset - Starting byte position of the page ranges.
|
2471
|
+
* @param count - Number of bytes to get.
|
2472
|
+
* @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.
|
2473
|
+
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2474
|
+
*/
|
2475
|
+
listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {
|
2476
|
+
return tslib_1.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() {
|
2477
|
+
var _a, e_2, _b, _c;
|
2478
|
+
let marker;
|
2479
|
+
try {
|
2480
|
+
for (var _d = true, _e = tslib_1.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
2481
|
+
_c = _f.value;
|
2482
|
+
_d = false;
|
2483
|
+
const getPageRangesSegment = _c;
|
2484
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment))));
|
2485
|
+
}
|
2486
|
+
}
|
2487
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
2488
|
+
finally {
|
2489
|
+
try {
|
2490
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
2491
|
+
}
|
2492
|
+
finally { if (e_2) throw e_2.error; }
|
2493
|
+
}
|
2494
|
+
});
|
2495
|
+
}
|
2496
|
+
/**
|
2497
|
+
* Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.
|
2498
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
|
2499
|
+
*
|
2500
|
+
* .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.
|
2501
|
+
*
|
2502
|
+
* ```ts snippet:ClientsListPageBlobsDiff
|
2503
|
+
* import { BlobServiceClient } from "@azure/storage-blob";
|
2504
|
+
* import { DefaultAzureCredential } from "@azure/identity";
|
2505
|
+
*
|
2506
|
+
* const account = "<account>";
|
2507
|
+
* const blobServiceClient = new BlobServiceClient(
|
2508
|
+
* `https://${account}.blob.core.windows.net`,
|
2509
|
+
* new DefaultAzureCredential(),
|
2510
|
+
* );
|
2511
|
+
*
|
2512
|
+
* const containerName = "<container name>";
|
2513
|
+
* const blobName = "<blob name>";
|
2514
|
+
* const containerClient = blobServiceClient.getContainerClient(containerName);
|
2515
|
+
* const pageBlobClient = containerClient.getPageBlobClient(blobName);
|
2516
|
+
*
|
2517
|
+
* const offset = 0;
|
2518
|
+
* const count = 1024;
|
2519
|
+
* const previousSnapshot = "<previous snapshot>";
|
2520
|
+
* // Example using `for await` syntax
|
2521
|
+
* let i = 1;
|
2522
|
+
* for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) {
|
2523
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2524
|
+
* }
|
2525
|
+
*
|
2526
|
+
* // Example using `iter.next()` syntax
|
2527
|
+
* i = 1;
|
2528
|
+
* const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot);
|
2529
|
+
* let { value, done } = await iter.next();
|
2530
|
+
* while (!done) {
|
2531
|
+
* console.log(`Page range ${i++}: ${value.start} - ${value.end}`);
|
2532
|
+
* ({ value, done } = await iter.next());
|
2533
|
+
* }
|
2534
|
+
*
|
2535
|
+
* // Example using `byPage()` syntax
|
2536
|
+
* i = 1;
|
2537
|
+
* for await (const page of pageBlobClient
|
2538
|
+
* .listPageRangesDiff(offset, count, previousSnapshot)
|
2539
|
+
* .byPage({ maxPageSize: 20 })) {
|
2540
|
+
* for (const pageRange of page.pageRange || []) {
|
2541
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2542
|
+
* }
|
2543
|
+
* }
|
2544
|
+
*
|
2545
|
+
* // Example using paging with a marker
|
2546
|
+
* i = 1;
|
2547
|
+
* let iterator = pageBlobClient
|
2548
|
+
* .listPageRangesDiff(offset, count, previousSnapshot)
|
2549
|
+
* .byPage({ maxPageSize: 2 });
|
2550
|
+
* let response = (await iterator.next()).value;
|
2551
|
+
* // Prints 2 page ranges
|
2552
|
+
* if (response.pageRange) {
|
2553
|
+
* for (const pageRange of response.pageRange) {
|
2554
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2555
|
+
* }
|
2556
|
+
* }
|
2557
|
+
* // Gets next marker
|
2558
|
+
* let marker = response.continuationToken;
|
2559
|
+
* // Passing next marker as continuationToken
|
2560
|
+
* iterator = pageBlobClient
|
2561
|
+
* .listPageRangesDiff(offset, count, previousSnapshot)
|
2562
|
+
* .byPage({ continuationToken: marker, maxPageSize: 10 });
|
2563
|
+
* response = (await iterator.next()).value;
|
2564
|
+
* // Prints 10 page ranges
|
2565
|
+
* if (response.pageRange) {
|
2566
|
+
* for (const pageRange of response.pageRange) {
|
2567
|
+
* console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);
|
2568
|
+
* }
|
2569
|
+
* }
|
2570
|
+
* ```
|
2571
|
+
*
|
2572
|
+
* @param offset - Starting byte position of the page ranges.
|
2573
|
+
* @param count - Number of bytes to get.
|
2574
|
+
* @param prevSnapshot - Timestamp of snapshot to retrieve the difference.
|
2575
|
+
* @param options - Options to the Page Blob Get Ranges operation.
|
2576
|
+
* @returns An asyncIterableIterator that supports paging.
|
2577
|
+
*/
|
2578
|
+
listPageRangesDiff(offset, count, prevSnapshot, options = {}) {
|
2579
|
+
options.conditions = options.conditions || {};
|
2580
|
+
// AsyncIterableIterator to iterate over blobs
|
2581
|
+
const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options));
|
2582
|
+
return {
|
2583
|
+
/**
|
2584
|
+
* The next method, part of the iteration protocol
|
2585
|
+
*/
|
2586
|
+
next() {
|
2587
|
+
return iter.next();
|
2588
|
+
},
|
2589
|
+
/**
|
2590
|
+
* The connection to the async iterator, part of the iteration protocol
|
2591
|
+
*/
|
2592
|
+
[Symbol.asyncIterator]() {
|
2593
|
+
return this;
|
2594
|
+
},
|
2595
|
+
/**
|
2596
|
+
* Return an AsyncIterableIterator that works a page at a time
|
2597
|
+
*/
|
2598
|
+
byPage: (settings = {}) => {
|
2599
|
+
return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));
|
2600
|
+
},
|
2601
|
+
};
|
2602
|
+
}
|
2603
|
+
/**
|
2604
|
+
* Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.
|
2605
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges
|
2606
|
+
*
|
2607
|
+
* @param offset - Starting byte position of the page blob
|
2608
|
+
* @param count - Number of bytes to get ranges diff.
|
2609
|
+
* @param prevSnapshotUrl - URL of snapshot to retrieve the difference.
|
2610
|
+
* @param options - Options to the Page Blob Get Page Ranges Diff operation.
|
2611
|
+
* @returns Response data for the Page Blob Get Page Range Diff operation.
|
2612
|
+
*/
|
2613
|
+
async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) {
|
2614
|
+
options.conditions = options.conditions || {};
|
2615
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => {
|
2616
|
+
var _a;
|
2617
|
+
const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({
|
2618
|
+
abortSignal: options.abortSignal,
|
2619
|
+
leaseAccessConditions: options.conditions,
|
2620
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2621
|
+
prevSnapshotUrl,
|
2622
|
+
range: (0, Range_js_1.rangeToString)({ offset, count }),
|
2623
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2624
|
+
}));
|
2625
|
+
return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response);
|
2626
|
+
});
|
2627
|
+
}
|
2628
|
+
/**
|
2629
|
+
* Resizes the page blob to the specified size (which must be a multiple of 512).
|
2630
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties
|
2631
|
+
*
|
2632
|
+
* @param size - Target size
|
2633
|
+
* @param options - Options to the Page Blob Resize operation.
|
2634
|
+
* @returns Response data for the Page Blob Resize operation.
|
2635
|
+
*/
|
2636
|
+
async resize(size, options = {}) {
|
2637
|
+
options.conditions = options.conditions || {};
|
2638
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => {
|
2639
|
+
var _a;
|
2640
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, {
|
2641
|
+
abortSignal: options.abortSignal,
|
2642
|
+
leaseAccessConditions: options.conditions,
|
2643
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2644
|
+
encryptionScope: options.encryptionScope,
|
2645
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2646
|
+
}));
|
2647
|
+
});
|
2648
|
+
}
|
2649
|
+
/**
|
2650
|
+
* Sets a page blob's sequence number.
|
2651
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
|
2652
|
+
*
|
2653
|
+
* @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number.
|
2654
|
+
* @param sequenceNumber - Required if sequenceNumberAction is max or update
|
2655
|
+
* @param options - Options to the Page Blob Update Sequence Number operation.
|
2656
|
+
* @returns Response data for the Page Blob Update Sequence Number operation.
|
2657
|
+
*/
|
2658
|
+
async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) {
|
2659
|
+
options.conditions = options.conditions || {};
|
2660
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => {
|
2661
|
+
var _a;
|
2662
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, {
|
2663
|
+
abortSignal: options.abortSignal,
|
2664
|
+
blobSequenceNumber: sequenceNumber,
|
2665
|
+
leaseAccessConditions: options.conditions,
|
2666
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2667
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2668
|
+
}));
|
2669
|
+
});
|
2670
|
+
}
|
2671
|
+
/**
|
2672
|
+
* Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.
|
2673
|
+
* The snapshot is copied such that only the differential changes between the previously
|
2674
|
+
* copied snapshot are transferred to the destination.
|
2675
|
+
* The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.
|
2676
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob
|
2677
|
+
* @see https://learn.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots
|
2678
|
+
*
|
2679
|
+
* @param copySource - Specifies the name of the source page blob snapshot. For example,
|
2680
|
+
* https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=<DateTime>
|
2681
|
+
* @param options - Options to the Page Blob Copy Incremental operation.
|
2682
|
+
* @returns Response data for the Page Blob Copy Incremental operation.
|
2683
|
+
*/
|
2684
|
+
async startCopyIncremental(copySource, options = {}) {
|
2685
|
+
return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => {
|
2686
|
+
var _a;
|
2687
|
+
return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, {
|
2688
|
+
abortSignal: options.abortSignal,
|
2689
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
2690
|
+
tracingOptions: updatedOptions.tracingOptions,
|
2691
|
+
}));
|
2692
|
+
});
|
2693
|
+
}
|
2694
|
+
}
|
2695
|
+
exports.PageBlobClient = PageBlobClient;
|
2696
|
+
//# sourceMappingURL=Clients.js.map
|