Document Models - Copy Model To
將檔模型複製到目標資源、區域和modelId。
POST {endpoint}/formrecognizer/documentModels/{modelId}:copyTo?api-version=2022-08-31
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
支援的認知服務端點 (通訊協定和主機名,例如: https://westus2.api.cognitive.microsoft.com) 。 |
model
|
path | True |
string |
唯一的檔模型名稱。 Regex 模式: |
api-version
|
query | True |
要求的 API 版本。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
要求本文
名稱 | 必要 | 類型 | 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 |
要求已順利排入佇列。 標題 Operation-Location: string |
|
Other Status Codes |
發生錯誤。 |
安全性
Ocp-Apim-Subscription-Key
類型:
apiKey
位於:
header
範例
CopyDocumentModelTo
範例要求
POST {endpoint}/formrecognizer/documentModels/sourceModel:copyTo?api-version=2022-08-31
{
"targetResourceId": "{targetResourceId}",
"targetResourceRegion": "{targetResourceRegion}",
"targetModelId": "targetModel",
"targetModelLocation": "{targetEndpoint}/formrecognizer/documentModels/targetModel?api-version=2022-08-31",
"accessToken": "{accessToken}",
"expirationDateTime": "2021-09-23T09:12:54.552Z"
}
範例回覆
Operation-Location: {endpoint}/formrecognizer/operations/{operationId}?api-version=2022-08-31
定義
名稱 | Description |
---|---|
Api |
API 版本。 |
Copy |
將檔案模型複製到指定的目標資源和modelId的授權。 |
Error |
錯誤資訊。 |
Error |
錯誤回應物件。 |
Inner |
詳細的錯誤。 |
ApiVersion
API 版本。
名稱 | 類型 | Description |
---|---|---|
2022-08-31 |
string |
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 |
詳細的錯誤。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤的目標。 |
ErrorResponse
錯誤回應物件。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤資訊。 |
InnerError
詳細的錯誤。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤碼。 |
innererror |
詳細的錯誤。 |
|
message |
string |
錯誤訊息。 |