Skip to content

Commit bf6dbe3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 48a18d90 of spec repo
1 parent 95bfc3b commit bf6dbe3

File tree

10 files changed

+336
-4
lines changed

10 files changed

+336
-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-13 18:28:08.995813",
8-
"spec_repo_commit": "3517c947"
7+
"regenerated": "2025-01-13 20:56:09.808808",
8+
"spec_repo_commit": "48a18d90"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-13 18:28:09.011266",
13-
"spec_repo_commit": "3517c947"
12+
"regenerated": "2025-01-13 20:56:09.822873",
13+
"spec_repo_commit": "48a18d90"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+92
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ components:
213213
required: true
214214
schema:
215215
type: string
216+
CustomFrameworksOrgID:
217+
description: The ID of the organization.
218+
in: path
219+
name: org_id
220+
required: true
221+
schema:
222+
type: string
216223
EntityID:
217224
description: UUID or Entity Ref.
218225
in: path
@@ -8375,6 +8382,51 @@ components:
83758382
$ref: '#/components/schemas/CustomDestinationResponseDefinition'
83768383
type: array
83778384
type: object
8385+
CustomFrameworkMetadata:
8386+
description: Response object for an organization's custom frameworks.
8387+
properties:
8388+
created_at:
8389+
description: Framework Creation Date
8390+
format: int64
8391+
type: integer
8392+
created_by:
8393+
description: Framework Creator
8394+
type: string
8395+
description:
8396+
description: Framework Description
8397+
type: string
8398+
handle:
8399+
description: Framework Handle
8400+
example: ''
8401+
type: string
8402+
id:
8403+
description: Custom Framework ID
8404+
example: ''
8405+
type: string
8406+
name:
8407+
description: Framework Name
8408+
example: ''
8409+
type: string
8410+
org_id:
8411+
description: Org ID
8412+
example: 0
8413+
format: int64
8414+
type: integer
8415+
updated_at:
8416+
description: Framework Update Date
8417+
format: int64
8418+
type: integer
8419+
version:
8420+
description: Framework Version
8421+
example: ''
8422+
type: string
8423+
required:
8424+
- id
8425+
- org_id
8426+
- handle
8427+
- version
8428+
- name
8429+
type: object
83788430
DORADeploymentRequest:
83798431
description: Request to create a DORA deployment event.
83808432
properties:
@@ -23390,6 +23442,15 @@ components:
2339023442
x-enum-varnames:
2339123443
- REQUIRE
2339223444
- SUPPRESS
23445+
SecurityMonitoringListCustomFrameworksResponse:
23446+
description: List of historical jobs.
23447+
properties:
23448+
data:
23449+
description: Array containing the list of custom frameworks.
23450+
items:
23451+
$ref: '#/components/schemas/CustomFrameworkMetadata'
23452+
type: array
23453+
type: object
2339323454
SecurityMonitoringListRulesResponse:
2339423455
description: List of rules.
2339523456
properties:
@@ -40135,6 +40196,37 @@ paths:
4013540196
operator: OR
4013640197
permissions:
4013740198
- org_management
40199+
/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks:
40200+
get:
40201+
description: List custom frameworks.
40202+
operationId: ListCustomFrameworks
40203+
parameters:
40204+
- $ref: '#/components/parameters/CustomFrameworksOrgID'
40205+
responses:
40206+
'200':
40207+
content:
40208+
application/json:
40209+
schema:
40210+
$ref: '#/components/schemas/SecurityMonitoringListCustomFrameworksResponse'
40211+
description: OK
40212+
'400':
40213+
$ref: '#/components/responses/BadRequestResponse'
40214+
'429':
40215+
$ref: '#/components/responses/TooManyRequestsResponse'
40216+
'500':
40217+
$ref: '#/components/responses/BadRequestResponse'
40218+
security:
40219+
- apiKeyAuth: []
40220+
appKeyAuth: []
40221+
- AuthZ:
40222+
- security_monitoring_rules_read
40223+
summary: List custom frameworks
40224+
tags:
40225+
- Security Monitoring
40226+
x-permission:
40227+
operator: OR
40228+
permissions:
40229+
- security_monitoring_rules_read
4013840230
/api/v2/permissions:
4013940231
get:
4014040232
description: Returns a list of all permissions, including name, description,

docs/datadog_api_client.v2.model.rst

+14
Original file line numberDiff line numberDiff line change
@@ -3301,6 +3301,13 @@ datadog\_api\_client.v2.model.custom\_destinations\_response module
33013301
:members:
33023302
:show-inheritance:
33033303

3304+
datadog\_api\_client.v2.model.custom\_framework\_metadata module
3305+
----------------------------------------------------------------
3306+
3307+
.. automodule:: datadog_api_client.v2.model.custom_framework_metadata
3308+
:members:
3309+
:show-inheritance:
3310+
33043311
datadog\_api\_client.v2.model.cvss module
33053312
-----------------------------------------
33063313

@@ -10350,6 +10357,13 @@ datadog\_api\_client.v2.model.security\_monitoring\_filter\_action module
1035010357
:members:
1035110358
:show-inheritance:
1035210359

10360+
datadog\_api\_client.v2.model.security\_monitoring\_list\_custom\_frameworks\_response module
10361+
---------------------------------------------------------------------------------------------
10362+
10363+
.. automodule:: datadog_api_client.v2.model.security_monitoring_list_custom_frameworks_response
10364+
:members:
10365+
:show-inheritance:
10366+
1035310367
datadog\_api\_client.v2.model.security\_monitoring\_list\_rules\_response module
1035410368
--------------------------------------------------------------------------------
1035510369

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
List custom frameworks returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = SecurityMonitoringApi(api_client)
11+
response = api_instance.list_custom_frameworks(
12+
org_id="org_id",
13+
)
14+
15+
print(response)

