azure - 我应该在 test_configurations.json 中填充哪些字段?

标签 azure azure-storage azure-blob-storage

总的来说,我对 Azure 和云服务非常陌生。我正在尝试在我的应用程序中使用 azure storage sdk ( https://github.com/Azure/azure-storage-cpp ),并尝试习惯它。我正在尝试运行测试以确保我正确构建了库。

查看自述文件,它说填写 test_configurations.json 文件,但我不知道应该填写什么或如何获取实际应该在其中的信息。我注册了免费的 Azure 帐户并创建了一个存储帐户,但我在控制台中的任何位置都没有看到 client_id、tenant_id 或客户端 key 。这是配置文件:

{
  "target": "production",
  "premium_target": "premium_account",
  "blob_storage_target": "blob_storage_account",
  "tenants": [
    {
      "name": "devstore",
      "type": "devstore",
      "connection_string": "UseDevelopmentStorage=true"
    },
    {
      "name": "production",
      "type": "cloud",
      "connection_string": "DefaultEndpointsProtocol=https;"
    },
    {
      "name": "premium_account",
      "type": "cloud",
      "connection_string": "DefaultEndpointsProtocol=https;"
    },
    {
      "name": "blob_storage_account",
      "type": "cloud",
      "connection_string": "DefaultEndpointsProtocol=https;"
    }
  ],
  "token_information": {
    "account_name": "",
    "tenant_id": "",
    "client_id": "",
    "client_secret": "",
    "resource": "https://storage.azure.com"
  }
}

如何获取我需要的 ID 和 secret ?

最佳答案

您需要将应用程序注册为存储客户端,然后才能获取这些详细信息 如前所述here

The first step in using Azure AD to authorize access to storage resources is registering your client application with an Azure AD

关于azure - 我应该在 test_configurations.json 中填充哪些字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66974430/

相关文章:

azure - 在 Azure/AWS 中读/写快照

javascript - 使用 Web 前端列出 Azure 容器内的所有 Blob,并提供目录级支持

SOX 合规性的 Azure DevOps 权限层次结构

python - Azure ML 中的属性错误 : 'Logger' object has no attribute 'activity_info' during Dataset Registration

.net - Azure WebJob 存储连接

c# - 并行 Azure CloudBlockBlob 操作崩溃(访问冲突)

python - Azure Blob 存储 : How can I read a file without having to download the whole thing first?

azure - Azcopy 支持管道吗?

azure - 如何为我的主机名提供自己的 FQDN?

.net - .NET7 升级后,在本地运行 Azure 函数会出现 "No runtime"错误