BatchJob

以非同步方式處理的一組變動。這些修改由使用者上傳。系統無法讀取異動內容,而且只能透過 BatchJobService.ListBatchJobResults 讀取工作結果。

JSON 表示法
{
  "resourceName": string,
  "metadata": {
    object (BatchJobMetadata)
  },
  "status": enum (BatchJobStatus),
  "id": string,
  "nextAddSequenceToken": string,
  "longRunningOperation": string
}
欄位
resourceName

string

不可變動。批次工作的資源名稱。批次工作資源名稱的格式如下:

customers/{customerId}/batchJobs/{batch_job_id}

metadata

object (BatchJobMetadata)

僅供輸出。包含這項批次工作的其他資訊。

status

enum (BatchJobStatus)

僅供輸出。這項批次工作的狀態。

id

string (int64 format)

僅供輸出。此批次工作的 ID。

nextAddSequenceToken

string

僅供輸出。新增作業時使用的下一個序列權杖。只有在批次工作狀態為「待處理」時才會設定。

longRunningOperation

string

僅供輸出。長時間執行作業的資源名稱,可用於輪詢完成狀態。只有在批次工作狀態為「執行中」或「完成」時才會設定。

BatchJobMetadata

批次工作的額外資訊。這個訊息也是批次工作 Long Running Operations 傳回的中繼資料。

JSON 表示法
{
  "creationDateTime": string,
  "startDateTime": string,
  "completionDateTime": string,
  "estimatedCompletionRatio": number,
  "operationCount": string,
  "executedOperationCount": string,
  "executionLimitSeconds": integer
}
欄位
creationDateTime

string

僅供輸出。這個批次工作的建立時間。格式為「yyyy-mm-dd hh:mm:ss」。例如:「2018-03-05 09:15:00」

startDateTime

string

僅供輸出。這個批次工作開始執行的時間。格式為「yyyy-mm-dd hh:mm:ss」。例如:「2018-03-05 09:15:30」

completionDateTime

string

僅供輸出。這項批次工作完成的時間。格式為「yyyy-MM-dd HH:mm:ss」。例如:「2018-03-05 09:16:00」

estimatedCompletionRatio

number

僅供輸出。已處理的變更比例 (介於 0.0 和 1.0)。如果工作尚未開始執行,這裡就不會顯示任何內容。

operationCount

string (int64 format)

僅供輸出。批次工作中的 mut 作業數量。

executedOperationCount

string (int64 format)

僅供輸出。批次工作執行的 mut 作業數。只有在工作已開始執行時才會顯示。

executionLimitSeconds

integer

不可變動。批次工作執行時間長度的約略上限 (以秒為單位)。如果工作執行的時間超過指定的上限,系統會取消工作。

BatchJobStatus

批次工作狀態。

列舉
UNSPECIFIED 未指定。
UNKNOWN 僅用於傳回值。代表這個版本未知的值。
PENDING 工作目前並未執行。
RUNNING 工作正在執行。
DONE 工作已完成。