src/datadog_api_client/v2/api/security_monitoring_api.py

+43
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
UnsetType,
1616
unset,
1717
)
18+
from datadog_api_client.v2.model.security_monitoring_list_custom_frameworks_response import (
19+
SecurityMonitoringListCustomFrameworksResponse,
20+
)
1821
from datadog_api_client.v2.model.list_findings_response import ListFindingsResponse
1922
from datadog_api_client.v2.model.finding_evaluation import FindingEvaluation
2023
from datadog_api_client.v2.model.finding_status import FindingStatus
@@ -558,6 +561,29 @@ def __init__(self, api_client=None):
558561
api_client=api_client,
559562
)
560563

564+
self._list_custom_frameworks_endpoint = _Endpoint(
565+
settings={
566+
"response_type": (SecurityMonitoringListCustomFrameworksResponse,),
567+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
568+
"endpoint_path": "/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks",
569+
"operation_id": "list_custom_frameworks",
570+
"http_method": "GET",
571+
"version": "v2",
572+
},
573+
params_map={
574+
"org_id": {
575+
"required": True,
576+
"openapi_types": (str,),
577+
"attribute": "org_id",
578+
"location": "path",
579+
},
580+
},
581+
headers_map={
582+
"accept": ["application/json"],
583+
},
584+
api_client=api_client,
585+
)
586+
561587
self._list_findings_endpoint = _Endpoint(
562588
settings={
563589
"response_type": (ListFindingsResponse,),
@@ -1705,6 +1731,23 @@ def get_security_monitoring_suppression(
17051731

17061732
return self._get_security_monitoring_suppression_endpoint.call_with_http_info(**kwargs)
17071733

1734+
def list_custom_frameworks(
1735+
self,
1736+
org_id: str,
1737+
) -> SecurityMonitoringListCustomFrameworksResponse:
1738+
"""List custom frameworks.
1739+
1740+
List custom frameworks.
1741+
1742+
:param org_id: The ID of the organization.
1743+
:type org_id: str
1744+
:rtype: SecurityMonitoringListCustomFrameworksResponse
1745+
"""
1746+
kwargs: Dict[str, Any] = {}
1747+
kwargs["org_id"] = org_id
1748+
1749+
return self._list_custom_frameworks_endpoint.call_with_http_info(**kwargs)
1750+
17081751
def list_findings(
17091752
self,
17101753
*,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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 CustomFrameworkMetadata(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"created_at": (int,),
21+
"created_by": (str,),
22+
"description": (str,),
23+
"handle": (str,),
24+
"id": (str,),
25+
"name": (str,),
26+
"org_id": (int,),
27+
"updated_at": (int,),
28+
"version": (str,),
29+
}
30+
31+
attribute_map = {
32+
"created_at": "created_at",
33+
"created_by": "created_by",
34+
"description": "description",
35+
"handle": "handle",
36+
"id": "id",
37+
"name": "name",
38+
"org_id": "org_id",
39+
"updated_at": "updated_at",
40+
"version": "version",
41+
}
42+
43+
def __init__(
44+
self_,
45+
handle: str,
46+
id: str,
47+
name: str,
48+
org_id: int,
49+
version: str,
50+
created_at: Union[int, UnsetType] = unset,
51+
created_by: Union[str, UnsetType] = unset,
52+
description: Union[str, UnsetType] = unset,
53+
updated_at: Union[int, UnsetType] = unset,
54+
**kwargs,
55+
):
56+
"""
57+
Response object for an organization's custom frameworks.
58+
59+
:param created_at: Framework Creation Date
60+
:type created_at: int, optional
61+
62+
:param created_by: Framework Creator
63+
:type created_by: str, optional
64+
65+
:param description: Framework Description
66+
:type description: str, optional
67+
68+
:param handle: Framework Handle
69+
:type handle: str
70+
71+
:param id: Custom Framework ID
72+
:type id: str
73+
74+
:param name: Framework Name
75+
:type name: str
76+
77+
:param org_id: Org ID
78+
:type org_id: int
79+
80+
:param updated_at: Framework Update Date
81+
:type updated_at: int, optional
82+
83+
:param version: Framework Version
84+
:type version: str
85+
"""
86+
if created_at is not unset:
87+
kwargs["created_at"] = created_at
88+
if created_by is not unset:
89+
kwargs["created_by"] = created_by
90+
if description is not unset:
91+
kwargs["description"] = description
92+
if updated_at is not unset:
93+
kwargs["updated_at"] = updated_at
94+
super().__init__(kwargs)
95+
96+
self_.handle = handle
97+
self_.id = id
98+
self_.name = name
99+
self_.org_id = org_id
100+
self_.version = version
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 List, 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.custom_framework_metadata import CustomFrameworkMetadata
18+
19+
20+
class SecurityMonitoringListCustomFrameworksResponse(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.custom_framework_metadata import CustomFrameworkMetadata
24+
25+
return {
26+
"data": ([CustomFrameworkMetadata],),
27+
}
28+
29+
attribute_map = {
30+
"data": "data",
31+
}
32+
33+
def __init__(self_, data: Union[List[CustomFrameworkMetadata], UnsetType] = unset, **kwargs):
34+
"""
35+
List of historical jobs.
36+
37+
:param data: Array containing the list of custom frameworks.
38+
:type data: [CustomFrameworkMetadata], optional
39+
"""
40+
if data is not unset:
41+
kwargs["data"] = data
42+
super().__init__(kwargs)

0 commit comments

Comments
 (0)