{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Set deployment records for a given cluster.\nIf proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',\n'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.\nIf no existing records match, new records will be created.\nNote: Artifacts are uniquely identified by the combination of their repository and digest fields. If two entries in the deployments\narray resolve to the same repository and have identical digest fields but differing name and version fields, the endpoint will use\nthe artifact name and version from the record processed first, since a single artifact (identified by repository and digest) can\nonly have one name and version.","properties":{"path":{"type":"object","properties":{"org":{"type":"string","description":"The organization name. The name is not case sensitive."},"cluster":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9._-]+$","description":"The cluster name."}},"required":["org","cluster"],"additionalProperties":false},"body":{"type":"object","properties":{"logical_environment":{"type":"string","description":"The stage of the deployment.","minLength":1,"maxLength":128},"physical_environment":{"type":"string","description":"The physical region of the deployment.","maxLength":128},"deployments":{"type":"array","description":"The list of deployments to record.","maxItems":1000,"items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the artifact.","minLength":1,"maxLength":256},"digest":{"type":"string","description":"The hex encoded digest of the artifact.","minLength":71,"maxLength":71,"pattern":"^sha256:[a-f0-9]{64}$"},"version":{"type":"string","description":"The artifact version.","maxLength":100,"examples":["1.2.3"]},"status":{"type":"string","description":"The deployment status of the artifact.","default":"deployed","enum":["deployed","decommissioned"]},"deployment_name":{"type":"string","description":"The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n","minLength":1,"maxLength":256},"github_repository":{"type":"string","description":"The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.","maxLength":100,"pattern":"^[A-Za-z0-9.\\-_]+$","examples":["my-github-repo"]},"tags":{"type":"object","description":"Key-value pairs to tag the deployment record.","additionalProperties":{"type":"string"}},"runtime_risks":{"type":"array","description":"A list of runtime risks associated with the deployment.","maxItems":4,"uniqueItems":true,"items":{"type":"string","enum":["critical-resource","internet-exposed","lateral-movement","sensitive-data"]}}},"required":["name","deployment_name","digest"]}},"partial_success":{"type":"boolean","default":false,"description":"When enabled, deployments associated with repositories the actor can write to are processed\nwhile deployments associated with repositories that cannot be resolved or written to by the actor\nare skipped and reported in the `errors` array. When false (the default), the endpoint returns\nan error if any targeted repository cannot be resolved, the actor lacks write access, or no matching attestation can be found.\n"},"return_records":{"type":"boolean","default":true,"description":"If true, the endpoint will return the set records in the response body\n"}},"required":["logical_environment","deployments"],"examples":[{"logical_environment":"prod","physical_environment":"pacific-east","deployments":[{"name":"awesome-image","digest":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","version":"2.1.0","status":"deployed","deployment_name":"deployment-pod","tags":{"owning-team":"platform"},"runtime_risks":["sensitive-data"]}]}]}},"required":["path","body"],"additionalProperties":false},"name":"Set cluster deployment records","id":"github.orgs.set-cluster-deployment-records","example":{"path":{"org":"example","cluster":"example"},"body":{"logical_environment":"prod","physical_environment":"pacific-east","deployments":[{"name":"awesome-image","digest":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","version":"2.1.0","status":"deployed","deployment_name":"deployment-pod","tags":{"owning-team":"platform"},"runtime_risks":["sensitive-data"]}]}},"maxRequests":1,"summary":false}}