Skip to content

Commit 2a28745

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 898cd727 of spec repo
1 parent 95bfc3b commit 2a28745

File tree

11 files changed

+441
-4
lines changed

11 files changed

+441
-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-14 17:10:38.716474",
8+
"spec_repo_commit": "898cd727"
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-14 17:10:38.732035",
13+
"spec_repo_commit": "898cd727"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+122
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ components:
213213
required: true
214214
schema:
215215
type: string
216+
CustomFrameworkOrgID:
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
@@ -7145,6 +7152,44 @@ components:
71457152
type: string
71467153
x-enum-varnames:
71477154
- APPDEFINITIONS
7155+
CreateCustomFrameworkRequest:
7156+
description: Create a custom framework.
7157+
properties:
7158+
description:
7159+
description: Framework Description
7160+
type: string
7161+
handle:
7162+
description: Framework Handle
7163+
example: ''
7164+
type: string
7165+
icon_url:
7166+
description: Framework Icon URL
7167+
type: string
7168+
id:
7169+
description: Custom Framework ID
7170+
type: string
7171+
name:
7172+
description: Framework Name
7173+
example: ''
7174+
type: string
7175+
requirements:
7176+
description: Framework Requirements
7177+
items:
7178+
$ref: '#/components/schemas/FrameworkRequirement'
7179+
type: array
7180+
user_email:
7181+
description: Framework Creator
7182+
type: string
7183+
version:
7184+
description: Framework Version
7185+
example: ''
7186+
type: string
7187+
required:
7188+
- handle
7189+
- version
7190+
- name
7191+
- requirements
7192+
type: object
71487193
CreateDataDeletionRequestBody:
71497194
description: Object needed to create a data deletion request.
71507195
properties:
@@ -11936,6 +11981,40 @@ components:
1193611981
order:
1193711982
$ref: '#/components/schemas/QuerySortOrder'
1193811983
type: object
11984+
FrameworkControl:
11985+
description: Framework Control.
11986+
properties:
11987+
name:
11988+
description: Control Name.
11989+
example: ''
11990+
type: string
11991+
rule_ids:
11992+
description: Rule IDs.
11993+
example:
11994+
- ''
11995+
items:
11996+
type: string
11997+
type: array
11998+
required:
11999+
- name
12000+
- rule_ids
12001+
type: object
12002+
FrameworkRequirement:
12003+
description: Framework Requirement.
12004+
properties:
12005+
controls:
12006+
description: Requirement Controls.
12007+
items:
12008+
$ref: '#/components/schemas/FrameworkControl'
12009+
type: array
12010+
name:
12011+
description: Requirement Name.
12012+
example: ''
12013+
type: string
12014+
required:
12015+
- name
12016+
- controls
12017+
type: object
1193912018
FullAPIKey:
1194012019
description: Datadog API key.
1194112020
properties:
@@ -30263,6 +30342,12 @@ components:
3026330342
scheme: bearer
3026430343
type: http
3026530344
x-env-name: DD_BEARER_TOKEN
30345+
userAuth:
30346+
description: Your Datadog User ID.
30347+
in: header
30348+
name: X-Datadog-UserId
30349+
type: http
30350+
x-env-name: X_Datadog_UserId
3026630351
info:
3026730352
contact:
3026830353
@@ -40135,6 +40220,43 @@ paths:
4013540220
operator: OR
4013640221
permissions:
4013740222
- org_management
40223+
/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks:
40224+
post:
40225+
description: Create a custom framework.
40226+
operationId: CreateCustomFramework
40227+
parameters:
40228+
- $ref: '#/components/parameters/CustomFrameworkOrgID'
40229+
requestBody:
40230+
content:
40231+
application/json:
40232+
schema:
40233+
$ref: '#/components/schemas/CreateCustomFrameworkRequest'
40234+
required: true
40235+
responses:
40236+
'200':
40237+
description: OK
40238+
'400':
40239+
$ref: '#/components/responses/BadRequestResponse'
40240+
'429':
40241+
$ref: '#/components/responses/TooManyRequestsResponse'
40242+
'500':
40243+
$ref: '#/components/responses/BadRequestResponse'
40244+
security:
40245+
- apiKeyAuth: []
40246+
appKeyAuth: []
40247+
userAuth: []
40248+
- AuthZ:
40249+
- security_monitoring_rules_read
40250+
- security_monitoring_rules_write
40251+
summary: Create a custom framework
40252+
tags:
40253+
- Security Monitoring
40254+
x-codegen-request-body-name: body
40255+
x-permission:
40256+
operator: AND
40257+
permissions:
40258+
- security_monitoring_rules_read
40259+
- security_monitoring_rules_write
4013840260
/api/v2/permissions:
4013940261
get:
4014040262
description: Returns a list of all permissions, including name, description,

docs/datadog_api_client.v2.model.rst

