Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 13 additions & 28 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,9 @@ components:
example: cd73a516-a481-4af5-8352-9b577465c77b
type: string
RumRetentionQuotaScopeTypeParameter:
description: The type of scope the retention quota configuration applies to.
description: |-
The type of scope the retention quota configuration applies to.
`application` is the only supported scope type.
in: path
name: scope_type
required: true
Expand Down Expand Up @@ -92488,25 +92490,9 @@ components:
$ref: "#/components/schemas/RumRetentionFilterData"
type: array
type: object
RumRetentionQuotaAdaptiveConfig:
description: The configuration used when `mode` is `adaptive`.
properties:
max_retention_rate:
description: The maximum fraction of sessions to retain, in the range `(0, 1]`.
example: 0.5
exclusiveMinimum: true
format: double
maximum: 1
minimum: 0
type: number
required:
- max_retention_rate
type: object
RumRetentionQuotaConfigAttributes:
description: The RUM retention quota configuration properties.
properties:
adaptive:
$ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig"
custom:
$ref: "#/components/schemas/RumRetentionQuotaCustomConfig"
mode:
Expand Down Expand Up @@ -92564,8 +92550,6 @@ components:
RumRetentionQuotaConfigUpdateAttributes:
description: The RUM retention quota configuration properties to create or update.
properties:
adaptive:
$ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig"
custom:
$ref: "#/components/schemas/RumRetentionQuotaCustomConfig"
mode:
Expand Down Expand Up @@ -92631,14 +92615,13 @@ components:
type: object
RumRetentionQuotaMode:
description: |-
The retention quota mode. `custom` enforces a fixed session limit, while
`adaptive` dynamically adjusts retention.
The retention quota mode. `custom` enforces a fixed session limit.
`custom` is the only supported mode.
enum:
- custom
- adaptive
example: custom
type: string
x-enum-varnames: ["CUSTOM", "ADAPTIVE"]
x-enum-varnames: ["CUSTOM"]
RumRetentionQuotaReachedAction:
description: The action to take when the session quota is reached.
enum:
Expand All @@ -92649,7 +92632,9 @@ components:
x-enum-varnames: ["STOP", "SLOWDOWN"]
RumRetentionQuotaScopeType:
default: application
description: The type of scope the retention quota configuration applies to.
description: |-
The type of scope the retention quota configuration applies to.
`application` is the only supported scope type.
enum:
- application
example: application
Expand Down Expand Up @@ -187415,7 +187400,7 @@ paths:
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Delete a RUM retention quota configuration
tags:
- RUM Retention Quota
- RUM Retention Quotas
x-permission:
operator: OR
permissions:
Expand Down Expand Up @@ -187478,7 +187463,7 @@ paths:
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Get a RUM retention quota configuration
tags:
- RUM Retention Quota
- RUM Retention Quotas
x-permission:
operator: OR
permissions:
Expand Down Expand Up @@ -187564,7 +187549,7 @@ paths:
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Create or update a RUM retention quota config
tags:
- RUM Retention Quota
- RUM Retention Quotas
x-codegen-request-body-name: body
x-permission:
operator: OR
Expand Down Expand Up @@ -218487,7 +218472,7 @@ tags:
name: RUM Remote Config
- description: |-
Manage RUM retention quota configurations for your organization's RUM applications.
name: RUM Retention Quota
name: RUM Retention Quotas
- description: View and manage Reference Tables in your organization.
name: Reference Tables
- description: |-
Expand Down
6 changes: 3 additions & 3 deletions docs/datadog_api_client.v2.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,10 @@ datadog\_api\_client.v2.api.rum\_retention\_filters\_api module
:members:
:show-inheritance:

datadog\_api\_client.v2.api.rum\_retention\_quota\_api module
-------------------------------------------------------------
datadog\_api\_client.v2.api.rum\_retention\_quotas\_api module
--------------------------------------------------------------

.. automodule:: datadog_api_client.v2.api.rum_retention_quota_api
.. automodule:: datadog_api_client.v2.api.rum_retention_quotas_api
:members:
:show-inheritance:

