Skip to content

Commit 908896c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6845166 of spec repo
1 parent 2493975 commit 908896c

16 files changed

+806
-40
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 65 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17358,6 +17358,16 @@ components:
1735817358
Must have HTTPS scheme and forwarding back to Datadog is not allowed.
1735917359
example: https://example.com
1736017360
type: string
17361+
sourcetype:
17362+
description: |-
17363+
The Splunk sourcetype for the events sent to this Splunk destination.
17364+
17365+
If absent, the default sourcetype `_json` is used. If set to `null`, the `sourcetype`
17366+
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
17367+
value is used as the sourcetype.
17368+
example: my-source
17369+
nullable: true
17370+
type: string
1736117371
type:
1736217372
$ref: "#/components/schemas/CustomDestinationForwardDestinationSplunkType"
1736317373
required:
@@ -17633,6 +17643,16 @@ components:
1763317643
Must have HTTPS scheme and forwarding back to Datadog is not allowed.
1763417644
example: https://example.com
1763517645
type: string
17646+
sourcetype:
17647+
description: |-
17648+
The Splunk sourcetype for the events sent to this Splunk destination.
17649+
17650+
If absent, the default sourcetype `_json` is used. If set to `null`, the `sourcetype`
17651+
field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string
17652+
value is used as the sourcetype.
17653+
example: my-source
17654+
nullable: true
17655+
type: string
1763617656
type:
1763717657
$ref: "#/components/schemas/CustomDestinationResponseForwardDestinationSplunkType"
1763817658
required:
@@ -57909,7 +57929,6 @@ components:
5790957929
- none
5791057930
- false_positive
5791157931
- testing_or_maintenance
57912-
- remediated
5791357932
- investigated_case_opened
5791457933
- true_positive_benign
5791557934
- true_positive_malicious
@@ -57919,7 +57938,6 @@ components:
5791957938
- NONE
5792057939
- FALSE_POSITIVE
5792157940
- TESTING_OR_MAINTENANCE
57922-
- REMEDIATED
5792357941
- INVESTIGATED_CASE_OPENED
5792457942
- TRUE_POSITIVE_BENIGN
5792557943
- TRUE_POSITIVE_MALICIOUS
@@ -102449,8 +102467,6 @@ paths:
102449102467
schema:
102450102468
$ref: "#/components/schemas/SecurityMonitoringSignalResponse"
102451102469
description: OK
102452-
"403":
102453-
$ref: "#/components/responses/NotAuthorizedResponse"
102454102470
"404":
102455102471
$ref: "#/components/responses/NotFoundResponse"
102456102472
"429":
@@ -102488,17 +102504,25 @@ paths:
102488102504
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
102489102505
description: OK
102490102506
"400":
102491-
$ref: "#/components/responses/BadRequestResponse"
102507+
content:
102508+
application/json:
102509+
schema:
102510+
$ref: "#/components/schemas/APIErrorResponse"
102511+
description: Bad Request
102492102512
"403":
102493-
$ref: "#/components/responses/NotAuthorizedResponse"
102513+
content:
102514+
application/json:
102515+
schema:
102516+
$ref: "#/components/schemas/APIErrorResponse"
102517+
description: Forbidden
102494102518
"404":
102495-
$ref: "#/components/responses/NotFoundResponse"
102519+
content:
102520+
application/json:
102521+
schema:
102522+
$ref: "#/components/schemas/APIErrorResponse"
102523+
description: Not Found
102496102524
"429":
102497102525
$ref: "#/components/responses/TooManyRequestsResponse"
102498-
security:
102499-
- apiKeyAuth: []
102500-
appKeyAuth: []
102501-
- AuthZ: []
102502102526
summary: Modify the triage assignee of a security signal
102503102527
tags: ["Security Monitoring"]
102504102528
x-codegen-request-body-name: body
@@ -102528,17 +102552,25 @@ paths:
102528102552
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
102529102553
description: OK
102530102554
"400":
102531-
$ref: "#/components/responses/BadRequestResponse"
102555+
content:
102556+
application/json:
102557+
schema:
102558+
$ref: "#/components/schemas/APIErrorResponse"
102559+
description: Bad Request
102532102560
"403":
102533-
$ref: "#/components/responses/NotAuthorizedResponse"
102561+
content:
102562+
application/json:
102563+
schema:
102564+
$ref: "#/components/schemas/APIErrorResponse"
102565+
description: Forbidden
102534102566
"404":
102535-
$ref: "#/components/responses/NotFoundResponse"
102567+
content:
102568+
application/json:
102569+
schema:
102570+
$ref: "#/components/schemas/APIErrorResponse"
102571+
description: Not Found
102536102572
"429":
102537102573
$ref: "#/components/responses/TooManyRequestsResponse"
102538-
security:
102539-
- apiKeyAuth: []
102540-
appKeyAuth: []
102541-
- AuthZ: []
102542102574
summary: Change the related incidents of a security signal
102543102575
tags: ["Security Monitoring"]
102544102576
x-codegen-request-body-name: body
@@ -102568,17 +102600,25 @@ paths:
102568102600
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
102569102601
description: OK
102570102602
"400":
102571-
$ref: "#/components/responses/BadRequestResponse"
102603+
content:
102604+
application/json:
102605+
schema:
102606+
$ref: "#/components/schemas/APIErrorResponse"
102607+
description: Bad Request
102572102608
"403":
102573-
$ref: "#/components/responses/NotAuthorizedResponse"
102609+
content:
102610+
application/json:
102611+
schema:
102612+
$ref: "#/components/schemas/APIErrorResponse"
102613+
description: Forbidden
102574102614
"404":
102575-
$ref: "#/components/responses/NotFoundResponse"
102615+
content:
102616+
application/json:
102617+
schema:
102618+
$ref: "#/components/schemas/APIErrorResponse"
102619+
description: Not Found
102576102620
"429":
102577102621
$ref: "#/components/responses/TooManyRequestsResponse"
102578-
security:
102579-
- apiKeyAuth: []
102580-
appKeyAuth: []
102581-
- AuthZ: []
102582102622
summary: Change the triage state of a security signal
102583102623
tags: ["Security Monitoring"]
102584102624
x-codegen-request-body-name: body
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Create a Splunk custom destination with a sourcetype returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.LogsCustomDestinationsApi;
6+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequest;
7+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestAttributes;
8+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestDefinition;
9+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestination;
10+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunk;
11+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunkType;
12+
import com.datadog.api.client.v2.model.CustomDestinationResponse;
13+
import com.datadog.api.client.v2.model.CustomDestinationType;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
LogsCustomDestinationsApi apiInstance = new LogsCustomDestinationsApi(defaultClient);
19+
20+
CustomDestinationCreateRequest body =
21+
new CustomDestinationCreateRequest()
22+
.data(
23+
new CustomDestinationCreateRequestDefinition()
24+
.attributes(
25+
new CustomDestinationCreateRequestAttributes()
26+
.enabled(false)
27+
.forwardTags(false)
28+
.forwarderDestination(
29+
new CustomDestinationForwardDestination(
30+
new CustomDestinationForwardDestinationSplunk()
31+
.accessToken("my-access-token")
32+
.endpoint("https://example.com")
33+
.type(
34+
CustomDestinationForwardDestinationSplunkType
35+
.SPLUNK_HEC)
36+
.sourcetype("my-sourcetype")))
37+
.name("Nginx logs")
38+
.query("source:nginx"))
39+
.type(CustomDestinationType.CUSTOM_DESTINATION));
40+
41+
try {
42+
CustomDestinationResponse result = apiInstance.createLogsCustomDestination(body);
43+
System.out.println(result);
44+
} catch (ApiException e) {
45+
System.err.println(
46+
"Exception when calling LogsCustomDestinationsApi#createLogsCustomDestination");
47+
System.err.println("Status code: " + e.getCode());
48+
System.err.println("Reason: " + e.getResponseBody());
49+
System.err.println("Response headers: " + e.getResponseHeaders());
50+
e.printStackTrace();
51+
}
52+
}
53+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Create a Splunk custom destination without a sourcetype returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.LogsCustomDestinationsApi;
6+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequest;
7+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestAttributes;
8+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestDefinition;
9+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestination;
10+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunk;
11+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunkType;
12+
import com.datadog.api.client.v2.model.CustomDestinationResponse;
13+
import com.datadog.api.client.v2.model.CustomDestinationType;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
LogsCustomDestinationsApi apiInstance = new LogsCustomDestinationsApi(defaultClient);
19+
20+
CustomDestinationCreateRequest body =
21+
new CustomDestinationCreateRequest()
22+
.data(
23+
new CustomDestinationCreateRequestDefinition()
24+
.attributes(
25+
new CustomDestinationCreateRequestAttributes()
26+
.enabled(false)
27+
.forwardTags(false)
28+
.forwarderDestination(
29+
new CustomDestinationForwardDestination(
30+
new CustomDestinationForwardDestinationSplunk()
31+
.accessToken("my-access-token")
32+
.endpoint("https://example.com")
33+
.type(
34+
CustomDestinationForwardDestinationSplunkType
35+
.SPLUNK_HEC)))
36+
.name("Nginx logs")
37+
.query("source:nginx"))
38+
.type(CustomDestinationType.CUSTOM_DESTINATION));
39+
40+
try {
41+
CustomDestinationResponse result = apiInstance.createLogsCustomDestination(body);
42+
System.out.println(result);
43+
} catch (ApiException e) {
44+
System.err.println(
45+
"Exception when calling LogsCustomDestinationsApi#createLogsCustomDestination");
46+
System.err.println("Status code: " + e.getCode());
47+
System.err.println("Reason: " + e.getResponseBody());
48+
System.err.println("Response headers: " + e.getResponseHeaders());
49+
e.printStackTrace();
50+
}
51+
}
52+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Create a Splunk custom destination with a null sourcetype returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.LogsCustomDestinationsApi;
6+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequest;
7+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestAttributes;
8+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestDefinition;
9+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestination;
10+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunk;
11+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunkType;
12+
import com.datadog.api.client.v2.model.CustomDestinationResponse;
13+
import com.datadog.api.client.v2.model.CustomDestinationType;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
LogsCustomDestinationsApi apiInstance = new LogsCustomDestinationsApi(defaultClient);
19+
20+
CustomDestinationCreateRequest body =
21+
new CustomDestinationCreateRequest()
22+
.data(
23+
new CustomDestinationCreateRequestDefinition()
24+
.attributes(
25+
new CustomDestinationCreateRequestAttributes()
26+
.enabled(false)
27+
.forwardTags(false)
28+
.forwarderDestination(
29+
new CustomDestinationForwardDestination(
30+
new CustomDestinationForwardDestinationSplunk()
31+
.accessToken("my-access-token")
32+
.endpoint("https://example.com")
33+
.type(
34+
CustomDestinationForwardDestinationSplunkType
35+
.SPLUNK_HEC)
36+
.sourcetype(null)))
37+
.name("Nginx logs")
38+
.query("source:nginx"))
39+
.type(CustomDestinationType.CUSTOM_DESTINATION));
40+
41+
try {
42+
CustomDestinationResponse result = apiInstance.createLogsCustomDestination(body);
43+
System.out.println(result);
44+
} catch (ApiException e) {
45+
System.err.println(
46+
"Exception when calling LogsCustomDestinationsApi#createLogsCustomDestination");
47+
System.err.println("Status code: " + e.getCode());
48+
System.err.println("Reason: " + e.getResponseBody());
49+
System.err.println("Response headers: " + e.getResponseHeaders());
50+
e.printStackTrace();
51+
}
52+
}
53+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Create a Splunk custom destination with an empty string sourcetype returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.LogsCustomDestinationsApi;
6+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequest;
7+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestAttributes;
8+
import com.datadog.api.client.v2.model.CustomDestinationCreateRequestDefinition;
9+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestination;
10+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunk;
11+
import com.datadog.api.client.v2.model.CustomDestinationForwardDestinationSplunkType;
12+
import com.datadog.api.client.v2.model.CustomDestinationResponse;
13+
import com.datadog.api.client.v2.model.CustomDestinationType;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
LogsCustomDestinationsApi apiInstance = new LogsCustomDestinationsApi(defaultClient);
19+
20+
CustomDestinationCreateRequest body =
21+
new CustomDestinationCreateRequest()
22+
.data(
23+
new CustomDestinationCreateRequestDefinition()
24+
.attributes(
25+
new CustomDestinationCreateRequestAttributes()
26+
.enabled(false)
27+
.forwardTags(false)
28+
.forwarderDestination(
29+
new CustomDestinationForwardDestination(
30+
new CustomDestinationForwardDestinationSplunk()
31+
.accessToken("my-access-token")
32+
.endpoint("https://example.com")
33+
.type(
34+
CustomDestinationForwardDestinationSplunkType
35+
.SPLUNK_HEC)
36+
.sourcetype("")))
37+
.name("Nginx logs")
38+
.query("source:nginx"))
39+
.type(CustomDestinationType.CUSTOM_DESTINATION));
40+
41+
try {
42+
CustomDestinationResponse result = apiInstance.createLogsCustomDestination(body);
43+
System.out.println(result);
44+
} catch (ApiException e) {
45+
System.err.println(
46+
"Exception when calling LogsCustomDestinationsApi#createLogsCustomDestination");
47+
System.err.println("Status code: " + e.getCode());
48+
System.err.println("Reason: " + e.getResponseBody());
49+
System.err.println("Response headers: " + e.getResponseHeaders());
50+
e.printStackTrace();
51+
}
52+
}
53+
}

0 commit comments

Comments
 (0)