你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Shared Keys - Get Shared Keys

获取工作区的共享密钥。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys?api-version=2025-07-01

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

workspaceName
path True

string

minLength: 4
maxLength: 63
pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

工作区的名称。

api-version
query True

string

minLength: 1

要用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

SharedKeys

确定响应定义。

安全性

azure_auth

Azure Active Directory OAuth2 流

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

SharedKeysList

示例请求

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/rg1/providers/Microsoft.OperationalInsights/workspaces/TestLinkWS/sharedKeys?api-version=2025-07-01

示例响应

{
  "primarySharedKey": "<primarySharedKey>",
  "secondarySharedKey": "<secondarySharedKey>"
}

定义

SharedKeys

工作区的共享密钥。

名称 类型 说明
primarySharedKey

string

工作区的主共享密钥。

secondarySharedKey

string

工作区的辅助共享密钥。