Skip to content

Commit 6ef6905

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4ec899ff of spec repo
1 parent f17e4a7 commit 6ef6905

File tree

100 files changed

+1613
-100
lines changed

Some content is hidden

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

100 files changed

+1613
-100
lines changed

.apigentools-info

+4-4
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": "2025-02-10 19:09:34.449930",
8-
"spec_repo_commit": "824f78a1"
7+
"regenerated": "2025-02-11 15:13:48.062439",
8+
"spec_repo_commit": "4ec899ff"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-10 19:09:34.468088",
13-
"spec_repo_commit": "824f78a1"
12+
"regenerated": "2025-02-11 15:13:48.078566",
13+
"spec_repo_commit": "4ec899ff"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+111
Original file line numberDiff line numberDiff line change
@@ -12683,6 +12683,30 @@ components:
1268312683
$ref: '#/components/schemas/GetInterfacesData'
1268412684
type: array
1268512685
type: object
12686+
GetRuleVersionHistoryData:
12687+
description: Data for the rule version history.
12688+
properties:
12689+
attributes:
12690+
$ref: '#/components/schemas/RuleVersionHistory'
12691+
id:
12692+
description: ID of the rule.
12693+
type: string
12694+
type:
12695+
$ref: '#/components/schemas/GetRuleVersionHistoryDataType'
12696+
type: object
12697+
GetRuleVersionHistoryDataType:
12698+
description: Type of data.
12699+
enum:
12700+
- GetRuleVersionHistoryResponse
12701+
type: string
12702+
x-enum-varnames:
12703+
- GETRULEVERSIONHISTORYRESPONSE
12704+
GetRuleVersionHistoryResponse:
12705+
description: Response for getting the rule version history.
12706+
properties:
12707+
data:
12708+
$ref: '#/components/schemas/GetRuleVersionHistoryData'
12709+
type: object
1268612710
GetSBOMResponse:
1268712711
description: The expected response schema when getting an SBOM.
1268812712
properties:
@@ -23245,6 +23269,57 @@ components:
2324523269
example: John Doe
2324623270
type: string
2324723271
type: object
23272+
RuleVersionHistory:
23273+
description: Response object containing the version history of a rule.
23274+
properties:
23275+
count:
23276+
description: The number of rule versions.
23277+
format: int32
23278+
maximum: 2147483647
23279+
type: integer
23280+
data:
23281+
additionalProperties:
23282+
$ref: '#/components/schemas/RuleVersions'
23283+
description: A rule version with a list of updates.
23284+
description: The `RuleVersionHistory` `data`.
23285+
type: object
23286+
type: object
23287+
RuleVersionUpdate:
23288+
description: A change in a rule version.
23289+
properties:
23290+
change:
23291+
description: The new value of the field.
23292+
example: cloud_provider:aws
23293+
type: string
23294+
field:
23295+
description: The field that was changed.
23296+
example: Tags
23297+
type: string
23298+
type:
23299+
$ref: '#/components/schemas/RuleVersionUpdateType'
23300+
type: object
23301+
RuleVersionUpdateType:
23302+
description: The type of change.
23303+
enum:
23304+
- create
23305+
- update
23306+
- delete
23307+
type: string
23308+
x-enum-varnames:
23309+
- CREATE
23310+
- UPDATE
23311+
- DELETE
23312+
RuleVersions:
23313+
description: A rule version with a list of updates.
23314+
properties:
23315+
changes:
23316+
description: A list of changes.
23317+
items:
23318+
$ref: '#/components/schemas/RuleVersionUpdate'
23319+
type: array
23320+
rule:
23321+
$ref: '#/components/schemas/SecurityMonitoringRuleResponse'
23322+
type: object
2324823323
RumMetricCompute:
2324923324
description: The compute rule to compute the rum-based metric.
2325023325
properties:
@@ -45631,6 +45706,42 @@ paths:
4563145706
operator: OR
4563245707
permissions:
4563345708
- security_monitoring_rules_write
45709+
/api/v2/security_monitoring/rules/{rule_id}/version_history:
45710+
get:
45711+
description: Get a rule's version history.
45712+
operationId: GetRuleVersionHistory
45713+
parameters:
45714+
- $ref: '#/components/parameters/SecurityMonitoringRuleID'
45715+
- $ref: '#/components/parameters/PageSize'
45716+
- $ref: '#/components/parameters/PageNumber'
45717+
responses:
45718+
'200':
45719+
content:
45720+
application/json:
45721+
schema:
45722+
$ref: '#/components/schemas/GetRuleVersionHistoryResponse'
45723+
description: OK
45724+
'400':
45725+
$ref: '#/components/responses/BadRequestResponse'
45726+
'403':
45727+
$ref: '#/components/responses/NotAuthorizedResponse'
45728+
'404':
45729+
$ref: '#/components/responses/NotFoundResponse'
45730+
'429':
45731+
$ref: '#/components/responses/TooManyRequestsResponse'
45732+
security:
45733+
- apiKeyAuth: []
45734+
appKeyAuth: []
45735+
- AuthZ:
45736+
- security_monitoring_rules_read
45737+
summary: Get a rule's version history
45738+
tags:
45739+
- Security Monitoring
45740+
x-permission:
45741+
operator: OR
45742+
permissions:
45743+
- security_monitoring_rules_read
45744+
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.'
4563445745
/api/v2/security_monitoring/signals:
4563545746
get:
4563645747
description: 'The list endpoint returns security signals that match a search
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Get a rule's version history 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.SecurityMonitoringApi;
6+
import com.datadog.api.client.v2.model.GetRuleVersionHistoryResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getRuleVersionHistory", true);
12+
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
13+
14+
try {
15+
GetRuleVersionHistoryResponse result = apiInstance.getRuleVersionHistory("rule_id");
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling SecurityMonitoringApi#getRuleVersionHistory");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Get rule version history 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.SecurityMonitoringApi;
6+
import com.datadog.api.client.v2.model.GetRuleVersionHistoryResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getRuleVersionHistory", true);
12+
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
13+
14+
// there is a valid "security_rule" in the system
15+
String SECURITY_RULE_ID = System.getenv("SECURITY_RULE_ID");
16+
17+
try {
18+
GetRuleVersionHistoryResponse result = apiInstance.getRuleVersionHistory(SECURITY_RULE_ID);
19+
System.out.println(result);
20+
} catch (ApiException e) {
21+
System.err.println("Exception when calling SecurityMonitoringApi#getRuleVersionHistory");
22+
System.err.println("Status code: " + e.getCode());
23+
System.err.println("Reason: " + e.getResponseBody());
24+
System.err.println("Response headers: " + e.getResponseHeaders());
25+
e.printStackTrace();
26+
}
27+
}
28+
}

src/main/java/com/datadog/api/client/ApiClient.java

+1
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ public class ApiClient {
421421
put("v2.deleteHistoricalJob", false);
422422
put("v2.getFinding", false);
423423
put("v2.getHistoricalJob", false);
424+
put("v2.getRuleVersionHistory", false);
424425
put("v2.listFindings", false);
425426
put("v2.listHistoricalJobs", false);
426427
put("v2.muteFindings", false);

0 commit comments

Comments
 (0)