CreateWaitGroup
Creates a new wait group.
You do not need to know all job_id values upfront — only the total count. A single wait group
can have millions of jobs.
Safe to retry — duplicate calls fail with AlreadyExists.
Request
counteris the total number of jobs the group is waiting for; it can be changed later with UpdateWaitGroup.expires_atis an absolute timestamp after which the group is markedexpiredif it has not already completed. It is not deleted at that moment — seedelete_after_finished_seconds.- Set
expires_atto a value comfortably past the expected completion time. It can be pushed out later with UpdateWaitGroup if a batch needs more time. delete_after_finished_secondsis the retention period: how long after the group finishes (completes or expires) it is kept before GC deletes it and its jobs.0means it becomes eligible for deletion as soon as it finishes. Must not be negative.metadatais an optional, opaque map of string key/value pairs stored alongside the wait group — see Metadata.
{
"namespace_name": "pipelines",
"wait_group_name": "batch_2026_06_12",
"description": "Daily ETL batch",
"counter": 100,
"expires_at": 1718236800000000000,
"delete_after_finished_seconds": 3600,
"metadata": {
"pipeline": "etl-daily"
}
}
Response
- Returns
NotFoundif the namespace does not exist. - Returns
AlreadyExistsif a wait group with the same name exists in the namespace. - Returns
ResourceExhaustedif the namespace has reached its wait group quota.
{
"wait_group": {
"name": "batch_2026_06_12",
"description": "Daily ETL batch",
"status": "ACTIVE",
"counter": 100,
"completed_jobs": 0,
"version": 1,
"created_at": 1718150400000000000,
"updated_at": 1718150400000000000,
"expires_at": 1718236800000000000,
"delete_after_finished_seconds": 3600,
"finished_at": 0,
"last_activity_at": 1718150400000000000,
"metadata": {
"pipeline": "etl-daily"
}
}
}