Share via


Document Models - Copy Model To

將檔模型複製到目標資源、區域和modelId。

POST {endpoint}/documentintelligence/documentModels/{modelId}:copyTo?api-version=2024-02-29-preview

URI 參數

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

string

Document Intelligence 服務端點。

modelId
path True

string

唯一的檔模型名稱。

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

api-version
query True

string

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
accessToken True

string

用來授權要求的令牌。

expirationDateTime True

string

存取令牌到期的日期/時間。

targetModelId True

string

目標檔模型的標識碼。

targetModelLocation True

string

目標帳戶中複製檔模型的 URL。

targetResourceId True

string

應複製檔模型的目標 Azure 資源識別碼。

targetResourceRegion True

string

應複製檔模型的目標 Azure 資源位置。

回應

名稱 類型 Description
202 Accepted

要求已接受進行處理,但尚未完成處理。

Headers

  • Operation-Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

未預期的錯誤回應。

安全性

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

名稱 Description
https://cognitiveservices.azure.com/.default

範例

Copy Document Model To

Sample Request

POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/sourceModel:copyTo?api-version=2024-02-29-preview

{
  "targetResourceId": "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService",
  "targetResourceRegion": "targetResourceRegion",
  "targetModelId": "targetModel",
  "targetModelLocation": "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentModels/targetModel",
  "accessToken": "accessToken",
  "expirationDateTime": "2021-09-23T09:12:54.552Z"
}

Sample Response

Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2024-02-29-preview

定義

名稱 Description
CopyAuthorization

將檔案模型複製到指定的目標資源和modelId的授權。

Error

錯誤物件。

ErrorResponse

錯誤回應物件。

InnerError

物件,包含有關錯誤的更特定資訊。

CopyAuthorization

將檔案模型複製到指定的目標資源和modelId的授權。

名稱 類型 Description
accessToken

string

用來授權要求的令牌。

expirationDateTime

string

存取令牌到期的日期/時間。

targetModelId

string

目標檔模型的標識碼。

targetModelLocation

string

目標帳戶中複製檔模型的 URL。

targetResourceId

string

應複製檔模型的目標 Azure 資源識別碼。

targetResourceRegion

string

應複製檔模型的目標 Azure 資源位置。

Error

錯誤物件。

名稱 類型 Description
code

string

其中一組伺服器定義的錯誤碼。

details

Error[]

導致此錯誤之特定錯誤的詳細數據陣列。

innererror

InnerError

物件,包含比目前對象有關錯誤的更特定資訊。

message

string

人類看得懂的錯誤表示法。

target

string

錯誤的目標。

ErrorResponse

錯誤回應物件。

名稱 類型 Description
error

Error

錯誤資訊。

InnerError

物件,包含有關錯誤的更特定資訊。

名稱 類型 Description
code

string

其中一組伺服器定義的錯誤碼。

innererror

InnerError

內部錯誤。

message

string

人類看得懂的錯誤表示法。