Skip to content

Commit 5f636b4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5aa96e08 of spec repo
1 parent 95bfc3b commit 5f636b4

File tree

10 files changed

+384
-4
lines changed

10 files changed

+384
-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 22:02:26.852023",
8+
"spec_repo_commit": "5aa96e08"
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 22:02:26.866361",
13+
"spec_repo_commit": "5aa96e08"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+108
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,27 @@ components:
213213
required: true
214214
schema:
215215
type: string
216+
CustomFrameworkHandle:
217+
description: The framework handle.
218+
in: path
219+
name: handle
220+
required: true
221+
schema:
222+
type: string
223+
CustomFrameworkOrgID:
224+
description: The ID of the organization.
225+
in: path
226+
name: org_id
227+
required: true
228+
schema:
229+
type: string
230+
CustomFrameworkVersion:
231+
description: The framework version.
232+
in: path
233+
name: version
234+
required: true
235+
schema:
236+
type: string
216237
EntityID:
217238
description: UUID or Entity Ref.
218239
in: path
@@ -8375,6 +8396,54 @@ components:
83758396
$ref: '#/components/schemas/CustomDestinationResponseDefinition'
83768397
type: array
83778398
type: object
8399+
CustomFrameworkMetadata:
8400+
description: Response object for an organization's custom frameworks.
8401+
properties:
8402+
created_at:
8403+
description: Framework Creation Date
8404+
format: int64
8405+
type: integer
8406+
created_by:
8407+
description: Framework Creator
8408+
type: string
8409+
description:
8410+
description: Framework Description
8411+
type: string
8412+
handle:
8413+
description: Framework Handle
8414+
example: ''
8415+
type: string
8416+
icon_url:
8417+
description: Framework Icon URL
8418+
type: string
8419+
id:
8420+
description: Custom Framework ID
8421+
example: ''
8422+
type: string
8423+
name:
8424+
description: Framework Name
8425+
example: ''
8426+
type: string
8427+
org_id:
8428+
description: Org ID
8429+
example: 0
8430+
format: int64
8431+
type: integer
8432+
updated_at:
8433+
description: Framework Update Date
8434+
format: int64
8435+
type: integer
8436+
version:
8437+
description: Framework Version
8438+
example: ''
8439+
type: string
8440+
required:
8441+
- id
8442+
- org_id
8443+
- handle
8444+
- version
8445+
- name
8446+
type: object
83788447
DORADeploymentRequest:
83798448
description: Request to create a DORA deployment event.
83808449
properties:
@@ -9015,6 +9084,12 @@ components:
90159084
type: string
90169085
x-enum-varnames:
90179086
- APPDEFINITIONS
9087+
DeleteCustomFrameworkResponse:
9088+
description: Delete a custom framework.
9089+
properties:
9090+
data:
9091+
$ref: '#/components/schemas/CustomFrameworkMetadata'
9092+
type: object
90189093
DependencyLocation:
90199094
description: Static library vulnerability location.
90209095
properties:
@@ -40135,6 +40210,39 @@ paths:
4013540210
operator: OR
4013640211
permissions:
4013740212
- org_management
40213+
/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks/{handle}/{version}:
40214+
delete:
40215+
description: Delete a custom framework.
40216+
operationId: DeleteCustomFramework
40217+
parameters:
40218+
- $ref: '#/components/parameters/CustomFrameworkOrgID'
40219+
- $ref: '#/components/parameters/CustomFrameworkHandle'
40220+
- $ref: '#/components/parameters/CustomFrameworkVersion'
40221+
responses:
40222+
'200':
40223+
content:
40224+
application/json:
40225+
schema:
40226+
$ref: '#/components/schemas/DeleteCustomFrameworkResponse'
40227+
description: OK
40228+
'400':
40229+
$ref: '#/components/responses/BadRequestResponse'
40230+
'429':
40231+
$ref: '#/components/responses/TooManyRequestsResponse'
40232+
'500':
40233+
$ref: '#/components/responses/BadRequestResponse'
40234+
security:
40235+
- apiKeyAuth: []
40236+
appKeyAuth: []
40237+
- AuthZ:
40238+
- security_monitoring_rules_read
40239+
summary: Delete a custom framework
40240+
tags:
40241+
- Security Monitoring
40242+
x-permission:
40243+
operator: OR
40244+
permissions:
40245+
- security_monitoring_rules_read
4013840246
/api/v2/permissions:
4013940247
get:
4014040248
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

@@ -3476,6 +3483,13 @@ datadog\_api\_client.v2.model.delete\_apps\_response\_data\_items\_type module
34763483
:members:
34773484
:show-inheritance:
34783485

3486+
datadog\_api\_client.v2.model.delete\_custom\_framework\_response module
3487+
------------------------------------------------------------------------
3488+
3489+
.. automodule:: datadog_api_client.v2.model.delete_custom_framework_response
3490+
:members:
3491+
:show-inheritance:
3492+
34793493
datadog\_api\_client.v2.model.dependency\_location module
34803494
---------------------------------------------------------
34813495

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Delete 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+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = SecurityMonitoringApi(api_client)
11+
response = api_instance.delete_custom_framework(
12+
org_id="org_id",
13+
handle="handle",
14+
version="version",
15+
)
16+
17+
print(response)

