Skip to main content

artifact_deployment_records

Creates, updates, deletes, gets or lists an artifact_deployment_records resource.

Overview

Nameartifact_deployment_records
TypeResource
Idgithub.orgs.artifact_deployment_records

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idinteger
attestation_idintegerThe ID of the provenance attestation associated with the deployment record.
deployment_namestring
clusterstring
created_atstring
digeststring
logical_environmentstring
physical_environmentstring
runtime_risksarrayA list of runtime risks associated with the deployment.
tagsobject
updated_atstring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_artifact_deployment_recordsselectorg, subject_digestList deployment records for an artifact metadata associated with an organization.
set_cluster_deployment_recordsinsertorg, cluster, logical_environment, deploymentsSet deployment records for a given cluster.
If proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',
'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.
If no existing records match, new records will be created.
create_artifact_deployment_recordinsertorg, name, digest, status, logical_environment, deployment_nameCreate or update deployment records for an artifact associated
with an organization.
This endpoint allows you to record information about a specific
artifact, such as its name, digest, environments, cluster, and
deployment.
The deployment name has to be uniqe within a cluster (i.e a
combination of logical, physical environment and cluster) as it
identifies unique deployment.
Multiple requests for the same combination of logical, physical
environment, cluster and deployment name will only create one
record, successive request will update the existing record.
This allows for a stable tracking of a deployment where the actual
deployed artifact can change over time.

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.
orgstringThe organization name. The name is not case sensitive.
subject_digeststringThe SHA256 digest of the artifact, in the form sha256:HEX_DIGEST.

SELECT examples

List deployment records for an artifact metadata associated with an organization.

SELECT
id,
attestation_id,
deployment_name,
cluster,
created_at,
digest,
logical_environment,
physical_environment,
runtime_risks,
tags,
updated_at
FROM github.orgs.artifact_deployment_records
WHERE org = '{{ org }}' -- required
AND subject_digest = '{{ subject_digest }}' -- required
;

INSERT examples

Set deployment records for a given cluster.
If proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',
'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.
If no existing records match, new records will be created.

INSERT INTO github.orgs.artifact_deployment_records (
logical_environment,
physical_environment,
deployments,
return_records,
org,
cluster
)
SELECT
'{{ logical_environment }}' /* required */,
'{{ physical_environment }}',
'{{ deployments }}' /* required */,
{{ return_records }},
'{{ org }}',
'{{ cluster }}'
RETURNING
deployment_records,
total_count
;