Skip to content

Commit 176c3b7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit be416ce of spec repo
1 parent b82c044 commit 176c3b7

22 files changed

Lines changed: 201 additions & 54 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18916,9 +18916,6 @@ components:
1891618916
ConvertJobResultsToSignalsAttributes:
1891718917
description: Attributes for converting historical job results to signals.
1891818918
properties:
18919-
id:
18920-
description: Request ID.
18921-
type: string
1892218919
jobResultIds:
1892318920
description: Job result IDs.
1892418921
example:
@@ -37587,10 +37584,34 @@ components:
3758737584
HistoricalJobQuery:
3758837585
description: Query for selecting logs analyzed by the historical job.
3758937586
properties:
37587+
additionalFilters:
37588+
description: Additional filters appended to the query at evaluation time.
37589+
type: string
3759037590
aggregation:
3759137591
$ref: "#/components/schemas/SecurityMonitoringRuleQueryAggregation"
37592+
correlatedByFields:
37593+
description: Fields used to correlate results across queries in sequence detection rules.
37594+
items:
37595+
description: Field.
37596+
type: string
37597+
type: array
37598+
correlatedQueryIndex:
37599+
description: Zero-based index of the query to correlate with in sequence detection rules. Up to 10 queries are supported, so valid values are 0 to 9.
37600+
format: int64
37601+
maximum: 9
37602+
minimum: 0
37603+
type: integer
37604+
customQueryExtension:
37605+
description: Custom query extension used to refine the base query.
37606+
type: string
3759237607
dataSource:
3759337608
$ref: "#/components/schemas/SecurityMonitoringStandardDataSource"
37609+
datasetIds:
37610+
description: IDs of reference datasets used by this query.
37611+
items:
37612+
description: Dataset ID.
37613+
type: string
37614+
type: array
3759437615
distinctFields:
3759537616
description: Field for which the cardinality is measured. Sent as an array.
3759637617
items:
@@ -37608,6 +37629,15 @@ components:
3760837629
description: When false, events without a group-by value are ignored by the query. When true, events with missing group-by fields are processed with `N/A`, replacing the missing values.
3760937630
example: false
3761037631
type: boolean
37632+
index:
37633+
description: Index used to load the data for this query.
37634+
type: string
37635+
indexes:
37636+
description: Indexes used to load the data for this query. Mutually exclusive with `index`.
37637+
items:
37638+
description: Index name.
37639+
type: string
37640+
type: array
3761137641
metrics:
3761237642
description: Group of target fields to aggregate over when using the sum, max, geo data, or new value aggregations. The sum, max, and geo data aggregations only accept one value in this list, whereas the new value aggregation accepts up to five values.
3761337643
items:
@@ -37621,6 +37651,9 @@ components:
3762137651
description: Query to run on logs.
3762237652
example: a > 3
3762337653
type: string
37654+
queryLanguage:
37655+
description: Language used to parse the query string.
37656+
type: string
3762437657
type: object
3762537658
HistoricalJobResponse:
3762637659
description: Historical job response.
@@ -37654,6 +37687,10 @@ components:
3765437687
modifiedAt:
3765537688
description: Last modification time of the job.
3765637689
type: string
37690+
progressRate:
37691+
description: Job execution progress as a value between 0 and 1. Omitted for finished jobs.
37692+
format: double
37693+
type: number
3765737694
signalOutput:
3765837695
description: Whether the job outputs signals.
3765937696
type: boolean
@@ -43184,9 +43221,10 @@ components:
4318443221
$ref: "#/components/schemas/CalculatedField"
4318543222
type: array
4318643223
cases:
43187-
description: Cases used for generating job results.
43224+
description: Cases used for generating job results. Up to 10 cases are allowed.
4318843225
items:
4318943226
$ref: "#/components/schemas/SecurityMonitoringRuleCaseCreate"
43227+
maxItems: 10
4319043228
type: array
4319143229
from:
4319243230
description: Starting time of data analyzed by the job.
@@ -43216,9 +43254,10 @@ components:
4321643254
options:
4321743255
$ref: "#/components/schemas/HistoricalJobOptions"
4321843256
queries:
43219-
description: Queries for selecting logs analyzed by the job.
43257+
description: Queries for selecting logs analyzed by the job. Up to 10 queries are allowed.
4322043258
items:
4322143259
$ref: "#/components/schemas/HistoricalJobQuery"
43260+
maxItems: 10
4322243261
type: array
4322343262
referenceTables:
4322443263
description: Reference tables used in the queries.
@@ -43232,10 +43271,11 @@ components:
4323243271
type: string
4323343272
type: array
4323443273
thirdPartyCases:
43235-
description: Cases for generating results from third-party detection method. Only available for third-party detection method.
43274+
description: Cases for generating results from third-party detection method. Only available for third-party detection method. Up to 10 cases are allowed.
4323643275
example: []
4323743276
items:
4323843277
$ref: "#/components/schemas/SecurityMonitoringThirdPartyRuleCaseCreate"
43278+
maxItems: 10
4323943279
type: array
4324043280
to:
4324143281
description: Ending time of data analyzed by the job.
@@ -43257,6 +43297,12 @@ components:
4325743297
JobDefinitionFromRule:
4325843298
description: Definition of a historical job based on a security monitoring rule.
4325943299
properties:
43300+
caseIndex:
43301+
description: Zero-based index of the rule case to use as the job's signal condition. When omitted, all cases are evaluated. Up to 10 cases are supported, so valid values are 0 to 9.
43302+
format: int32
43303+
maximum: 9
43304+
minimum: 0
43305+
type: integer
4326043306
from:
4326143307
description: Starting time of data analyzed by the job.
4326243308
example: 1729843470000
@@ -70397,11 +70443,11 @@ components:
7039770443
properties:
7039870444
fromRule:
7039970445
$ref: "#/components/schemas/JobDefinitionFromRule"
70400-
id:
70401-
description: Request ID.
70402-
type: string
7040370446
jobDefinition:
7040470447
$ref: "#/components/schemas/JobDefinition"
70448+
signalOutput:
70449+
description: Whether the job outputs signals when results are converted.
70450+
type: boolean
7040570451
type: object
7040670452
RunHistoricalJobRequestData:
7040770453
description: Data for running a historical job request.