+21
Original file line numberDiff line numberDiff line change
@@ -2727,6 +2727,13 @@ datadog\_api\_client.v2.model.create\_app\_response\_data\_type module
27272727
:members:
27282728
:show-inheritance:
27292729

2730+
datadog\_api\_client.v2.model.create\_custom\_framework\_request module
2731+
-----------------------------------------------------------------------
2732+
2733+
.. automodule:: datadog_api_client.v2.model.create_custom_framework_request
2734+
:members:
2735+
:show-inheritance:
2736+
27302737
datadog\_api\_client.v2.model.create\_data\_deletion\_request\_body module
27312738
--------------------------------------------------------------------------
27322739

@@ -4883,6 +4890,20 @@ datadog\_api\_client.v2.model.formula\_limit module
48834890
:members:
48844891
:show-inheritance:
48854892

4893+
datadog\_api\_client.v2.model.framework\_control module
4894+
-------------------------------------------------------
4895+
4896+
.. automodule:: datadog_api_client.v2.model.framework_control
4897+
:members:
4898+
:show-inheritance:
4899+
4900+
datadog\_api\_client.v2.model.framework\_requirement module
4901+
-----------------------------------------------------------
4902+
4903+
.. automodule:: datadog_api_client.v2.model.framework_requirement
4904+
:members:
4905+
:show-inheritance:
4906+
48864907
datadog\_api\_client.v2.model.full\_api\_key module
48874908
---------------------------------------------------
48884909

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""
2+
Create a custom framework 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+
from datadog_api_client.v2.model.create_custom_framework_request import CreateCustomFrameworkRequest
8+
from datadog_api_client.v2.model.framework_control import FrameworkControl
9+
from datadog_api_client.v2.model.framework_requirement import FrameworkRequirement
10+
11+
body = CreateCustomFrameworkRequest(
12+
handle="",
13+
name="",
14+
requirements=[
15+
FrameworkRequirement(
16+
controls=[
17+
FrameworkControl(
18+
name="",
19+
rule_ids=[
20+
"",
21+
],
22+
),
23+
],
24+
name="",
25+
),
26+
],
27+
version="",
28+
)
29+
30+
configuration = Configuration()
31+
with ApiClient(configuration) as api_client:
32+
api_instance = SecurityMonitoringApi(api_client)
33+
api_instance.create_custom_framework(org_id="org_id", body=body)

src/datadog_api_client/v2/api/security_monitoring_api.py

+48
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
UnsetType,
1616
unset,
1717
)
18+
from datadog_api_client.v2.model.create_custom_framework_request import CreateCustomFrameworkRequest
1819
from datadog_api_client.v2.model.list_findings_response import ListFindingsResponse
1920
from datadog_api_client.v2.model.finding_evaluation import FindingEvaluation
2021
from datadog_api_client.v2.model.finding_status import FindingStatus
@@ -182,6 +183,32 @@ def __init__(self, api_client=None):
182183
api_client=api_client,
183184
)
184185

186+
self._create_custom_framework_endpoint = _Endpoint(
187+
settings={
188+
"response_type": None,
189+
"auth": ["apiKeyAuth", "appKeyAuth", "userAuth", "AuthZ"],
190+
"endpoint_path": "/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks",
191+
"operation_id": "create_custom_framework",
192+
"http_method": "POST",
193+
"version": "v2",
194+
},
195+
params_map={
196+
"org_id": {
197+
"required": True,
198+
"openapi_types": (str,),
199+
"attribute": "org_id",
200+
"location": "path",
201+
},
202+
"body": {
203+
"required": True,
204+
"openapi_types": (CreateCustomFrameworkRequest,),
205+
"location": "body",
206+
},
207+
},
208+
headers_map={"accept": ["*/*"], "content_type": ["application/json"]},
209+
api_client=api_client,
210+
)
211+
185212
self._create_security_filter_endpoint = _Endpoint(
186213
settings={
187214
"response_type": (SecurityFilterResponse,),
@@ -1401,6 +1428,27 @@ def convert_security_monitoring_rule_from_json_to_terraform(
14011428

14021429
return self._convert_security_monitoring_rule_from_json_to_terraform_endpoint.call_with_http_info(**kwargs)
14031430

1431+
def create_custom_framework(
1432+
self,
1433+
org_id: str,
1434+
body: CreateCustomFrameworkRequest,
1435+
) -> None:
1436+
"""Create a custom framework.
1437+
1438+
Create a custom framework.
1439+
1440+
:param org_id: The ID of the organization.
1441+
:type org_id: str
1442+
:type body: CreateCustomFrameworkRequest
1443+
:rtype: None
1444+
"""
1445+
kwargs: Dict[str, Any] = {}
1446+
kwargs["org_id"] = org_id
1447+
1448+
kwargs["body"] = body
1449+
1450+
return self._create_custom_framework_endpoint.call_with_http_info(**kwargs)
1451+
14041452
def create_security_filter(
14051453
self,
14061454
body: SecurityFilterCreateRequest,

0 commit comments

Comments
 (0)