BatchClient class

Client class for accessing Azure Batch service.

方法

createJob(BatchJobCreateOptions, CreateJobOptionalParams)

批次服務支援兩種方式來控制作為工作一部分的工作。 在第一種方法中,使用者指定一個工作管理員任務。 批次服務會在準備開始工作時啟動此任務。 工作管理員任務透過工作 API 控制所有在該工作下執行的其他任務。 在第二種方式中,使用者透過任務 API 直接控制在主動作業下的任務執行。 另外要注意:命名工作時,請避免包含敏感資訊,例如使用者名稱或秘密專案名稱。 這些資訊可能會出現在 Microsoft 支援服務 工程師可存取的遙測日誌中。

createJobSchedule(BatchJobScheduleCreateOptions, CreateJobScheduleOptionalParams)

為指定的帳戶建立工作排程。

createNodeUser(string, string, BatchNodeUserCreateOptions, CreateNodeUserOptionalParams)

你只能在運算節點處於閒置或執行狀態時,將使用者帳號加入。 在遠端登入運算節點之前,必須先設定 SSH 和 RDP 的存取埠。 如需詳細資訊,請參閱 https://learn.microsoft.com/azure/batch/pool-endpoint-configuration

createPool(BatchPoolCreateOptions, CreatePoolOptionalParams)

命名集區時,請避免包含敏感性資訊,例如用戶名稱或秘密項目名稱。 這些資訊可能會出現在 Microsoft 支援服務 工程師可存取的遙測日誌中。

createTask(string, BatchTaskCreateOptions, CreateTaskOptionalParams)

任務從新增到完成的最長壽命為180天。 如果任務在加入後 180 天內未完成,批次服務會終止該任務,並維持當時的狀態。

createTaskCollection(string, BatchTaskGroup, CreateTaskCollectionOptionalParams)

請注意,每個任務必須有唯一的 ID。 批次服務不得依照此請求中任務提交的順序回傳每個任務的結果。 如果伺服器在請求過程中逾時或連線關閉,請求可能已經部分或全部處理,甚至根本沒有處理。 此時,使用者應重新發出請求。 請注意,重新發出請求時,正確處理失敗的責任在於使用者。 例如,重試時應該使用相同的任務 ID,這樣如果前一個操作成功,重試就不會意外產生額外的任務。 如果回應中包含任何未加入的任務,客戶端可以重新嘗試該請求。 在重試中,最有效率的做法是只重新提交那些未加的任務,並省略第一次成功新增的任務。 任務從新增到完成的最長壽命為180天。 如果任務在加入後 180 天內未完成,批次服務會終止該任務,並維持當時的狀態。

deallocateNode(string, string, DeallocateNodeOptionalParams)

只有當計算節點處於閑置或執行中狀態時,才可以解除分配。

deleteJob(string, DeleteJobOptionalParams)

刪除工作也會刪除該工作所有屬於該工作的一部分任務,以及所有工作統計數據。 這也會覆蓋任務資料的保留期;也就是說,如果工作包含仍保留在計算節點上的任務,批次服務會刪除這些工作中的工作目錄及其所有內容。 當收到刪除工作請求時,批次服務會將工作設定為刪除狀態。 所有處於刪除狀態的工作更新操作都會失敗,狀態代碼為 409(衝突),並會有額外資訊顯示該工作正在被刪除。

deleteJobSchedule(string, DeleteJobScheduleOptionalParams)

當您刪除作業排程時,這也會刪除該排程下的所有作業和工作。 刪除 [工作] 時,也會刪除計算節點上其工作目錄中的所有檔案(會忽略保留期間)。 一旦刪除作業排程,作業排程統計數據仍計入帳戶存留期統計數據,就無法再存取作業排程統計數據。

deleteNodeFile(string, string, string, DeleteNodeFileOptionalParams)

從計算節點刪除指定的檔案。

deleteNodeUser(string, string, string, DeleteNodeUserOptionalParams)

只有當使用者帳戶處於閑置或執行中狀態時,才可以將使用者帳戶刪除至計算節點。 在遠端登入運算節點之前,必須先設定 SSH 和 RDP 的存取埠。 如需詳細資訊,請參閱 https://learn.microsoft.com/azure/batch/pool-endpoint-configuration

deletePool(string, DeletePoolOptionalParams)

當您要求刪除集區時,會發生下列動作:集區狀態設定為刪除;已停止集區上任何進行中的重設大小作業;Batch 服務會開始將集區大小調整為零計算節點;在現有計算節點上執行的任何工作都會終止並重新排入佇列(如同已使用預設重新佇列選項要求重設大小集區作業):最後,集區會從系統中移除。 因為重新排入佇列執行的工作,因此使用者可以藉由更新其作業以以不同的集區為目標來重新執行這些工作。 工作接著可以在新的集區上執行。 如果您想要覆寫重新佇列行為,則應該先明確地呼叫重設大小集區,將集區壓縮為零大小,再刪除集區。 如果您在處於刪除狀態的集區上呼叫 Update、Patch 或刪除 API,它會失敗,並出現 HTTP 狀態代碼 409,並出現錯誤碼 PoolBeingDeleted。

deleteTask(string, string, DeleteTaskOptionalParams)

刪除工作時,也會刪除其所在計算節點上其目錄中的所有檔案(不論保留時間為何)。 針對多重實例工作,刪除工作作業會同步套用至主要工作;子工作及其檔案接著會在背景以異步方式刪除。

deleteTaskFile(string, string, string, DeleteTaskFileOptionalParams)

從執行工作的計算節點刪除指定的工作檔案。

disableJob(string, BatchJobDisableOptions, DisableJobOptionalParams)

批次服務會立即將工作移至停用狀態。 批次接著使用 disableTasks 參數來決定該工作中正在執行的任務該如何處理。 工作會維持停用狀態,直到停用操作完成且所有任務依 disableTasks 選項處理完畢;工作接著轉為殘障狀態。 在工作回到啟用狀態前,不會啟動新的任務。 如果你嘗試停用非活躍、停用或停用狀態的工作,請求會以狀態碼 409 失敗。

disableJobSchedule(string, DisableJobScheduleOptionalParams)

在再次啟用作業排程之前,將不會建立任何新的作業。

disableNodeScheduling(string, string, DisableNodeSchedulingOptionalParams)

只有當運算節點目前的排程狀態已啟用時,才能關閉任務排程。

disablePoolAutoScale(string, DisablePoolAutoScaleOptionalParams)

停用集區的自動調整。

