Skip to content

Commit c949db8

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

5 files changed

Lines changed: 24 additions & 18 deletions

.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

src/datadog_api_client/v2/model/custom_destination_forward_destination.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ def __init__(self, **kwargs):
3030
3131
:param sourcetype: The Splunk sourcetype for the events sent to this Splunk destination.
3232
33-
If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
34-
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
35-
value is used as the sourcetype.
33+
If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype `_json` is used.
34+
On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
35+
If set to `null`, the sourcetype field is omitted from the forwarded event entirely.
36+
Otherwise, the provided string value is used as the sourcetype.
3637
:type sourcetype: str, none_type, optional
3738
3839
:param index_name: Name of the Elasticsearch index (must follow [Elasticsearch's criteria](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/indices-create-index.html#indices-create-api-path-params)).

src/datadog_api_client/v2/model/custom_destination_forward_destination_splunk.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ def __init__(
6161
6262
:param sourcetype: The Splunk sourcetype for the events sent to this Splunk destination.
6363
64-
If absent, the default sourcetype ``_json`` is used. If set to null, the ``sourcetype``
65-
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
66-
value is used as the sourcetype.
64+
If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype ``_json`` is used.
65+
On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
66+
If set to ``null`` , the sourcetype field is omitted from the forwarded event entirely.
67+
Otherwise, the provided string value is used as the sourcetype.
6768
:type sourcetype: str, none_type, optional
6869
6970
:param type: Type of the Splunk HTTP Event Collector (HEC) destination.

src/datadog_api_client/v2/model/custom_destination_response_forward_destination.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ def __init__(self, **kwargs):
2727
2828
:param sourcetype: The Splunk sourcetype for the events sent to this Splunk destination.
2929
30-
If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype`
31-
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
32-
value is used as the sourcetype.
30+
If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype `_json` is used.
31+
On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
32+
If set to `null`, the sourcetype field is omitted from the forwarded event entirely.
33+
Otherwise, the provided string value is used as the sourcetype.
3334
:type sourcetype: str, none_type, optional
3435
3536
:param index_name: Name of the Elasticsearch index (must follow [Elasticsearch's criteria](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/indices-create-index.html#indices-create-api-path-params)).

src/datadog_api_client/v2/model/custom_destination_response_forward_destination_splunk.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ def __init__(
5555
5656
:param sourcetype: The Splunk sourcetype for the events sent to this Splunk destination.
5757
58-
If absent, the default sourcetype ``_json`` is used. If set to null, the ``sourcetype``
59-
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
60-
value is used as the sourcetype.
58+
If the field is absent from the request and no sourcetype has been previously set on this destination, the default sourcetype ``_json`` is used.
59+
On update, if the field is absent from the request but a sourcetype was previously set, the previous value is kept.
60+
If set to ``null`` , the sourcetype field is omitted from the forwarded event entirely.
61+
Otherwise, the provided string value is used as the sourcetype.
6162
:type sourcetype: str, none_type, optional
6263
6364
:param type: Type of the Splunk HTTP Event Collector (HEC) destination.

0 commit comments

Comments
 (0)