Skip to content

Commit cbd77dd

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8f7e449 of spec repo (#3884)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b4a25da commit cbd77dd

24 files changed

Lines changed: 1559 additions & 0 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 387 additions & 0 deletions
Large diffs are not rendered by default.

‎docs/datadog_api_client.v2.api.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,13 @@ datadog\_api\_client.v2.api.rum\_retention\_filters\_api module
781781
:members:
782782
:show-inheritance:
783783

784+
datadog\_api\_client.v2.api.rum\_retention\_quota\_api module
785+
-------------------------------------------------------------
786+
787+
.. automodule:: datadog_api_client.v2.api.rum_retention_quota_api
788+
:members:
789+
:show-inheritance:
790+
784791
datadog\_api\_client.v2.api.salesforce\_integration\_api module
785792
---------------------------------------------------------------
786793

‎docs/datadog_api_client.v2.model.rst‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38588,6 +38588,97 @@ datadog\_api\_client.v2.model.rum\_retention\_filters\_response module
3858838588
:members:
3858938589
:show-inheritance:
3859038590

38591+
datadog\_api\_client.v2.model.rum\_retention\_quota\_adaptive\_config module
38592+
----------------------------------------------------------------------------
38593+
38594+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_adaptive_config
38595+
:members:
38596+
:show-inheritance:
38597+
38598+
datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_attributes module
38599+
------------------------------------------------------------------------------
38600+
38601+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_config_attributes
38602+
:members:
38603+
:show-inheritance:
38604+
38605+
datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_data module
38606+
------------------------------------------------------------------------
38607+
38608+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_config_data
38609+
:members:
38610+
:show-inheritance:
38611+
38612+
datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_response module
38613+
----------------------------------------------------------------------------
38614+
38615+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_config_response
38616+
:members:
38617+
:show-inheritance:
38618+
38619+
datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_type module
38620+
------------------------------------------------------------------------
38621+
38622+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_config_type
38623+
:members:
38624+
:show-inheritance:
38625+
38626+
datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_update\_attributes module
38627+
--------------------------------------------------------------------------------------
38628+
38629+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_config_update_attributes
38630+
:members:
38631+
:show-inheritance:
38632+
38633+
datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_update\_data module
38634+
--------------------------------------------------------------------------------
38635+
38636+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_config_update_data
38637+
:members:
38638+
:show-inheritance:
38639+
38640+
datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_update\_request module
38641+
-----------------------------------------------------------------------------------
38642+
38643+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_config_update_request
38644+
:members:
38645+
:show-inheritance:
38646+
38647+
datadog\_api\_client.v2.model.rum\_retention\_quota\_custom\_config module
38648+
--------------------------------------------------------------------------
38649+
38650+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_custom_config
38651+
:members:
38652+
:show-inheritance:
38653+
38654+
datadog\_api\_client.v2.model.rum\_retention\_quota\_mode module
38655+
----------------------------------------------------------------
38656+
38657+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_mode
38658+
:members:
38659+
:show-inheritance:
38660+
38661+
datadog\_api\_client.v2.model.rum\_retention\_quota\_reached\_action module
38662+
---------------------------------------------------------------------------
38663+
38664+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_reached_action
38665+
:members:
38666+
:show-inheritance:
38667+
38668+
datadog\_api\_client.v2.model.rum\_retention\_quota\_scope\_type module
38669+
-----------------------------------------------------------------------
38670+
38671+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_scope_type
38672+
:members:
38673+
:show-inheritance:
38674+
38675+
datadog\_api\_client.v2.model.rum\_retention\_quota\_window\_type module
38676+
------------------------------------------------------------------------
38677+
38678+
.. automodule:: datadog_api_client.v2.model.rum_retention_quota_window_type
38679+
:members:
38680+
:show-inheritance:
38681+
3859138682
datadog\_api\_client.v2.model.rum\_sdk\_config\_attributes module
3859238683
-----------------------------------------------------------------
3859338684

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Delete a RUM retention quota configuration returns "No Content" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
7+
from datadog_api_client.v2.model.rum_retention_quota_scope_type import RumRetentionQuotaScopeType
8+
9+
configuration = Configuration()
10+
with ApiClient(configuration) as api_client:
11+
api_instance = RUMRetentionQuotaApi(api_client)
12+
api_instance.delete_rum_quota_config(
13+
scope_type=RumRetentionQuotaScopeType.APPLICATION,
14+
scope_id="ced16651-97b6-4e67-8590-8caec3af0695",
15+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Get a RUM retention quota configuration returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
7+
from datadog_api_client.v2.model.rum_retention_quota_scope_type import RumRetentionQuotaScopeType
8+
9+
configuration = Configuration()
10+
with ApiClient(configuration) as api_client:
11+
api_instance = RUMRetentionQuotaApi(api_client)
12+
response = api_instance.get_rum_quota_config(
13+
scope_type=RumRetentionQuotaScopeType.APPLICATION,
14+
scope_id="ced16651-97b6-4e67-8590-8caec3af0695",
15+
)
16+
17+
print(response)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
"""
2+
Create or update a RUM retention quota config returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
7+
from datadog_api_client.v2.model.rum_retention_quota_adaptive_config import RumRetentionQuotaAdaptiveConfig
8+
from datadog_api_client.v2.model.rum_retention_quota_config_type import RumRetentionQuotaConfigType
9+
from datadog_api_client.v2.model.rum_retention_quota_config_update_attributes import (
10+
RumRetentionQuotaConfigUpdateAttributes,
11+
)
12+
from datadog_api_client.v2.model.rum_retention_quota_config_update_data import RumRetentionQuotaConfigUpdateData
13+
from datadog_api_client.v2.model.rum_retention_quota_config_update_request import RumRetentionQuotaConfigUpdateRequest
14+
from datadog_api_client.v2.model.rum_retention_quota_custom_config import RumRetentionQuotaCustomConfig
15+
from datadog_api_client.v2.model.rum_retention_quota_mode import RumRetentionQuotaMode
16+
from datadog_api_client.v2.model.rum_retention_quota_reached_action import RumRetentionQuotaReachedAction
17+
from datadog_api_client.v2.model.rum_retention_quota_scope_type import RumRetentionQuotaScopeType
18+
from datadog_api_client.v2.model.rum_retention_quota_window_type import RumRetentionQuotaWindowType
19+
20+
body = RumRetentionQuotaConfigUpdateRequest(
21+
data=RumRetentionQuotaConfigUpdateData(
22+
attributes=RumRetentionQuotaConfigUpdateAttributes(
23+
adaptive=RumRetentionQuotaAdaptiveConfig(
24+
max_retention_rate=0.5,
25+
),
26+
custom=RumRetentionQuotaCustomConfig(
27+
daily_reset_time="08:00",
28+
daily_reset_timezone="+09:00",
29+
quota_reached_action=RumRetentionQuotaReachedAction.STOP,
30+
session_limit=1000000,
31+
window_type=RumRetentionQuotaWindowType.DAILY,
32+
),
33+
mode=RumRetentionQuotaMode.CUSTOM,
34+
),
35+
id="ced16651-97b6-4e67-8590-8caec3af0695",
36+
type=RumRetentionQuotaConfigType.RUM_QUOTA_CONFIG,
37+
),
38+
)
39+
40+
configuration = Configuration()
41+
with ApiClient(configuration) as api_client:
42+
api_instance = RUMRetentionQuotaApi(api_client)
43+
response = api_instance.upsert_rum_quota_config(
44+
scope_type=RumRetentionQuotaScopeType.APPLICATION, scope_id="ced16651-97b6-4e67-8590-8caec3af0695", body=body
45+
)
46+
47+
print(response)
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
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.rum_retention_quota_scope_type import RumRetentionQuotaScopeType
11+
from datadog_api_client.v2.model.rum_retention_quota_config_response import RumRetentionQuotaConfigResponse
12+
from datadog_api_client.v2.model.rum_retention_quota_config_update_request import RumRetentionQuotaConfigUpdateRequest
13+
14+
15+
class RUMRetentionQuotaApi:
16+
"""
17+
Manage RUM retention quota configurations for your organization's RUM applications.
18+
"""
19+
20+
def __init__(self, api_client=None):
21+
if api_client is None:
22+
api_client = ApiClient(Configuration())
23+
self.api_client = api_client
24+
25+
self._delete_rum_quota_config_endpoint = _Endpoint(
26+
settings={
27+
"response_type": None,
28+
"auth": ["apiKeyAuth", "appKeyAuth"],
29+
"endpoint_path": "/api/v2/rum/config/retention-quota/{scope_type}/{scope_id}",
30+
"operation_id": "delete_rum_quota_config",
31+
"http_method": "DELETE",
32+
"version": "v2",
33+
},
34+
params_map={
35+
"scope_type": {
36+
"required": True,
37+
"openapi_types": (RumRetentionQuotaScopeType,),
38+
"attribute": "scope_type",
39+
"location": "path",
40+
},
41+
"scope_id": {
42+
"required": True,
43+
"openapi_types": (str,),
44+
"attribute": "scope_id",
45+
"location": "path",
46+
},
47+
},
48+
headers_map={
49+
"accept": ["*/*"],
50+
},
51+
api_client=api_client,
52+
)
53+
54+
self._get_rum_quota_config_endpoint = _Endpoint(
55+
settings={
56+
"response_type": (RumRetentionQuotaConfigResponse,),
57+
"auth": ["apiKeyAuth", "appKeyAuth"],
58+
"endpoint_path": "/api/v2/rum/config/retention-quota/{scope_type}/{scope_id}",
59+
"operation_id": "get_rum_quota_config",
60+
"http_method": "GET",
61+
"version": "v2",
62+
},
63+
params_map={
64+
"scope_type": {
65+
"required": True,
66+
"openapi_types": (RumRetentionQuotaScopeType,),
67+
"attribute": "scope_type",
68+
"location": "path",
69+
},
70+
"scope_id": {
71+
"required": True,
72+
"openapi_types": (str,),
73+
"attribute": "scope_id",
74+
"location": "path",
75+
},
76+
},
77+
headers_map={
78+
"accept": ["application/json"],
79+
},
80+
api_client=api_client,
81+
)
82+
83+
self._upsert_rum_quota_config_endpoint = _Endpoint(
84+
settings={
85+
"response_type": (RumRetentionQuotaConfigResponse,),
86+
"auth": ["apiKeyAuth", "appKeyAuth"],
87+
"endpoint_path": "/api/v2/rum/config/retention-quota/{scope_type}/{scope_id}",
88+
"operation_id": "upsert_rum_quota_config",
89+
"http_method": "PUT",
90+
"version": "v2",
91+
},
92+
params_map={
93+
"scope_type": {
94+
"required": True,
95+
"openapi_types": (RumRetentionQuotaScopeType,),
96+
"attribute": "scope_type",
97+
"location": "path",
98+
},
99+
"scope_id": {
100+
"required": True,
101+
"openapi_types": (str,),
102+
"attribute": "scope_id",
103+
"location": "path",
104+
},
105+
"body": {
106+
"required": True,
107+
"openapi_types": (RumRetentionQuotaConfigUpdateRequest,),
108+
"location": "body",
109+
},
110+
},
111+
headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
112+
api_client=api_client,
113+
)
114+
115+
def delete_rum_quota_config(
116+
self,
117+
scope_type: RumRetentionQuotaScopeType,
118+
scope_id: str,
119+
) -> None:
120+
"""Delete a RUM retention quota configuration.
121+
122+
Delete the RUM retention quota configuration for a given scope.
123+
124+
:param scope_type: The type of scope the retention quota configuration applies to.
125+
:type scope_type: RumRetentionQuotaScopeType
126+
:param scope_id: The identifier of the scope the retention quota configuration applies to.
127+
For the ``application`` scope, this is the RUM application ID.
128+
:type scope_id: str
129+
:rtype: None
130+
"""
131+
kwargs: Dict[str, Any] = {}
132+
kwargs["scope_type"] = scope_type
133+
134+
kwargs["scope_id"] = scope_id
135+
136+
return self._delete_rum_quota_config_endpoint.call_with_http_info(**kwargs)
137+
138+
def get_rum_quota_config(
139+
self,
140+
scope_type: RumRetentionQuotaScopeType,
141+
scope_id: str,
142+
) -> RumRetentionQuotaConfigResponse:
143+
"""Get a RUM retention quota configuration.
144+
145+
Get the RUM retention quota configuration for a given scope.
146+
147+
:param scope_type: The type of scope the retention quota configuration applies to.
148+
:type scope_type: RumRetentionQuotaScopeType
149+
:param scope_id: The identifier of the scope the retention quota configuration applies to.
150+
For the ``application`` scope, this is the RUM application ID.
151+
:type scope_id: str
152+
:rtype: RumRetentionQuotaConfigResponse
153+
"""
154+
kwargs: Dict[str, Any] = {}
155+
kwargs["scope_type"] = scope_type
156+
157+
kwargs["scope_id"] = scope_id
158+
159+
return self._get_rum_quota_config_endpoint.call_with_http_info(**kwargs)
160+
161+
def upsert_rum_quota_config(
162+
self,
163+
scope_type: RumRetentionQuotaScopeType,
164+
scope_id: str,
165+
body: RumRetentionQuotaConfigUpdateRequest,
166+
) -> RumRetentionQuotaConfigResponse:
167+
"""Create or update a RUM retention quota config.
168+
169+
Create or update the RUM retention quota configuration for a given scope.
170+
Returns the retention quota configuration object when the request is successful.
171+
172+
:param scope_type: The type of scope the retention quota configuration applies to.
173+
:type scope_type: RumRetentionQuotaScopeType
174+
:param scope_id: The identifier of the scope the retention quota configuration applies to.
175+
For the ``application`` scope, this is the RUM application ID.
176+
:type scope_id: str
177+
:param body: The definition of the RUM retention quota configuration to create or update.
178+
:type body: RumRetentionQuotaConfigUpdateRequest
179+
:rtype: RumRetentionQuotaConfigResponse
180+
"""
181+
kwargs: Dict[str, Any] = {}
182+
kwargs["scope_type"] = scope_type
183+
184+
kwargs["scope_id"] = scope_id
185+
186+
kwargs["body"] = body
187+
188+
return self._upsert_rum_quota_config_endpoint.call_with_http_info(**kwargs)

‎src/datadog_api_client/v2/apis/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
from datadog_api_client.v2.api.rum_insights_api import RUMInsightsApi
9898
from datadog_api_client.v2.api.rum_operations_api import RUMOperationsApi
9999
from datadog_api_client.v2.api.rum_remote_config_api import RUMRemoteConfigApi
100+
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
100101
from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi
101102
from datadog_api_client.v2.api.report_schedules_api import ReportSchedulesApi
102103
from datadog_api_client.v2.api.reporting_and_sharing_api import ReportingAndSharingApi
@@ -241,6 +242,7 @@
241242
"RUMInsightsApi",
242243
"RUMOperationsApi",
243244
"RUMRemoteConfigApi",
245+
"RUMRetentionQuotaApi",
244246
"ReferenceTablesApi",
245247
"ReportSchedulesApi",
246248
"ReportingAndSharingApi",

0 commit comments

Comments
 (0)