共用方式為


Shared Private Link Resources - Create Or Update

起始由指定資源群組中搜尋服務所管理的共用私人鏈接資源的建立或更新。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}?api-version=2025-05-01

URI 參數

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

string

目前訂用帳戶內的資源組名。 您可以從 Azure Resource Manager API 或入口網站取得此值。

searchServiceName
path True

string

pattern: ^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$

與指定資源群組相關聯的 Azure AI 搜尋服務名稱。

sharedPrivateLinkResourceName
path True

string

由指定資源群組內 Azure AI 搜尋服務所管理之共用私人鏈接資源的名稱。

subscriptionId
path True

string

Microsoft Azure 訂用帳戶的唯一標識符。 您可以從 Azure Resource Manager API 或入口網站取得此值。

api-version
query True

string

每個要求所使用的 API 版本。

要求標頭

名稱 必要 類型 Description
x-ms-client-request-id

string (uuid)

用戶端產生的 GUID 值,可識別此要求。 如果指定,則會以追蹤要求的方式包含在響應資訊中。

要求本文

名稱 類型 Description
properties

SharedPrivateLinkResourceProperties

描述 Azure AI 搜尋服務所管理之共用私人鏈接資源的屬性。

回應

名稱 類型 Description
200 OK

SharedPrivateLinkResource

已建立或更新之共用私人鏈接資源的詳細數據。

202 Accepted

已接受共用私人鏈接資源建立或更新作業,且會以異步方式完成。

Other Status Codes

CloudError

HTTP 400 (不正確的要求):指定的共用私人鏈接資源名稱或共用私人鏈接資源定義無效;如需詳細資訊,請參閱回應中的錯誤碼和訊息。 HTTP 404 (找不到):找不到訂用帳戶、資源群組、搜尋服務或共用私人鏈接資源。 HTTP 409 (衝突):指定的訂用帳戶已停用。

安全性

azure_auth

指定Microsoft身分識別平台上支援的隱含授與流程。

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

範圍

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

範例

SharedPrivateLinkResourceCreateOrUpdate

範例要求

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice/sharedPrivateLinkResources/testResource?api-version=2025-05-01

{
  "properties": {
    "requestMessage": "please approve",
    "groupId": "blob",
    "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storageAccountName",
    "resourceRegion": null
  }
}

範例回覆

Location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchService/sharedPrivateLinkResources/testResource/operationStatuses/08586060559526078782?api-version=2025-05-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchService/sharedPrivateLinkResources/testResource/operationStatuses/08586060559526078782?api-version=2025-05-01
{
  "name": "testResource",
  "type": "Microsoft.Search/searchServices/sharedPrivateLinkResources",
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice/sharedPrivateLinkResources/testResource",
  "properties": {
    "requestMessage": "please approve",
    "groupId": "blob",
    "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storageAccountName",
    "status": "Pending",
    "resourceRegion": null
  }
}

定義

名稱 Description
CloudError

包含 API 錯誤的相關信息。

CloudErrorBody

描述具有錯誤碼和訊息的特定 API 錯誤。

createdByType

建立資源的身分識別類型。

SharedPrivateLinkResource

描述 Azure AI 搜尋服務所管理的共用私人鏈接資源。

SharedPrivateLinkResourceProperties

描述 Azure AI 搜尋服務所管理之現有共用私人鏈接資源的屬性。

SharedPrivateLinkResourceProvisioningState

共用私人鏈接資源的布建狀態。 有效值為更新、刪除、失敗、成功或不完整。

SharedPrivateLinkResourceStatus

共用私人鏈接資源的狀態。 有效值為 Pending、Approved、Rejected 或 Disconnected。

systemData

與建立和上次修改資源相關的元數據。

CloudError

包含 API 錯誤的相關信息。

名稱 類型 Description
error

CloudErrorBody

描述具有錯誤碼和訊息的特定 API 錯誤。

message

string

錯誤簡短描述,其中提示發生錯誤的原因(如需詳細數據/偵錯資訊,請參閱 'error.message' 屬性。

CloudErrorBody

描述具有錯誤碼和訊息的特定 API 錯誤。

名稱 類型 Description
code

string

比 HTTP 狀態代碼更精確地描述錯誤條件的錯誤碼。 可用來以程式設計方式處理特定錯誤案例。

details

CloudErrorBody[]

包含與此錯誤相關的巢狀錯誤。

message

string

描述錯誤的詳細訊息,並提供偵錯資訊。

target

string

特定錯誤的目標(例如,錯誤中的屬性名稱)。

createdByType

建立資源的身分識別類型。

Description
User
Application
ManagedIdentity
Key

SharedPrivateLinkResource

描述 Azure AI 搜尋服務所管理的共用私人鏈接資源。

名稱 類型 Description
id

string (arm-id)

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

name

string

資源的名稱

properties

SharedPrivateLinkResourceProperties

描述 Azure AI 搜尋服務所管理之共用私人鏈接資源的屬性。

systemData

systemData

包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。

type

string

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

SharedPrivateLinkResourceProperties

描述 Azure AI 搜尋服務所管理之現有共用私人鏈接資源的屬性。

名稱 類型 Description
groupId

string

共用私人鏈接資源提供者的群組標識碼。

privateLinkResourceId

string

共用私人鏈接資源的資源資源識別碼。

provisioningState

SharedPrivateLinkResourceProvisioningState

共用私人鏈接資源的布建狀態。 有效值為更新、刪除、失敗、成功或不完整。

requestMessage

string

要求核准共用私人鏈接資源的訊息。

resourceRegion

string

選擇性。 可用來指定正在建立共用私人鏈接之資源的 Azure Resource Manager 位置。 只有 DNS 設定為區域的資源(例如 Azure Kubernetes Service)才需要此專案。

status

SharedPrivateLinkResourceStatus

共用私人鏈接資源的狀態。 有效值為 Pending、Approved、Rejected 或 Disconnected。

SharedPrivateLinkResourceProvisioningState

共用私人鏈接資源的布建狀態。 有效值為更新、刪除、失敗、成功或不完整。

Description
Updating

共用私人鏈接資源正與其他資源一起建立,使其功能正常運作。

Deleting

共用的私人鏈接資源正在刪除。

Failed

無法布建或刪除共用的私人鏈接資源。

Succeeded

共用的私人鏈接資源已完成布建,並已準備好進行核准。

Incomplete

已接受共用私人鏈接資源的布建要求,但尚未開始建立程式。

SharedPrivateLinkResourceStatus

共用私人鏈接資源的狀態。 有效值為 Pending、Approved、Rejected 或 Disconnected。

Description
Pending

已建立共用私人鏈接資源,且正在等待核准。

Approved

共用的私人鏈接資源已核准且可供使用。

Rejected

共用的私人鏈接資源已遭到拒絕,且無法使用。

Disconnected

共用的私人鏈接資源已從服務中移除。

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。