繁体   English   中英

以编程方式获取存储帐户连接字符串

[英]Progamatically get Storage Account Connection String

我想将数据上传和下载到不同存储帐户的 Azure Blob 容器。 我不想存储连接字符串。 我将连接字符串传递给 BlobServiceClient。


                BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString, options);

                string containerName = "nameXYZ";

                BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient(containerName);

我看到了一种使用 POST 调用来执行此操作的方法, 如此链接所示。

有没有其他方法可以动态获取连接字符串?

我有容器名称和 Blob URL。

(我正在使用 Azure.Storage.Blobs V12)

OAuth 是您要完成的工作的更好选择。 这是与存储相关的文档: https://learn.microsoft.com/en-us/azure/storage/common/storage-auth-aad-app?tabs=dotnet

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM