From 4ede0ff09e1a5834adc2491778eeb2f142fb8ae8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 2 Jun 2026 19:20:19 +0000 Subject: [PATCH] Regenerate client from commit 80606a9 of spec repo --- .generator/schemas/v2/openapi.yaml | 395 ++++++++++++++++++ docs/datadog_api_client.v2.api.rst | 7 + docs/datadog_api_client.v2.model.rst | 98 +++++ .../GetHardcodedRetentionFilter.py | 16 + .../ListHardcodedRetentionFilters.py | 15 + .../UpdateHardcodedRetentionFilter.py | 39 ++ .../rum_retention_filters_hardcoded_api.py | 178 ++++++++ src/datadog_api_client/v2/apis/__init__.py | 2 + .../rum_hardcoded_cross_product_sampling.py | 75 ++++ ...oded_cross_product_sampling_editability.py | 48 +++ ...hardcoded_cross_product_sampling_update.py | 78 ++++ ...m_hardcoded_retention_filter_attributes.py | 113 +++++ .../rum_hardcoded_retention_filter_data.py | 78 ++++ ...m_hardcoded_retention_filter_event_type.py | 53 +++ .../rum_hardcoded_retention_filter_meta.py | 66 +++ ..._hardcoded_retention_filter_meta_source.py | 41 ++ ...rum_hardcoded_retention_filter_response.py | 42 ++ .../rum_hardcoded_retention_filter_type.py | 37 ++ ...oded_retention_filter_update_attributes.py | 50 +++ ..._hardcoded_retention_filter_update_data.py | 65 +++ ...rdcoded_retention_filter_update_request.py | 44 ++ ...um_hardcoded_retention_filters_response.py | 42 ++ src/datadog_api_client/v2/models/__init__.py | 36 ++ .../rum_hardcoded_retention_filters.feature | 59 +++ .../rum_retention_filters_hardcoded.feature | 59 +++ tests/v2/features/undo.json | 18 + 26 files changed, 1754 insertions(+) create mode 100644 examples/v2/rum-retention-filters-hardcoded/GetHardcodedRetentionFilter.py create mode 100644 examples/v2/rum-retention-filters-hardcoded/ListHardcodedRetentionFilters.py create mode 100644 examples/v2/rum-retention-filters-hardcoded/UpdateHardcodedRetentionFilter.py create mode 100644 src/datadog_api_client/v2/api/rum_retention_filters_hardcoded_api.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_editability.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_update.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_attributes.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_data.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_event_type.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta_source.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_response.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_type.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_attributes.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_data.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_request.py create mode 100644 src/datadog_api_client/v2/model/rum_hardcoded_retention_filters_response.py create mode 100644 tests/v2/features/rum_hardcoded_retention_filters.feature create mode 100644 tests/v2/features/rum_retention_filters_hardcoded.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 52c5ef104a..ed6c1a55d5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1558,6 +1558,20 @@ components: required: true schema: type: string + RumHardcodedRetentionFilterApplicationIDParameter: + description: RUM application ID. + in: path + name: app_id + required: true + schema: + type: string + RumHardcodedRetentionFilterIDParameter: + description: Hardcoded retention filter ID. + in: path + name: rf_id + required: true + schema: + type: string RumMetricIDParameter: description: The name of the rum-based metric. in: path @@ -72837,6 +72851,223 @@ components: minimum: 0 type: number type: object + RumHardcodedCrossProductSampling: + description: Cross-product retention settings for a hardcoded retention filter. + properties: + session_replay_enabled: + description: Indicates whether Session Replay cross-product retention is active. + example: true + type: boolean + session_replay_sample_rate: + description: Percentage (0–100) of retained sessions with an ingested replay whose replay data is kept. + example: 50.0 + format: double + maximum: 100 + minimum: 0 + type: number + trace_enabled: + description: Indicates whether Trace cross-product retention is active. + example: true + type: boolean + trace_sample_rate: + description: Percentage (0–100) of retained sessions with ingested traces whose traces are indexed. + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + type: object + RumHardcodedCrossProductSamplingEditability: + description: Flags indicating which `cross_product_sampling` fields can be updated. Read-only. + properties: + session_replay_sample_rate: + description: |- + If `true`, `cross_product_sampling.session_replay_sample_rate` can be updated on this filter. + example: true + type: boolean + trace_sample_rate: + description: If `true`, `cross_product_sampling.trace_sample_rate` can be updated on this filter. + example: false + type: boolean + type: object + RumHardcodedCrossProductSamplingUpdate: + description: |- + Partial update for cross-product retention of a hardcoded retention filter. + Only fields whose matching flag in `cross_product_sampling_editability` is `true` can be updated. + properties: + session_replay_enabled: + description: Controls whether Session Replay cross-product retention is active. Omit to leave unchanged. + example: true + type: boolean + session_replay_sample_rate: + description: |- + Percentage (0–100) of retained sessions with an ingested replay whose replay data is kept. + Omit to leave unchanged. + example: 50.0 + format: double + maximum: 100 + minimum: 0 + type: number + trace_enabled: + description: Controls whether Trace cross-product retention is active. Omit to leave unchanged. + example: true + type: boolean + trace_sample_rate: + description: |- + Percentage (0–100) of retained sessions with ingested traces whose traces are indexed. + Omit to leave unchanged. + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + type: object + RumHardcodedRetentionFilterAttributes: + description: The attributes of a hardcoded retention filter. + properties: + cross_product_sampling: + $ref: "#/components/schemas/RumHardcodedCrossProductSampling" + cross_product_sampling_editability: + $ref: "#/components/schemas/RumHardcodedCrossProductSamplingEditability" + enabled: + description: Indicates whether the hardcoded retention filter is active. Read-only. + example: true + type: boolean + event_type: + $ref: "#/components/schemas/RumHardcodedRetentionFilterEventType" + name: + description: The name of the hardcoded retention filter. Read-only. + example: Replay sessions + type: string + query: + description: The query string for the hardcoded retention filter. Read-only. + example: "@session.has_replay:true" + type: string + sample_rate: + description: The retention sample rate (0–100) for the hardcoded filter. Read-only. + example: 100.0 + format: double + maximum: 100 + minimum: 0 + type: number + type: object + RumHardcodedRetentionFilterData: + description: A hardcoded retention filter. + properties: + attributes: + $ref: "#/components/schemas/RumHardcodedRetentionFilterAttributes" + id: + description: The ID of the hardcoded retention filter. + example: forced_replay_sessions + type: string + meta: + $ref: "#/components/schemas/RumHardcodedRetentionFilterMeta" + type: + $ref: "#/components/schemas/RumHardcodedRetentionFilterType" + type: object + RumHardcodedRetentionFilterEventType: + description: The type of RUM events the hardcoded filter applies to. Read-only. + enum: + - session + - view + - action + - error + - resource + - long_task + - vital + example: session + type: string + x-enum-varnames: + - SESSION + - VIEW + - ACTION + - ERROR + - RESOURCE + - LONG_TASK + - VITAL + RumHardcodedRetentionFilterMeta: + description: Metadata about the hardcoded retention filter. + properties: + source: + $ref: "#/components/schemas/RumHardcodedRetentionFilterMetaSource" + updated_at: + description: Unix epoch (in milliseconds) of the last update. + example: 1735689600000 + format: int64 + type: integer + updated_by_handle: + description: Handle of the user who last updated the filter. + example: jane.doe@example.com + type: string + type: object + RumHardcodedRetentionFilterMetaSource: + description: The source of the last update to a hardcoded retention filter. + enum: + - default + - ui + - terraform + example: ui + type: string + x-enum-varnames: + - DEFAULT + - UI + - TERRAFORM + RumHardcodedRetentionFilterResponse: + description: A hardcoded retention filter response body. + properties: + data: + $ref: "#/components/schemas/RumHardcodedRetentionFilterData" + type: object + RumHardcodedRetentionFilterType: + default: hardcoded_retention_filters + description: The resource type. The value must be `hardcoded_retention_filters`. + enum: + - hardcoded_retention_filters + example: hardcoded_retention_filters + type: string + x-enum-varnames: + - HARDCODED_RETENTION_FILTERS + RumHardcodedRetentionFilterUpdateAttributes: + description: |- + The attributes of a hardcoded retention filter that can be updated. + Only fields whose matching flag in `cross_product_sampling_editability` is `true` can be modified. + properties: + cross_product_sampling: + $ref: "#/components/schemas/RumHardcodedCrossProductSamplingUpdate" + type: object + RumHardcodedRetentionFilterUpdateData: + description: The hardcoded retention filter properties to update. + properties: + attributes: + $ref: "#/components/schemas/RumHardcodedRetentionFilterUpdateAttributes" + id: + description: The ID of the hardcoded retention filter. Must match the `rf_id` path parameter. + example: forced_replay_sessions + type: string + type: + $ref: "#/components/schemas/RumHardcodedRetentionFilterType" + required: + - id + - type + - attributes + type: object + RumHardcodedRetentionFilterUpdateRequest: + description: The hardcoded retention filter body to update. + properties: + data: + $ref: "#/components/schemas/RumHardcodedRetentionFilterUpdateData" + required: + - data + type: object + RumHardcodedRetentionFiltersResponse: + description: All hardcoded retention filters for a RUM application. + properties: + data: + description: A list of hardcoded retention filters. + items: + $ref: "#/components/schemas/RumHardcodedRetentionFilterData" + type: array + type: object RumMetricCompute: description: The compute rule to compute the rum-based metric. properties: @@ -150164,6 +150395,167 @@ paths: operator: OR permissions: - rum_apps_write + /api/v2/rum/applications/{app_id}/hardcoded_retention_filters: + get: + description: Get the list of hardcoded retention filters for a RUM application. + operationId: ListHardcodedRetentionFilters + parameters: + - $ref: "#/components/parameters/RumHardcodedRetentionFilterApplicationIDParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cross_product_sampling: + session_replay_enabled: true + session_replay_sample_rate: 50.0 + trace_enabled: true + trace_sample_rate: 25.0 + cross_product_sampling_editability: + session_replay_sample_rate: true + trace_sample_rate: false + enabled: true + event_type: session + name: Replay sessions + query: "@session.has_replay:true" + sample_rate: 100.0 + id: forced_replay_sessions + meta: + source: ui + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: hardcoded_retention_filters + schema: + $ref: "#/components/schemas/RumHardcodedRetentionFiltersResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all hardcoded retention filters + tags: + - RUM Retention Filters Hardcoded + /api/v2/rum/applications/{app_id}/hardcoded_retention_filters/{rf_id}: + get: + description: Get a single hardcoded retention filter for a RUM application. + operationId: GetHardcodedRetentionFilter + parameters: + - $ref: "#/components/parameters/RumHardcodedRetentionFilterApplicationIDParameter" + - $ref: "#/components/parameters/RumHardcodedRetentionFilterIDParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cross_product_sampling: + session_replay_enabled: true + session_replay_sample_rate: 50.0 + trace_enabled: true + trace_sample_rate: 25.0 + cross_product_sampling_editability: + session_replay_sample_rate: true + trace_sample_rate: false + enabled: true + event_type: session + name: Replay sessions + query: "@session.has_replay:true" + sample_rate: 100.0 + id: forced_replay_sessions + meta: + source: ui + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: hardcoded_retention_filters + schema: + $ref: "#/components/schemas/RumHardcodedRetentionFilterResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a hardcoded retention filter + tags: + - RUM Retention Filters Hardcoded + patch: + description: |- + Update the cross-product sample rates of a hardcoded retention filter for a RUM application. + Only fields whose matching flag in `cross_product_sampling_editability` is `true` can be updated. + Any other field is read-only and cannot be sent in the payload. + Returns the updated hardcoded retention filter when the request is successful. + operationId: UpdateHardcodedRetentionFilter + parameters: + - $ref: "#/components/parameters/RumHardcodedRetentionFilterApplicationIDParameter" + - $ref: "#/components/parameters/RumHardcodedRetentionFilterIDParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cross_product_sampling: + session_replay_enabled: true + session_replay_sample_rate: 50.0 + id: forced_replay_sessions + type: hardcoded_retention_filters + schema: + $ref: "#/components/schemas/RumHardcodedRetentionFilterUpdateRequest" + description: New cross-product sample rates for the hardcoded retention filter. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cross_product_sampling: + session_replay_enabled: true + session_replay_sample_rate: 50.0 + trace_enabled: true + trace_sample_rate: 25.0 + cross_product_sampling_editability: + session_replay_sample_rate: true + trace_sample_rate: false + enabled: true + event_type: session + name: Replay sessions + query: "@session.has_replay:true" + sample_rate: 100.0 + id: forced_replay_sessions + meta: + source: ui + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: hardcoded_retention_filters + schema: + $ref: "#/components/schemas/RumHardcodedRetentionFilterResponse" + description: Updated + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a hardcoded retention filter + tags: + - RUM Retention Filters Hardcoded + x-codegen-request-body-name: body /api/v2/rum/applications/{app_id}/relationships/retention_filters: patch: description: |- @@ -175551,6 +175943,9 @@ tags: - description: |- Get insights into the performance of your Real User Monitoring (RUM) applications over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information name: RUM Insights + - description: |- + Manage hardcoded retention filters through [Manage Applications](https://app.datadoghq.com/rum/list) in RUM. + name: RUM Retention Filters Hardcoded - description: View and manage Reference Tables in your organization. name: Reference Tables - description: |- diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index eb7f38e42c..0c0ecd7fc3 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -662,6 +662,13 @@ datadog\_api\_client.v2.api.rum\_retention\_filters\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.rum\_retention\_filters\_hardcoded\_api module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.rum_retention_filters_hardcoded_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.salesforce\_integration\_api module --------------------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 4316c3bc44..65c20de44c 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -31322,6 +31322,104 @@ datadog\_api\_client.v2.model.rum\_group\_by\_total module :members: :show-inheritance: +datadog\_api\_client.v2.model.rum\_hardcoded\_cross\_product\_sampling module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_cross\_product\_sampling\_editability module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_editability + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_cross\_product\_sampling\_update module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_update + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_attributes module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_data module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_event\_type module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_event_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_meta module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_meta\_source module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_response module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_type module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_update\_attributes module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_update\_data module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filter\_update\_request module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_hardcoded\_retention\_filters\_response module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_hardcoded_retention_filters_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.rum\_metric\_compute module --------------------------------------------------------- diff --git a/examples/v2/rum-retention-filters-hardcoded/GetHardcodedRetentionFilter.py b/examples/v2/rum-retention-filters-hardcoded/GetHardcodedRetentionFilter.py new file mode 100644 index 0000000000..31d5ac03a7 --- /dev/null +++ b/examples/v2/rum-retention-filters-hardcoded/GetHardcodedRetentionFilter.py @@ -0,0 +1,16 @@ +""" +Get a hardcoded retention filter returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_retention_filters_hardcoded_api import RUMRetentionFiltersHardcodedApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = RUMRetentionFiltersHardcodedApi(api_client) + response = api_instance.get_hardcoded_retention_filter( + app_id="Example-RUM-Retention-Filters-Hardcoded", + rf_id="Example-RUM-Retention-Filters-Hardcoded", + ) + + print(response) diff --git a/examples/v2/rum-retention-filters-hardcoded/ListHardcodedRetentionFilters.py b/examples/v2/rum-retention-filters-hardcoded/ListHardcodedRetentionFilters.py new file mode 100644 index 0000000000..0dd066e38a --- /dev/null +++ b/examples/v2/rum-retention-filters-hardcoded/ListHardcodedRetentionFilters.py @@ -0,0 +1,15 @@ +""" +Get all hardcoded retention filters returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_retention_filters_hardcoded_api import RUMRetentionFiltersHardcodedApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = RUMRetentionFiltersHardcodedApi(api_client) + response = api_instance.list_hardcoded_retention_filters( + app_id="Example-RUM-Retention-Filters-Hardcoded", + ) + + print(response) diff --git a/examples/v2/rum-retention-filters-hardcoded/UpdateHardcodedRetentionFilter.py b/examples/v2/rum-retention-filters-hardcoded/UpdateHardcodedRetentionFilter.py new file mode 100644 index 0000000000..1ff0031bb4 --- /dev/null +++ b/examples/v2/rum-retention-filters-hardcoded/UpdateHardcodedRetentionFilter.py @@ -0,0 +1,39 @@ +""" +Update a hardcoded retention filter returns "Updated" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_retention_filters_hardcoded_api import RUMRetentionFiltersHardcodedApi +from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_update import ( + RumHardcodedCrossProductSamplingUpdate, +) +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_type import RumHardcodedRetentionFilterType +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_attributes import ( + RumHardcodedRetentionFilterUpdateAttributes, +) +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_data import RumHardcodedRetentionFilterUpdateData +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_request import ( + RumHardcodedRetentionFilterUpdateRequest, +) + +body = RumHardcodedRetentionFilterUpdateRequest( + data=RumHardcodedRetentionFilterUpdateData( + id="REPLACE.ME", + type=RumHardcodedRetentionFilterType.HARDCODED_RETENTION_FILTERS, + attributes=RumHardcodedRetentionFilterUpdateAttributes( + cross_product_sampling=RumHardcodedCrossProductSamplingUpdate( + session_replay_sample_rate=50.0, + session_replay_enabled=True, + ), + ), + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = RUMRetentionFiltersHardcodedApi(api_client) + response = api_instance.update_hardcoded_retention_filter( + app_id="Example-RUM-Retention-Filters-Hardcoded", rf_id="Example-RUM-Retention-Filters-Hardcoded", body=body + ) + + print(response) diff --git a/src/datadog_api_client/v2/api/rum_retention_filters_hardcoded_api.py b/src/datadog_api_client/v2/api/rum_retention_filters_hardcoded_api.py new file mode 100644 index 0000000000..31b4ca3347 --- /dev/null +++ b/src/datadog_api_client/v2/api/rum_retention_filters_hardcoded_api.py @@ -0,0 +1,178 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Dict + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.v2.model.rum_hardcoded_retention_filters_response import RumHardcodedRetentionFiltersResponse +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_response import RumHardcodedRetentionFilterResponse +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_request import ( + RumHardcodedRetentionFilterUpdateRequest, +) + + +class RUMRetentionFiltersHardcodedApi: + """ + Manage hardcoded retention filters through `Manage Applications `_ in RUM. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._get_hardcoded_retention_filter_endpoint = _Endpoint( + settings={ + "response_type": (RumHardcodedRetentionFilterResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/rum/applications/{app_id}/hardcoded_retention_filters/{rf_id}", + "operation_id": "get_hardcoded_retention_filter", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (str,), + "attribute": "app_id", + "location": "path", + }, + "rf_id": { + "required": True, + "openapi_types": (str,), + "attribute": "rf_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_hardcoded_retention_filters_endpoint = _Endpoint( + settings={ + "response_type": (RumHardcodedRetentionFiltersResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/rum/applications/{app_id}/hardcoded_retention_filters", + "operation_id": "list_hardcoded_retention_filters", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (str,), + "attribute": "app_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._update_hardcoded_retention_filter_endpoint = _Endpoint( + settings={ + "response_type": (RumHardcodedRetentionFilterResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/rum/applications/{app_id}/hardcoded_retention_filters/{rf_id}", + "operation_id": "update_hardcoded_retention_filter", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (str,), + "attribute": "app_id", + "location": "path", + }, + "rf_id": { + "required": True, + "openapi_types": (str,), + "attribute": "rf_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (RumHardcodedRetentionFilterUpdateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def get_hardcoded_retention_filter( + self, + app_id: str, + rf_id: str, + ) -> RumHardcodedRetentionFilterResponse: + """Get a hardcoded retention filter. + + Get a single hardcoded retention filter for a RUM application. + + :param app_id: RUM application ID. + :type app_id: str + :param rf_id: Hardcoded retention filter ID. + :type rf_id: str + :rtype: RumHardcodedRetentionFilterResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["rf_id"] = rf_id + + return self._get_hardcoded_retention_filter_endpoint.call_with_http_info(**kwargs) + + def list_hardcoded_retention_filters( + self, + app_id: str, + ) -> RumHardcodedRetentionFiltersResponse: + """Get all hardcoded retention filters. + + Get the list of hardcoded retention filters for a RUM application. + + :param app_id: RUM application ID. + :type app_id: str + :rtype: RumHardcodedRetentionFiltersResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + return self._list_hardcoded_retention_filters_endpoint.call_with_http_info(**kwargs) + + def update_hardcoded_retention_filter( + self, + app_id: str, + rf_id: str, + body: RumHardcodedRetentionFilterUpdateRequest, + ) -> RumHardcodedRetentionFilterResponse: + """Update a hardcoded retention filter. + + Update the cross-product sample rates of a hardcoded retention filter for a RUM application. + Only fields whose matching flag in ``cross_product_sampling_editability`` is ``true`` can be updated. + Any other field is read-only and cannot be sent in the payload. + Returns the updated hardcoded retention filter when the request is successful. + + :param app_id: RUM application ID. + :type app_id: str + :param rf_id: Hardcoded retention filter ID. + :type rf_id: str + :param body: New cross-product sample rates for the hardcoded retention filter. + :type body: RumHardcodedRetentionFilterUpdateRequest + :rtype: RumHardcodedRetentionFilterResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["rf_id"] = rf_id + + kwargs["body"] = body + + return self._update_hardcoded_retention_filter_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 194d10485c..d3bb626150 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -82,6 +82,7 @@ from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi from datadog_api_client.v2.api.rum_api import RUMApi from datadog_api_client.v2.api.rum_insights_api import RUMInsightsApi +from datadog_api_client.v2.api.rum_retention_filters_hardcoded_api import RUMRetentionFiltersHardcodedApi from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi from datadog_api_client.v2.api.restriction_policies_api import RestrictionPoliciesApi from datadog_api_client.v2.api.roles_api import RolesApi @@ -205,6 +206,7 @@ "ProductAnalyticsApi", "RUMApi", "RUMInsightsApi", + "RUMRetentionFiltersHardcodedApi", "ReferenceTablesApi", "RestrictionPoliciesApi", "RolesApi", diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling.py b/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling.py new file mode 100644 index 0000000000..b8e4ad5a06 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling.py @@ -0,0 +1,75 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RumHardcodedCrossProductSampling(ModelNormal): + validations = { + "session_replay_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + "trace_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "session_replay_enabled": (bool,), + "session_replay_sample_rate": (float,), + "trace_enabled": (bool,), + "trace_sample_rate": (float,), + } + + attribute_map = { + "session_replay_enabled": "session_replay_enabled", + "session_replay_sample_rate": "session_replay_sample_rate", + "trace_enabled": "trace_enabled", + "trace_sample_rate": "trace_sample_rate", + } + + def __init__( + self_, + session_replay_enabled: Union[bool, UnsetType] = unset, + session_replay_sample_rate: Union[float, UnsetType] = unset, + trace_enabled: Union[bool, UnsetType] = unset, + trace_sample_rate: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Cross-product retention settings for a hardcoded retention filter. + + :param session_replay_enabled: Indicates whether Session Replay cross-product retention is active. + :type session_replay_enabled: bool, optional + + :param session_replay_sample_rate: Percentage (0–100) of retained sessions with an ingested replay whose replay data is kept. + :type session_replay_sample_rate: float, optional + + :param trace_enabled: Indicates whether Trace cross-product retention is active. + :type trace_enabled: bool, optional + + :param trace_sample_rate: Percentage (0–100) of retained sessions with ingested traces whose traces are indexed. + :type trace_sample_rate: float, optional + """ + if session_replay_enabled is not unset: + kwargs["session_replay_enabled"] = session_replay_enabled + if session_replay_sample_rate is not unset: + kwargs["session_replay_sample_rate"] = session_replay_sample_rate + if trace_enabled is not unset: + kwargs["trace_enabled"] = trace_enabled + if trace_sample_rate is not unset: + kwargs["trace_sample_rate"] = trace_sample_rate + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_editability.py b/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_editability.py new file mode 100644 index 0000000000..3f0afdaf3b --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_editability.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RumHardcodedCrossProductSamplingEditability(ModelNormal): + @cached_property + def openapi_types(_): + return { + "session_replay_sample_rate": (bool,), + "trace_sample_rate": (bool,), + } + + attribute_map = { + "session_replay_sample_rate": "session_replay_sample_rate", + "trace_sample_rate": "trace_sample_rate", + } + + def __init__( + self_, + session_replay_sample_rate: Union[bool, UnsetType] = unset, + trace_sample_rate: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Flags indicating which ``cross_product_sampling`` fields can be updated. Read-only. + + :param session_replay_sample_rate: If ``true`` , ``cross_product_sampling.session_replay_sample_rate`` can be updated on this filter. + :type session_replay_sample_rate: bool, optional + + :param trace_sample_rate: If ``true`` , ``cross_product_sampling.trace_sample_rate`` can be updated on this filter. + :type trace_sample_rate: bool, optional + """ + if session_replay_sample_rate is not unset: + kwargs["session_replay_sample_rate"] = session_replay_sample_rate + if trace_sample_rate is not unset: + kwargs["trace_sample_rate"] = trace_sample_rate + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_update.py b/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_update.py new file mode 100644 index 0000000000..680ae7f33f --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_cross_product_sampling_update.py @@ -0,0 +1,78 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RumHardcodedCrossProductSamplingUpdate(ModelNormal): + validations = { + "session_replay_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + "trace_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "session_replay_enabled": (bool,), + "session_replay_sample_rate": (float,), + "trace_enabled": (bool,), + "trace_sample_rate": (float,), + } + + attribute_map = { + "session_replay_enabled": "session_replay_enabled", + "session_replay_sample_rate": "session_replay_sample_rate", + "trace_enabled": "trace_enabled", + "trace_sample_rate": "trace_sample_rate", + } + + def __init__( + self_, + session_replay_enabled: Union[bool, UnsetType] = unset, + session_replay_sample_rate: Union[float, UnsetType] = unset, + trace_enabled: Union[bool, UnsetType] = unset, + trace_sample_rate: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Partial update for cross-product retention of a hardcoded retention filter. + Only fields whose matching flag in ``cross_product_sampling_editability`` is ``true`` can be updated. + + :param session_replay_enabled: Controls whether Session Replay cross-product retention is active. Omit to leave unchanged. + :type session_replay_enabled: bool, optional + + :param session_replay_sample_rate: Percentage (0–100) of retained sessions with an ingested replay whose replay data is kept. + Omit to leave unchanged. + :type session_replay_sample_rate: float, optional + + :param trace_enabled: Controls whether Trace cross-product retention is active. Omit to leave unchanged. + :type trace_enabled: bool, optional + + :param trace_sample_rate: Percentage (0–100) of retained sessions with ingested traces whose traces are indexed. + Omit to leave unchanged. + :type trace_sample_rate: float, optional + """ + if session_replay_enabled is not unset: + kwargs["session_replay_enabled"] = session_replay_enabled + if session_replay_sample_rate is not unset: + kwargs["session_replay_sample_rate"] = session_replay_sample_rate + if trace_enabled is not unset: + kwargs["trace_enabled"] = trace_enabled + if trace_sample_rate is not unset: + kwargs["trace_sample_rate"] = trace_sample_rate + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_attributes.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_attributes.py new file mode 100644 index 0000000000..f1474f2357 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_attributes.py @@ -0,0 +1,113 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling import RumHardcodedCrossProductSampling + from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_editability import ( + RumHardcodedCrossProductSamplingEditability, + ) + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_event_type import ( + RumHardcodedRetentionFilterEventType, + ) + + +class RumHardcodedRetentionFilterAttributes(ModelNormal): + validations = { + "sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling import RumHardcodedCrossProductSampling + from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_editability import ( + RumHardcodedCrossProductSamplingEditability, + ) + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_event_type import ( + RumHardcodedRetentionFilterEventType, + ) + + return { + "cross_product_sampling": (RumHardcodedCrossProductSampling,), + "cross_product_sampling_editability": (RumHardcodedCrossProductSamplingEditability,), + "enabled": (bool,), + "event_type": (RumHardcodedRetentionFilterEventType,), + "name": (str,), + "query": (str,), + "sample_rate": (float,), + } + + attribute_map = { + "cross_product_sampling": "cross_product_sampling", + "cross_product_sampling_editability": "cross_product_sampling_editability", + "enabled": "enabled", + "event_type": "event_type", + "name": "name", + "query": "query", + "sample_rate": "sample_rate", + } + + def __init__( + self_, + cross_product_sampling: Union[RumHardcodedCrossProductSampling, UnsetType] = unset, + cross_product_sampling_editability: Union[RumHardcodedCrossProductSamplingEditability, UnsetType] = unset, + enabled: Union[bool, UnsetType] = unset, + event_type: Union[RumHardcodedRetentionFilterEventType, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + query: Union[str, UnsetType] = unset, + sample_rate: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + The attributes of a hardcoded retention filter. + + :param cross_product_sampling: Cross-product retention settings for a hardcoded retention filter. + :type cross_product_sampling: RumHardcodedCrossProductSampling, optional + + :param cross_product_sampling_editability: Flags indicating which ``cross_product_sampling`` fields can be updated. Read-only. + :type cross_product_sampling_editability: RumHardcodedCrossProductSamplingEditability, optional + + :param enabled: Indicates whether the hardcoded retention filter is active. Read-only. + :type enabled: bool, optional + + :param event_type: The type of RUM events the hardcoded filter applies to. Read-only. + :type event_type: RumHardcodedRetentionFilterEventType, optional + + :param name: The name of the hardcoded retention filter. Read-only. + :type name: str, optional + + :param query: The query string for the hardcoded retention filter. Read-only. + :type query: str, optional + + :param sample_rate: The retention sample rate (0–100) for the hardcoded filter. Read-only. + :type sample_rate: float, optional + """ + if cross_product_sampling is not unset: + kwargs["cross_product_sampling"] = cross_product_sampling + if cross_product_sampling_editability is not unset: + kwargs["cross_product_sampling_editability"] = cross_product_sampling_editability + if enabled is not unset: + kwargs["enabled"] = enabled + if event_type is not unset: + kwargs["event_type"] = event_type + if name is not unset: + kwargs["name"] = name + if query is not unset: + kwargs["query"] = query + if sample_rate is not unset: + kwargs["sample_rate"] = sample_rate + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_data.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_data.py new file mode 100644 index 0000000000..1af6575e70 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_data.py @@ -0,0 +1,78 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_attributes import ( + RumHardcodedRetentionFilterAttributes, + ) + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta import RumHardcodedRetentionFilterMeta + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_type import RumHardcodedRetentionFilterType + + +class RumHardcodedRetentionFilterData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_attributes import ( + RumHardcodedRetentionFilterAttributes, + ) + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta import RumHardcodedRetentionFilterMeta + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_type import RumHardcodedRetentionFilterType + + return { + "attributes": (RumHardcodedRetentionFilterAttributes,), + "id": (str,), + "meta": (RumHardcodedRetentionFilterMeta,), + "type": (RumHardcodedRetentionFilterType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "meta": "meta", + "type": "type", + } + + def __init__( + self_, + attributes: Union[RumHardcodedRetentionFilterAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + meta: Union[RumHardcodedRetentionFilterMeta, UnsetType] = unset, + type: Union[RumHardcodedRetentionFilterType, UnsetType] = unset, + **kwargs, + ): + """ + A hardcoded retention filter. + + :param attributes: The attributes of a hardcoded retention filter. + :type attributes: RumHardcodedRetentionFilterAttributes, optional + + :param id: The ID of the hardcoded retention filter. + :type id: str, optional + + :param meta: Metadata about the hardcoded retention filter. + :type meta: RumHardcodedRetentionFilterMeta, optional + + :param type: The resource type. The value must be ``hardcoded_retention_filters``. + :type type: RumHardcodedRetentionFilterType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if meta is not unset: + kwargs["meta"] = meta + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_event_type.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_event_type.py new file mode 100644 index 0000000000..abc2ee2f43 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_event_type.py @@ -0,0 +1,53 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RumHardcodedRetentionFilterEventType(ModelSimple): + """ + The type of RUM events the hardcoded filter applies to. Read-only. + + :param value: Must be one of ["session", "view", "action", "error", "resource", "long_task", "vital"]. + :type value: str + """ + + allowed_values = { + "session", + "view", + "action", + "error", + "resource", + "long_task", + "vital", + } + SESSION: ClassVar["RumHardcodedRetentionFilterEventType"] + VIEW: ClassVar["RumHardcodedRetentionFilterEventType"] + ACTION: ClassVar["RumHardcodedRetentionFilterEventType"] + ERROR: ClassVar["RumHardcodedRetentionFilterEventType"] + RESOURCE: ClassVar["RumHardcodedRetentionFilterEventType"] + LONG_TASK: ClassVar["RumHardcodedRetentionFilterEventType"] + VITAL: ClassVar["RumHardcodedRetentionFilterEventType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RumHardcodedRetentionFilterEventType.SESSION = RumHardcodedRetentionFilterEventType("session") +RumHardcodedRetentionFilterEventType.VIEW = RumHardcodedRetentionFilterEventType("view") +RumHardcodedRetentionFilterEventType.ACTION = RumHardcodedRetentionFilterEventType("action") +RumHardcodedRetentionFilterEventType.ERROR = RumHardcodedRetentionFilterEventType("error") +RumHardcodedRetentionFilterEventType.RESOURCE = RumHardcodedRetentionFilterEventType("resource") +RumHardcodedRetentionFilterEventType.LONG_TASK = RumHardcodedRetentionFilterEventType("long_task") +RumHardcodedRetentionFilterEventType.VITAL = RumHardcodedRetentionFilterEventType("vital") diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta.py new file mode 100644 index 0000000000..7b90351a50 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta.py @@ -0,0 +1,66 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta_source import ( + RumHardcodedRetentionFilterMetaSource, + ) + + +class RumHardcodedRetentionFilterMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta_source import ( + RumHardcodedRetentionFilterMetaSource, + ) + + return { + "source": (RumHardcodedRetentionFilterMetaSource,), + "updated_at": (int,), + "updated_by_handle": (str,), + } + + attribute_map = { + "source": "source", + "updated_at": "updated_at", + "updated_by_handle": "updated_by_handle", + } + + def __init__( + self_, + source: Union[RumHardcodedRetentionFilterMetaSource, UnsetType] = unset, + updated_at: Union[int, UnsetType] = unset, + updated_by_handle: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Metadata about the hardcoded retention filter. + + :param source: The source of the last update to a hardcoded retention filter. + :type source: RumHardcodedRetentionFilterMetaSource, optional + + :param updated_at: Unix epoch (in milliseconds) of the last update. + :type updated_at: int, optional + + :param updated_by_handle: Handle of the user who last updated the filter. + :type updated_by_handle: str, optional + """ + if source is not unset: + kwargs["source"] = source + if updated_at is not unset: + kwargs["updated_at"] = updated_at + if updated_by_handle is not unset: + kwargs["updated_by_handle"] = updated_by_handle + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta_source.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta_source.py new file mode 100644 index 0000000000..5d16968853 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_meta_source.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RumHardcodedRetentionFilterMetaSource(ModelSimple): + """ + The source of the last update to a hardcoded retention filter. + + :param value: Must be one of ["default", "ui", "terraform"]. + :type value: str + """ + + allowed_values = { + "default", + "ui", + "terraform", + } + DEFAULT: ClassVar["RumHardcodedRetentionFilterMetaSource"] + UI: ClassVar["RumHardcodedRetentionFilterMetaSource"] + TERRAFORM: ClassVar["RumHardcodedRetentionFilterMetaSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RumHardcodedRetentionFilterMetaSource.DEFAULT = RumHardcodedRetentionFilterMetaSource("default") +RumHardcodedRetentionFilterMetaSource.UI = RumHardcodedRetentionFilterMetaSource("ui") +RumHardcodedRetentionFilterMetaSource.TERRAFORM = RumHardcodedRetentionFilterMetaSource("terraform") diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_response.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_response.py new file mode 100644 index 0000000000..68abe0dd1a --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_data import RumHardcodedRetentionFilterData + + +class RumHardcodedRetentionFilterResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_data import RumHardcodedRetentionFilterData + + return { + "data": (RumHardcodedRetentionFilterData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[RumHardcodedRetentionFilterData, UnsetType] = unset, **kwargs): + """ + A hardcoded retention filter response body. + + :param data: A hardcoded retention filter. + :type data: RumHardcodedRetentionFilterData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_type.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_type.py new file mode 100644 index 0000000000..b6cb057a9b --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RumHardcodedRetentionFilterType(ModelSimple): + """ + The resource type. The value must be `hardcoded_retention_filters`. + + :param value: If omitted defaults to "hardcoded_retention_filters". Must be one of ["hardcoded_retention_filters"]. + :type value: str + """ + + allowed_values = { + "hardcoded_retention_filters", + } + HARDCODED_RETENTION_FILTERS: ClassVar["RumHardcodedRetentionFilterType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RumHardcodedRetentionFilterType.HARDCODED_RETENTION_FILTERS = RumHardcodedRetentionFilterType( + "hardcoded_retention_filters" +) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_attributes.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_attributes.py new file mode 100644 index 0000000000..5aca054b30 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_attributes.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_update import ( + RumHardcodedCrossProductSamplingUpdate, + ) + + +class RumHardcodedRetentionFilterUpdateAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_update import ( + RumHardcodedCrossProductSamplingUpdate, + ) + + return { + "cross_product_sampling": (RumHardcodedCrossProductSamplingUpdate,), + } + + attribute_map = { + "cross_product_sampling": "cross_product_sampling", + } + + def __init__( + self_, cross_product_sampling: Union[RumHardcodedCrossProductSamplingUpdate, UnsetType] = unset, **kwargs + ): + """ + The attributes of a hardcoded retention filter that can be updated. + Only fields whose matching flag in ``cross_product_sampling_editability`` is ``true`` can be modified. + + :param cross_product_sampling: Partial update for cross-product retention of a hardcoded retention filter. + Only fields whose matching flag in ``cross_product_sampling_editability`` is ``true`` can be updated. + :type cross_product_sampling: RumHardcodedCrossProductSamplingUpdate, optional + """ + if cross_product_sampling is not unset: + kwargs["cross_product_sampling"] = cross_product_sampling + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_data.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_data.py new file mode 100644 index 0000000000..db67623f1e --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_data.py @@ -0,0 +1,65 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_attributes import ( + RumHardcodedRetentionFilterUpdateAttributes, + ) + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_type import RumHardcodedRetentionFilterType + + +class RumHardcodedRetentionFilterUpdateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_attributes import ( + RumHardcodedRetentionFilterUpdateAttributes, + ) + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_type import RumHardcodedRetentionFilterType + + return { + "attributes": (RumHardcodedRetentionFilterUpdateAttributes,), + "id": (str,), + "type": (RumHardcodedRetentionFilterType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: RumHardcodedRetentionFilterUpdateAttributes, + id: str, + type: RumHardcodedRetentionFilterType, + **kwargs, + ): + """ + The hardcoded retention filter properties to update. + + :param attributes: The attributes of a hardcoded retention filter that can be updated. + Only fields whose matching flag in ``cross_product_sampling_editability`` is ``true`` can be modified. + :type attributes: RumHardcodedRetentionFilterUpdateAttributes + + :param id: The ID of the hardcoded retention filter. Must match the ``rf_id`` path parameter. + :type id: str + + :param type: The resource type. The value must be ``hardcoded_retention_filters``. + :type type: RumHardcodedRetentionFilterType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_request.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_request.py new file mode 100644 index 0000000000..e562703a6a --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filter_update_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_data import ( + RumHardcodedRetentionFilterUpdateData, + ) + + +class RumHardcodedRetentionFilterUpdateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_data import ( + RumHardcodedRetentionFilterUpdateData, + ) + + return { + "data": (RumHardcodedRetentionFilterUpdateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: RumHardcodedRetentionFilterUpdateData, **kwargs): + """ + The hardcoded retention filter body to update. + + :param data: The hardcoded retention filter properties to update. + :type data: RumHardcodedRetentionFilterUpdateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/rum_hardcoded_retention_filters_response.py b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filters_response.py new file mode 100644 index 0000000000..3359bd3434 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_hardcoded_retention_filters_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_data import RumHardcodedRetentionFilterData + + +class RumHardcodedRetentionFiltersResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_hardcoded_retention_filter_data import RumHardcodedRetentionFilterData + + return { + "data": ([RumHardcodedRetentionFilterData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[RumHardcodedRetentionFilterData], UnsetType] = unset, **kwargs): + """ + All hardcoded retention filters for a RUM application. + + :param data: A list of hardcoded retention filters. + :type data: [RumHardcodedRetentionFilterData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 417b40c4cd..1947ebeb08 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -6251,6 +6251,28 @@ from datadog_api_client.v2.model.rum_cross_product_sampling import RumCrossProductSampling from datadog_api_client.v2.model.rum_cross_product_sampling_create import RumCrossProductSamplingCreate from datadog_api_client.v2.model.rum_cross_product_sampling_update import RumCrossProductSamplingUpdate +from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling import RumHardcodedCrossProductSampling +from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_editability import ( + RumHardcodedCrossProductSamplingEditability, +) +from datadog_api_client.v2.model.rum_hardcoded_cross_product_sampling_update import ( + RumHardcodedCrossProductSamplingUpdate, +) +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_attributes import RumHardcodedRetentionFilterAttributes +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_data import RumHardcodedRetentionFilterData +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_event_type import RumHardcodedRetentionFilterEventType +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta import RumHardcodedRetentionFilterMeta +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_meta_source import RumHardcodedRetentionFilterMetaSource +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_response import RumHardcodedRetentionFilterResponse +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_type import RumHardcodedRetentionFilterType +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_attributes import ( + RumHardcodedRetentionFilterUpdateAttributes, +) +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_data import RumHardcodedRetentionFilterUpdateData +from datadog_api_client.v2.model.rum_hardcoded_retention_filter_update_request import ( + RumHardcodedRetentionFilterUpdateRequest, +) +from datadog_api_client.v2.model.rum_hardcoded_retention_filters_response import RumHardcodedRetentionFiltersResponse from datadog_api_client.v2.model.rum_metric_compute import RumMetricCompute from datadog_api_client.v2.model.rum_metric_compute_aggregation_type import RumMetricComputeAggregationType from datadog_api_client.v2.model.rum_metric_create_attributes import RumMetricCreateAttributes @@ -13234,6 +13256,20 @@ "RumCrossProductSampling", "RumCrossProductSamplingCreate", "RumCrossProductSamplingUpdate", + "RumHardcodedCrossProductSampling", + "RumHardcodedCrossProductSamplingEditability", + "RumHardcodedCrossProductSamplingUpdate", + "RumHardcodedRetentionFilterAttributes", + "RumHardcodedRetentionFilterData", + "RumHardcodedRetentionFilterEventType", + "RumHardcodedRetentionFilterMeta", + "RumHardcodedRetentionFilterMetaSource", + "RumHardcodedRetentionFilterResponse", + "RumHardcodedRetentionFilterType", + "RumHardcodedRetentionFilterUpdateAttributes", + "RumHardcodedRetentionFilterUpdateData", + "RumHardcodedRetentionFilterUpdateRequest", + "RumHardcodedRetentionFiltersResponse", "RumMetricCompute", "RumMetricComputeAggregationType", "RumMetricCreateAttributes", diff --git a/tests/v2/features/rum_hardcoded_retention_filters.feature b/tests/v2/features/rum_hardcoded_retention_filters.feature new file mode 100644 index 0000000000..05e942989b --- /dev/null +++ b/tests/v2/features/rum_hardcoded_retention_filters.feature @@ -0,0 +1,59 @@ +@endpoint(rum-hardcoded-retention-filters) @endpoint(rum-hardcoded-retention-filters-v2) +Feature: RUM Retention Filters Hardcoded + Manage hardcoded retention filters through [Manage + Applications](https://app.datadoghq.com/rum/list) in RUM. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMRetentionFiltersHardcoded" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a hardcoded retention filter returns "Not Found" response + Given new "GetHardcodedRetentionFilter" request + And request contains "app_id" parameter with value "{{ unique }}" + And request contains "rf_id" parameter with value "{{ unique }}" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a hardcoded retention filter returns "OK" response + Given new "GetHardcodedRetentionFilter" request + And request contains "app_id" parameter with value "{{ unique }}" + And request contains "rf_id" parameter with value "{{ unique }}" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Get all hardcoded retention filters returns "OK" response + Given new "ListHardcodedRetentionFilters" request + And request contains "app_id" parameter with value "{{ unique }}" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a hardcoded retention filter returns "Bad Request" response + Given new "UpdateHardcodedRetentionFilter" request + And request contains "app_id" parameter with value "{{ unique }}" + And request contains "rf_id" parameter with value "{{ unique }}" + And body with value {"data": {"id": "REPLACE.ME", "type": "hardcoded_retention_filters", "attributes": {"cross_product_sampling": {"session_replay_sample_rate": 50.0}}}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a hardcoded retention filter returns "Not Found" response + Given new "UpdateHardcodedRetentionFilter" request + And request contains "app_id" parameter with value "{{ unique }}" + And request contains "rf_id" parameter with value "{{ unique }}" + And body with value {"data": {"id": "REPLACE.ME", "type": "hardcoded_retention_filters", "attributes": {"cross_product_sampling": {"session_replay_sample_rate": 50.0}}}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a hardcoded retention filter returns "Updated" response + Given new "UpdateHardcodedRetentionFilter" request + And request contains "app_id" parameter with value "{{ unique }}" + And request contains "rf_id" parameter with value "{{ unique }}" + And body with value {"data": {"id": "REPLACE.ME", "type": "hardcoded_retention_filters", "attributes": {"cross_product_sampling": {"session_replay_sample_rate": 50.0, "session_replay_enabled": true}}}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/rum_retention_filters_hardcoded.feature b/tests/v2/features/rum_retention_filters_hardcoded.feature new file mode 100644 index 0000000000..2ce25e7a3a --- /dev/null +++ b/tests/v2/features/rum_retention_filters_hardcoded.feature @@ -0,0 +1,59 @@ +@endpoint(rum-retention-filters-hardcoded) @endpoint(rum-retention-filters-hardcoded-v2) +Feature: RUM Retention Filters Hardcoded + Manage hardcoded retention filters through [Manage + Applications](https://app.datadoghq.com/rum/list) in RUM. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMRetentionFiltersHardcoded" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a hardcoded retention filter returns "Not Found" response + Given new "GetHardcodedRetentionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "rf_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a hardcoded retention filter returns "OK" response + Given new "GetHardcodedRetentionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "rf_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Get all hardcoded retention filters returns "OK" response + Given new "ListHardcodedRetentionFilters" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a hardcoded retention filter returns "Bad Request" response + Given new "UpdateHardcodedRetentionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "rf_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cross_product_sampling": {"session_replay_enabled": true, "session_replay_sample_rate": 50.0, "trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "forced_replay_sessions", "type": "hardcoded_retention_filters"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a hardcoded retention filter returns "Not Found" response + Given new "UpdateHardcodedRetentionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "rf_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cross_product_sampling": {"session_replay_enabled": true, "session_replay_sample_rate": 50.0, "trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "forced_replay_sessions", "type": "hardcoded_retention_filters"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a hardcoded retention filter returns "Updated" response + Given new "UpdateHardcodedRetentionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "rf_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cross_product_sampling": {"session_replay_enabled": true, "session_replay_sample_rate": 50.0, "trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "forced_replay_sessions", "type": "hardcoded_retention_filters"}} + When the request is sent + Then the response status is 200 Updated diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index f60cf1a2f7..8578b08969 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6030,6 +6030,24 @@ "type": "unsafe" } }, + "ListHardcodedRetentionFilters": { + "tag": "RUM Retention Filters Hardcoded", + "undo": { + "type": "safe" + } + }, + "GetHardcodedRetentionFilter": { + "tag": "RUM Retention Filters Hardcoded", + "undo": { + "type": "safe" + } + }, + "UpdateHardcodedRetentionFilter": { + "tag": "RUM Retention Filters Hardcoded", + "undo": { + "type": "idempotent" + } + }, "OrderRetentionFilters": { "tag": "Rum Retention Filters", "undo": {