cluster_deployment_records_jobs
Creates, updates, deletes, gets or lists a cluster_deployment_records_jobs resource.
Overview
| Name | cluster_deployment_records_jobs |
| Type | Resource |
| Id | github.orgs.cluster_deployment_records_jobs |
Fields
The following fields are returned by SELECT queries:
- get_cluster_deployment_records_job
Job status retrieved successfully.
| Name | Datatype | Description |
|---|---|---|
job_id | integer | The ID of the job. |
errors | array | Processing errors (only present when completed or failed). |
started_at | string (date-time) | When the job started processing (only present when processing, completed, or failed). |
status | string | The current status of the job. (pending, processing, completed, failed) |
total_count | integer | The number of records successfully mutated (only present when completed). |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_cluster_deployment_records_job | select | org, cluster, job_id | Get the status and results of a previously created cluster deployment records job. | |
create_cluster_deployment_records_job | insert | org, cluster, logical_environment, deployments | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
cluster | string | The cluster name. |
job_id | integer | The ID of the job. |
org | string | The organization name. The name is not case sensitive. |
SELECT examples
- get_cluster_deployment_records_job
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_cluster_deployment_records_job
- Manifest
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
;
# Description fields are for documentation purposes
- name: cluster_deployment_records_jobs
props:
- name: org
value: "{{ org }}"
description: Required parameter for the cluster_deployment_records_jobs resource.
- name: cluster
value: "{{ cluster }}"
description: Required parameter for the cluster_deployment_records_jobs resource.
- name: logical_environment
value: "{{ logical_environment }}"
description: |
The stage of the deployment.
- name: physical_environment
value: "{{ physical_environment }}"
description: |
The physical region of the deployment.
- name: deployments
description: |
The list of deployments to record.
value:
- name: "{{ name }}"
digest: "{{ digest }}"
version: "{{ version }}"
status: "{{ status }}"
deployment_name: "{{ deployment_name }}"
github_repository: "{{ github_repository }}"
tags: "{{ tags }}"
runtime_risks: "{{ runtime_risks }}"