Skip to content

Commit 46f53f9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 00a632d of spec repo
1 parent 8aec44e commit 46f53f9

21 files changed

Lines changed: 208 additions & 1556 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 11 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -7475,89 +7475,23 @@ components:
74757475
properties:
74767476
data:
74777477
items:
7478-
$ref: '#/components/schemas/TableRowResourceIdentifier'
7478+
$ref: '#/components/schemas/BatchDeleteRowsRequestData'
74797479
maxItems: 200
74807480
type: array
74817481
required:
74827482
- data
74837483
type: object
7484-
BatchRowsQueryDataType:
7485-
default: reference-tables-batch-rows-query
7486-
description: Resource type identifier for batch queries of reference table rows.
7487-
enum:
7488-
- reference-tables-batch-rows-query
7489-
example: reference-tables-batch-rows-query
7490-
type: string
7491-
x-enum-varnames:
7492-
- REFERENCE_TABLES_BATCH_ROWS_QUERY
7493-
BatchRowsQueryRequest:
7494-
properties:
7495-
data:
7496-
$ref: '#/components/schemas/BatchRowsQueryRequestData'
7497-
type: object
7498-
BatchRowsQueryRequestData:
7499-
properties:
7500-
attributes:
7501-
$ref: '#/components/schemas/BatchRowsQueryRequestDataAttributes'
7502-
type:
7503-
$ref: '#/components/schemas/BatchRowsQueryDataType'
7504-
required:
7505-
- type
7506-
type: object
7507-
BatchRowsQueryRequestDataAttributes:
7508-
properties:
7509-
row_ids:
7510-
example:
7511-
- row_id_1
7512-
- row_id_2
7513-
items:
7514-
type: string
7515-
type: array
7516-
table_id:
7517-
example: 00000000-0000-0000-0000-000000000000
7518-
type: string
7519-
required:
7520-
- row_ids
7521-
- table_id
7522-
type: object
7523-
BatchRowsQueryResponse:
7524-
example:
7525-
data:
7526-
id: 00000000-0000-0000-0000-000000000000
7527-
relationships:
7528-
rows:
7529-
data:
7530-
- id: row_id_1
7531-
type: row
7532-
- id: row_id_2
7533-
type: row
7534-
type: reference-tables-batch-rows-query
7535-
properties:
7536-
data:
7537-
$ref: '#/components/schemas/BatchRowsQueryResponseData'
7538-
type: object
7539-
BatchRowsQueryResponseData:
7484+
BatchDeleteRowsRequestData:
7485+
description: Row resource containing a single row identifier for deletion.
75407486
properties:
75417487
id:
7488+
example: primary_key_value
75427489
type: string
7543-
relationships:
7544-
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationships'
75457490
type:
7546-
$ref: '#/components/schemas/BatchRowsQueryDataType'
7491+
$ref: '#/components/schemas/TableRowResourceDataType'
75477492
required:
75487493
- type
7549-
type: object
7550-
BatchRowsQueryResponseDataRelationships:
7551-
properties:
7552-
rows:
7553-
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationshipsRows'
7554-
type: object
7555-
BatchRowsQueryResponseDataRelationshipsRows:
7556-
properties:
7557-
data:
7558-
items:
7559-
$ref: '#/components/schemas/TableRowResourceIdentifier'
7560-
type: array
7494+
- id
75617495
type: object
75627496
BatchUpsertRowsRequestArray:
75637497
description: The request body for creating or updating multiple rows into a
@@ -44644,6 +44578,11 @@ components:
4464444578
targets.
4464544579
example: service:my-service
4464644580
type: string
44581+
keep_unmatched:
44582+
description: Indicates whether to keep event which do not match any of the
44583+
mapping filters.
44584+
example: false
44585+
type: boolean
4464744586
mappings:
4464844587
description: A list of mapping rules to convert events to the OCSF format.
4464944588
items:
@@ -67019,18 +66958,6 @@ components:
6701966958
type: string
6702066959
x-enum-varnames:
6702166960
- ROW
67022-
TableRowResourceIdentifier:
67023-
description: Row resource containing a single row identifier.
67024-
properties:
67025-
id:
67026-
example: primary_key_value
67027-
type: string
67028-
type:
67029-
$ref: '#/components/schemas/TableRowResourceDataType'
67030-
required:
67031-
- type
67032-
- id
67033-
type: object
6703466961
TagsEventAttribute:
6703566962
description: Array of tags associated with your event.
6703666963
example:
@@ -96466,57 +96393,6 @@ paths:
9646696393
operator: OR
9646796394
permissions:
9646896395
- timeseries_query
96469-
/api/v2/reference-tables/queries/batch-rows:
96470-
post:
96471-
description: Batch query reference table rows by their primary key values. Returns
96472-
only found rows in the included array.
96473-
operationId: BatchRowsQuery
96474-
requestBody:
96475-
content:
96476-
application/json:
96477-
examples:
96478-
happy_path:
96479-
summary: Batch query reference table rows by their primary key values.
96480-
value:
96481-
data:
96482-
attributes:
96483-
row_ids:
96484-
- row_id_1
96485-
- row_id_2
96486-
table_id: 00000000-0000-0000-0000-000000000000
96487-
type: reference-tables-batch-rows-query
96488-
schema:
96489-
$ref: '#/components/schemas/BatchRowsQueryRequest'
96490-
required: true
96491-
responses:
96492-
'200':
96493-
content:
96494-
application/json:
96495-
schema:
96496-
$ref: '#/components/schemas/BatchRowsQueryResponse'
96497-
description: Successfully retrieved rows. Some or all requested rows were
96498-
found. Response includes found rows in the included section.
96499-
'400':
96500-
$ref: '#/components/responses/BadRequestResponse'
96501-
'403':
96502-
$ref: '#/components/responses/ForbiddenResponse'
96503-
'404':
96504-
$ref: '#/components/responses/NotFoundResponse'
96505-
'429':
96506-
$ref: '#/components/responses/TooManyRequestsResponse'
96507-
'500':
96508-
content:
96509-
application/json:
96510-
schema:
96511-
$ref: '#/components/schemas/APIErrorResponse'
96512-
description: Internal Server Error
96513-
security:
96514-
- apiKeyAuth: []
96515-
appKeyAuth: []
96516-
- AuthZ: []
96517-
summary: Batch rows query
96518-
tags:
96519-
- Reference Tables
9652096396
/api/v2/reference-tables/tables:
9652196397
get:
9652296398
description: List all reference tables in this organization.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
// Validate an observability pipeline with OCSF mapper keep_unmatched 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.ObservabilityPipelinesApi;
6+
import com.datadog.api.client.v2.model.ObservabilityPipelineConfig;
7+
import com.datadog.api.client.v2.model.ObservabilityPipelineConfigDestinationItem;
8+
import com.datadog.api.client.v2.model.ObservabilityPipelineConfigProcessorGroup;
9+
import com.datadog.api.client.v2.model.ObservabilityPipelineConfigProcessorItem;
10+
import com.datadog.api.client.v2.model.ObservabilityPipelineConfigSourceItem;
11+
import com.datadog.api.client.v2.model.ObservabilityPipelineDataAttributes;
12+
import com.datadog.api.client.v2.model.ObservabilityPipelineDatadogAgentSource;
13+
import com.datadog.api.client.v2.model.ObservabilityPipelineDatadogAgentSourceType;
14+
import com.datadog.api.client.v2.model.ObservabilityPipelineDatadogLogsDestination;
15+
import com.datadog.api.client.v2.model.ObservabilityPipelineDatadogLogsDestinationType;
16+
import com.datadog.api.client.v2.model.ObservabilityPipelineOcsfMapperProcessor;
17+
import com.datadog.api.client.v2.model.ObservabilityPipelineOcsfMapperProcessorMapping;
18+
import com.datadog.api.client.v2.model.ObservabilityPipelineOcsfMapperProcessorMappingMapping;
19+
import com.datadog.api.client.v2.model.ObservabilityPipelineOcsfMapperProcessorType;
20+
import com.datadog.api.client.v2.model.ObservabilityPipelineOcsfMappingLibrary;
21+
import com.datadog.api.client.v2.model.ObservabilityPipelineSpec;
22+
import com.datadog.api.client.v2.model.ObservabilityPipelineSpecData;
23+
import com.datadog.api.client.v2.model.ValidationResponse;
24+
import java.util.Collections;
25+
26+
public class Example {
27+
public static void main(String[] args) {
28+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
29+
ObservabilityPipelinesApi apiInstance = new ObservabilityPipelinesApi(defaultClient);
30+
31+
ObservabilityPipelineSpec body =
32+
new ObservabilityPipelineSpec()
33+
.data(
34+
new ObservabilityPipelineSpecData()
35+
.attributes(
36+
new ObservabilityPipelineDataAttributes()
37+
.config(
38+
new ObservabilityPipelineConfig()
39+
.destinations(
40+
Collections.singletonList(
41+
new ObservabilityPipelineConfigDestinationItem(
42+
new ObservabilityPipelineDatadogLogsDestination()
43+
.id("datadog-logs-destination")
44+
.inputs(
45+
Collections.singletonList(
46+
"my-processor-group"))
47+
.type(
48+
ObservabilityPipelineDatadogLogsDestinationType
49+
.DATADOG_LOGS))))
50+
.processorGroups(
51+
Collections.singletonList(
52+
new ObservabilityPipelineConfigProcessorGroup()
53+
.enabled(true)
54+
.id("my-processor-group")
55+
.include("service:my-service")
56+
.inputs(
57+
Collections.singletonList(
58+
"datadog-agent-source"))
59+
.processors(
60+
Collections.singletonList(
61+
new ObservabilityPipelineConfigProcessorItem(
62+
new ObservabilityPipelineOcsfMapperProcessor()
63+
.enabled(true)
64+
.id("ocsf-mapper-processor")
65+
.include("service:my-service")
66+
.type(
67+
ObservabilityPipelineOcsfMapperProcessorType
68+
.OCSF_MAPPER)
69+
.keepUnmatched(true)
70+
.mappings(
71+
Collections.singletonList(
72+
new ObservabilityPipelineOcsfMapperProcessorMapping()
73+
.include(
74+
"source:cloudtrail")
75+
.mapping(
76+
new ObservabilityPipelineOcsfMapperProcessorMappingMapping(
77+
ObservabilityPipelineOcsfMappingLibrary
78+
.CLOUDTRAIL_ACCOUNT_CHANGE)))))))))
79+
.sources(
80+
Collections.singletonList(
81+
new ObservabilityPipelineConfigSourceItem(
82+
new ObservabilityPipelineDatadogAgentSource()
83+
.id("datadog-agent-source")
84+
.type(
85+
ObservabilityPipelineDatadogAgentSourceType
86+
.DATADOG_AGENT)))))
87+
.name("OCSF Mapper Keep Unmatched Pipeline"))
88+
.type("pipelines"));
89+
90+
try {
91+
ValidationResponse result = apiInstance.validatePipeline(body);
92+
System.out.println(result);
93+
} catch (ApiException e) {
94+
System.err.println("Exception when calling ObservabilityPipelinesApi#validatePipeline");
95+
System.err.println("Status code: " + e.getCode());
96+
System.err.println("Reason: " + e.getResponseBody());
97+
System.err.println("Response headers: " + e.getResponseHeaders());
98+
e.printStackTrace();
99+
}
100+
}
101+
}

examples/v2/reference-tables/BatchRowsQuery.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

examples/v2/reference-tables/DeleteRows.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import com.datadog.api.client.ApiException;
55
import com.datadog.api.client.v2.api.ReferenceTablesApi;
66
import com.datadog.api.client.v2.model.BatchDeleteRowsRequestArray;
7+
import com.datadog.api.client.v2.model.BatchDeleteRowsRequestData;
78
import com.datadog.api.client.v2.model.TableRowResourceDataType;
8-
import com.datadog.api.client.v2.model.TableRowResourceIdentifier;
99
import java.util.Collections;
1010

1111
public class Example {
@@ -17,7 +17,7 @@ public static void main(String[] args) {
1717
new BatchDeleteRowsRequestArray()
1818
.data(
1919
Collections.singletonList(
20-
new TableRowResourceIdentifier()
20+
new BatchDeleteRowsRequestData()
2121
.id("primary_key_value")
2222
.type(TableRowResourceDataType.ROW)));
2323

0 commit comments

Comments
 (0)