共用方式為


Custom Models - Copy

將儲存在此資源的自定義模型 (來源) 複製到使用者指定的目標 表格辨識器 資源。

POST {endpoint}/formrecognizer/v2.1/custom/models/{modelId}/copy

URI 參數

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

string

支援的認知服務端點 (通訊協定和主機名,例如: https://westus2.api.cognitive.microsoft.com) 。

modelId
path True

string

uuid

模型標識碼。

要求標頭

名稱 必要 類型 Description
Ocp-Apim-Subscription-Key True

string

要求本文

名稱 必要 類型 Description
copyAuthorization True

CopyAuthorizationResult

將宣告編碼為授權複製要求的實體。

targetResourceId True

string

複製模型的目標 Azure 資源識別碼 表格辨識器 資源。

targetResourceRegion True

string

目標 Azure 資源的位置。 認知服務支援的有效 Azure 區域名稱。

回應

名稱 類型 Description
202 Accepted

複製要求已成功排入佇列。

標題

Operation-Location: string

Other Status Codes

ErrorResponse

回應實體隨附的非成功回應,其中包含有關錯誤的其他詳細數據。

安全性

Ocp-Apim-Subscription-Key

類型: apiKey
位於: header

範例

Copy custom model

範例要求

POST {endpoint}/formrecognizer/v2.1/custom/models/f973e3c1-1148-43bb-bea8-49d0603ab3a8/copy


{
  "targetResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{resourceName}",
  "targetResourceRegion": "westus2",
  "copyAuthorization": {
    "modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
    "accessToken": "{accessToken}",
    "expirationDateTimeTicks": 86400
  }
}

範例回覆

Operation-Location: {endpoint}/formrecognizer/v2.1/custom/models/f973e3c1-1148-43bb-bea8-49d0603ab3a8/copyResults/3b1e6c5b-e113-4114-ab6b-ce65dfe8050f

定義

名稱 Description
CopyAuthorizationResult

要求參數,其中包含複製作業的授權宣告。

CopyRequest

要求參數,將現有的自定義模型從來源資源複製到資源標識元所參考的目標資源。

ErrorInformation
ErrorResponse

CopyAuthorizationResult

要求參數,其中包含複製作業的授權宣告。

名稱 類型 Description
accessToken

string

用來授權要求的令牌宣告。

expirationDateTimeTicks

integer

存取權杖的到期時間。 日期會表示為從 1970-01-01T0:0:0Z UTC 至到期時間的秒數。

modelId

string

模型標識碼。

CopyRequest

要求參數,將現有的自定義模型從來源資源複製到資源標識元所參考的目標資源。

名稱 類型 Description
copyAuthorization

CopyAuthorizationResult

將宣告編碼為授權複製要求的實體。

targetResourceId

string

複製模型的目標 Azure 資源識別碼 表格辨識器 資源。

targetResourceRegion

string

目標 Azure 資源的位置。 認知服務支援的有效 Azure 區域名稱。

ErrorInformation

名稱 類型 Description
code

string

message

string

ErrorResponse

名稱 類型 Description
error

ErrorInformation