enableJob(string, EnableJobOptionalParams)

當你呼叫這個 API 時,批次服務會將一個被停用的 Job 設為啟用狀態。 完成此操作後,工作會進入活躍狀態,並恢復工作下新任務的排程。 批次服務不允許任務在活躍狀態停留超過 180 天。 因此,如果你啟用包含超過 180 天前新增的活躍任務的工作,這些任務將無法執行。

enableJobSchedule(string, EnableJobScheduleOptionalParams)

啟用作業排程。

enableNodeScheduling(string, string, EnableNodeSchedulingOptionalParams)

只有當運算節點目前的排程狀態被停用時,才能啟用任務排程

enablePoolAutoScale(string, BatchPoolEnableAutoScaleOptions, EnablePoolAutoScaleOptionalParams)

如果集區上的重設大小作業正在進行中,您無法在集區上啟用自動調整。 如果集區目前已停用自動調整,您必須在要求中指定有效的自動調整公式。 如果已經啟用集區自動調整,您可以指定新的自動調整公式和/或新的評估間隔。 您無法每隔 30 秒多次針對相同的集區呼叫此 API。

evaluatePoolAutoScale(string, BatchPoolEvaluateAutoScaleOptions, EvaluatePoolAutoScaleOptionalParams)

此 API 主要是為了驗證自動調整公式,因為它只會傳回結果,而不需要將公式套用至集區。 集區必須啟用自動調整,才能評估公式。

getApplication(string, GetApplicationOptionalParams)

此操作僅回傳可用於運算節點的應用程式與版本;也就是說,可以用於套件參考。 如需管理員關於尚未提供給運算節點的應用程式與版本資訊,請使用 Azure 入口網站或 Azure 資源管理器 API。

getJob(string, GetJobOptionalParams)

獲取指定職務的資訊。

getJobSchedule(string, GetJobScheduleOptionalParams)

取得指定的工作排程資訊。

getJobTaskCounts(string, GetJobTaskCountsOptionalParams)

工作計數會依作用中、執行中或已完成的工作狀態,以及成功或失敗的工作計數來提供工作計數。 準備狀態中的工作會計算為執行中。 請注意,傳回的數位不一定是最新的。 如果您需要確切的工作計數,請使用清單查詢。

getNode(string, string, GetNodeOptionalParams)

取得指定計算節點的相關信息。

getNodeExtension(string, string, string, GetNodeExtensionOptionalParams)

取得指定的計算節點擴充的資訊。

getNodeFile(string, string, string, GetNodeFileOptionalParams)

回傳指定的計算節點檔案內容。

getNodeFileProperties(string, string, string, GetNodeFilePropertiesOptionalParams)

取得指定之計算節點檔案的屬性。

getNodeRemoteLoginSettings(string, string, GetNodeRemoteLoginSettingsOptionalParams)

在你能用遠端登入設定遠端登入運算節點之前,必須在運算節點建立使用者帳號,並設定 SSH 和 RDP 的存取埠。 如需詳細資訊,請參閱 https://learn.microsoft.com/azure/batch/pool-endpoint-configuration

getPool(string, GetPoolOptionalParams)

取得指定集區的相關信息。

getTask(string, string, GetTaskOptionalParams)

對於多實例任務,像 affinityId、executionInfo 和 nodeInfo 這類資訊指的是主要任務。 使用 list 子任務 API 來取得子任務的資訊。

getTaskFile(string, string, string, GetTaskFileOptionalParams)

回傳指定的任務檔案內容。

getTaskFileProperties(string, string, string, GetTaskFilePropertiesOptionalParams)

取得指定之 Task 檔案的屬性。

jobScheduleExists(string, JobScheduleExistsOptionalParams)

檢查指定的工作排程是否存在。

listApplications(ListApplicationsOptionalParams)

此操作僅回傳可用於運算節點的應用程式與版本;也就是說,可以用於套件參考。 如需管理員關於尚未提供給運算節點的應用程式與版本資訊,請使用 Azure 入口網站或 Azure 資源管理器 API。

listJobPreparationAndReleaseTaskStatus(string, ListJobPreparationAndReleaseTaskStatusOptionalParams)

此 API 會傳回已執行作業準備或作業釋放工作之所有計算節點上的工作準備和作業發行工作狀態。 這包括自那以後已從集區中移除的計算節點。 如果在沒有作業準備或作業釋放工作的作業上叫用此 API,Batch 服務會傳回 HTTP 狀態代碼 409 (衝突),並傳回 JobPreparationTaskNotSpecified 的錯誤碼。

listJobs(ListJobsOptionalParams)

列出指定帳號中的所有職缺。

listJobSchedules(ListJobSchedulesOptionalParams)

列出指定帳號中的所有工作排程。

listJobsFromSchedule(string, ListJobsFromScheduleOptionalParams)

列出依照指定工作排程建立的工作。

listNodeExtensions(string, string, ListNodeExtensionsOptionalParams)

列出指定池中計算節點的擴充。

listNodeFiles(string, string, ListNodeFilesOptionalParams)

列出指定計算節點上 [工作] 目錄中的所有檔案。

listNodes(string, ListNodesOptionalParams)

列出指定集區中的計算節點。

listPoolNodeCounts(ListPoolNodeCountsOptionalParams)

取得依集區分組之每個狀態的計算節點數目。 請注意,傳回的數位不一定是最新的。 如果您需要確切的節點計數,請使用清單查詢。

listPools(ListPoolsOptionalParams)

列出指定帳戶中的所有集區。

listPoolUsageMetrics(ListPoolUsageMetricsOptionalParams)

如果您未指定包含 poolId 的$filter子句,回應會包含帳戶中所有存在於傳回匯總間隔時間範圍內的集區。 如果您未指定$filter子句,包括 startTime 或 endTime,這些篩選會預設為目前可用之最後一個匯總間隔的開始和結束時間;也就是說,只會傳回最後一個匯總間隔。

listSubTasks(string, string, ListSubTasksOptionalParams)

如果Task不是多重實例Task,則這會傳回空集合。

listSupportedImages(ListSupportedImagesOptionalParams)

列出所有由 Azure Batch 服務支援的虛擬機映像。

listTaskFiles(string, string, ListTaskFilesOptionalParams)

列出工作目錄中其計算節點上的檔案。

listTasks(string, ListTasksOptionalParams)

對於多實例任務,像 affinityId、executionInfo 和 nodeInfo 這類資訊指的是主要任務。 使用 list 子任務 API 來取得子任務的資訊。

