incident_types
Creates, updates, deletes, gets or lists an incident_types resource.
Overview
| Name | incident_types |
| Type | Resource |
| Id | datadog.service_management.incident_types |
Fields
The following fields are returned by SELECT queries:
- get_incident_type
- list_incident_types
| Name | Datatype | Description |
|---|---|---|
id | string | The incident type's ID. (example: 00000000-0000-0000-0000-000000000000) |
attributes | object | Incident type's attributes. |
relationships | object | The incident type's resource relationships. |
type | string | Incident type resource type. (incident_types) (default: incident_types, example: incident_types) |
| Name | Datatype | Description |
|---|---|---|
id | string | The incident type's ID. (example: 00000000-0000-0000-0000-000000000000) |
attributes | object | Incident type's attributes. |
relationships | object | The incident type's resource relationships. |
type | string | Incident type resource type. (incident_types) (default: incident_types, example: incident_types) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_incident_type | select | incident_type_id | Get incident type details. | |
list_incident_types | select | include_deleted | Get all incident types. | |
create_incident_type | insert | data | Create an incident type. | |
update_incident_type | update | incident_type_id, data | Update an incident type. | |
delete_incident_type | delete | incident_type_id | Delete an incident type. |
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 |
|---|---|---|
incident_type_id | string | The UUID of the incident type. |
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. |
include_deleted | boolean | Include deleted incident types in the response. |
SELECT examples
- get_incident_type
- list_incident_types
Get incident type details.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_types
WHERE incident_type_id = '{{ incident_type_id }}' -- required
;
Get all incident types.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_types
WHERE include_deleted = '{{ include_deleted }}'
;
INSERT examples
- create_incident_type
- Manifest
Create an incident type.
INSERT INTO datadog.service_management.incident_types (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: incident_types
props:
- name: data
description: |
Incident type data for a create request.
value:
attributes:
configuration:
allow_incident_deletion: {{ allow_incident_deletion }}
allow_workflows: {{ allow_workflows }}
create_message: "{{ create_message }}"
editable_timestamps: {{ editable_timestamps }}
private_incidents: {{ private_incidents }}
private_incidents_by_default: {{ private_incidents_by_default }}
slug_source: "{{ slug_source }}"
test_incidents: {{ test_incidents }}
createdAt: "{{ createdAt }}"
createdBy: "{{ createdBy }}"
description: "{{ description }}"
is_default: {{ is_default }}
lastModifiedBy: "{{ lastModifiedBy }}"
modifiedAt: "{{ modifiedAt }}"
name: "{{ name }}"
prefix: "{{ prefix }}"
type: "{{ type }}"
UPDATE examples
- update_incident_type
Update an incident type.
UPDATE datadog.service_management.incident_types
SET
data = '{{ data }}'
WHERE
incident_type_id = '{{ incident_type_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_incident_type
Delete an incident type.
DELETE FROM datadog.service_management.incident_types
WHERE incident_type_id = '{{ incident_type_id }}' --required
;