@azure/storage-blob 12.25.1-alpha.20241014.1 → 12.26.0-alpha.20241016.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +86 -8
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +33 -0
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +30 -0
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/index.js +2 -0
- package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js +18 -3
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +2 -2
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +2 -2
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/package.json +1 -1
- package/types/latest/storage-blob.d.ts +59 -0
@@ -944,6 +944,39 @@ export class BlobClient extends StorageClient {
|
|
944
944
|
}
|
945
945
|
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign;
|
946
946
|
}
|
947
|
+
/**
|
948
|
+
*
|
949
|
+
* Generates a Blob Service Shared Access Signature (SAS) URI based on
|
950
|
+
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
951
|
+
*
|
952
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
953
|
+
*
|
954
|
+
* @param options - Optional parameters.
|
955
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
956
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
957
|
+
*/
|
958
|
+
generateUserDelegationSasUrl(options, userDelegationKey) {
|
959
|
+
return new Promise((resolve) => {
|
960
|
+
const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).toString();
|
961
|
+
resolve(appendToURLQuery(this.url, sas));
|
962
|
+
});
|
963
|
+
}
|
964
|
+
/**
|
965
|
+
* Only available for BlobClient constructed with a shared key credential.
|
966
|
+
*
|
967
|
+
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
|
968
|
+
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
969
|
+
*
|
970
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
971
|
+
*
|
972
|
+
* @param options - Optional parameters.
|
973
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
974
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
975
|
+
*/
|
976
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
977
|
+
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
978
|
+
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).stringToSign;
|
979
|
+
}
|
947
980
|
/**
|
948
981
|
* Delete the immutablility policy on the blob.
|
949
982
|
*
|