poolExists(string, PoolExistsOptionalParams)

獲得池的基本屬性。

reactivateTask(string, string, ReactivateTaskOptionalParams)

重新啟用可讓工作重新重試,最多達到重試計數上限。 工作的狀態會變更為作用中。 由於工作已不再處於已完成狀態,任何先前的結束代碼或失敗資訊都無法在重新啟用之後再使用。 每次重新啟動工作時,其重試計數會重設為 0。 未完成或先前成功完成的工作將會重新啟動失敗(結束代碼為 0)。 此外,如果作業已完成(或正在終止或刪除),它將會失敗。

rebootNode(string, string, RebootNodeOptionalParams)

只有在計算節點處於閑置或執行中狀態時,才能重新啟動它。

reimageNode(string, string, ReimageNodeOptionalParams)

只有當操作系統處於閑置或執行中狀態時,才可以在計算節點上重新安裝操作系統。 此 API 只能在以雲端服務設定屬性建立的池中調用。

removeNodes(string, BatchNodeRemoveOptions, RemoveNodesOptionalParams)

此作業只能在集區的配置狀態穩定時執行。 當此作業執行時,配置狀態會從穩定變更為重設大小。 每個要求最多可以移除100個節點。

replaceJob(string, BatchJob, ReplaceJobOptionalParams)

這完全取代了工作中所有可更新的屬性。 例如,若工作與其相關聯有約束,且此請求未指定限制,批次服務將移除現有約束。

replaceJobSchedule(string, BatchJobSchedule, ReplaceJobScheduleOptionalParams)

這完全取代了工作排程中所有可更新的屬性。 例如,如果此請求未指定排程屬性,批次服務會移除現有排程。 工作排程的變更僅影響更新後排程所建立的工作;目前執行的職業未受影響。

replaceNodeUser(string, string, string, BatchNodeUserUpdateOptions, ReplaceNodeUserOptionalParams)

此操作取代了帳戶中所有可更新的屬性。 例如,若未指定 expiryTime 元素,當前值會被替換為預設值,且不會保留未修改。 你只能在運算節點上更新使用者帳號,當它處於閒置或執行狀態時。

replacePoolProperties(string, BatchPoolReplaceOptions, ReplacePoolPropertiesOptionalParams)

這完全取代了池中所有可更新的屬性。 例如,如果池子有 StartTask,且此請求未指定 StartTask,則批次服務會移除現有的 StartTask。

replaceTask(string, string, BatchTask, ReplaceTaskOptionalParams)

更新指定任務的屬性。

resizePool(string, BatchPoolResizeOptions, ResizePoolOptionalParams)

只有當集區配置狀態穩定時,您才能調整集區的大小。 如果集區已經重設大小,要求會失敗,狀態代碼為 409。 當您調整集區大小時,集區的配置狀態會從穩定變更為重設大小。 您無法調整針對自動調整設定的集區大小。 如果您嘗試這樣做,Batch 服務會傳回錯誤 409。 如果您向下調整集區的大小,Batch 服務會選擇要移除的計算節點。 若要移除特定的計算節點,請改用集區移除計算節點 API。

startNode(string, string, StartNodeOptionalParams)

只有當運算節點已經被釋放時,才能啟動它。

stopPoolResize(string, StopPoolResizeOptionalParams)

此方法不會將池恢復到調整大小前的狀態:它只會停止任何進一步的變更,池子會維持目前狀態。 停止後,池會穩定在停止操作完成時的計算節點數。 在停止操作期間,池配置狀態先變為停止,接著變為穩定。 調整大小操作不必是明確的調整池請求;此 API 也可用來在池子建立時停止初始大小調整。

terminateJob(string, TerminateJobOptionalParams)

當收到終止工作請求時,批次服務會將工作設定為終止狀態。 批次服務接著終止與該工作相關的執行任務,並執行所需的工作釋放任務。 接著工作進入完成狀態。 如果工作中有任何任務處於活躍狀態,它們會保持在活躍狀態。 一旦工作終止,無法新增任務,且剩餘的活躍任務將不會被排程。

terminateJobSchedule(string, TerminateJobScheduleOptionalParams)

終止作業排程。

terminateTask(string, string, TerminateTaskOptionalParams)

當工作終止時,它會移至已完成狀態。 針對多重實例工作,終止工作作業會同步套用至主要工作;子工作接著會在背景以異步方式終止。

updateJob(string, BatchJobUpdateOptions, UpdateJobOptionalParams)

這只會取代請求中指定的工作屬性。 例如,若工作有限制條件,且請求未指定限制元素,則工作保留現有限制。

updateJobSchedule(string, BatchJobScheduleUpdateOptions, UpdateJobScheduleOptionalParams)

這僅取代請求中指定的工作排程屬性。 例如,如果此請求未指定排程屬性,批次服務將保留現有排程。 工作排程的變更僅影響更新後排程所建立的工作;目前執行的職業未受影響。

updatePool(string, BatchPoolUpdateOptions, UpdatePoolOptionalParams)

這只會取代請求中指定的池屬性。 例如,若池子有關聯的 StartTask,且請求未指定 StartTask 元素,則池會保留現有的 StartTask。

uploadNodeLogs(string, string, UploadBatchServiceLogsOptions, UploadNodeLogsOptionalParams)

這是用來自動從計算節點收集 Azure 批次服務日誌檔,如果你遇到錯誤並想升級到 Azure 支援。 Azure Batch 服務的日誌檔案應該與 Azure 支援 共享,以協助除錯批次服務的問題。

建構函式詳細資料

BatchClient(string, TokenCredential | AzureNamedKeyCredential, BatchClientOptionalParams)

new BatchClient(endpointParam: string, credential: TokenCredential | AzureNamedKeyCredential, options?: BatchClientOptionalParams)

參數

endpointParam

string

方法詳細資料

createJob(BatchJobCreateOptions, CreateJobOptionalParams)

批次服務支援兩種方式來控制作為工作一部分的工作。 在第一種方法中,使用者指定一個工作管理員任務。 批次服務會在準備開始工作時啟動此任務。 工作管理員任務透過工作 API 控制所有在該工作下執行的其他任務。 在第二種方式中,使用者透過任務 API 直接控制在主動作業下的任務執行。 另外要注意:命名工作時,請避免包含敏感資訊,例如使用者名稱或秘密專案名稱。 這些資訊可能會出現在 Microsoft 支援服務 工程師可存取的遙測日誌中。

function createJob(job: BatchJobCreateOptions, options?: CreateJobOptionalParams): Promise<void>

