Skip to content

Commit 8375ea1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 9dd2b6ae of spec repo (#2444)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e12c40b commit 8375ea1

File tree

10 files changed

+82
-86
lines changed

10 files changed

+82
-86
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-03-06 16:19:13.960471",
8-
"spec_repo_commit": "1a11ef53"
7+
"regenerated": "2025-03-06 17:12:13.173680",
8+
"spec_repo_commit": "9dd2b6ae"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-03-06 16:19:13.975295",
13-
"spec_repo_commit": "1a11ef53"
12+
"regenerated": "2025-03-06 17:12:13.188797",
13+
"spec_repo_commit": "9dd2b6ae"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4122,6 +4122,8 @@ components:
41224122
of EC2 instances, lambda functions, AMI, ECR, RDS and S3 buckets.
41234123
example: arn:aws:ec2:us-east-1:727000456123:instance/i-0eabb50529b67a1ba
41244124
type: string
4125+
required:
4126+
- arn
41254127
type: object
41264128
AwsOnDemandCreateData:
41274129
description: Object for a single AWS on demand task.
@@ -4219,6 +4221,11 @@ components:
42194221
description: Indicates if scanning for vulnerabilities in hosts is enabled.
42204222
example: true
42214223
type: boolean
4224+
required:
4225+
- lambda
4226+
- sensitive_data
4227+
- vuln_containers_os
4228+
- vuln_host_os
42224229
type: object
42234230
AwsScanOptionsCreateData:
42244231
description: Object for the scan options of a single AWS account.
@@ -33982,7 +33989,9 @@ paths:
3398233989
permissions:
3398333990
- security_monitoring_findings_read
3398433991
post:
33985-
description: Trigger the scan of an AWS resource with a high priority.
33992+
description: Trigger the scan of an AWS resource with a high priority. Agentless
33993+
scanning must be activated for the AWS account containing the resource to
33994+
scan.
3398633995
operationId: CreateAwsOnDemandTask
3398733996
requestBody:
3398833997
content:
@@ -34015,7 +34024,7 @@ paths:
3401534024
/api/v2/agentless_scanning/ondemand/aws/{task_id}:
3401634025
get:
3401734026
description: Fetch the data of a specific on demand task.
34018-
operationId: RetrieveAwsOnDemandTask
34027+
operationId: GetAwsOnDemandTask
3401934028
parameters:
3402034029
- $ref: '#/components/parameters/OnDemandTaskId'
3402134030
responses:
@@ -53068,8 +53077,9 @@ tags:
5306853077
name: Action Connection
5306953078
- description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin
5307053079
your hosts, running containers, and serverless functions\u2014all without\nrequiring
53071-
teams to install Agents on every host or where Agents cannot be installed.\nGo
53072-
to https://www.datadoghq.com/blog/agentless-scanning/ to learn more."
53080+
teams to install Agents on every host or where Agents cannot be installed.\nAgentless
53081+
offers also Sensitive Data Scanning capabilities on your storage.\nGo to https://www.datadoghq.com/blog/agentless-scanning/
53082+
to learn more."
5307353083
name: Agentless Scanning
5307453084
- description: Datadog App Builder provides a low-code solution to rapidly develop
5307553085
and integrate secure, customized applications into your monitoring stack that

examples/v2/agentless-scanning/RetrieveAwsOnDemandTask.py renamed to examples/v2/agentless-scanning/GetAwsOnDemandTask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
configuration = Configuration()
99
with ApiClient(configuration) as api_client:
1010
api_instance = AgentlessScanningApi(api_client)
11-
response = api_instance.retrieve_aws_on_demand_task(
11+
response = api_instance.get_aws_on_demand_task(
1212
task_id="63d6b4f5-e5d0-4d90-824a-9580f05f026a",
1313
)
1414

src/datadog_api_client/v2/api/agentless_scanning_api.py

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class AgentlessScanningApi:
2121
Datadog Agentless Scanning provides visibility into risks and vulnerabilities
2222
within your hosts, running containers, and serverless functions—all without
2323
requiring teams to install Agents on every host or where Agents cannot be installed.
24+
Agentless offers also Sensitive Data Scanning capabilities on your storage.
2425
Go to https://www.datadoghq.com/blog/agentless-scanning/ to learn more.
2526
"""
2627

@@ -92,28 +93,35 @@ def __init__(self, api_client=None):
9293
api_client=api_client,
9394
)
9495

95-
self._list_aws_on_demand_tasks_endpoint = _Endpoint(
96+
self._get_aws_on_demand_task_endpoint = _Endpoint(
9697
settings={
97-
"response_type": (AwsOnDemandListResponse,),
98+
"response_type": (AwsOnDemandResponse,),
9899
"auth": ["apiKeyAuth", "appKeyAuth"],
99-
"endpoint_path": "/api/v2/agentless_scanning/ondemand/aws",
100-
"operation_id": "list_aws_on_demand_tasks",
100+
"endpoint_path": "/api/v2/agentless_scanning/ondemand/aws/{task_id}",
101+
"operation_id": "get_aws_on_demand_task",
101102
"http_method": "GET",
102103
"version": "v2",
103104
},
104-
params_map={},
105+
params_map={
106+
"task_id": {
107+
"required": True,
108+
"openapi_types": (str,),
109+
"attribute": "task_id",
110+
"location": "path",
111+
},
112+
},
105113
headers_map={
106114
"accept": ["application/json"],
107115
},
108116
api_client=api_client,
109117
)
110118

111-
self._list_aws_scan_options_endpoint = _Endpoint(
119+
self._list_aws_on_demand_tasks_endpoint = _Endpoint(
112120
settings={
113-
"response_type": (AwsScanOptionsListResponse,),
121+
"response_type": (AwsOnDemandListResponse,),
114122
"auth": ["apiKeyAuth", "appKeyAuth"],
115-
"endpoint_path": "/api/v2/agentless_scanning/accounts/aws",
116-
"operation_id": "list_aws_scan_options",
123+
"endpoint_path": "/api/v2/agentless_scanning/ondemand/aws",
124+
"operation_id": "list_aws_on_demand_tasks",
117125
"http_method": "GET",
118126
"version": "v2",
119127
},
@@ -124,23 +132,16 @@ def __init__(self, api_client=None):
124132
api_client=api_client,
125133
)
126134

127-
self._retrieve_aws_on_demand_task_endpoint = _Endpoint(
135+
self._list_aws_scan_options_endpoint = _Endpoint(
128136
settings={
129-
"response_type": (AwsOnDemandResponse,),
137+
"response_type": (AwsScanOptionsListResponse,),
130138
"auth": ["apiKeyAuth", "appKeyAuth"],
131-
"endpoint_path": "/api/v2/agentless_scanning/ondemand/aws/{task_id}",
132-
"operation_id": "retrieve_aws_on_demand_task",
139+
"endpoint_path": "/api/v2/agentless_scanning/accounts/aws",
140+
"operation_id": "list_aws_scan_options",
133141
"http_method": "GET",
134142
"version": "v2",
135143
},
136-
params_map={
137-
"task_id": {
138-
"required": True,
139-
"openapi_types": (str,),
140-
"attribute": "task_id",
141-
"location": "path",
142-
},
143-
},
144+
params_map={},
144145
headers_map={
145146
"accept": ["application/json"],
146147
},
@@ -179,7 +180,7 @@ def create_aws_on_demand_task(
179180
) -> AwsOnDemandResponse:
180181
"""Post an AWS on demand task.
181182
182-
Trigger the scan of an AWS resource with a high priority.
183+
Trigger the scan of an AWS resource with a high priority. Agentless scanning must be activated for the AWS account containing the resource to scan.
183184
184185
:param body: The definition of the on demand task.
185186
:type body: AwsOnDemandCreateRequest
@@ -224,6 +225,23 @@ def delete_aws_scan_options(
224225

225226
return self._delete_aws_scan_options_endpoint.call_with_http_info(**kwargs)
226227

228+
def get_aws_on_demand_task(
229+
self,
230+
task_id: str,
231+
) -> AwsOnDemandResponse:
232+
"""Get AWS On Demand task by id.
233+
234+
Fetch the data of a specific on demand task.
235+
236+
:param task_id: The UUID of the task.
237+
:type task_id: str
238+
:rtype: AwsOnDemandResponse
239+
"""
240+
kwargs: Dict[str, Any] = {}
241+
kwargs["task_id"] = task_id
242+
243+
return self._get_aws_on_demand_task_endpoint.call_with_http_info(**kwargs)
244+
227245
def list_aws_on_demand_tasks(
228246
self,
229247
) -> AwsOnDemandListResponse:
@@ -248,23 +266,6 @@ def list_aws_scan_options(
248266
kwargs: Dict[str, Any] = {}
249267
return self._list_aws_scan_options_endpoint.call_with_http_info(**kwargs)
250268

251-
def retrieve_aws_on_demand_task(
252-
self,
253-
task_id: str,
254-
) -> AwsOnDemandResponse:
255-
"""Get AWS On Demand task by id.
256-
257-
Fetch the data of a specific on demand task.
258-
259-
:param task_id: The UUID of the task.
260-
:type task_id: str
261-
:rtype: AwsOnDemandResponse
262-
"""
263-
kwargs: Dict[str, Any] = {}
264-
kwargs["task_id"] = task_id
265-
266-
return self._retrieve_aws_on_demand_task_endpoint.call_with_http_info(**kwargs)
267-
268269
def update_aws_scan_options(
269270
self,
270271
account_id: str,

src/datadog_api_client/v2/model/aws_on_demand_create_attributes.py

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

6-
from typing import Union
76

87
from datadog_api_client.model_utils import (
98
ModelNormal,
109
cached_property,
11-
unset,
12-
UnsetType,
1310
)
1411

1512

@@ -24,13 +21,13 @@ def openapi_types(_):
2421
"arn": "arn",
2522
}
2623

27-
def __init__(self_, arn: Union[str, UnsetType] = unset, **kwargs):
24+
def __init__(self_, arn: str, **kwargs):
2825
"""
2926
Attributes for the AWS on demand task.
3027
3128
:param arn: The arn of the resource to scan. Agentless supports the scan of EC2 instances, lambda functions, AMI, ECR, RDS and S3 buckets.
32-
:type arn: str, optional
29+
:type arn: str
3330
"""
34-
if arn is not unset:
35-
kwargs["arn"] = arn
3631
super().__init__(kwargs)
32+
33+
self_.arn = arn

src/datadog_api_client/v2/model/aws_scan_options_create_attributes.py

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

6-
from typing import Union
76

87
from datadog_api_client.model_utils import (
98
ModelNormal,
109
cached_property,
11-
unset,
12-
UnsetType,
1310
)
1411

1512

@@ -30,35 +27,25 @@ def openapi_types(_):
3027
"vuln_host_os": "vuln_host_os",
3128
}
3229

33-
def __init__(
34-
self_,
35-
_lambda: Union[bool, UnsetType] = unset,
36-
sensitive_data: Union[bool, UnsetType] = unset,
37-
vuln_containers_os: Union[bool, UnsetType] = unset,
38-
vuln_host_os: Union[bool, UnsetType] = unset,
39-
**kwargs,
40-
):
30+
def __init__(self_, _lambda: bool, sensitive_data: bool, vuln_containers_os: bool, vuln_host_os: bool, **kwargs):
4131
"""
4232
Attributes for the AWS scan options to create.
4333
4434
:param _lambda: Indicates if scanning of Lambda functions is enabled.
45-
:type _lambda: bool, optional
35+
:type _lambda: bool
4636
4737
:param sensitive_data: Indicates if scanning for sensitive data is enabled.
48-
:type sensitive_data: bool, optional
38+
:type sensitive_data: bool
4939
5040
:param vuln_containers_os: Indicates if scanning for vulnerabilities in containers is enabled.
51-
:type vuln_containers_os: bool, optional
41+
:type vuln_containers_os: bool
5242
5343
:param vuln_host_os: Indicates if scanning for vulnerabilities in hosts is enabled.
54-
:type vuln_host_os: bool, optional
44+
:type vuln_host_os: bool
5545
"""
56-
if _lambda is not unset:
57-
kwargs["_lambda"] = _lambda
58-
if sensitive_data is not unset:
59-
kwargs["sensitive_data"] = sensitive_data
60-
if vuln_containers_os is not unset:
61-
kwargs["vuln_containers_os"] = vuln_containers_os
62-
if vuln_host_os is not unset:
63-
kwargs["vuln_host_os"] = vuln_host_os
6446
super().__init__(kwargs)
47+
48+
self_._lambda = _lambda
49+
self_.sensitive_data = sensitive_data
50+
self_.vuln_containers_os = vuln_containers_os
51+
self_.vuln_host_os = vuln_host_os
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-03-01T20:02:10.630Z
1+
2025-03-06T11:57:47.413Z

tests/v2/cassettes/test_scenarios/test_post_aws_scan_options_returns_conflict_response.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"lambda":false,"vuln_containers_os":true,"vuln_host_os":true},"id":"000000000002","type":"aws_scan_options"}}'
3+
body: '{"data":{"attributes":{"lambda":false,"sensitive_data":false,"vuln_containers_os":true,"vuln_host_os":true},"id":"000000000002","type":"aws_scan_options"}}'
44
headers:
55
accept:
66
- application/json

tests/v2/features/agentless_scanning.feature

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Feature: Agentless Scanning
33
Datadog Agentless Scanning provides visibility into risks and
44
vulnerabilities within your hosts, running containers, and serverless
55
functions—all without requiring teams to install Agents on every host or
6-
where Agents cannot be installed. Go to
6+
where Agents cannot be installed. Agentless offers also Sensitive Data
7+
Scanning capabilities on your storage. Go to
78
https://www.datadoghq.com/blog/agentless-scanning/ to learn more.
89

910
Background:
@@ -34,21 +35,21 @@ Feature: Agentless Scanning
3435

3536
@team:DataDog/k9-agentless
3637
Scenario: Get AWS On Demand task by id returns "Bad Request" response
37-
Given new "RetrieveAwsOnDemandTask" request
38+
Given new "GetAwsOnDemandTask" request
3839
And request contains "task_id" parameter with value "invalid-uuid"
3940
When the request is sent
4041
Then the response status is 400 Bad Request
4142

4243
@team:DataDog/k9-agentless
4344
Scenario: Get AWS On Demand task by id returns "Not Found" response
44-
Given new "RetrieveAwsOnDemandTask" request
45+
Given new "GetAwsOnDemandTask" request
4546
And request contains "task_id" parameter with value "00000000-0000-0000-824a-000000000000"
4647
When the request is sent
4748
Then the response status is 404 Not Found
4849

4950
@team:DataDog/k9-agentless
5051
Scenario: Get AWS On Demand task by id returns "OK." response
51-
Given new "RetrieveAwsOnDemandTask" request
52+
Given new "GetAwsOnDemandTask" request
5253
And request contains "task_id" parameter with value "63d6b4f5-e5d0-4d90-824a-9580f05f026a"
5354
When the request is sent
5455
Then the response status is 200 OK
@@ -115,7 +116,7 @@ Feature: Agentless Scanning
115116
@team:DataDog/k9-agentless
116117
Scenario: Post AWS Scan Options returns "Conflict" response
117118
Given new "CreateAwsScanOptions" request
118-
And body with value {"data":{"type":"aws_scan_options","id":"000000000002","attributes":{"vuln_host_os":true,"vuln_containers_os":true,"lambda":false}}}
119+
And body with value {"data":{"type":"aws_scan_options","id":"000000000002","attributes":{"vuln_host_os":true,"vuln_containers_os":true,"sensitive_data":false,"lambda":false}}}
119120
When the request is sent
120121
Then the response status is 409 Conflict
121122

tests/v2/features/undo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"type": "idempotent"
7474
}
7575
},
76-
"RetrieveAwsOnDemandTask": {
76+
"GetAwsOnDemandTask": {
7777
"tag": "Agentless Scanning",
7878
"undo": {
7979
"type": "safe"

0 commit comments

Comments
 (0)