Skip to content

Commit 54657b5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add optional group-bys support to security signals (#1748)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 8c58fff commit 54657b5

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2023-11-07 09:02:06.404689",
8-
"spec_repo_commit": "c7428dad"
7+
"regenerated": "2023-11-09 10:45:49.710867",
8+
"spec_repo_commit": "66a4cef6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-11-07 09:02:06.418647",
13-
"spec_repo_commit": "c7428dad"
12+
"regenerated": "2023-11-09 10:45:49.725898",
13+
"spec_repo_commit": "66a4cef6"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15010,6 +15010,13 @@ components:
1501015010
description: Field.
1501115011
type: string
1501215012
type: array
15013+
hasOptionalGroupByFields:
15014+
description: When false, events without a group-by value are ignored by
15015+
the rule. When true, events with missing group-by fields are processed
15016+
with `N/A`, replacing the missing values.
15017+
example: false
15018+
readOnly: true
15019+
type: boolean
1501315020
metric:
1501415021
deprecated: true
1501515022
description: '(Deprecated) The target field to aggregate over when using

src/datadog_api_client/v2/model/security_monitoring_rule_query.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ def __init__(self, **kwargs):
2424
:param group_by_fields: Fields to group by.
2525
:type group_by_fields: [str], optional
2626
27+
:param has_optional_group_by_fields: When false, events without a group-by value are ignored by the rule. When true, events with missing group-by fields are processed with `N/A`, replacing the missing values.
28+
:type has_optional_group_by_fields: bool, optional
29+
2730
:param metric: (Deprecated) The target field to aggregate over when using the sum or max
2831
aggregations. `metrics` field should be used instead.
2932
:type metric: str, optional

src/datadog_api_client/v2/model/security_monitoring_standard_rule_query.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def openapi_types(_):
3030
"aggregation": (SecurityMonitoringRuleQueryAggregation,),
3131
"distinct_fields": ([str],),
3232
"group_by_fields": ([str],),
33+
"has_optional_group_by_fields": (bool,),
3334
"metric": (str,),
3435
"metrics": ([str],),
3536
"name": (str,),
@@ -40,17 +41,22 @@ def openapi_types(_):
4041
"aggregation": "aggregation",
4142
"distinct_fields": "distinctFields",
4243
"group_by_fields": "groupByFields",
44+
"has_optional_group_by_fields": "hasOptionalGroupByFields",
4345
"metric": "metric",
4446
"metrics": "metrics",
4547
"name": "name",
4648
"query": "query",
4749
}
50+
read_only_vars = {
51+
"has_optional_group_by_fields",
52+
}
4853

4954
def __init__(
5055
self_,
5156
aggregation: Union[SecurityMonitoringRuleQueryAggregation, UnsetType] = unset,
5257
distinct_fields: Union[List[str], UnsetType] = unset,
5358
group_by_fields: Union[List[str], UnsetType] = unset,
59+
has_optional_group_by_fields: Union[bool, UnsetType] = unset,
5460
metric: Union[str, UnsetType] = unset,
5561
metrics: Union[List[str], UnsetType] = unset,
5662
name: Union[str, UnsetType] = unset,
@@ -69,6 +75,9 @@ def __init__(
6975
:param group_by_fields: Fields to group by.
7076
:type group_by_fields: [str], optional
7177
78+
:param has_optional_group_by_fields: When false, events without a group-by value are ignored by the rule. When true, events with missing group-by fields are processed with ``N/A`` , replacing the missing values.
79+
:type has_optional_group_by_fields: bool, optional
80+
7281
:param metric: (Deprecated) The target field to aggregate over when using the sum or max
7382
aggregations. ``metrics`` field should be used instead. **Deprecated**.
7483
:type metric: str, optional
@@ -88,6 +97,8 @@ def __init__(
8897
kwargs["distinct_fields"] = distinct_fields
8998
if group_by_fields is not unset:
9099
kwargs["group_by_fields"] = group_by_fields
100+
if has_optional_group_by_fields is not unset:
101+
kwargs["has_optional_group_by_fields"] = has_optional_group_by_fields
91102
if metric is not unset:
92103
kwargs["metric"] = metric
93104
if metrics is not unset:

0 commit comments

Comments
 (0)