Expand Down
7 changes: 0 additions & 7 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39638,13 +39638,6 @@ datadog\_api\_client.v2.model.rum\_retention\_filters\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_retention\_quota\_adaptive\_config module
----------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.rum_retention_quota_adaptive_config
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_retention\_quota\_config\_attributes module
------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
from datadog_api_client.v2.api.rum_retention_quotas_api import RUMRetentionQuotasApi
from datadog_api_client.v2.model.rum_retention_quota_scope_type import RumRetentionQuotaScopeType

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = RUMRetentionQuotaApi(api_client)
api_instance = RUMRetentionQuotasApi(api_client)
api_instance.delete_rum_quota_config(
scope_type=RumRetentionQuotaScopeType.APPLICATION,
scope_id="ced16651-97b6-4e67-8590-8caec3af0695",
scope_id="cd73a516-a481-4af5-8352-9b577465c77b",
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
from datadog_api_client.v2.api.rum_retention_quotas_api import RUMRetentionQuotasApi
from datadog_api_client.v2.model.rum_retention_quota_scope_type import RumRetentionQuotaScopeType

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = RUMRetentionQuotaApi(api_client)
api_instance = RUMRetentionQuotasApi(api_client)
response = api_instance.get_rum_quota_config(
scope_type=RumRetentionQuotaScopeType.APPLICATION,
scope_id="ced16651-97b6-4e67-8590-8caec3af0695",
scope_id="cd73a516-a481-4af5-8352-9b577465c77b",
)

print(response)
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
from datadog_api_client.v2.model.rum_retention_quota_adaptive_config import RumRetentionQuotaAdaptiveConfig
from datadog_api_client.v2.api.rum_retention_quotas_api import RUMRetentionQuotasApi
from datadog_api_client.v2.model.rum_retention_quota_config_type import RumRetentionQuotaConfigType
from datadog_api_client.v2.model.rum_retention_quota_config_update_attributes import (
RumRetentionQuotaConfigUpdateAttributes,
Expand All @@ -20,9 +19,6 @@
body = RumRetentionQuotaConfigUpdateRequest(
data=RumRetentionQuotaConfigUpdateData(
attributes=RumRetentionQuotaConfigUpdateAttributes(
adaptive=RumRetentionQuotaAdaptiveConfig(
max_retention_rate=0.5,
),
custom=RumRetentionQuotaCustomConfig(
daily_reset_time="08:00",
daily_reset_timezone="+09:00",
Expand All @@ -32,16 +28,16 @@
),
mode=RumRetentionQuotaMode.CUSTOM,
),
id="ced16651-97b6-4e67-8590-8caec3af0695",
id="cd73a516-a481-4af5-8352-9b577465c77b",
type=RumRetentionQuotaConfigType.RUM_QUOTA_CONFIG,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = RUMRetentionQuotaApi(api_client)
api_instance = RUMRetentionQuotasApi(api_client)
response = api_instance.upsert_rum_quota_config(
scope_type=RumRetentionQuotaScopeType.APPLICATION, scope_id="ced16651-97b6-4e67-8590-8caec3af0695", body=body
scope_type=RumRetentionQuotaScopeType.APPLICATION, scope_id="cd73a516-a481-4af5-8352-9b577465c77b", body=body
)

print(response)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from datadog_api_client.v2.model.rum_retention_quota_config_update_request import RumRetentionQuotaConfigUpdateRequest


class RUMRetentionQuotaApi:
class RUMRetentionQuotasApi:
"""
Manage RUM retention quota configurations for your organization's RUM applications.
"""
Expand Down Expand Up @@ -122,6 +122,7 @@ def delete_rum_quota_config(
Delete the RUM retention quota configuration for a given scope.

:param scope_type: The type of scope the retention quota configuration applies to.
``application`` is the only supported scope type.
:type scope_type: RumRetentionQuotaScopeType
:param scope_id: The identifier of the scope the retention quota configuration applies to.
For the ``application`` scope, this is the RUM application ID.
Expand All @@ -145,6 +146,7 @@ def get_rum_quota_config(
Get the RUM retention quota configuration for a given scope.

:param scope_type: The type of scope the retention quota configuration applies to.
``application`` is the only supported scope type.
:type scope_type: RumRetentionQuotaScopeType
:param scope_id: The identifier of the scope the retention quota configuration applies to.
For the ``application`` scope, this is the RUM application ID.
Expand All @@ -170,6 +172,7 @@ def upsert_rum_quota_config(
Returns the retention quota configuration object when the request is successful.

:param scope_type: The type of scope the retention quota configuration applies to.
``application`` is the only supported scope type.
:type scope_type: RumRetentionQuotaScopeType
:param scope_id: The identifier of the scope the retention quota configuration applies to.
For the ``application`` scope, this is the RUM application ID.
Expand Down
4 changes: 2 additions & 2 deletions src/datadog_api_client/v2/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
from datadog_api_client.v2.api.rum_insights_api import RUMInsightsApi
from datadog_api_client.v2.api.rum_operations_api import RUMOperationsApi
from datadog_api_client.v2.api.rum_remote_config_api import RUMRemoteConfigApi
from datadog_api_client.v2.api.rum_retention_quota_api import RUMRetentionQuotaApi
from datadog_api_client.v2.api.rum_retention_quotas_api import RUMRetentionQuotasApi
from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi
from datadog_api_client.v2.api.report_schedules_api import ReportSchedulesApi
from datadog_api_client.v2.api.reporting_and_sharing_api import ReportingAndSharingApi
Expand Down Expand Up @@ -242,7 +242,7 @@
"RUMInsightsApi",
"RUMOperationsApi",
"RUMRemoteConfigApi",
"RUMRetentionQuotaApi",
"RUMRetentionQuotasApi",
"ReferenceTablesApi",
"ReportSchedulesApi",
"ReportingAndSharingApi",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.rum_retention_quota_adaptive_config import RumRetentionQuotaAdaptiveConfig
from datadog_api_client.v2.model.rum_retention_quota_custom_config import RumRetentionQuotaCustomConfig
from datadog_api_client.v2.model.rum_retention_quota_mode import RumRetentionQuotaMode


class RumRetentionQuotaConfigAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.rum_retention_quota_adaptive_config import RumRetentionQuotaAdaptiveConfig
from datadog_api_client.v2.model.rum_retention_quota_custom_config import RumRetentionQuotaCustomConfig
from datadog_api_client.v2.model.rum_retention_quota_mode import RumRetentionQuotaMode

return {
"adaptive": (RumRetentionQuotaAdaptiveConfig,),
"custom": (RumRetentionQuotaCustomConfig,),
"mode": (RumRetentionQuotaMode,),
"org_id": (int,),
Expand All @@ -37,7 +34,6 @@ def openapi_types(_):
}

attribute_map = {
"adaptive": "adaptive",
"custom": "custom",
"mode": "mode",
"org_id": "org_id",
Expand All @@ -49,7 +45,6 @@ def __init__(
self_,
mode: RumRetentionQuotaMode,
org_id: int,
adaptive: Union[RumRetentionQuotaAdaptiveConfig, UnsetType] = unset,
custom: Union[RumRetentionQuotaCustomConfig, UnsetType] = unset,
updated_at: Union[datetime, UnsetType] = unset,
updated_by: Union[str, UnsetType] = unset,
Expand All @@ -58,14 +53,11 @@ def __init__(
"""
The RUM retention quota configuration properties.

:param adaptive: The configuration used when ``mode`` is ``adaptive``.
:type adaptive: RumRetentionQuotaAdaptiveConfig, optional

:param custom: The configuration used when ``mode`` is ``custom``.
:type custom: RumRetentionQuotaCustomConfig, optional

:param mode: The retention quota mode. ``custom`` enforces a fixed session limit, while
``adaptive`` dynamically adjusts retention.
:param mode: The retention quota mode. ``custom`` enforces a fixed session limit.
``custom`` is the only supported mode.
:type mode: RumRetentionQuotaMode

:param org_id: The ID of the organization the retention quota configuration belongs to.
Expand All @@ -77,8 +69,6 @@ def __init__(
:param updated_by: The handle of the user who last updated the retention quota configuration.
:type updated_by: str, optional
"""
if adaptive is not unset:
kwargs["adaptive"] = adaptive
if custom is not unset:
kwargs["custom"] = custom
if updated_at is not unset:
Expand Down
Loading
Loading