Response containing a single custom attribute configuration.
Expand All
항목
유형
설명
data
object
A custom attribute configuration that defines an organization-specific metadata field on work items. Custom attributes are scoped to a work item type and can hold text, URLs, numbers, or predefined select options.
attributes
object
Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to work items of a given type.
case_type_id [required]
string
The UUID of the work item type this custom attribute belongs to.
description
string
A description explaining the purpose and expected values for this custom attribute.
display_name [required]
string
The human-readable label shown in the Work Management UI for this custom attribute.
is_multi [required]
boolean
If true, this attribute accepts an array of values. If false, only a single value is allowed.
key [required]
string
The programmatic key used to reference this custom attribute in search queries and API calls.
type [required]
enum
The data type of the custom attribute, which determines the allowed values and UI input control.
Allowed enum values: URL,TEXT,NUMBER,SELECT
id
string
Custom attribute configs identifier
type
enum
JSON:API resource type for custom attribute configurations.
Allowed enum values: custom_attribute
default: custom_attribute
{"data":{"attributes":{"case_type_id":"aeadc05e-98a8-11ec-ac2c-da7ad0900001","description":"AWS Region, must be a valid region supported by AWS","display_name":"AWS Region","is_multi":true,"key":"aws_region","type":"NUMBER"},"id":"aeadc05e-98a8-11ec-ac2c-da7ad0900001","type":"custom_attribute"}}
## default
#
# Path parameters exportcase_type_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de505" exportcustom_attribute_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de505" # Use a Personal Access Token or Service Access Token exportDD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Update custom attribute config returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){body:=datadogV2.CustomAttributeConfigUpdateRequest{Data:datadogV2.CustomAttributeConfigUpdate{Attributes:&datadogV2.CustomAttributeConfigUpdateAttributes{Description:datadog.PtrString("Updated description."),DisplayName:datadog.PtrString("AWS Region"),Type:datadogV2.CUSTOMATTRIBUTETYPE_NUMBER.Ptr(),TypeData:&datadogV2.CustomAttributeTypeData{Options:[]datadogV2.CustomAttributeSelectOption{{Value:"us-east-1",},},},},Type:datadogV2.CUSTOMATTRIBUTECONFIGRESOURCETYPE_CUSTOM_ATTRIBUTE,},}ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewCaseManagementAttributeApi(apiClient)resp,r,err:=api.UpdateCustomAttributeConfig(ctx,"case_type_id","custom_attribute_id",body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `CaseManagementAttributeApi.UpdateCustomAttributeConfig`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `CaseManagementAttributeApi.UpdateCustomAttributeConfig`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.