rsc_wait_for_job
Poll a Rubrik Security Cloud job until it completes and return final status, automatically handling CDM and cloud-native job types without custom polling code.
Instructions
Poll an RSC job until it completes and return the final status.
Handles all job types automatically based on objectType — no polling code needed from the caller.
How to get job_id and cluster_id:
CDM workloads: job_id = the
idfield from the AsyncRequestStatus returned by the snapshot mutation. cluster_id = thecluster_idfield returned by rsc_take_on_demand_snapshot (included automatically for CDM types). Falls back to cluster.id from rsc_get_workloads if needed.Cloud-native workloads: job_id =
taskchainUuidfromtaskchainUuids[0].taskchainUuidin the mutation response. cluster_id is not needed.
For background monitoring without blocking, run rsc-job-monitor via the Bash tool and watch it with the Monitor tool: Bash(run_in_background=true): /app/.venv/bin/rubrik-job-monitor --job-id --object-type [--cluster-id ] Monitor(command): /app/.venv/bin/rubrik-job-monitor --job-id --object-type [--cluster-id ]
Args: job_id: Request ID (CDM) or taskchainUuid (cloud-native). object_type: Workload objectType — determines which status query to use. cluster_id: Rubrik cluster UUID. Required for CDM workloads. Get it from rsc_get_workloads cluster.id. timeout: Maximum seconds to wait before returning. Default 300. poll_interval: Seconds between status checks. Default 10.
Returns: Dict with status, progress, done, raw, and optionally timed_out. CDM status values: SUCCEEDED, FAILED, CANCELED, QUEUED, IN_PROGRESS. Cloud-native state values: SUCCEEDED, FAILED, CANCELED, RUNNING, READY. jobInfo status values: SUCCESS, FAILURE, IN_PROGRESS, UNSPECIFIED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| timeout | No | ||
| cluster_id | No | ||
| object_type | Yes | ||
| poll_interval | No |