Skip to content

Commit acabcf1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9e8e271 of spec repo
1 parent d34602c commit acabcf1

16 files changed

+202
-8
lines changed

.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": "98e3371",
3-
"generated": "2025-08-27 08:45:21.765"
2+
"spec_repo_commit": "9e8e271",
3+
"generated": "2025-08-27 13:11:08.001"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46082,7 +46082,7 @@ paths:
4608246082
$ref: '#/components/responses/NotAuthorizedResponse'
4608346083
'429':
4608446084
$ref: '#/components/responses/TooManyRequestsResponse'
46085-
summary: Get AWS Scan Options
46085+
summary: List AWS Scan Options
4608646086
tags:
4608746087
- Agentless Scanning
4608846088
post:
@@ -46134,6 +46134,29 @@ paths:
4613446134
summary: Delete AWS Scan Options
4613546135
tags:
4613646136
- Agentless Scanning
46137+
get:
46138+
description: Fetches the Agentless scan options for an activated account.
46139+
operationId: GetAwsScanOptions
46140+
parameters:
46141+
- $ref: '#/components/parameters/AwsAccountId'
46142+
responses:
46143+
'200':
46144+
content:
46145+
application/json:
46146+
schema:
46147+
$ref: '#/components/schemas/AwsScanOptionsResponse'
46148+
description: OK
46149+
'400':
46150+
$ref: '#/components/responses/BadRequestResponse'
46151+
'403':
46152+
$ref: '#/components/responses/NotAuthorizedResponse'
46153+
'404':
46154+
$ref: '#/components/responses/NotFoundResponse'
46155+
'429':
46156+
$ref: '#/components/responses/TooManyRequestsResponse'
46157+
summary: Get AWS scan options
46158+
tags:
46159+
- Agentless Scanning
4613746160
patch:
4613846161
description: Update the Agentless scan options for an activated account.
4613946162
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-27T13:04:35.618Z
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/not-an-account-id
9+
response:
10+
body:
11+
string: '{"errors":[{"title":"Generic Error","detail":"missing or invalid url
12+
parameter ''accountId'', expected 12 digit format ''123456789012''"}]}'
13+
headers:
14+
content-type:
15+
- application/vnd.api+json
16+
status:
17+
code: 400
18+
message: Bad Request
19+
version: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-08-27T01:14:07.103Z
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-27T01:14:24.197Z

0 commit comments

Comments
 (0)