參數

傳回

Promise<void>

createJobSchedule(BatchJobScheduleCreateOptions, CreateJobScheduleOptionalParams)

為指定的帳戶建立工作排程。

function createJobSchedule(jobSchedule: BatchJobScheduleCreateOptions, options?: CreateJobScheduleOptionalParams): Promise<void>

參數

傳回

Promise<void>

createNodeUser(string, string, BatchNodeUserCreateOptions, CreateNodeUserOptionalParams)

你只能在運算節點處於閒置或執行狀態時,將使用者帳號加入。 在遠端登入運算節點之前,必須先設定 SSH 和 RDP 的存取埠。 如需詳細資訊,請參閱 https://learn.microsoft.com/azure/batch/pool-endpoint-configuration

function createNodeUser(poolId: string, nodeId: string, user: BatchNodeUserCreateOptions, options?: CreateNodeUserOptionalParams): Promise<void>

參數

poolId

string

nodeId

string

傳回

Promise<void>

createPool(BatchPoolCreateOptions, CreatePoolOptionalParams)

命名集區時,請避免包含敏感性資訊,例如用戶名稱或秘密項目名稱。 這些資訊可能會出現在 Microsoft 支援服務 工程師可存取的遙測日誌中。

function createPool(pool: BatchPoolCreateOptions, options?: CreatePoolOptionalParams): Promise<void>

參數

傳回

Promise<void>

createTask(string, BatchTaskCreateOptions, CreateTaskOptionalParams)

任務從新增到完成的最長壽命為180天。 如果任務在加入後 180 天內未完成,批次服務會終止該任務,並維持當時的狀態。

function createTask(jobId: string, task: BatchTaskCreateOptions, options?: CreateTaskOptionalParams): Promise<void>

參數

jobId

string

傳回

Promise<void>

createTaskCollection(string, BatchTaskGroup, CreateTaskCollectionOptionalParams)

請注意,每個任務必須有唯一的 ID。 批次服務不得依照此請求中任務提交的順序回傳每個任務的結果。 如果伺服器在請求過程中逾時或連線關閉,請求可能已經部分或全部處理,甚至根本沒有處理。 此時,使用者應重新發出請求。 請注意,重新發出請求時,正確處理失敗的責任在於使用者。 例如,重試時應該使用相同的任務 ID,這樣如果前一個操作成功,重試就不會意外產生額外的任務。 如果回應中包含任何未加入的任務,客戶端可以重新嘗試該請求。 在重試中,最有效率的做法是只重新提交那些未加的任務,並省略第一次成功新增的任務。 任務從新增到完成的最長壽命為180天。 如果任務在加入後 180 天內未完成,批次服務會終止該任務,並維持當時的狀態。

function createTaskCollection(jobId: string, taskCollection: BatchTaskGroup, options?: CreateTaskCollectionOptionalParams): Promise<BatchCreateTaskCollectionResult>

參數

jobId

string

taskCollection
BatchTaskGroup

傳回

deallocateNode(string, string, DeallocateNodeOptionalParams)

只有當計算節點處於閑置或執行中狀態時,才可以解除分配。

