Skip to content

Commit 3583fb0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Document behavior of absent Splunk sourcetype in Custom Destinations (DataDog#3972)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 5f31934 commit 3583fb0

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18679,9 +18679,10 @@ components:
1867918679
description: |-
1868018680
The Splunk sourcetype for the events sent to this Splunk destination.
1868118681

18682-
If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
18683-
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
18684-
value is used as the sourcetype.
18682+
If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype `_json` is used.
18683+
On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
18684+
If set to `null`, the sourcetype field is omitted from the forwarded event entirely.
18685+
Otherwise, the provided string value is used as the sourcetype.
1868518686
example: my-source
1868618687
nullable: true
1868718688
type: string
@@ -18964,9 +18965,10 @@ components:
1896418965
description: |-
1896518966
The Splunk sourcetype for the events sent to this Splunk destination.
1896618967

18967-
If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
18968-
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
18969-
value is used as the sourcetype.
18968+
If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype `_json` is used.
18969+
On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
18970+
If set to `null`, the sourcetype field is omitted from the forwarded event entirely.
18971+
Otherwise, the provided string value is used as the sourcetype.
1897018972
example: my-source
1897118973
nullable: true
1897218974
type: string

api/datadogV2/model_custom_destination_forward_destination_splunk.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ type CustomDestinationForwardDestinationSplunk struct {
1919
Endpoint string `json:"endpoint"`
2020
// The Splunk sourcetype for the events sent to this Splunk destination.
2121
//
22-
// If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
23-
// field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
24-
// value is used as the sourcetype.
22+
// If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype `_json` is used.
23+
// On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
24+
// If set to `null`, the sourcetype field is omitted from the forwarded event entirely.
25+
// Otherwise, the provided string value is used as the sourcetype.
2526
Sourcetype datadog.NullableString `json:"sourcetype,omitempty"`
2627
// Type of the Splunk HTTP Event Collector (HEC) destination.
2728
Type CustomDestinationForwardDestinationSplunkType `json:"type"`

api/datadogV2/model_custom_destination_response_forward_destination_splunk.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ type CustomDestinationResponseForwardDestinationSplunk struct {
1717
Endpoint string `json:"endpoint"`
1818
// The Splunk sourcetype for the events sent to this Splunk destination.
1919
//
20-
// If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
21-
// field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
22-
// value is used as the sourcetype.
20+
// If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype `_json` is used.
21+
// On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
22+
// If set to `null`, the sourcetype field is omitted from the forwarded event entirely.
23+
// Otherwise, the provided string value is used as the sourcetype.
2324
Sourcetype datadog.NullableString `json:"sourcetype,omitempty"`
2425
// Type of the Splunk HTTP Event Collector (HEC) destination.
2526
Type CustomDestinationResponseForwardDestinationSplunkType `json:"type"`

0 commit comments

Comments
 (0)