共用方式為


Linked Services - Create Or Update

建立或更新連結服務。

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

URI 參數

名稱 位於 必要 類型 Description
linkedServiceName
path True

string

linkedServices 資源的名稱

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string

minLength: 1

目標訂用帳戶的標識碼。

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 版本。

要求本文

名稱 類型 Description
properties.provisioningState

LinkedServiceEntityStatus

鏈接服務的布建狀態。

properties.resourceId

string

將連結至工作區之資源的資源標識碼。 這應該用於連結需要讀取許可權的資源

properties.writeAccessResourceId

string

將連結至工作區之資源的資源標識碼。 這應該用於連結需要寫入存取權的資源

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

LinkedService

確定回應定義。

201 Created

LinkedService

已建立回應定義。

202 Accepted

接受的回應定義。

安全性

azure_auth

Azure Active Directory OAuth2 流

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

LinkedServicesCreate

範例要求

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

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

範例回覆

{
  "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"
}

定義

名稱 Description
LinkedService

最上層連結服務資源容器。

LinkedServiceEntityStatus

鏈接服務的布建狀態。

LinkedService

最上層連結服務資源容器。

名稱 類型 Description
id

string

資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

資源的名稱

properties.provisioningState

LinkedServiceEntityStatus

鏈接服務的布建狀態。

properties.resourceId

string

將連結至工作區之資源的資源標識碼。 這應該用於連結需要讀取許可權的資源

properties.writeAccessResourceId

string

將連結至工作區之資源的資源標識碼。 這應該用於連結需要寫入存取權的資源

tags

object

資源標籤。

type

string

資源的類型。 例如「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」

LinkedServiceEntityStatus

鏈接服務的布建狀態。

Description
Succeeded
Deleting
ProvisioningAccount
Updating