azure-docs-sdk-node icon indicating copy to clipboard operation
azure-docs-sdk-node copied to clipboard

Update BlobServiceClient.yml

Open Ankit-MSFT opened this issue 3 years ago • 1 comments

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. image

Ankit-MSFT avatar Jan 24 '22 13:01 Ankit-MSFT

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:

opbld30 avatar Jan 24 '22 13:01 opbld30