Skip to content

Commit e1f4e2e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 697149a of spec repo
1 parent ecb3578 commit e1f4e2e

28 files changed

Lines changed: 1035 additions & 90 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 288 additions & 68 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.model.rst

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18253,6 +18253,48 @@ datadog\_api\_client.v2.model.maintenance\_data\_relationships\_status\_page\_da
1825318253
:members:
1825418254
:show-inheritance:
1825518255

18256+
datadog\_api\_client.v2.model.managed\_orgs\_data module
18257+
--------------------------------------------------------
18258+
18259+
.. automodule:: datadog_api_client.v2.model.managed_orgs_data
18260+
:members:
18261+
:show-inheritance:
18262+
18263+
datadog\_api\_client.v2.model.managed\_orgs\_relationship\_to\_org module
18264+
-------------------------------------------------------------------------
18265+
18266+
.. automodule:: datadog_api_client.v2.model.managed_orgs_relationship_to_org
18267+
:members:
18268+
:show-inheritance:
18269+
18270+
datadog\_api\_client.v2.model.managed\_orgs\_relationship\_to\_orgs module
18271+
--------------------------------------------------------------------------
18272+
18273+
.. automodule:: datadog_api_client.v2.model.managed_orgs_relationship_to_orgs
18274+
:members:
18275+
:show-inheritance:
18276+
18277+
datadog\_api\_client.v2.model.managed\_orgs\_relationships module
18278+
-----------------------------------------------------------------
18279+
18280+
.. automodule:: datadog_api_client.v2.model.managed_orgs_relationships
18281+
:members:
18282+
:show-inheritance:
18283+
18284+
datadog\_api\_client.v2.model.managed\_orgs\_response module
18285+
------------------------------------------------------------
18286+
18287+
.. automodule:: datadog_api_client.v2.model.managed_orgs_response
18288+
:members:
18289+
:show-inheritance:
18290+
18291+
datadog\_api\_client.v2.model.managed\_orgs\_type module
18292+
--------------------------------------------------------
18293+
18294+
.. automodule:: datadog_api_client.v2.model.managed_orgs_type
18295+
:members:
18296+
:show-inheritance:
18297+
1825618298
datadog\_api\_client.v2.model.member\_team module
1825718299
-------------------------------------------------
1825818300

@@ -22292,6 +22334,13 @@ datadog\_api\_client.v2.model.order\_direction module
2229222334
:members:
2229322335
:show-inheritance:
2229422336

22337+
datadog\_api\_client.v2.model.org\_attributes module
22338+
----------------------------------------------------
22339+
22340+
.. automodule:: datadog_api_client.v2.model.org_attributes
22341+
:members:
22342+
:show-inheritance:
22343+
2229522344
datadog\_api\_client.v2.model.org\_config\_get\_response module
2229622345
---------------------------------------------------------------
2229722346

@@ -22502,6 +22551,13 @@ datadog\_api\_client.v2.model.org\_connection\_user\_relationship\_data\_type mo
2250222551
:members:
2250322552
:show-inheritance:
2250422553

22554+
datadog\_api\_client.v2.model.org\_data module
22555+
----------------------------------------------
22556+
22557+
.. automodule:: datadog_api_client.v2.model.org_data
22558+
:members:
22559+
:show-inheritance:
22560+
2250522561
datadog\_api\_client.v2.model.org\_group\_attributes module
2250622562
-----------------------------------------------------------
2250722563

@@ -22985,6 +23041,20 @@ datadog\_api\_client.v2.model.org\_group\_update\_request module
2298523041
:members:
2298623042
:show-inheritance:
2298723043

23044+
datadog\_api\_client.v2.model.org\_relationship\_data module
23045+
------------------------------------------------------------
23046+
23047+
.. automodule:: datadog_api_client.v2.model.org_relationship_data
23048+
:members:
23049+
:show-inheritance:
23050+
23051+
datadog\_api\_client.v2.model.org\_resource\_type module
23052+
--------------------------------------------------------
23053+
23054+
.. automodule:: datadog_api_client.v2.model.org_resource_type
23055+
:members:
23056+
:show-inheritance:
23057+
2298823058
datadog\_api\_client.v2.model.organization module
2298923059
-------------------------------------------------
2299023060

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
List your managed organizations returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.organizations_api import OrganizationsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = OrganizationsApi(api_client)
11+
response = api_instance.list_orgs()
12+
13+
print(response)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Delete a pending user's invitations returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.users_api import UsersApi
7+
from uuid import UUID
8+
9+
configuration = Configuration()
10+
with ApiClient(configuration) as api_client:
11+
api_instance = UsersApi(api_client)
12+
api_instance.delete_user_invitations(
13+
user_id=UUID("4dee724d-00cc-11ea-a77b-570c9d03c6c5"),
14+
)

