azure-docs-sdk-node
azure-docs-sdk-node copied to clipboard
Update BlobServiceClient.yml
As per documentation, generateAccountSasUrl is only available for object constructed with SharedKey credential. However, we are able to generate SAS with object created using connection string as well.
Repro: Using below code, created a SAS token
import { AccountSASPermissions, AccountSASResourceTypes, BlobServiceClient } from "@azure/storage-blob"
const connStr = "";
const blobServiceClient = BlobServiceClient.fromConnectionString(connStr);
var token = blobServiceClient.generateAccountSasUrl(new Date(new Date().valueOf() + 166400),
AccountSASPermissions.parse("racwdl"),
AccountSASResourceTypes.service);
console.log(token);
using the generated token, was able to sucessfully connect to storage using Azure Storage Explorer and also perfomed read, delete and create operations as per the permissions supplied.

Docs Build status updates of commit 7c163b8:
:white_check_mark: Validation status: passed
| File | Status | Preview URL | Details |
|---|---|---|---|
| docs-ref-autogen/@azure/storage-blob/BlobServiceClient.yml | :white_check_mark:Succeeded | View (azure-node-latest) |
For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:
- Try searching the docs.microsoft.com contributor guides
- Post your question in the Docs support channel