Skip to content

Commit cc2c777

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f3350c8 of spec repo
1 parent 2f52ea8 commit cc2c777

14 files changed

Lines changed: 171 additions & 7 deletions

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "55aea96",
3-
"generated": "2025-08-25 15:34:07.121"
2+
"spec_repo_commit": "f3350c8",
3+
"generated": "2025-08-25 17:12:38.301"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46081,7 +46081,7 @@ paths:
4608146081
$ref: '#/components/responses/NotAuthorizedResponse'
4608246082
'429':
4608346083
$ref: '#/components/responses/TooManyRequestsResponse'
46084-
summary: Get AWS Scan Options
46084+
summary: List AWS Scan Options
4608546085
tags:
4608646086
- Agentless Scanning
4608746087
post:
@@ -46133,6 +46133,27 @@ paths:
4613346133
summary: Delete AWS Scan Options
4613446134
tags:
4613546135
- Agentless Scanning
46136+
get:
46137+
description: Fetches the Agentless scan options for an activated account.
46138+
operationId: GetAwsScanOptions
46139+
parameters:
46140+
- $ref: '#/components/parameters/AwsAccountId'
46141+
responses:
46142+
'200':
46143+
content:
46144+
application/json:
46145+
schema:
46146+
$ref: '#/components/schemas/AwsScanOptionsResponse'
46147+
description: OK
46148+
'403':
46149+
$ref: '#/components/responses/NotAuthorizedResponse'
46150+
'404':
46151+
$ref: '#/components/responses/NotFoundResponse'
46152+
'429':
46153+
$ref: '#/components/responses/TooManyRequestsResponse'
46154+
summary: Get AWS Scan Options
46155+
tags:
46156+
- Agentless Scanning
4613646157
patch:
4613746158
description: Update the Agentless scan options for an activated account.
4613846159
operationId: UpdateAwsScanOptions
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Get AWS Scan Options returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.agentless_scanning_api import AgentlessScanningApi
8+
9+
# there is a valid "aws_scan_options" in the system
10+
AWS_SCAN_OPTIONS_ID = environ["AWS_SCAN_OPTIONS_ID"]
11+
12+
configuration = Configuration()
13+
with ApiClient(configuration) as api_client:
14+
api_instance = AgentlessScanningApi(api_client)
15+
response = api_instance.get_aws_scan_options(
16+
account_id=AWS_SCAN_OPTIONS_ID,
17+
)
18+
19+
print(response)

examples/v2/agentless-scanning/ListAwsScanOptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get AWS Scan Options returns "OK" response
2+
List AWS Scan Options returns "OK" response
33
"""
44

55
from datadog_api_client import ApiClient, Configuration

src/datadog_api_client/v2/api/agentless_scanning_api.py

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,29 @@ def __init__(self, api_client=None):
116116
api_client=api_client,
117117
)
118118

119+
self._get_aws_scan_options_endpoint = _Endpoint(
120+
settings={
121+
"response_type": (AwsScanOptionsResponse,),
122+
"auth": ["apiKeyAuth", "appKeyAuth"],
123+
"endpoint_path": "/api/v2/agentless_scanning/accounts/aws/{account_id}",
124+
"operation_id": "get_aws_scan_options",
125+
"http_method": "GET",
126+
"version": "v2",
127+
},
128+
params_map={
129+
"account_id": {
130+
"required": True,
131+
"openapi_types": (str,),
132+
"attribute": "account_id",
133+
"location": "path",
134+
},
135+
},
136+
headers_map={
137+
"accept": ["application/json"],
138+
},
139+
api_client=api_client,
140+
)
141+
119142
self._list_aws_on_demand_tasks_endpoint = _Endpoint(
120143
settings={
121144
"response_type": (AwsOnDemandListResponse,),
@@ -242,6 +265,23 @@ def get_aws_on_demand_task(
242265

243266
return self._get_aws_on_demand_task_endpoint.call_with_http_info(**kwargs)
244267

268+
def get_aws_scan_options(
269+
self,
270+
account_id: str,
271+
) -> AwsScanOptionsResponse:
272+
"""Get AWS Scan Options.
273+
274+
Fetches the Agentless scan options for an activated account.
275+
276+
:param account_id: The ID of an AWS account.
277+
:type account_id: str
278+
:rtype: AwsScanOptionsResponse
279+
"""
280+
kwargs: Dict[str, Any] = {}
281+
kwargs["account_id"] = account_id
282+
283+
return self._get_aws_scan_options_endpoint.call_with_http_info(**kwargs)
284+
245285
def list_aws_on_demand_tasks(
246286
self,
247287
) -> AwsOnDemandListResponse:
@@ -257,7 +297,7 @@ def list_aws_on_demand_tasks(
257297
def list_aws_scan_options(
258298
self,
259299
) -> AwsScanOptionsListResponse:
260-
"""Get AWS Scan Options.
300+
"""List AWS Scan Options.
261301
262302
Fetches the scan options configured for AWS accounts.
263303
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-08-24T22:54:50.008Z
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json
7+
method: GET
8+
uri: https://api.datadoghq.com/api/v2/agentless_scanning/accounts/aws/404404404404
9+
response:
10+
body:
11+
string: '{"errors":[{"status":"404","detail":"no aws scan options found for
12+
subscription 404404404404"}]}'
13+
headers:
14+
content-type:
15+
- application/vnd.api+json
16+
status:
17+
code: 404
18+
message: Not Found
19+
version: 1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-03-01T20:02:08.552Z
1+
2025-08-24T22:56:14.095Z

tests/v2/cassettes/test_scenarios/test_get_aws_scan_options_returns_ok_response.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@ interactions:
88
uri: https://api.datadoghq.com/api/v2/agentless_scanning/accounts/aws
99
response:
1010
body:
11-
string: '{"data":[{"id":"000000000002","type":"aws_scan_options","attributes":{"lambda":false,"sensitive_data":false,"vuln_containers_os":true,"vuln_host_os":true}}]}'
11+
string: '{"data":[{"id":"000000000002","type":"aws_scan_options","attributes":{"lambda":false,"sensitive_data":false,"vuln_containers_os":true,"vuln_host_os":true}},{"id":"123456789012","type":"aws_scan_options","attributes":{"lambda":true,"sensitive_data":true,"vuln_containers_os":true,"vuln_host_os":true}}]}'
12+
headers:
13+
content-type:
14+
- application/vnd.api+json
15+
status:
16+
code: 200
17+
message: OK
18+
- request:
19+
body: null
20+
headers:
21+
accept:
22+
- application/json
23+
method: GET
24+
uri: https://api.datadoghq.com/api/v2/agentless_scanning/accounts/aws/000000000002
25+
response:
26+
body:
27+
string: '{"data":{"id":"000000000002","type":"aws_scan_options","attributes":{"lambda":false,"sensitive_data":false,"vuln_containers_os":true,"vuln_host_os":true}}}'
1228
headers:
1329
content-type:
1430
- application/vnd.api+json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-08-24T22:53:40.600Z

0 commit comments

Comments
 (0)