我想Azure Storage Account Key (connectionString)
使用 azure.NET SDK
或 fluent API。
问问题
174 次
1 回答
2
尝试这个 :
var azure = Azure.Configure().Authenticate(credentials).WithSubscription(subscriptionID);
var storageName = "<storage name>";
var resourceGroup = "<storage resource group>";
var keys = azure.StorageAccounts.GetByResourceGroup(resourceGroup, storageName).GetKeys();
var key1 = keys[0];
var key2 = keys[1];
var connStr1 = "DefaultEndpointsProtocol=https;AccountName=" + storageName + ";AccountKey="+ key1.Value + ";EndpointSuffix=core.windows.net";
var connStr2 = "DefaultEndpointsProtocol=https;AccountName=" + storageName + ";AccountKey=" + key2.Value + ";EndpointSuffix=core.windows.net";
于 2021-06-04T01:24:54.710 回答