dora_deployments
Creates, updates, deletes, gets or lists a dora_deployments resource.
Overview
| Name | dora_deployments |
| Type | Resource |
| Id | datadog.software_delivery.dora_deployments |
Fields
The following fields are returned by SELECT queries:
- get_doradeployment
- list_doradeployments
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the deployment event. |
attributes | object | The attributes of the deployment event. |
type | string | JSON:API type for DORA deployment events. (dora_deployment) (default: dora_deployment, example: dora_deployment) |
| Name | Datatype | Description |
|---|---|---|
data | array | The list of DORA deployment events. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_doradeployment | select | deployment_id | Use this API endpoint to get a deployment event. | |
list_doradeployments | select | Use this API endpoint to get a list of deployment events. | ||
create_doradeployment | insert | data | Use this API endpoint to provide deployment data.<br /><br />This is necessary for:<br />- Deployment Frequency<br />- Change Lead Time<br />- Change Failure Rate<br />- Failed Deployment Recovery Time | |
patch_doradeployment | update | deployment_id, data | Update a deployment's change failure status. Use this to mark a deployment as a change failure or back to stable. You can optionally include remediation details to enable failed deployment recovery time calculation. | |
patch_doradeployment_by_version | update | data | Update a deployment's change failure status, identifying the deployment by its service, environment, and version instead of its ID. Use this to mark a deployment as a change failure or back to stable. You can optionally include remediation details to enable failed deployment recovery time calculation. If multiple deployments match the given service, environment, and version, the most recently finished one is updated. | |
delete_doradeployment | delete | deployment_id | Use this API endpoint to delete a deployment event. |
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 |
|---|---|---|
deployment_id | string | The ID of the deployment event to delete. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
SELECT examples
- get_doradeployment
- list_doradeployments
Use this API endpoint to get a deployment event.
SELECT
id,
attributes,
type
FROM datadog.software_delivery.dora_deployments
WHERE deployment_id = '{{ deployment_id }}' -- required
;
Use this API endpoint to get a list of deployment events.
SELECT
data
FROM datadog.software_delivery.dora_deployments
;
INSERT examples
- create_doradeployment
- Manifest
Use this API endpoint to provide deployment data.<br /><br />This is necessary for:<br />- Deployment Frequency<br />- Change Lead Time<br />- Change Failure Rate<br />- Failed Deployment Recovery Time
INSERT INTO datadog.software_delivery.dora_deployments (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: dora_deployments
props:
- name: data
description: |
The JSON:API data.
value:
attributes:
custom_tags:
- "{{ custom_tags }}"
env: "{{ env }}"
finished_at: {{ finished_at }}
git:
commit_sha: "{{ commit_sha }}"
repository_url: "{{ repository_url }}"
id: "{{ id }}"
service: "{{ service }}"
started_at: {{ started_at }}
team: "{{ team }}"
version: "{{ version }}"
UPDATE examples
- patch_doradeployment
- patch_doradeployment_by_version
Update a deployment's change failure status. Use this to mark a deployment as a change failure or back to stable. You can optionally include remediation details to enable failed deployment recovery time calculation.
UPDATE datadog.software_delivery.dora_deployments
SET
data = '{{ data }}'
WHERE
deployment_id = '{{ deployment_id }}' --required
AND data = '{{ data }}' --required;
Update a deployment's change failure status, identifying the deployment by its service, environment, and version instead of its ID. Use this to mark a deployment as a change failure or back to stable. You can optionally include remediation details to enable failed deployment recovery time calculation. If multiple deployments match the given service, environment, and version, the most recently finished one is updated.
UPDATE datadog.software_delivery.dora_deployments
SET
data = '{{ data }}'
WHERE
data = '{{ data }}' --required;
DELETE examples
- delete_doradeployment
Use this API endpoint to delete a deployment event.
DELETE FROM datadog.software_delivery.dora_deployments
WHERE deployment_id = '{{ deployment_id }}' --required
;