Skip to content

Commit 832895e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add CSM Agentless Read Endpoint (#2330)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 29d2316 commit 832895e

16 files changed

+434
-4
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-01-07 19:53:46.976483",
8-
"spec_repo_commit": "d63fa330"
7+
"regenerated": "2025-01-08 14:02:38.575019",
8+
"spec_repo_commit": "1920836f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-07 19:53:46.990711",
13-
"spec_repo_commit": "d63fa330"
12+
"regenerated": "2025-01-08 14:02:38.589493",
13+
"spec_repo_commit": "1920836f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+74
Original file line numberDiff line numberDiff line change
@@ -2732,6 +2732,57 @@ components:
27322732
$ref: '#/components/schemas/AwsCURConfig'
27332733
type: array
27342734
type: object
2735+
AwsScanOptionsAttributes:
2736+
description: Attributes for the AWS scan options.
2737+
properties:
2738+
lambda:
2739+
description: Indicates if scanning of Lambda functions is enabled.
2740+
example: true
2741+
type: boolean
2742+
sensitive_data:
2743+
description: Indicates if scanning for sensitive data is enabled.
2744+
example: false
2745+
type: boolean
2746+
vuln_containers_os:
2747+
description: Indicates if scanning for vulnerabilities in containers is
2748+
enabled.
2749+
example: true
2750+
type: boolean
2751+
vuln_host_os:
2752+
description: Indicates if scanning for vulnerabilities in hosts is enabled.
2753+
example: true
2754+
type: boolean
2755+
type: object
2756+
AwsScanOptionsData:
2757+
description: Single AWS Scan Options entry.
2758+
properties:
2759+
attributes:
2760+
$ref: '#/components/schemas/AwsScanOptionsAttributes'
2761+
id:
2762+
description: The ID of the AWS account.
2763+
example: '184366314700'
2764+
type: string
2765+
type:
2766+
$ref: '#/components/schemas/AwsScanOptionsType'
2767+
type: object
2768+
AwsScanOptionsResponse:
2769+
description: Response object that includes a list of AWS scan options.
2770+
properties:
2771+
data:
2772+
description: A list of AWS scan options.
2773+
items:
2774+
$ref: '#/components/schemas/AwsScanOptionsData'
2775+
type: array
2776+
type: object
2777+
AwsScanOptionsType:
2778+
default: aws_scan_options
2779+
description: The type of the resource. The value should always be `aws_scan_options`.
2780+
enum:
2781+
- aws_scan_options
2782+
example: aws_scan_options
2783+
type: string
2784+
x-enum-varnames:
2785+
- AWS_SCAN_OPTIONS
27352786
AzureUCConfig:
27362787
description: Azure config.
27372788
properties:
@@ -30222,6 +30273,24 @@ info:
3022230273
version: '1.0'
3022330274
openapi: 3.0.0
3022430275
paths:
30276+
/api/v2/agentless_scanning/accounts/aws:
30277+
get:
30278+
description: Fetches the scan options configured for AWS accounts.
30279+
operationId: ListAwsScanOptions
30280+
responses:
30281+
'200':
30282+
content:
30283+
application/json:
30284+
schema:
30285+
$ref: '#/components/schemas/AwsScanOptionsResponse'
30286+
description: OK
30287+
'403':
30288+
$ref: '#/components/responses/NotAuthorizedResponse'
30289+
'429':
30290+
$ref: '#/components/responses/TooManyRequestsResponse'
30291+
summary: Get AWS Scan Options
30292+
tags:
30293+
- Agentless Scanning
3022530294
/api/v2/api_keys:
3022630295
get:
3022730296
description: List all API keys available for your account.
@@ -48131,6 +48200,11 @@ tags:
4813148200
externalDocs:
4813248201
url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection
4813348202
name: AWS Logs Integration
48203+
- description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin
48204+
your hosts, running containers, and serverless functions\u2014all without\nrequiring
48205+
teams to install Agents on every host or where Agents cannot be installed.\nGo
48206+
to https://www.datadoghq.com/blog/agentless-scanning/ to learn more"
48207+
name: Agentless Scanning
4813448208
- description: Datadog App Builder provides a low-code solution to rapidly develop
4813548209
and integrate secure, customized applications into your monitoring stack that
4813648210
are built to accelerate remediation at scale. These API endpoints allow you to

docs/datadog_api_client.v2.api.rst

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ datadog\_api\_client.v2.api package
44
Submodules
55
----------
66

7+
datadog\_api\_client.v2.api.agentless\_scanning\_api module
8+
-----------------------------------------------------------
9+
10+
.. automodule:: datadog_api_client.v2.api.agentless_scanning_api
11+
:members:
12+
:show-inheritance:
13+
714
datadog\_api\_client.v2.api.api\_management\_api module
815
-------------------------------------------------------
916

docs/datadog_api_client.v2.model.rst

+28
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,34 @@ datadog\_api\_client.v2.model.aws\_resources\_config module
921921
:members:
922922
:show-inheritance:
923923

924+
datadog\_api\_client.v2.model.aws\_scan\_options\_attributes module
925+
-------------------------------------------------------------------
926+
927+
.. automodule:: datadog_api_client.v2.model.aws_scan_options_attributes
928+
:members:
929+
:show-inheritance:
930+
931+
datadog\_api\_client.v2.model.aws\_scan\_options\_data module
932+
-------------------------------------------------------------
933+
934+
.. automodule:: datadog_api_client.v2.model.aws_scan_options_data
935+
:members:
936+
:show-inheritance:
937+
938+
datadog\_api\_client.v2.model.aws\_scan\_options\_response module
939+
-----------------------------------------------------------------
940+
941+
.. automodule:: datadog_api_client.v2.model.aws_scan_options_response
942+
:members:
943+
:show-inheritance:
944+
945+
datadog\_api\_client.v2.model.aws\_scan\_options\_type module
946+
-------------------------------------------------------------
947+
948+
.. automodule:: datadog_api_client.v2.model.aws_scan_options_type
949+
:members:
950+
:show-inheritance:
951+
924952
datadog\_api\_client.v2.model.aws\_traces\_config module
925953
--------------------------------------------------------
926954

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get AWS Scan Options returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.agentless_scanning_api import AgentlessScanningApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = AgentlessScanningApi(api_client)
11+
response = api_instance.list_aws_scan_options()
12+
13+
print(response)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Any, Dict
7+
8+
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
9+
from datadog_api_client.configuration import Configuration
10+
from datadog_api_client.v2.model.aws_scan_options_response import AwsScanOptionsResponse
11+
12+
13+
class AgentlessScanningApi:
14+
"""
15+
Datadog Agentless Scanning provides visibility into risks and vulnerabilities
16+
within your hosts, running containers, and serverless functions—all without
17+
requiring teams to install Agents on every host or where Agents cannot be installed.
18+
Go to https://www.datadoghq.com/blog/agentless-scanning/ to learn more
19+
"""
20+
21+
def __init__(self, api_client=None):
22+
if api_client is None:
23+
api_client = ApiClient(Configuration())
24+
self.api_client = api_client
25+
26+
self._list_aws_scan_options_endpoint = _Endpoint(
27+
settings={
28+
"response_type": (AwsScanOptionsResponse,),
29+
"auth": ["apiKeyAuth", "appKeyAuth"],
30+
"endpoint_path": "/api/v2/agentless_scanning/accounts/aws",
31+
"operation_id": "list_aws_scan_options",
32+
"http_method": "GET",
33+
"version": "v2",
34+
},
35+
params_map={},
36+
headers_map={
37+
"accept": ["application/json"],
38+
},
39+
api_client=api_client,
40+
)
41+
42+
def list_aws_scan_options(
43+
self,
44+
) -> AwsScanOptionsResponse:
45+
"""Get AWS Scan Options.
46+
47+
Fetches the scan options configured for AWS accounts.
48+
49+
:rtype: AwsScanOptionsResponse
50+
"""
51+
kwargs: Dict[str, Any] = {}
52+
return self._list_aws_scan_options_endpoint.call_with_http_info(**kwargs)

src/datadog_api_client/v2/apis/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from datadog_api_client.v2.api.apm_retention_filters_api import APMRetentionFiltersApi
33
from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi
44
from datadog_api_client.v2.api.aws_logs_integration_api import AWSLogsIntegrationApi
5+
from datadog_api_client.v2.api.agentless_scanning_api import AgentlessScanningApi
56
from datadog_api_client.v2.api.apps_api import AppsApi
67
from datadog_api_client.v2.api.audit_api import AuditApi
78
from datadog_api_client.v2.api.authn_mappings_api import AuthNMappingsApi
@@ -67,6 +68,7 @@
6768
"APMRetentionFiltersApi",
6869
"AWSIntegrationApi",
6970
"AWSLogsIntegrationApi",
71+
"AgentlessScanningApi",
7072
"AppsApi",
7173
"AuditApi",
7274
"AuthNMappingsApi",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class AwsScanOptionsAttributes(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"_lambda": (bool,),
21+
"sensitive_data": (bool,),
22+
"vuln_containers_os": (bool,),
23+
"vuln_host_os": (bool,),
24+
}
25+
26+
attribute_map = {
27+
"_lambda": "lambda",
28+
"sensitive_data": "sensitive_data",
29+
"vuln_containers_os": "vuln_containers_os",
30+
"vuln_host_os": "vuln_host_os",
31+
}
32+
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+
):
41+
"""
42+
Attributes for the AWS scan options.
43+
44+
:param _lambda: Indicates if scanning of Lambda functions is enabled.
45+
:type _lambda: bool, optional
46+
47+
:param sensitive_data: Indicates if scanning for sensitive data is enabled.
48+
:type sensitive_data: bool, optional
49+
50+
:param vuln_containers_os: Indicates if scanning for vulnerabilities in containers is enabled.
51+
:type vuln_containers_os: bool, optional
52+
53+
:param vuln_host_os: Indicates if scanning for vulnerabilities in hosts is enabled.
54+
:type vuln_host_os: bool, optional
55+
"""
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
64+
super().__init__(kwargs)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.aws_scan_options_attributes import AwsScanOptionsAttributes
18+
from datadog_api_client.v2.model.aws_scan_options_type import AwsScanOptionsType
19+
20+
21+
class AwsScanOptionsData(ModelNormal):
22+
@cached_property
23+
def openapi_types(_):
24+
from datadog_api_client.v2.model.aws_scan_options_attributes import AwsScanOptionsAttributes
25+
from datadog_api_client.v2.model.aws_scan_options_type import AwsScanOptionsType
26+
27+
return {
28+
"attributes": (AwsScanOptionsAttributes,),
29+
"id": (str,),
30+
"type": (AwsScanOptionsType,),
31+
}
32+
33+
attribute_map = {
34+
"attributes": "attributes",
35+
"id": "id",
36+
"type": "type",
37+
}
38+
39+
def __init__(
40+
self_,
41+
attributes: Union[AwsScanOptionsAttributes, UnsetType] = unset,
42+
id: Union[str, UnsetType] = unset,
43+
type: Union[AwsScanOptionsType, UnsetType] = unset,
44+
**kwargs,
45+
):
46+
"""
47+
Single AWS Scan Options entry.
48+
49+
:param attributes: Attributes for the AWS scan options.
50+
:type attributes: AwsScanOptionsAttributes, optional
51+
52+
:param id: The ID of the AWS account.
53+
:type id: str, optional
54+
55+
:param type: The type of the resource. The value should always be ``aws_scan_options``.
56+
:type type: AwsScanOptionsType, optional
57+
"""
58+
if attributes is not unset:
59+
kwargs["attributes"] = attributes
60+
if id is not unset:
61+
kwargs["id"] = id
62+
if type is not unset:
63+
kwargs["type"] = type
64+
super().__init__(kwargs)

0 commit comments

Comments
 (0)