Skip to content

Commit 8fd08da

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Deprecate metric field of Security Monitoring Rules (#1534)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4583708 commit 8fd08da

File tree

42 files changed

+122
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+122
-114
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.4",
7-
"regenerated": "2022-10-14 14:37:49.709179",
8-
"spec_repo_commit": "7eb6ca7a"
7+
"regenerated": "2022-10-20 09:07:29.545844",
8+
"spec_repo_commit": "148c906a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2022-10-14 14:37:49.725086",
13-
"spec_repo_commit": "7eb6ca7a"
12+
"regenerated": "2022-10-20 09:07:29.557796",
13+
"spec_repo_commit": "148c906a"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8174,8 +8174,7 @@ components:
81748174
maximum: 9
81758175
type: integer
81768176
metrics:
8177-
description: Group of target fields to aggregate over when using the new
8178-
value aggregations.
8177+
description: Group of target fields to aggregate over.
81798178
items:
81808179
description: Field.
81818180
type: string
@@ -8278,8 +8277,7 @@ components:
82788277
example: d3f-ru1-e1d
82798278
type: string
82808279
metrics:
8281-
description: Group of target fields to aggregate over when using the new
8282-
value aggregations.
8280+
description: Group of target fields to aggregate over.
82838281
items:
82848282
description: Field.
82858283
type: string
@@ -8533,13 +8531,17 @@ components:
85338531
type: string
85348532
type: array
85358533
metric:
8536-
description: 'The target field to aggregate over when using the sum or max
8534+
deprecated: true
8535+
description: '(Deprecated) The target field to aggregate over when using
8536+
the sum or max
85378537

8538-
aggregations.'
8538+
aggregations. `metrics` field should be used instead.'
85398539
type: string
85408540
metrics:
8541-
description: Group of target fields to aggregate over when using the new
8542-
value aggregations.
8541+
description: Group of target fields to aggregate over when using the sum,
8542+
max, geo data, or new value aggregations. The sum, max, and geo data aggregations
8543+
only accept one value in this list, whereas the new value aggregation
8544+
accepts up to five values.
85438545
items:
85448546
description: Field.
85458547
type: string

src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public SecurityMonitoringSignalRuleQuery addMetricsItem(String metricsItem) {
145145
}
146146

147147
/**
148-
* Group of target fields to aggregate over when using the new value aggregations.
148+
* Group of target fields to aggregate over.
149149
*
150150
* @return metrics
151151
*/

src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringSignalRuleResponseQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public SecurityMonitoringSignalRuleResponseQuery addMetricsItem(String metricsIt
163163
}
164164

165165
/**
166-
* Group of target fields to aggregate over when using the new value aggregations.
166+
* Group of target fields to aggregate over.
167167
*
168168
* @return metrics
169169
*/

src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringStandardRuleQuery.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,21 @@ public SecurityMonitoringStandardRuleQuery metric(String metric) {
148148
}
149149

150150
/**
151-
* The target field to aggregate over when using the sum or max aggregations.
151+
* (Deprecated) The target field to aggregate over when using the sum or max aggregations. <code>
152+
* metrics</code> field should be used instead.
152153
*
153154
* @return metric
155+
* @deprecated
154156
*/
157+
@Deprecated
155158
@jakarta.annotation.Nullable
156159
@JsonProperty(JSON_PROPERTY_METRIC)
157160
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
158161
public String getMetric() {
159162
return metric;
160163
}
161164

165+
@Deprecated
162166
public void setMetric(String metric) {
163167
this.metric = metric;
164168
}
@@ -177,7 +181,9 @@ public SecurityMonitoringStandardRuleQuery addMetricsItem(String metricsItem) {
177181
}
178182

179183
/**
180-
* Group of target fields to aggregate over when using the new value aggregations.
184+
* Group of target fields to aggregate over when using the sum, max, geo data, or new value
185+
* aggregations. The sum, max, and geo data aggregations only accept one value in this list,
186+
* whereas the new value aggregation accepts up to five values.
181187
*
182188
* @return metrics
183189
*/

src/test/resources/cassettes/features/v1/Get_all_hosts_with_metadata_deserializes_successfully.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"timeToLive": {
2929
"unlimited": true
3030
},
31-
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31e"
31+
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31d"
3232
}
3333
]

src/test/resources/cassettes/features/v1/Get_all_hosts_with_metadata_for_your_organization_returns_OK_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"timeToLive": {
2929
"unlimited": true
3030
},
31-
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31d"
31+
"id": "d5bade64-6ebb-4f4d-903d-8069b52bb31e"
3232
}
3333
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-09-27T13:06:48.381Z
1+
2022-10-19T13:36:33.262Z

src/test/resources/cassettes/features/v2/Create_a_detection_rule_returns_Bad_Request_response.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"cases\":[{\"status\":\"info\"}],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Create_a_detection_rule_returns_Bad_Request_response-1664284008\",\"options\":{},\"queries\":[{\"query\":\"\"}],\"tags\":[]}"
6+
"json": "{\"cases\":[{\"status\":\"info\"}],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Create_a_detection_rule_returns_Bad_Request_response-1666186593\",\"options\":{},\"queries\":[{\"query\":\"\"}],\"tags\":[]}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -27,6 +27,6 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "710c4def-7bae-181d-3c01-f89a98f7f31e"
30+
"id": "8515ec7a-4796-004b-97e5-6fe68002292f"
3131
}
3232
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-09-27T13:06:48.898Z
1+
2022-10-19T13:36:33.666Z

0 commit comments

Comments
 (0)