in src/tree/StorageAccountTreeItem.ts [148:177]
private createRoot(): IStorageRoot {
return {
storageAccountName: this.storageAccount.name,
storageAccountId: this.storageAccount.id,
isEmulated: false,
primaryEndpoints: this.storageAccount.primaryEndpoints,
generateSasToken: (accountSASSignatureValues: AccountSASSignatureValues) => {
return generateAccountSASQueryParameters(
accountSASSignatureValues,
new StorageSharedKeyCredential(this.storageAccount.name, this.key.value)
).toString();
},
createBlobServiceClient: () => {
const credential = new azureStorageBlob.StorageSharedKeyCredential(this.storageAccount.name, this.key.value);
return new azureStorageBlob.BlobServiceClient(nonNullProp(this.storageAccount.primaryEndpoints, 'blob'), credential);
},
createShareServiceClient: () => {
const credential = new azureStorageShare.StorageSharedKeyCredential(this.storageAccount.name, this.key.value);
return new azureStorageShare.ShareServiceClient(nonNullProp(this.storageAccount.primaryEndpoints, 'file'), credential);
},
createQueueServiceClient: () => {
const credential = new azureStorageQueue.StorageSharedKeyCredential(this.storageAccount.name, this.key.value);
return new azureStorageQueue.QueueServiceClient(nonNullProp(this.storageAccount.primaryEndpoints, 'queue'), credential);
},
createTableServiceClient: () => {
const credential = new azureDataTables.AzureNamedKeyCredential(this.storageAccount.name, this.key.value);
return new azureDataTables.TableServiceClient(nonNullProp(this.storageAccount.primaryEndpoints, 'table'), credential);
}
};
}