Compute Node - Upload Batch Service Logs
將 Azure Batch 服務記錄檔從指定的計算節點上傳至 Azure Blob 記憶體。
如果您遇到錯誤,而且想要呈報至 Azure 支援,這是為了以自動化方式從計算節點收集 Azure Batch 服務記錄檔。 Azure Batch 服務記錄檔應該與 Azure 支援共用,以協助對 Batch 服務的問題進行偵錯。
POST {batchUrl}/pools/{poolId}/nodes/{nodeId}/uploadbatchservicelogs?api-version=2024-07-01.20.0
POST {batchUrl}/pools/{poolId}/nodes/{nodeId}/uploadbatchservicelogs?timeout={timeout}&api-version=2024-07-01.20.0
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
batch
|
path | True |
string |
所有 Azure Batch 服務要求的基底 URL。 |
node
|
path | True |
string |
您要上傳 Azure Batch 服務記錄檔的計算節點識別碼。 |
pool
|
path | True |
string |
包含計算節點的集區識別碼。 |
api-version
|
query | True |
string |
用戶端 API 版本。 |
timeout
|
query |
integer (int32) |
伺服器可以花費數秒處理要求的時間上限。 預設值為30秒。 如果值大於 30,則會改用預設值。 |
要求標頭
Media Types: "application/json; odata=minimalmetadata"
名稱 | 必要 | 類型 | Description |
---|---|---|---|
client-request-id |
string (uuid) |
呼叫端產生的要求身分識別,格式為 GUID,不含大括弧,例如 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0。 |
|
return-client-request-id |
boolean |
伺服器是否應該在回應中傳回 client-request-id。 |
|
ocp-date |
string (date-time-rfc1123) |
發出要求的時間。 用戶端連結庫通常會將此設定為目前的系統時鐘時間;如果您要直接呼叫 REST API,請明確設定它。 |
要求本文
Media Types: "application/json; odata=minimalmetadata"
名稱 | 必要 | 類型 | Description |
---|---|---|---|
containerUrl | True |
string |
要上傳 Batch 服務記錄檔的 Azure Blob 記憶體內的容器 URL。 |
startTime | True |
string (date-time) |
上傳 Batch 服務記錄檔的時間範圍開始時間範圍。 |
endTime |
string (date-time) |
上傳 Batch 服務記錄檔的時間範圍結束。 |
|
identityReference |
使用者指派身分識別的參考,用來存取 containerUrl 所指定的 Azure Blob 記憶體。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
Batch 服務的要求成功。 標題
|
|
Other Status Codes |
Batch 服務的錯誤。 |
安全性
azure_auth
Microsoft Entra OAuth 2.0 驗證碼流程
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
Authorization
類型:
apiKey
位於:
header
範例
Upload BatchService Logs
範例要求
POST account.region.batch.azure.com/pools/poolId/nodes/tvm-1695681911_1-20161121t182739z/uploadbatchservicelogs?api-version=2024-07-01.20.0
{
"containerUrl": "https://somestorageacct.blob.core.windows.net/batch-compute-node-logs?se=2017-12-09T18%3A51%3A00Z&sp=w&sv=2016-05-31&sr=c&sig",
"startTime": "2017-11-27T00:00:00Z"
}
範例回覆
{
"virtualDirectoryName": "poolId/tvm-1695681911-1-20161121t182739z/0795539d-82fe-48e3-bbff-2964905b6de0",
"numberOfFilesUploaded": 8
}
定義
名稱 | Description |
---|---|
Batch |
從 Azure Batch 服務收到的錯誤回應。 |
Batch |
Azure Batch 錯誤回應中包含的其他信息專案。 |
Compute |
與計算節點將使用的 Batch 集區相關聯的使用者指派身分識別參考。 |
Error |
Azure Batch 錯誤回應中收到的錯誤訊息。 |
Upload |
Azure Batch 服務記錄檔會上傳計算節點的組態。 |
Upload |
從特定計算節點上傳 Batch 服務記錄檔的結果。 |
BatchError
從 Azure Batch 服務收到的錯誤回應。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤的識別碼。 程序代碼是不變的,而且是要以程序設計方式取用。 |
message |
描述錯誤的訊息,適用於在使用者介面中顯示。 |
|
values |
索引鍵/值組的集合,其中包含錯誤的其他詳細數據。 |
BatchErrorDetail
Azure Batch 錯誤回應中包含的其他信息專案。
名稱 | 類型 | Description |
---|---|---|
key |
string |
指定 Value 屬性意義的識別碼。 |
value |
string |
錯誤回應隨附的其他資訊。 |
ComputeNodeIdentityReference
與計算節點將使用的 Batch 集區相關聯的使用者指派身分識別參考。
名稱 | 類型 | Description |
---|---|---|
resourceId |
string |
使用者指派身分識別的 ARM 資源識別碼。 |
ErrorMessage
Azure Batch 錯誤回應中收到的錯誤訊息。
名稱 | 類型 | Description |
---|---|---|
lang |
string |
錯誤訊息的語言代碼 |
value |
string |
訊息的文字。 |
UploadBatchServiceLogsConfiguration
Azure Batch 服務記錄檔會上傳計算節點的組態。
名稱 | 類型 | Description |
---|---|---|
containerUrl |
string |
要上傳 Batch 服務記錄檔的 Azure Blob 記憶體內的容器 URL。 |
endTime |
string (date-time) |
上傳 Batch 服務記錄檔的時間範圍結束。 |
identityReference |
使用者指派身分識別的參考,用來存取 containerUrl 所指定的 Azure Blob 記憶體。 |
|
startTime |
string (date-time) |
上傳 Batch 服務記錄檔的時間範圍開始時間範圍。 |
UploadBatchServiceLogsResult
從特定計算節點上傳 Batch 服務記錄檔的結果。
名稱 | 類型 | Description |
---|---|---|
numberOfFilesUploaded |
integer (int32) |
將上傳的記錄檔數目。 |
virtualDirectoryName |
string |
將上傳 Batch 服務記錄檔的 Azure Blob 記憶體容器內的虛擬目錄。 |