Skip to main content

cluster_deployment_records_jobs

Creates, updates, deletes, gets or lists a cluster_deployment_records_jobs resource.

Overview

Namecluster_deployment_records_jobs
TypeResource
Idgithub.orgs.cluster_deployment_records_jobs

Fields

The following fields are returned by SELECT queries:

Job status retrieved successfully.

NameDatatypeDescription
job_idintegerThe ID of the job.
errorsarrayProcessing errors (only present when completed or failed).
started_atstring (date-time)When the job started processing (only present when processing, completed, or failed).
statusstringThe current status of the job. (pending, processing, completed, failed)
total_countintegerThe number of records successfully mutated (only present when completed).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cluster_deployment_records_jobselectorg, cluster, job_idGet the status and results of a previously created cluster deployment records job.
create_cluster_deployment_records_jobinsertorg, cluster, logical_environment, deploymentsCreate a background job to set deployment records for a given cluster.
Performs validation and permission checks synchronously, returning rejected
deployments immediately, then enqueues a background job for the actual
deployment updates. Use the companion GET endpoint to poll for job status.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
clusterstringThe cluster name.
job_idintegerThe ID of the job.
orgstringThe organization name. The name is not case sensitive.

SELECT examples

Get the status and results of a previously created cluster deployment records job.

SELECT
job_id,
errors,
started_at,
status,
total_count
FROM github.orgs.cluster_deployment_records_jobs
WHERE org = '{{ org }}' -- required
AND cluster = '{{ cluster }}' -- required
AND job_id = '{{ job_id }}' -- required
;

INSERT examples

Create a background job to set deployment records for a given cluster.
Performs validation and permission checks synchronously, returning rejected
deployments immediately, then enqueues a background job for the actual
deployment updates. Use the companion GET endpoint to poll for job status.

INSERT INTO github.orgs.cluster_deployment_records_jobs (
logical_environment,
physical_environment,
deployments,
org,
cluster
)
SELECT
'{{ logical_environment }}' /* required */,
'{{ physical_environment }}',
'{{ deployments }}' /* required */,
'{{ org }}',
'{{ cluster }}'
RETURNING
job_id,
errors
;