function deallocateNode(poolId: string, nodeId: string, options?: DeallocateNodeOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

nodeId

string

傳回

PollerLike<OperationState<void>, void>

deleteJob(string, DeleteJobOptionalParams)

刪除工作也會刪除該工作所有屬於該工作的一部分任務,以及所有工作統計數據。 這也會覆蓋任務資料的保留期;也就是說,如果工作包含仍保留在計算節點上的任務,批次服務會刪除這些工作中的工作目錄及其所有內容。 當收到刪除工作請求時,批次服務會將工作設定為刪除狀態。 所有處於刪除狀態的工作更新操作都會失敗,狀態代碼為 409(衝突),並會有額外資訊顯示該工作正在被刪除。

function deleteJob(jobId: string, options?: DeleteJobOptionalParams): PollerLike<OperationState<void>, void>

參數

jobId

string

傳回

PollerLike<OperationState<void>, void>

deleteJobSchedule(string, DeleteJobScheduleOptionalParams)

當您刪除作業排程時,這也會刪除該排程下的所有作業和工作。 刪除 [工作] 時,也會刪除計算節點上其工作目錄中的所有檔案(會忽略保留期間)。 一旦刪除作業排程,作業排程統計數據仍計入帳戶存留期統計數據,就無法再存取作業排程統計數據。

function deleteJobSchedule(jobScheduleId: string, options?: DeleteJobScheduleOptionalParams): PollerLike<OperationState<void>, void>

參數

jobScheduleId

string

傳回

PollerLike<OperationState<void>, void>

deleteNodeFile(string, string, string, DeleteNodeFileOptionalParams)

從計算節點刪除指定的檔案。

function deleteNodeFile(poolId: string, nodeId: string, filePath: string, options?: DeleteNodeFileOptionalParams): Promise<void>

參數

poolId

string

nodeId

string

filePath

string

傳回

Promise<void>

deleteNodeUser(string, string, string, DeleteNodeUserOptionalParams)

只有當使用者帳戶處於閑置或執行中狀態時,才可以將使用者帳戶刪除至計算節點。 在遠端登入運算節點之前,必須先設定 SSH 和 RDP 的存取埠。 如需詳細資訊,請參閱 https://learn.microsoft.com/azure/batch/pool-endpoint-configuration

function deleteNodeUser(poolId: string, nodeId: string, userName: string, options?: DeleteNodeUserOptionalParams): Promise<void>

參數

poolId

string

nodeId

string

userName

string

傳回

Promise<void>

deletePool(string, DeletePoolOptionalParams)

當您要求刪除集區時,會發生下列動作:集區狀態設定為刪除;已停止集區上任何進行中的重設大小作業;Batch 服務會開始將集區大小調整為零計算節點;在現有計算節點上執行的任何工作都會終止並重新排入佇列(如同已使用預設重新佇列選項要求重設大小集區作業):最後,集區會從系統中移除。 因為重新排入佇列執行的工作,因此使用者可以藉由更新其作業以以不同的集區為目標來重新執行這些工作。 工作接著可以在新的集區上執行。 如果您想要覆寫重新佇列行為,則應該先明確地呼叫重設大小集區,將集區壓縮為零大小,再刪除集區。 如果您在處於刪除狀態的集區上呼叫 Update、Patch 或刪除 API,它會失敗,並出現 HTTP 狀態代碼 409,並出現錯誤碼 PoolBeingDeleted。

function deletePool(poolId: string, options?: DeletePoolOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

傳回

PollerLike<OperationState<void>, void>

deleteTask(string, string, DeleteTaskOptionalParams)

刪除工作時,也會刪除其所在計算節點上其目錄中的所有檔案(不論保留時間為何)。 針對多重實例工作,刪除工作作業會同步套用至主要工作;子工作及其檔案接著會在背景以異步方式刪除。

function deleteTask(jobId: string, taskId: string, options?: DeleteTaskOptionalParams): Promise<void>

參數

jobId

string

taskId

string

傳回

Promise<void>

deleteTaskFile(string, string, string, DeleteTaskFileOptionalParams)

從執行工作的計算節點刪除指定的工作檔案。

function deleteTaskFile(jobId: string, taskId: string, filePath: string, options?: DeleteTaskFileOptionalParams): Promise<void>

參數

jobId

string

taskId

string

filePath

string

傳回

Promise<void>

disableJob(string, BatchJobDisableOptions, DisableJobOptionalParams)

批次服務會立即將工作移至停用狀態。 批次接著使用 disableTasks 參數來決定該工作中正在執行的任務該如何處理。 工作會維持停用狀態,直到停用操作完成且所有任務依 disableTasks 選項處理完畢;工作接著轉為殘障狀態。 在工作回到啟用狀態前,不會啟動新的任務。 如果你嘗試停用非活躍、停用或停用狀態的工作,請求會以狀態碼 409 失敗。

function disableJob(jobId: string, disableOptions: BatchJobDisableOptions, options?: DisableJobOptionalParams): PollerLike<OperationState<void>, void>

參數

jobId

string

disableOptions
BatchJobDisableOptions

傳回

PollerLike<OperationState<void>, void>

disableJobSchedule(string, DisableJobScheduleOptionalParams)

在再次啟用作業排程之前,將不會建立任何新的作業。

function disableJobSchedule(jobScheduleId: string, options?: DisableJobScheduleOptionalParams): Promise<void>

參數

jobScheduleId

string

傳回

Promise<void>

disableNodeScheduling(string, string, DisableNodeSchedulingOptionalParams)

只有當運算節點目前的排程狀態已啟用時,才能關閉任務排程。

function disableNodeScheduling(poolId: string, nodeId: string, options?: DisableNodeSchedulingOptionalParams): Promise<void>

參數

poolId

string

nodeId

string

傳回

Promise<void>

disablePoolAutoScale(string, DisablePoolAutoScaleOptionalParams)

停用集區的自動調整。

function disablePoolAutoScale(poolId: string, options?: DisablePoolAutoScaleOptionalParams): Promise<void>

參數

poolId

string

傳回

Promise<void>

enableJob(string, EnableJobOptionalParams)

當你呼叫這個 API 時,批次服務會將一個被停用的 Job 設為啟用狀態。 完成此操作後,工作會進入活躍狀態,並恢復工作下新任務的排程。 批次服務不允許任務在活躍狀態停留超過 180 天。 因此,如果你啟用包含超過 180 天前新增的活躍任務的工作,這些任務將無法執行。

function enableJob(jobId: string, options?: EnableJobOptionalParams): PollerLike<OperationState<void>, void>

參數

jobId

string

傳回

PollerLike<OperationState<void>, void>

enableJobSchedule(string, EnableJobScheduleOptionalParams)

啟用作業排程。

function enableJobSchedule(jobScheduleId: string, options?: EnableJobScheduleOptionalParams): Promise<void>

參數

jobScheduleId

string

傳回

Promise<void>

enableNodeScheduling(string, string, EnableNodeSchedulingOptionalParams)

只有當運算節點目前的排程狀態被停用時,才能啟用任務排程

function enableNodeScheduling(poolId: string, nodeId: string, options?: EnableNodeSchedulingOptionalParams): Promise<void>

參數

poolId

string

nodeId

string

傳回

Promise<void>

enablePoolAutoScale(string, BatchPoolEnableAutoScaleOptions, EnablePoolAutoScaleOptionalParams)

如果集區上的重設大小作業正在進行中,您無法在集區上啟用自動調整。 如果集區目前已停用自動調整,您必須在要求中指定有效的自動調整公式。 如果已經啟用集區自動調整,您可以指定新的自動調整公式和/或新的評估間隔。 您無法每隔 30 秒多次針對相同的集區呼叫此 API。

function enablePoolAutoScale(poolId: string, enableAutoScaleOptions: BatchPoolEnableAutoScaleOptions, options?: EnablePoolAutoScaleOptionalParams): Promise<void>

參數

poolId

string

enableAutoScaleOptions
BatchPoolEnableAutoScaleOptions

傳回

Promise<void>

evaluatePoolAutoScale(string, BatchPoolEvaluateAutoScaleOptions, EvaluatePoolAutoScaleOptionalParams)

此 API 主要是為了驗證自動調整公式,因為它只會傳回結果,而不需要將公式套用至集區。 集區必須啟用自動調整,才能評估公式。

function evaluatePoolAutoScale(poolId: string, evaluateAutoScaleOptions: BatchPoolEvaluateAutoScaleOptions, options?: EvaluatePoolAutoScaleOptionalParams): Promise<AutoScaleRun>

參數

poolId

string

evaluateAutoScaleOptions
BatchPoolEvaluateAutoScaleOptions

傳回

Promise<AutoScaleRun>

getApplication(string, GetApplicationOptionalParams)

此操作僅回傳可用於運算節點的應用程式與版本;也就是說,可以用於套件參考。 如需管理員關於尚未提供給運算節點的應用程式與版本資訊,請使用 Azure 入口網站或 Azure 資源管理器 API。

function getApplication(applicationId: string, options?: GetApplicationOptionalParams): Promise<BatchApplication>

參數

applicationId

string

傳回

Promise<BatchApplication>

getJob(string, GetJobOptionalParams)

獲取指定職務的資訊。

function getJob(jobId: string, options?: GetJobOptionalParams): Promise<BatchJob>

參數

jobId

string

傳回

Promise<BatchJob>

getJobSchedule(string, GetJobScheduleOptionalParams)

取得指定的工作排程資訊。

function getJobSchedule(jobScheduleId: string, options?: GetJobScheduleOptionalParams): Promise<BatchJobSchedule>

參數

jobScheduleId

string

傳回

Promise<BatchJobSchedule>

getJobTaskCounts(string, GetJobTaskCountsOptionalParams)

工作計數會依作用中、執行中或已完成的工作狀態,以及成功或失敗的工作計數來提供工作計數。 準備狀態中的工作會計算為執行中。 請注意,傳回的數位不一定是最新的。 如果您需要確切的工作計數,請使用清單查詢。

function getJobTaskCounts(jobId: string, options?: GetJobTaskCountsOptionalParams): Promise<BatchTaskCountsResult>

參數

jobId

string

傳回

getNode(string, string, GetNodeOptionalParams)

取得指定計算節點的相關信息。

function getNode(poolId: string, nodeId: string, options?: GetNodeOptionalParams): Promise<BatchNode>

參數

poolId

string

nodeId

string

傳回

Promise<BatchNode>

getNodeExtension(string, string, string, GetNodeExtensionOptionalParams)

取得指定的計算節點擴充的資訊。

function getNodeExtension(poolId: string, nodeId: string, extensionName: string, options?: GetNodeExtensionOptionalParams): Promise<BatchNodeVMExtension>

參數

poolId

string

nodeId

string

extensionName

string

傳回

getNodeFile(string, string, string, GetNodeFileOptionalParams)

回傳指定的計算節點檔案內容。

function getNodeFile(poolId: string, nodeId: string, filePath: string, options?: GetNodeFileOptionalParams): Promise<Uint8Array>

參數

poolId

string

nodeId

string

filePath

string

傳回

Promise<Uint8Array>

getNodeFileProperties(string, string, string, GetNodeFilePropertiesOptionalParams)

取得指定之計算節點檔案的屬性。

function getNodeFileProperties(poolId: string, nodeId: string, filePath: string, options?: GetNodeFilePropertiesOptionalParams): Promise<BatchNodeFile>

參數

poolId

string

nodeId

string

filePath

string

傳回

Promise<BatchNodeFile>

getNodeRemoteLoginSettings(string, string, GetNodeRemoteLoginSettingsOptionalParams)

在你能用遠端登入設定遠端登入運算節點之前,必須在運算節點建立使用者帳號,並設定 SSH 和 RDP 的存取埠。 如需詳細資訊,請參閱 https://learn.microsoft.com/azure/batch/pool-endpoint-configuration

function getNodeRemoteLoginSettings(poolId: string, nodeId: string, options?: GetNodeRemoteLoginSettingsOptionalParams): Promise<BatchNodeRemoteLoginSettings>

參數

poolId

string

nodeId

string

傳回

getPool(string, GetPoolOptionalParams)

取得指定集區的相關信息。

function getPool(poolId: string, options?: GetPoolOptionalParams): Promise<BatchPool>

參數

poolId

string

傳回

Promise<BatchPool>

getTask(string, string, GetTaskOptionalParams)

對於多實例任務,像 affinityId、executionInfo 和 nodeInfo 這類資訊指的是主要任務。 使用 list 子任務 API 來取得子任務的資訊。

function getTask(jobId: string, taskId: string, options?: GetTaskOptionalParams): Promise<BatchTask>

參數

jobId

string

taskId

string

傳回

Promise<BatchTask>

getTaskFile(string, string, string, GetTaskFileOptionalParams)

回傳指定的任務檔案內容。

function getTaskFile(jobId: string, taskId: string, filePath: string, options?: GetTaskFileOptionalParams): Promise<Uint8Array>

參數

jobId

string

taskId

string

filePath

string

傳回

Promise<Uint8Array>

getTaskFileProperties(string, string, string, GetTaskFilePropertiesOptionalParams)

取得指定之 Task 檔案的屬性。

function getTaskFileProperties(jobId: string, taskId: string, filePath: string, options?: GetTaskFilePropertiesOptionalParams): Promise<BatchNodeFile>

參數

jobId

string

taskId

string

filePath

string

傳回

Promise<BatchNodeFile>

jobScheduleExists(string, JobScheduleExistsOptionalParams)

檢查指定的工作排程是否存在。

function jobScheduleExists(jobScheduleId: string, options?: JobScheduleExistsOptionalParams): Promise<boolean>

參數

jobScheduleId

string

傳回

Promise<boolean>

listApplications(ListApplicationsOptionalParams)

此操作僅回傳可用於運算節點的應用程式與版本;也就是說,可以用於套件參考。 如需管理員關於尚未提供給運算節點的應用程式與版本資訊,請使用 Azure 入口網站或 Azure 資源管理器 API。

function listApplications(options?: ListApplicationsOptionalParams): PagedAsyncIterableIterator<BatchApplication, BatchApplication[], PageSettings>

參數

傳回

listJobPreparationAndReleaseTaskStatus(string, ListJobPreparationAndReleaseTaskStatusOptionalParams)

此 API 會傳回已執行作業準備或作業釋放工作之所有計算節點上的工作準備和作業發行工作狀態。 這包括自那以後已從集區中移除的計算節點。 如果在沒有作業準備或作業釋放工作的作業上叫用此 API,Batch 服務會傳回 HTTP 狀態代碼 409 (衝突),並傳回 JobPreparationTaskNotSpecified 的錯誤碼。

function listJobPreparationAndReleaseTaskStatus(jobId: string, options?: ListJobPreparationAndReleaseTaskStatusOptionalParams): PagedAsyncIterableIterator<BatchJobPreparationAndReleaseTaskStatus, BatchJobPreparationAndReleaseTaskStatus[], PageSettings>

參數

jobId

string

傳回

listJobs(ListJobsOptionalParams)

列出指定帳號中的所有職缺。

function listJobs(options?: ListJobsOptionalParams): PagedAsyncIterableIterator<BatchJob, BatchJob[], PageSettings>

參數

傳回

listJobSchedules(ListJobSchedulesOptionalParams)

列出指定帳號中的所有工作排程。

function listJobSchedules(options?: ListJobSchedulesOptionalParams): PagedAsyncIterableIterator<BatchJobSchedule, BatchJobSchedule[], PageSettings>

參數

傳回

listJobsFromSchedule(string, ListJobsFromScheduleOptionalParams)

列出依照指定工作排程建立的工作。

function listJobsFromSchedule(jobScheduleId: string, options?: ListJobsFromScheduleOptionalParams): PagedAsyncIterableIterator<BatchJob, BatchJob[], PageSettings>

參數

jobScheduleId

string

傳回

listNodeExtensions(string, string, ListNodeExtensionsOptionalParams)

列出指定池中計算節點的擴充。

function listNodeExtensions(poolId: string, nodeId: string, options?: ListNodeExtensionsOptionalParams): PagedAsyncIterableIterator<BatchNodeVMExtension, BatchNodeVMExtension[], PageSettings>

參數

poolId

string

nodeId

string

傳回

listNodeFiles(string, string, ListNodeFilesOptionalParams)

列出指定計算節點上 [工作] 目錄中的所有檔案。

function listNodeFiles(poolId: string, nodeId: string, options?: ListNodeFilesOptionalParams): PagedAsyncIterableIterator<BatchNodeFile, BatchNodeFile[], PageSettings>

參數

poolId

string

nodeId

string

傳回

listNodes(string, ListNodesOptionalParams)

列出指定集區中的計算節點。

function listNodes(poolId: string, options?: ListNodesOptionalParams): PagedAsyncIterableIterator<BatchNode, BatchNode[], PageSettings>

參數

poolId

string

傳回

listPoolNodeCounts(ListPoolNodeCountsOptionalParams)

取得依集區分組之每個狀態的計算節點數目。 請注意,傳回的數位不一定是最新的。 如果您需要確切的節點計數,請使用清單查詢。

function listPoolNodeCounts(options?: ListPoolNodeCountsOptionalParams): PagedAsyncIterableIterator<BatchPoolNodeCounts, BatchPoolNodeCounts[], PageSettings>

參數

傳回

listPools(ListPoolsOptionalParams)

列出指定帳戶中的所有集區。

function listPools(options?: ListPoolsOptionalParams): PagedAsyncIterableIterator<BatchPool, BatchPool[], PageSettings>

參數

傳回

listPoolUsageMetrics(ListPoolUsageMetricsOptionalParams)

如果您未指定包含 poolId 的$filter子句,回應會包含帳戶中所有存在於傳回匯總間隔時間範圍內的集區。 如果您未指定$filter子句,包括 startTime 或 endTime,這些篩選會預設為目前可用之最後一個匯總間隔的開始和結束時間;也就是說,只會傳回最後一個匯總間隔。

function listPoolUsageMetrics(options?: ListPoolUsageMetricsOptionalParams): PagedAsyncIterableIterator<BatchPoolUsageMetrics, BatchPoolUsageMetrics[], PageSettings>

參數

傳回

listSubTasks(string, string, ListSubTasksOptionalParams)

如果Task不是多重實例Task,則這會傳回空集合。

function listSubTasks(jobId: string, taskId: string, options?: ListSubTasksOptionalParams): PagedAsyncIterableIterator<BatchSubtask, BatchSubtask[], PageSettings>

參數

jobId

string

taskId

string

傳回

listSupportedImages(ListSupportedImagesOptionalParams)

列出所有由 Azure Batch 服務支援的虛擬機映像。

function listSupportedImages(options?: ListSupportedImagesOptionalParams): PagedAsyncIterableIterator<BatchSupportedImage, BatchSupportedImage[], PageSettings>

參數

傳回

listTaskFiles(string, string, ListTaskFilesOptionalParams)

列出工作目錄中其計算節點上的檔案。

function listTaskFiles(jobId: string, taskId: string, options?: ListTaskFilesOptionalParams): PagedAsyncIterableIterator<BatchNodeFile, BatchNodeFile[], PageSettings>

參數

jobId

string

taskId

string

傳回

listTasks(string, ListTasksOptionalParams)

對於多實例任務,像 affinityId、executionInfo 和 nodeInfo 這類資訊指的是主要任務。 使用 list 子任務 API 來取得子任務的資訊。

function listTasks(jobId: string, options?: ListTasksOptionalParams): PagedAsyncIterableIterator<BatchTask, BatchTask[], PageSettings>

參數

jobId

string

傳回

poolExists(string, PoolExistsOptionalParams)

獲得池的基本屬性。

function poolExists(poolId: string, options?: PoolExistsOptionalParams): Promise<boolean>

參數

poolId

string

傳回

Promise<boolean>

reactivateTask(string, string, ReactivateTaskOptionalParams)

重新啟用可讓工作重新重試,最多達到重試計數上限。 工作的狀態會變更為作用中。 由於工作已不再處於已完成狀態,任何先前的結束代碼或失敗資訊都無法在重新啟用之後再使用。 每次重新啟動工作時,其重試計數會重設為 0。 未完成或先前成功完成的工作將會重新啟動失敗(結束代碼為 0)。 此外,如果作業已完成(或正在終止或刪除),它將會失敗。

function reactivateTask(jobId: string, taskId: string, options?: ReactivateTaskOptionalParams): Promise<void>

參數

jobId

string

taskId

string

傳回

Promise<void>

rebootNode(string, string, RebootNodeOptionalParams)

只有在計算節點處於閑置或執行中狀態時,才能重新啟動它。

function rebootNode(poolId: string, nodeId: string, options?: RebootNodeOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

nodeId

string

傳回

PollerLike<OperationState<void>, void>

reimageNode(string, string, ReimageNodeOptionalParams)

只有當操作系統處於閑置或執行中狀態時,才可以在計算節點上重新安裝操作系統。 此 API 只能在以雲端服務設定屬性建立的池中調用。

function reimageNode(poolId: string, nodeId: string, options?: ReimageNodeOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

nodeId

string

傳回

PollerLike<OperationState<void>, void>

removeNodes(string, BatchNodeRemoveOptions, RemoveNodesOptionalParams)

此作業只能在集區的配置狀態穩定時執行。 當此作業執行時,配置狀態會從穩定變更為重設大小。 每個要求最多可以移除100個節點。

function removeNodes(poolId: string, removeOptions: BatchNodeRemoveOptions, options?: RemoveNodesOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

removeOptions
BatchNodeRemoveOptions

傳回

PollerLike<OperationState<void>, void>

replaceJob(string, BatchJob, ReplaceJobOptionalParams)

這完全取代了工作中所有可更新的屬性。 例如,若工作與其相關聯有約束,且此請求未指定限制,批次服務將移除現有約束。

function replaceJob(jobId: string, job: BatchJob, options?: ReplaceJobOptionalParams): Promise<void>

參數

jobId

string

job
BatchJob

傳回

Promise<void>

replaceJobSchedule(string, BatchJobSchedule, ReplaceJobScheduleOptionalParams)

這完全取代了工作排程中所有可更新的屬性。 例如,如果此請求未指定排程屬性,批次服務會移除現有排程。 工作排程的變更僅影響更新後排程所建立的工作;目前執行的職業未受影響。

function replaceJobSchedule(jobScheduleId: string, jobSchedule: BatchJobSchedule, options?: ReplaceJobScheduleOptionalParams): Promise<void>

參數

jobScheduleId

string

jobSchedule
BatchJobSchedule

傳回

Promise<void>

replaceNodeUser(string, string, string, BatchNodeUserUpdateOptions, ReplaceNodeUserOptionalParams)

此操作取代了帳戶中所有可更新的屬性。 例如,若未指定 expiryTime 元素,當前值會被替換為預設值,且不會保留未修改。 你只能在運算節點上更新使用者帳號,當它處於閒置或執行狀態時。

function replaceNodeUser(poolId: string, nodeId: string, userName: string, updateOptions: BatchNodeUserUpdateOptions, options?: ReplaceNodeUserOptionalParams): Promise<void>

參數

poolId

string

nodeId

string

userName

string

傳回

Promise<void>

replacePoolProperties(string, BatchPoolReplaceOptions, ReplacePoolPropertiesOptionalParams)

這完全取代了池中所有可更新的屬性。 例如,如果池子有 StartTask,且此請求未指定 StartTask,則批次服務會移除現有的 StartTask。

function replacePoolProperties(poolId: string, pool: BatchPoolReplaceOptions, options?: ReplacePoolPropertiesOptionalParams): Promise<void>

參數

poolId

string

傳回

Promise<void>

replaceTask(string, string, BatchTask, ReplaceTaskOptionalParams)

更新指定任務的屬性。

function replaceTask(jobId: string, taskId: string, task: BatchTask, options?: ReplaceTaskOptionalParams): Promise<void>

參數

jobId

string

taskId

string

task
BatchTask

傳回

Promise<void>

resizePool(string, BatchPoolResizeOptions, ResizePoolOptionalParams)

只有當集區配置狀態穩定時,您才能調整集區的大小。 如果集區已經重設大小,要求會失敗,狀態代碼為 409。 當您調整集區大小時,集區的配置狀態會從穩定變更為重設大小。 您無法調整針對自動調整設定的集區大小。 如果您嘗試這樣做,Batch 服務會傳回錯誤 409。 如果您向下調整集區的大小,Batch 服務會選擇要移除的計算節點。 若要移除特定的計算節點,請改用集區移除計算節點 API。

function resizePool(poolId: string, resizeOptions: BatchPoolResizeOptions, options?: ResizePoolOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

resizeOptions
BatchPoolResizeOptions

傳回

PollerLike<OperationState<void>, void>

startNode(string, string, StartNodeOptionalParams)

只有當運算節點已經被釋放時,才能啟動它。

function startNode(poolId: string, nodeId: string, options?: StartNodeOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

nodeId

string

傳回

PollerLike<OperationState<void>, void>

stopPoolResize(string, StopPoolResizeOptionalParams)

此方法不會將池恢復到調整大小前的狀態:它只會停止任何進一步的變更,池子會維持目前狀態。 停止後,池會穩定在停止操作完成時的計算節點數。 在停止操作期間,池配置狀態先變為停止,接著變為穩定。 調整大小操作不必是明確的調整池請求;此 API 也可用來在池子建立時停止初始大小調整。

function stopPoolResize(poolId: string, options?: StopPoolResizeOptionalParams): PollerLike<OperationState<void>, void>

參數

poolId

string

傳回

PollerLike<OperationState<void>, void>

terminateJob(string, TerminateJobOptionalParams)

當收到終止工作請求時,批次服務會將工作設定為終止狀態。 批次服務接著終止與該工作相關的執行任務,並執行所需的工作釋放任務。 接著工作進入完成狀態。 如果工作中有任何任務處於活躍狀態,它們會保持在活躍狀態。 一旦工作終止,無法新增任務,且剩餘的活躍任務將不會被排程。

function terminateJob(jobId: string, options?: TerminateJobOptionalParams): PollerLike<OperationState<void>, void>

參數

jobId

string

傳回

PollerLike<OperationState<void>, void>

terminateJobSchedule(string, TerminateJobScheduleOptionalParams)

終止作業排程。

function terminateJobSchedule(jobScheduleId: string, options?: TerminateJobScheduleOptionalParams): PollerLike<OperationState<void>, void>

參數

jobScheduleId

string

傳回

PollerLike<OperationState<void>, void>

terminateTask(string, string, TerminateTaskOptionalParams)

當工作終止時,它會移至已完成狀態。 針對多重實例工作,終止工作作業會同步套用至主要工作;子工作接著會在背景以異步方式終止。

function terminateTask(jobId: string, taskId: string, options?: TerminateTaskOptionalParams): Promise<void>

參數

jobId

string

taskId

string

傳回

Promise<void>

updateJob(string, BatchJobUpdateOptions, UpdateJobOptionalParams)

這只會取代請求中指定的工作屬性。 例如,若工作有限制條件,且請求未指定限制元素,則工作保留現有限制。

function updateJob(jobId: string, job: BatchJobUpdateOptions, options?: UpdateJobOptionalParams): Promise<void>

參數

jobId

string

傳回

Promise<void>

updateJobSchedule(string, BatchJobScheduleUpdateOptions, UpdateJobScheduleOptionalParams)

這僅取代請求中指定的工作排程屬性。 例如,如果此請求未指定排程屬性,批次服務將保留現有排程。 工作排程的變更僅影響更新後排程所建立的工作;目前執行的職業未受影響。

function updateJobSchedule(jobScheduleId: string, jobSchedule: BatchJobScheduleUpdateOptions, options?: UpdateJobScheduleOptionalParams): Promise<void>

參數

jobScheduleId

string

傳回

Promise<void>

updatePool(string, BatchPoolUpdateOptions, UpdatePoolOptionalParams)

這只會取代請求中指定的池屬性。 例如,若池子有關聯的 StartTask,且請求未指定 StartTask 元素,則池會保留現有的 StartTask。

function updatePool(poolId: string, pool: BatchPoolUpdateOptions, options?: UpdatePoolOptionalParams): Promise<void>

參數

poolId

string

傳回

Promise<void>

uploadNodeLogs(string, string, UploadBatchServiceLogsOptions, UploadNodeLogsOptionalParams)

這是用來自動從計算節點收集 Azure 批次服務日誌檔,如果你遇到錯誤並想升級到 Azure 支援。 Azure Batch 服務的日誌檔案應該與 Azure 支援 共享,以協助除錯批次服務的問題。

function uploadNodeLogs(poolId: string, nodeId: string, uploadOptions: UploadBatchServiceLogsOptions, options?: UploadNodeLogsOptionalParams): Promise<UploadBatchServiceLogsResult>

參數

poolId

string

nodeId

string

傳回