Skip to content

Commit b49e731

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 979319f1 of spec repo
1 parent 5f88599 commit b49e731

27 files changed

+2117
-16
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": "2025-05-14 15:44:18.459381",
8-
"spec_repo_commit": "64f5e7ee"
7+
"regenerated": "2025-05-15 07:29:15.279993",
8+
"spec_repo_commit": "979319f1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-14 15:44:18.474808",
13-
"spec_repo_commit": "64f5e7ee"
12+
"regenerated": "2025-05-15 07:29:15.296439",
13+
"spec_repo_commit": "979319f1"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 196 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,21 @@ components:
689689
required: true
690690
schema:
691691
type: string
692+
ResourceFilterAccountID:
693+
description: Filter resource filters by cloud provider account ID. This parameter
694+
is only valid when provider is specified.
695+
in: query
696+
name: account_id
697+
required: false
698+
schema:
699+
type: string
700+
ResourceFilterProvider:
701+
description: Filter resource filters by cloud provider (e.g. aws, gcp, azure).
702+
in: query
703+
name: cloud_provider
704+
required: false
705+
schema:
706+
type: string
692707
ResourceID:
693708
description: 'Identifier, formatted as `type:id`. Supported types: `connection`,
694709
`dashboard`, `integration-account`, `integration-service`, `integration-webhook`,
@@ -807,6 +822,13 @@ components:
807822
required: true
808823
schema:
809824
type: string
825+
SkipCache:
826+
description: Skip cache for resource filters.
827+
in: query
828+
name: skip_cache
829+
required: false
830+
schema:
831+
type: boolean
810832
SpansMetricIDParameter:
811833
description: The name of the span-based metric.
812834
in: path
@@ -15715,6 +15737,25 @@ components:
1571515737
$ref: '#/components/schemas/GetInterfacesData'
1571615738
type: array
1571715739
type: object
15740+
GetResourceEvaluationFiltersResponse:
15741+
description: The definition of `GetResourceEvaluationFiltersResponse` object.
15742+
properties:
15743+
data:
15744+
$ref: '#/components/schemas/GetResourceEvaluationFiltersResponseData'
15745+
required:
15746+
- data
15747+
type: object
15748+
GetResourceEvaluationFiltersResponseData:
15749+
description: The definition of `GetResourceFilterResponseData` object.
15750+
properties:
15751+
attributes:
15752+
$ref: '#/components/schemas/ResourceFilterAttributes'
15753+
id:
15754+
description: The `data` `id`.
15755+
type: string
15756+
type:
15757+
$ref: '#/components/schemas/ResourceFilterRequestType'
15758+
type: object
1571815759
GetRuleVersionHistoryData:
1571915760
description: Data for the rule version history.
1572015761
properties:
@@ -29270,6 +29311,46 @@ components:
2927029311
required:
2927129312
- data
2927229313
type: object
29314+
ResourceFilterAttributes:
29315+
description: Attributes of a resource filter.
29316+
properties:
29317+
cloud_provider:
29318+
additionalProperties:
29319+
additionalProperties:
29320+
items:
29321+
description: Tag filter in format "key:value"
29322+
example: environment:production
29323+
type: string
29324+
type: array
29325+
type: object
29326+
description: A map of cloud provider names (e.g., "aws", "gcp", "azure")
29327+
to a map of account/resource IDs and their associated tag filters.
29328+
example:
29329+
aws:
29330+
'123456789':
29331+
- environment:production
29332+
- team:devops
29333+
azure:
29334+
sub-001:
29335+
- app:frontend
29336+
gcp:
29337+
project-abc:
29338+
- region:us-central1
29339+
type: object
29340+
uuid:
29341+
description: The UUID of the resource filter.
29342+
type: string
29343+
required:
29344+
- cloud_provider
29345+
type: object
29346+
ResourceFilterRequestType:
29347+
description: Constant string to identify the resource type.
29348+
enum:
29349+
- csm_resource_filter
29350+
example: csm_resource_filter
29351+
type: string
29352+
x-enum-varnames:
29353+
- CSM_RESOURCE_FILTER
2927329354
ResponseMetaAttributes:
2927429355
description: Object describing meta attributes of response.
2927529356
properties:
@@ -32253,9 +32334,11 @@ components:
3225332334
example: true
3225432335
type: boolean
3225532336
SecurityMonitoringRuleKeepAlive:
32256-
description: "Once a signal is generated, the signal will remain \u201Copen\u201D
32257-
if a case is matched at least once within\nthis keep alive window. For third
32258-
party detection method, this field is not used."
32337+
description: 'Once a signal is generated, the signal will remain "open" if a
32338+
case is matched at least once within
32339+
32340+
this keep alive window. For third party detection method, this field is not
32341+
used.'
3225932342
enum:
3226032343
- 0
3226132344
- 60
@@ -32285,9 +32368,10 @@ components:
3228532368
- TWELVE_HOURS
3228632369
- ONE_DAY
3228732370
SecurityMonitoringRuleMaxSignalDuration:
32288-
description: "A signal will \u201Cclose\u201D regardless of the query being
32289-
matched once the time exceeds the maximum duration.\nThis time is calculated
32290-
from the first seen timestamp."
32371+
description: 'A signal will "close" regardless of the query being matched once
32372+
the time exceeds the maximum duration.
32373+
32374+
This time is calculated from the first seen timestamp.'
3229132375
enum:
3229232376
- 0
3229332377
- 60
@@ -38688,6 +38772,44 @@ components:
3868838772
id:
3868938773
$ref: '#/components/schemas/ApiID'
3869038774
type: object
38775+
UpdateResourceEvaluationFiltersRequest:
38776+
description: Request object to update a resource filter.
38777+
properties:
38778+
data:
38779+
$ref: '#/components/schemas/UpdateResourceEvaluationFiltersRequestData'
38780+
required:
38781+
- data
38782+
type: object
38783+
UpdateResourceEvaluationFiltersRequestData:
38784+
description: The definition of `UpdateResourceFilterRequestData` object.
38785+
properties:
38786+
attributes:
38787+
$ref: '#/components/schemas/ResourceFilterAttributes'
38788+
id:
38789+
description: The `UpdateResourceEvaluationFiltersRequestData` `id`.
38790+
type: string
38791+
type:
38792+
$ref: '#/components/schemas/ResourceFilterRequestType'
38793+
type: object
38794+
UpdateResourceEvaluationFiltersResponse:
38795+
description: The definition of `UpdateResourceEvaluationFiltersResponse` object.
38796+
properties:
38797+
data:
38798+
$ref: '#/components/schemas/UpdateResourceEvaluationFiltersResponseData'
38799+
required:
38800+
- data
38801+
type: object
38802+
UpdateResourceEvaluationFiltersResponseData:
38803+
description: The definition of `UpdateResourceFilterResponseData` object.
38804+
properties:
38805+
attributes:
38806+
$ref: '#/components/schemas/ResourceFilterAttributes'
38807+
id:
38808+
description: The `data` `id`.
38809+
type: string
38810+
type:
38811+
$ref: '#/components/schemas/ResourceFilterRequestType'
38812+
type: object
3869138813
UpdateRuleRequest:
3869238814
description: Request to update a scorecard rule.
3869338815
properties:
@@ -43624,6 +43746,74 @@ paths:
4362443746
permissions:
4362543747
- security_monitoring_rules_read
4362643748
- security_monitoring_rules_write
43749+
/api/v2/cloud_security_management/resource_filters:
43750+
get:
43751+
description: List resource filters.
43752+
operationId: GetResourceEvaluationFilters
43753+
parameters:
43754+
- $ref: '#/components/parameters/ResourceFilterProvider'
43755+
- $ref: '#/components/parameters/ResourceFilterAccountID'
43756+
- $ref: '#/components/parameters/SkipCache'
43757+
responses:
43758+
'200':
43759+
content:
43760+
application/json:
43761+
schema:
43762+
$ref: '#/components/schemas/GetResourceEvaluationFiltersResponse'
43763+
description: OK
43764+
'400':
43765+
$ref: '#/components/responses/BadRequestResponse'
43766+
'403':
43767+
$ref: '#/components/responses/NotAuthorizedResponse'
43768+
'429':
43769+
$ref: '#/components/responses/TooManyRequestsResponse'
43770+
security:
43771+
- apiKeyAuth: []
43772+
appKeyAuth: []
43773+
- AuthZ:
43774+
- security_monitoring_filters_read
43775+
summary: List resource filters
43776+
tags:
43777+
- Security Monitoring
43778+
x-permission:
43779+
operator: OR
43780+
permissions:
43781+
- security_monitoring_filters_read
43782+
put:
43783+
description: Update resource filters.
43784+
operationId: UpdateResourceEvaluationFilters
43785+
requestBody:
43786+
content:
43787+
application/json:
43788+
schema:
43789+
$ref: '#/components/schemas/UpdateResourceEvaluationFiltersRequest'
43790+
required: true
43791+
responses:
43792+
'201':
43793+
content:
43794+
application/json:
43795+
schema:
43796+
$ref: '#/components/schemas/UpdateResourceEvaluationFiltersResponse'
43797+
description: OK
43798+
'400':
43799+
$ref: '#/components/responses/BadRequestResponse'
43800+
'403':
43801+
$ref: '#/components/responses/NotAuthorizedResponse'
43802+
'429':
43803+
$ref: '#/components/responses/TooManyRequestsResponse'
43804+
security:
43805+
- apiKeyAuth: []
43806+
appKeyAuth: []
43807+
- AuthZ:
43808+
- security_monitoring_filters_write
43809+
summary: Update resource filters
43810+
tags:
43811+
- Security Monitoring
43812+
x-codegen-request-body-name: body
43813+
x-permission:
43814+
operator: OR
43815+
permissions:
43816+
- security_monitoring_filters_write
4362743817
/api/v2/container_images:
4362843818
get:
4362943819
description: Get all Container Images for your organization.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// List resource filters 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.api.SecurityMonitoringApi.GetResourceEvaluationFiltersOptionalParameters;
7+
import com.datadog.api.client.v2.model.GetResourceEvaluationFiltersResponse;
8+
9+
public class Example {
10+
public static void main(String[] args) {
11+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
12+
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
13+
14+
try {
15+
GetResourceEvaluationFiltersResponse result =
16+
apiInstance.getResourceEvaluationFilters(
17+
new GetResourceEvaluationFiltersOptionalParameters()
18+
.cloudProvider("aws")
19+
.accountId("123456789"));
20+
System.out.println(result);
21+
} catch (ApiException e) {
22+
System.err.println(
23+
"Exception when calling SecurityMonitoringApi#getResourceEvaluationFilters");
24+
System.err.println("Status code: " + e.getCode());
25+
System.err.println("Reason: " + e.getResponseBody());
26+
System.err.println("Response headers: " + e.getResponseHeaders());
27+
e.printStackTrace();
28+
}
29+
}
30+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Update resource filters 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.ResourceFilterAttributes;
7+
import com.datadog.api.client.v2.model.ResourceFilterRequestType;
8+
import com.datadog.api.client.v2.model.UpdateResourceEvaluationFiltersRequest;
9+
import com.datadog.api.client.v2.model.UpdateResourceEvaluationFiltersRequestData;
10+
import com.datadog.api.client.v2.model.UpdateResourceEvaluationFiltersResponse;
11+
import java.util.Arrays;
12+
import java.util.Collections;
13+
import java.util.Map;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
19+
20+
UpdateResourceEvaluationFiltersRequest body =
21+
new UpdateResourceEvaluationFiltersRequest()
22+
.data(
23+
new UpdateResourceEvaluationFiltersRequestData()
24+
.attributes(
25+
new ResourceFilterAttributes()
26+
.cloudProvider(
27+
Map.ofEntries(
28+
Map.entry(
29+
"aws",
30+
Map.ofEntries(
31+
Map.entry(
32+
"123456789",
33+
Arrays.asList(
34+
"environment:production", "team:devops")))),
35+
Map.entry(
36+
"azure",
37+
Map.ofEntries(
38+
Map.entry(
39+
"sub-001",
40+
Collections.singletonList("app:frontend")))),
41+
Map.entry(
42+
"gcp",
43+
Map.ofEntries(
44+
Map.entry(
45+
"project-abc",
46+
Collections.singletonList(
47+
"region:us-central1")))))))
48+
.type(ResourceFilterRequestType.CSM_RESOURCE_FILTER));
49+
50+
try {
51+
UpdateResourceEvaluationFiltersResponse result =
52+
apiInstance.updateResourceEvaluationFilters(body);
53+
System.out.println(result);
54+
} catch (ApiException e) {
55+
System.err.println(
56+
"Exception when calling SecurityMonitoringApi#updateResourceEvaluationFilters");
57+
System.err.println("Status code: " + e.getCode());
58+
System.err.println("Reason: " + e.getResponseBody());
59+
System.err.println("Response headers: " + e.getResponseHeaders());
60+
e.printStackTrace();
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)