src/datadog_api_client/v2/api/security_monitoring_api.py

+63
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
UnsetType,
1616
unset,
1717
)
18+
from datadog_api_client.v2.model.delete_custom_framework_response import DeleteCustomFrameworkResponse
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
@@ -242,6 +243,41 @@ def __init__(self, api_client=None):
242243
api_client=api_client,
243244
)
244245

246+
self._delete_custom_framework_endpoint = _Endpoint(
247+
settings={
248+
"response_type": (DeleteCustomFrameworkResponse,),
249+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
250+
"endpoint_path": "/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks/{handle}/{version}",
251+
"operation_id": "delete_custom_framework",
252+
"http_method": "DELETE",
253+
"version": "v2",
254+
},
255+
params_map={
256+
"org_id": {
257+
"required": True,
258+
"openapi_types": (str,),
259+
"attribute": "org_id",
260+
"location": "path",
261+
},
262+
"handle": {
263+
"required": True,
264+
"openapi_types": (str,),
265+
"attribute": "handle",
266+
"location": "path",
267+
},
268+
"version": {
269+
"required": True,
270+
"openapi_types": (str,),
271+
"attribute": "version",
272+
"location": "path",
273+
},
274+
},
275+
headers_map={
276+
"accept": ["application/json"],
277+
},
278+
api_client=api_client,
279+
)
280+
245281
self._delete_historical_job_endpoint = _Endpoint(
246282
settings={
247283
"response_type": None,
@@ -1459,6 +1495,33 @@ def create_security_monitoring_suppression(
14591495

14601496
return self._create_security_monitoring_suppression_endpoint.call_with_http_info(**kwargs)
14611497

1498+
def delete_custom_framework(
1499+
self,
1500+
org_id: str,
1501+
handle: str,
1502+
version: str,
1503+
) -> DeleteCustomFrameworkResponse:
1504+
"""Delete a custom framework.
1505+
1506+
Delete a custom framework.
1507+
1508+
:param org_id: The ID of the organization.
1509+
:type org_id: str
1510+
:param handle: The framework handle.
1511+
:type handle: str
1512+
:param version: The framework version.
1513+
:type version: str
1514+
:rtype: DeleteCustomFrameworkResponse
1515+
"""
1516+
kwargs: Dict[str, Any] = {}
1517+
kwargs["org_id"] = org_id
1518+
1519+
kwargs["handle"] = handle
1520+
1521+
kwargs["version"] = version
1522+
1523+
return self._delete_custom_framework_endpoint.call_with_http_info(**kwargs)
1524+
14621525
def delete_historical_job(
14631526
self,
14641527
job_id: str,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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+
"icon_url": (str,),
25+
"id": (str,),
26+
"name": (str,),
27+
"org_id": (int,),
28+
"updated_at": (int,),
29+
"version": (str,),
30+
}
31+
32+
attribute_map = {
33+
"created_at": "created_at",
34+
"created_by": "created_by",
35+
"description": "description",
36+
"handle": "handle",
37+
"icon_url": "icon_url",
38+
"id": "id",
39+
"name": "name",
40+
"org_id": "org_id",
41+
"updated_at": "updated_at",
42+
"version": "version",
43+
}
44+
45+
def __init__(
46+
self_,
47+
handle: str,
48+
id: str,
49+
name: str,
50+
org_id: int,
51+
version: str,
52+
created_at: Union[int, UnsetType] = unset,
53+
created_by: Union[str, UnsetType] = unset,
54+
description: Union[str, UnsetType] = unset,
55+
icon_url: Union[str, UnsetType] = unset,
56+
updated_at: Union[int, UnsetType] = unset,
57+
**kwargs,
58+
):
59+
"""
60+
Response object for an organization's custom frameworks.
61+
62+
:param created_at: Framework Creation Date
63+
:type created_at: int, optional
64+
65+
:param created_by: Framework Creator
66+
:type created_by: str, optional
67+
68+
:param description: Framework Description
69+
:type description: str, optional
70+
71+
:param handle: Framework Handle
72+
:type handle: str
73+
74+
:param icon_url: Framework Icon URL
75+
:type icon_url: str, optional
76+
77+
:param id: Custom Framework ID
78+
:type id: str
79+
80+
:param name: Framework Name
81+
:type name: str
82+
83+
:param org_id: Org ID
84+
:type org_id: int
85+
86+
:param updated_at: Framework Update Date
87+
:type updated_at: int, optional
88+
89+
:param version: Framework Version
90+
:type version: str
91+
"""
92+
if created_at is not unset:
93+
kwargs["created_at"] = created_at
94+
if created_by is not unset:
95+
kwargs["created_by"] = created_by
96+
if description is not unset:
97+
kwargs["description"] = description
98+
if icon_url is not unset:
99+
kwargs["icon_url"] = icon_url
100+
if updated_at is not unset:
101+
kwargs["updated_at"] = updated_at
102+
super().__init__(kwargs)
103+
104+
self_.handle = handle
105+
self_.id = id
106+
self_.name = name
107+
self_.org_id = org_id
108+
self_.version = version

0 commit comments

Comments
 (0)