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

Linked Services - Create Or Update

创建或更新链接服务。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}?api-version=2020-08-01

URI 参数

名称 必需 类型 说明
linkedServiceName
path True

string

linkedServices 资源的名称

resourceGroupName
path True

string

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

subscriptionId
path True

string

目标订阅的 ID。

workspaceName
path True

string

工作区的名称。

Regex pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

api-version
query True

string

要用于此操作的 API 版本。

请求正文

名称 类型 说明
properties.provisioningState

LinkedServiceEntityStatus

链接服务的预配状态。

properties.resourceId

string

将链接到工作区的资源的资源 ID。 这应该用于链接需要读取访问权限的资源

properties.writeAccessResourceId

string

将链接到工作区的资源的资源 ID。 这应该用于链接需要写入访问权限的资源

tags

object

资源标记。

响应

名称 类型 说明
200 OK

LinkedService

确定响应定义。

201 Created

LinkedService

已创建响应定义。

202 Accepted

接受的响应定义。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

LinkedServicesCreate

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/TestLinkWS/linkedServices/Cluster?api-version=2020-08-01

{
  "properties": {
    "writeAccessResourceId": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/clusters/testcluster"
  }
}

Sample Response

{
  "properties": {
    "writeAccessResourceId": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/clusters/testcluster",
    "provisioningState": "ProvisioningAccount"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testlinkws/linkedservices/cluster",
  "name": "TestLinkWS/Cluster",
  "type": "Microsoft.OperationalInsights/workspaces/linkedServices"
}
{
  "properties": {
    "writeAccessResourceId": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/clusters/testcluster",
    "provisioningState": "ProvisioningAccount"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testlinkws/linkedservices/cluster",
  "name": "TestLinkWS/Cluster",
  "type": "Microsoft.OperationalInsights/workspaces/linkedServices"
}

定义

名称 说明
LinkedService

顶级链接服务资源容器。

LinkedServiceEntityStatus

链接服务的预配状态。

LinkedService

顶级链接服务资源容器。

名称 类型 说明
id

string

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

资源的名称

properties.provisioningState

LinkedServiceEntityStatus

链接服务的预配状态。

properties.resourceId

string

将链接到工作区的资源的资源 ID。 这应该用于链接需要读取访问权限的资源

properties.writeAccessResourceId

string

将链接到工作区的资源的资源 ID。 这应该用于链接需要写入访问权限的资源

tags

object

资源标记。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

LinkedServiceEntityStatus

链接服务的预配状态。

名称 类型 说明
Deleting

string

ProvisioningAccount

string

Succeeded

string

Updating

string