src/datadog_api_client/v2/api/organizations_api.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
UnsetType,
1313
unset,
1414
)
15+
from datadog_api_client.v2.model.managed_orgs_response import ManagedOrgsResponse
1516
from datadog_api_client.v2.model.org_config_list_response import OrgConfigListResponse
1617
from datadog_api_client.v2.model.org_config_get_response import OrgConfigGetResponse
1718
from datadog_api_client.v2.model.org_config_write_request import OrgConfigWriteRequest
@@ -66,6 +67,28 @@ def __init__(self, api_client=None):
6667
api_client=api_client,
6768
)
6869

70+
self._list_orgs_endpoint = _Endpoint(
71+
settings={
72+
"response_type": (ManagedOrgsResponse,),
73+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
74+
"endpoint_path": "/api/v2/org",
75+
"operation_id": "list_orgs",
76+
"http_method": "GET",
77+
"version": "v2",
78+
},
79+
params_map={
80+
"filter_name": {
81+
"openapi_types": (str,),
82+
"attribute": "filter[name]",
83+
"location": "query",
84+
},
85+
},
86+
headers_map={
87+
"accept": ["application/json"],
88+
},
89+
api_client=api_client,
90+
)
91+
6992
self._update_org_config_endpoint = _Endpoint(
7093
settings={
7194
"response_type": (OrgConfigGetResponse,),
@@ -141,6 +164,25 @@ def list_org_configs(
141164
kwargs: Dict[str, Any] = {}
142165
return self._list_org_configs_endpoint.call_with_http_info(**kwargs)
143166

167+
def list_orgs(
168+
self,
169+
*,
170+
filter_name: Union[str, UnsetType] = unset,
171+
) -> ManagedOrgsResponse:
172+
"""List your managed organizations.
173+
174+
Returns the current organization and its managed organizations in JSON:API format.
175+
176+
:param filter_name: Filter managed organizations by name.
177+
:type filter_name: str, optional
178+
:rtype: ManagedOrgsResponse
179+
"""
180+
kwargs: Dict[str, Any] = {}
181+
if filter_name is not unset:
182+
kwargs["filter_name"] = filter_name
183+
184+
return self._list_orgs_endpoint.call_with_http_info(**kwargs)
185+
144186
def update_org_config(
145187
self,
146188
org_config_name: str,

src/datadog_api_client/v2/api/security_monitoring_api.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def __init__(self, api_client=None):
192192
self._activate_content_pack_endpoint = _Endpoint(
193193
settings={
194194
"response_type": None,
195-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
195+
"auth": ["apiKeyAuth", "appKeyAuth"],
196196
"endpoint_path": "/api/v2/security_monitoring/content_packs/{content_pack_id}/activate",
197197
"operation_id": "activate_content_pack",
198198
"http_method": "PUT",
@@ -659,7 +659,7 @@ def __init__(self, api_client=None):
659659
self._deactivate_content_pack_endpoint = _Endpoint(
660660
settings={
661661
"response_type": None,
662-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
662+
"auth": ["apiKeyAuth", "appKeyAuth"],
663663
"endpoint_path": "/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate",
664664
"operation_id": "deactivate_content_pack",
665665
"http_method": "PUT",
@@ -1025,7 +1025,7 @@ def __init__(self, api_client=None):
10251025
self._get_content_packs_states_endpoint = _Endpoint(
10261026
settings={
10271027
"response_type": (SecurityMonitoringContentPackStatesResponse,),
1028-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
1028+
"auth": ["apiKeyAuth", "appKeyAuth"],
10291029
"endpoint_path": "/api/v2/security_monitoring/content_packs/states",
10301030
"operation_id": "get_content_packs_states",
10311031
"http_method": "GET",
@@ -2993,11 +2993,11 @@ def activate_content_pack(
29932993
) -> None:
29942994
"""Activate content pack.
29952995
2996-
Activate a Cloud SIEM content pack. This operation configures the necessary
2996+
Activate a security monitoring content pack. This operation configures the necessary
29972997
log filters or security filters depending on the pricing model and updates the content
29982998
pack activation state.
29992999
3000-
:param content_pack_id: The ID of the content pack to activate (for example, ``aws-cloudtrail`` ).
3000+
:param content_pack_id: The ID of the content pack to activate.
30013001
:type content_pack_id: str
30023002
:rtype: None
30033003
"""
@@ -3417,10 +3417,10 @@ def deactivate_content_pack(
34173417
) -> None:
34183418
"""Deactivate content pack.
34193419
3420-
Deactivate a Cloud SIEM content pack. This operation removes the content pack's
3420+
Deactivate a security monitoring content pack. This operation removes the content pack's
34213421
configuration from log filters or security filters and updates the content pack activation state.
34223422
3423-
:param content_pack_id: The ID of the content pack to deactivate (for example, ``aws-cloudtrail`` ).
3423+
:param content_pack_id: The ID of the content pack to deactivate.
34243424
:type content_pack_id: str
34253425
:rtype: None
34263426
"""
@@ -3704,8 +3704,9 @@ def get_content_packs_states(
37043704
) -> SecurityMonitoringContentPackStatesResponse:
37053705
"""Get content pack states.
37063706
3707-
Get the activation state, integration status, and log collection status
3708-
for all Cloud SIEM content packs.
3707+
Get the activation and configuration states for all security monitoring content packs.
3708+
This endpoint returns status information about each content pack including activation state,
3709+
integration status, and log collection status.
37093710
37103711
:rtype: SecurityMonitoringContentPackStatesResponse
37113712
"""

src/datadog_api_client/v2/api/users_api.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
get_attribute_from_path,
1414
UnsetType,
1515
unset,
16+
UUID,
1617
)
1718
from datadog_api_client.v2.model.user_invitations_response import UserInvitationsResponse
1819
from datadog_api_client.v2.model.user_invitations_request import UserInvitationsRequest
@@ -56,6 +57,29 @@ def __init__(self, api_client=None):
5657
api_client=api_client,
5758
)
5859

60+
self._delete_user_invitations_endpoint = _Endpoint(
61+
settings={
62+
"response_type": None,
63+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
64+
"endpoint_path": "/api/v2/users/{user_id}/invitations",
65+
"operation_id": "delete_user_invitations",
66+
"http_method": "DELETE",
67+
"version": "v2",
68+
},
69+
params_map={
70+
"user_id": {
71+
"required": True,
72+
"openapi_types": (UUID,),
73+
"attribute": "user_id",
74+
"location": "path",
75+
},
76+
},
77+
headers_map={
78+
"accept": ["*/*"],
79+
},
80+
api_client=api_client,
81+
)
82+
5983
self._disable_user_endpoint = _Endpoint(
6084
settings={
6185
"response_type": None,
@@ -280,6 +304,24 @@ def create_user(
280304

281305
return self._create_user_endpoint.call_with_http_info(**kwargs)
282306

307+
def delete_user_invitations(
308+
self,
309+
user_id: UUID,
310+
) -> None:
311+
"""Delete a pending user's invitations.
312+
313+
Cancel all pending invitations for a specified user.
314+
Requires the ``user_access_invite`` permission.
315+
316+
:param user_id: The UUID of the user whose pending invitations should be canceled.
317+
:type user_id: UUID
318+
:rtype: None
319+
"""
320+
kwargs: Dict[str, Any] = {}
321+
kwargs["user_id"] = user_id
322+
323+
return self._delete_user_invitations_endpoint.call_with_http_info(**kwargs)
324+
283325
def disable_user(
284326
self,
285327
user_id: str,
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
UUID,
12+
)
13+
14+
15+
if TYPE_CHECKING:
16+
from datadog_api_client.v2.model.managed_orgs_relationships import ManagedOrgsRelationships
17+
from datadog_api_client.v2.model.managed_orgs_type import ManagedOrgsType
18+
19+
20+
class ManagedOrgsData(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.managed_orgs_relationships import ManagedOrgsRelationships
24+
from datadog_api_client.v2.model.managed_orgs_type import ManagedOrgsType
25+
26+
return {
27+
"id": (UUID,),
28+
"relationships": (ManagedOrgsRelationships,),
29+
"type": (ManagedOrgsType,),
30+
}
31+
32+
attribute_map = {
33+
"id": "id",
34+
"relationships": "relationships",
35+
"type": "type",
36+
}
37+
38+
def __init__(self_, id: UUID, relationships: ManagedOrgsRelationships, type: ManagedOrgsType, **kwargs):
39+
"""
40+
The managed organizations resource.
41+
42+
:param id: The UUID of the current organization.
43+
:type id: UUID
44+
45+
:param relationships: Relationships of the managed organizations resource.
46+
:type relationships: ManagedOrgsRelationships
47+
48+
:param type: The resource type for managed organizations.
49+
:type type: ManagedOrgsType
50+
"""
51+
super().__init__(kwargs)
52+
53+
self_.id = id
54+
self_.relationships = relationships
55+
self_.type = type

0 commit comments

Comments
 (0)