src/datadog_api_client/v2/model/convert_job_results_to_signals_attributes.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import List, Union, TYPE_CHECKING
6+
from typing import List, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11-
unset,
12-
UnsetType,
1311
)
1412

1513

@@ -23,15 +21,13 @@ def openapi_types(_):
2321
from datadog_api_client.v2.model.security_monitoring_rule_severity import SecurityMonitoringRuleSeverity
2422

2523
return {
26-
"id": (str,),
2724
"job_result_ids": ([str],),
2825
"notifications": ([str],),
2926
"signal_message": (str,),
3027
"signal_severity": (SecurityMonitoringRuleSeverity,),
3128
}
3229

3330
attribute_map = {
34-
"id": "id",
3531
"job_result_ids": "jobResultIds",
3632
"notifications": "notifications",
3733
"signal_message": "signalMessage",
@@ -44,15 +40,11 @@ def __init__(
4440
notifications: List[str],
4541
signal_message: str,
4642
signal_severity: SecurityMonitoringRuleSeverity,
47-
id: Union[str, UnsetType] = unset,
4843
**kwargs,
4944
):
5045
"""
5146
Attributes for converting historical job results to signals.
5247
53-
:param id: Request ID.
54-
:type id: str, optional
55-
5648
:param job_result_ids: Job result IDs.
5749
:type job_result_ids: [str]
5850
@@ -65,8 +57,6 @@ def __init__(
6557
:param signal_severity: Severity of the Security Signal.
6658
:type signal_severity: SecurityMonitoringRuleSeverity
6759
"""
68-
if id is not unset:
69-
kwargs["id"] = id
7060
super().__init__(kwargs)
7161

7262
self_.job_result_ids = job_result_ids

src/datadog_api_client/v2/model/historical_job_query.py

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323

2424

2525
class HistoricalJobQuery(ModelNormal):
26+
validations = {
27+
"correlated_query_index": {
28+
"inclusive_maximum": 9,
29+
"inclusive_minimum": 0,
30+
},
31+
}
32+
2633
@cached_property
2734
def openapi_types(_):
2835
from datadog_api_client.v2.model.security_monitoring_rule_query_aggregation import (
@@ -33,48 +40,87 @@ def openapi_types(_):
3340
)
3441

3542
return {
43+
"additional_filters": (str,),
3644
"aggregation": (SecurityMonitoringRuleQueryAggregation,),
45+
"correlated_by_fields": ([str],),
46+
"correlated_query_index": (int,),
47+
"custom_query_extension": (str,),
3748
"data_source": (SecurityMonitoringStandardDataSource,),
49+
"dataset_ids": ([str],),
3850
"distinct_fields": ([str],),
3951
"group_by_fields": ([str],),
4052
"has_optional_group_by_fields": (bool,),
53+
"index": (str,),
54+
"indexes": ([str],),
4155
"metrics": ([str],),
4256
"name": (str,),
4357
"query": (str,),
58+
"query_language": (str,),
4459
}
4560

4661
attribute_map = {
62+
"additional_filters": "additionalFilters",
4763
"aggregation": "aggregation",
64+
"correlated_by_fields": "correlatedByFields",
65+
"correlated_query_index": "correlatedQueryIndex",
66+
"custom_query_extension": "customQueryExtension",
4867
"data_source": "dataSource",
68+
"dataset_ids": "datasetIds",
4969
"distinct_fields": "distinctFields",
5070
"group_by_fields": "groupByFields",
5171
"has_optional_group_by_fields": "hasOptionalGroupByFields",
72+
"index": "index",
73+
"indexes": "indexes",
5274
"metrics": "metrics",
5375
"name": "name",
5476
"query": "query",
77+
"query_language": "queryLanguage",
5578
}
5679

5780
def __init__(
5881
self_,
82+
additional_filters: Union[str, UnsetType] = unset,
5983
aggregation: Union[SecurityMonitoringRuleQueryAggregation, UnsetType] = unset,
84+
correlated_by_fields: Union[List[str], UnsetType] = unset,
85+
correlated_query_index: Union[int, UnsetType] = unset,
86+
custom_query_extension: Union[str, UnsetType] = unset,
6087
data_source: Union[SecurityMonitoringStandardDataSource, UnsetType] = unset,
88+
dataset_ids: Union[List[str], UnsetType] = unset,
6189
distinct_fields: Union[List[str], UnsetType] = unset,
6290
group_by_fields: Union[List[str], UnsetType] = unset,
6391
has_optional_group_by_fields: Union[bool, UnsetType] = unset,
92+
index: Union[str, UnsetType] = unset,
93+
indexes: Union[List[str], UnsetType] = unset,
6494
metrics: Union[List[str], UnsetType] = unset,
6595
name: Union[str, UnsetType] = unset,
6696
query: Union[str, UnsetType] = unset,
97+
query_language: Union[str, UnsetType] = unset,
6798
**kwargs,
6899
):
69100
"""
70101
Query for selecting logs analyzed by the historical job.
71102
103+
:param additional_filters: Additional filters appended to the query at evaluation time.
104+
:type additional_filters: str, optional
105+
72106
:param aggregation: The aggregation type.
73107
:type aggregation: SecurityMonitoringRuleQueryAggregation, optional
74108
109+
:param correlated_by_fields: Fields used to correlate results across queries in sequence detection rules.
110+
:type correlated_by_fields: [str], optional
111+
112+
:param correlated_query_index: Zero-based index of the query to correlate with in sequence detection rules. Up to 10 queries are supported, so valid values are 0 to 9.
113+
:type correlated_query_index: int, optional
114+
115+
:param custom_query_extension: Custom query extension used to refine the base query.
116+
:type custom_query_extension: str, optional
117+
75118
:param data_source: Source of events, either logs, audit trail, security signals, or Datadog events. ``app_sec_spans`` is deprecated in favor of ``spans``.
76119
:type data_source: SecurityMonitoringStandardDataSource, optional
77120
121+
:param dataset_ids: IDs of reference datasets used by this query.
122+
:type dataset_ids: [str], optional
123+
78124
:param distinct_fields: Field for which the cardinality is measured. Sent as an array.
79125
:type distinct_fields: [str], optional
80126
@@ -84,6 +130,12 @@ def __init__(
84130
:param has_optional_group_by_fields: When false, events without a group-by value are ignored by the query. When true, events with missing group-by fields are processed with ``N/A`` , replacing the missing values.
85131
:type has_optional_group_by_fields: bool, optional
86132
133+
:param index: Index used to load the data for this query.
134+
:type index: str, optional
135+
136+
:param indexes: Indexes used to load the data for this query. Mutually exclusive with ``index``.
137+
:type indexes: [str], optional
138+
87139
:param metrics: Group of target fields to aggregate over when using the sum, max, geo data, or new value aggregations. The sum, max, and geo data aggregations only accept one value in this list, whereas the new value aggregation accepts up to five values.
88140
:type metrics: [str], optional
89141
@@ -92,21 +144,40 @@ def __init__(
92144
93145
:param query: Query to run on logs.
94146
:type query: str, optional
147+
148+
:param query_language: Language used to parse the query string.
149+
:type query_language: str, optional
95150
"""
151+
if additional_filters is not unset:
152+
kwargs["additional_filters"] = additional_filters
96153
if aggregation is not unset:
97154
kwargs["aggregation"] = aggregation
155+
if correlated_by_fields is not unset:
156+
kwargs["correlated_by_fields"] = correlated_by_fields
157+
if correlated_query_index is not unset:
158+
kwargs["correlated_query_index"] = correlated_query_index
159+
if custom_query_extension is not unset:
160+
kwargs["custom_query_extension"] = custom_query_extension
98161
if data_source is not unset:
99162
kwargs["data_source"] = data_source
163+
if dataset_ids is not unset:
164+
kwargs["dataset_ids"] = dataset_ids
100165
if distinct_fields is not unset:
101166
kwargs["distinct_fields"] = distinct_fields
102167
if group_by_fields is not unset:
103168
kwargs["group_by_fields"] = group_by_fields
104169
if has_optional_group_by_fields is not unset:
105170
kwargs["has_optional_group_by_fields"] = has_optional_group_by_fields
171+
if index is not unset:
172+
kwargs["index"] = index
173+
if indexes is not unset:
174+
kwargs["indexes"] = indexes
106175
if metrics is not unset:
107176
kwargs["metrics"] = metrics
108177
if name is not unset:
109178
kwargs["name"] = name
110179
if query is not unset:
111180
kwargs["query"] = query
181+
if query_language is not unset:
182+
kwargs["query_language"] = query_language
112183
super().__init__(kwargs)

0 commit comments

Comments
 (0)