case_type_custom_attributes
Creates, updates, deletes, gets or lists a case_type_custom_attributes resource.
Overview
| Name | case_type_custom_attributes |
| Type | Resource |
| Id | datadog.service_management.case_type_custom_attributes |
Fields
The following fields are returned by SELECT queries:
- get_all_custom_attribute_configs_by_case_type
- get_all_custom_attributes
| Name | Datatype | Description |
|---|---|---|
id | string | Custom attribute configs identifier (example: aeadc05e-98a8-11ec-ac2c-da7ad0900001) |
attributes | object | Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. |
type | string | JSON:API resource type for custom attribute configurations. (custom_attribute) (default: custom_attribute, example: custom_attribute) |
| Name | Datatype | Description |
|---|---|---|
id | string | Custom attribute configs identifier (example: aeadc05e-98a8-11ec-ac2c-da7ad0900001) |
attributes | object | Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. |
type | string | JSON:API resource type for custom attribute configurations. (custom_attribute) (default: custom_attribute, example: custom_attribute) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_all_custom_attribute_configs_by_case_type | select | case_type_id | Get all custom attribute config of case type | |
get_all_custom_attributes | select | Get all custom attributes | ||
create_custom_attribute_config | insert | case_type_id, data | Create custom attribute config for a case type | |
update_custom_attribute_config | replace | case_type_id, custom_attribute_id, data | Updates the display name, description, type, or options of an existing custom attribute configuration for a case type. | |
delete_custom_attribute_config | delete | case_type_id, custom_attribute_id | Delete custom attribute config |
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 |
|---|---|---|
case_type_id | string | The UUID of the case type. (example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de505) |
custom_attribute_id | string | Case Custom attribute's UUID (example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de505) |
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_all_custom_attribute_configs_by_case_type
- get_all_custom_attributes
Get all custom attribute config of case type
SELECT
id,
attributes,
type
FROM datadog.service_management.case_type_custom_attributes
WHERE case_type_id = '{{ case_type_id }}' -- required
;
Get all custom attributes
SELECT
id,
attributes,
type
FROM datadog.service_management.case_type_custom_attributes
;
INSERT examples
- create_custom_attribute_config
- Manifest
Create custom attribute config for a case type
INSERT INTO datadog.service_management.case_type_custom_attributes (
data,
case_type_id
)
SELECT
'{{ data }}' /* required */,
'{{ case_type_id }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: case_type_custom_attributes
props:
- name: case_type_id
value: "{{ case_type_id }}"
description: Required parameter for the case_type_custom_attributes resource.
- name: data
description: |
Data object for creating a custom attribute configuration.
value:
attributes:
description: "{{ description }}"
display_name: "{{ display_name }}"
is_multi: {{ is_multi }}
key: "{{ key }}"
type: "{{ type }}"
type: "{{ type }}"
REPLACE examples
- update_custom_attribute_config
Updates the display name, description, type, or options of an existing custom attribute configuration for a case type.
REPLACE datadog.service_management.case_type_custom_attributes
SET
data = '{{ data }}'
WHERE
case_type_id = '{{ case_type_id }}' --required
AND custom_attribute_id = '{{ custom_attribute_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_custom_attribute_config
Delete custom attribute config
DELETE FROM datadog.service_management.case_type_custom_attributes
WHERE case_type_id = '{{ case_type_id }}' --required
AND custom_attribute_id = '{{ custom_attribute_id }}' --required
;