Skip to main content

case_type_custom_attributes

Creates, updates, deletes, gets or lists a case_type_custom_attributes resource.

Overview

Namecase_type_custom_attributes
TypeResource
Iddatadog.service_management.case_type_custom_attributes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringCustom attribute configs identifier (example: aeadc05e-98a8-11ec-ac2c-da7ad0900001)
attributesobjectAttributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type.
typestringJSON:API resource type for custom attribute configurations. (custom_attribute) (default: custom_attribute, example: custom_attribute)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_all_custom_attribute_configs_by_case_typeselectcase_type_idGet all custom attribute config of case type
get_all_custom_attributesselectGet all custom attributes
create_custom_attribute_configinsertcase_type_id, dataCreate custom attribute config for a case type
update_custom_attribute_configreplacecase_type_id, custom_attribute_id, dataUpdates the display name, description, type, or options of an existing custom attribute configuration for a case type.
delete_custom_attribute_configdeletecase_type_id, custom_attribute_idDelete 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.

NameDatatypeDescription
case_type_idstringThe UUID of the case type. (example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de505)
custom_attribute_idstringCase Custom attribute's UUID (example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de505)
sitestringThe 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 config of case type

SELECT
id,
attributes,
type
FROM datadog.service_management.case_type_custom_attributes
WHERE case_type_id = '{{ case_type_id }}' -- required
;

INSERT examples

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
;

REPLACE examples

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 FROM datadog.service_management.case_type_custom_attributes
WHERE case_type_id = '{{ case_type_id }}' --required
AND custom_attribute_id = '{{ custom_attribute_id }}' --required
;