From 1da79e2daa6134e7cc9bf2fdcfe8c922095be1e8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 3 Jun 2026 16:12:53 +0000 Subject: [PATCH] Regenerate client from commit f80d965 of spec repo --- .generator/schemas/v2/openapi.yaml | 291 ++++++++++++++++++ docs/datadog_api_client.v2.api.rst | 7 + docs/datadog_api_client.v2.model.rst | 70 +++++ examples/v2/rum-config/CreateRumConfig.py | 27 ++ examples/v2/rum-config/GetRumConfig.py | 14 + examples/v2/rum-config/UpdateRumConfig.py | 27 ++ src/datadog_api_client/configuration.py | 3 + .../v2/api/rum_config_api.py | 127 ++++++++ src/datadog_api_client/v2/apis/__init__.py | 2 + .../v2/model/rum_config_attributes.py | 104 +++++++ .../v2/model/rum_config_create_attributes.py | 33 ++ .../v2/model/rum_config_create_data.py | 48 +++ .../v2/model/rum_config_create_request.py | 40 +++ .../v2/model/rum_config_data.py | 54 ++++ .../v2/model/rum_config_response.py | 40 +++ .../v2/model/rum_config_type.py | 35 +++ .../v2/model/rum_config_update_attributes.py | 33 ++ .../v2/model/rum_config_update_data.py | 48 +++ .../v2/model/rum_config_update_request.py | 40 +++ src/datadog_api_client/v2/models/__init__.py | 20 ++ tests/v2/features/rum_config.feature | 49 +++ tests/v2/features/undo.json | 18 ++ 22 files changed, 1130 insertions(+) create mode 100644 examples/v2/rum-config/CreateRumConfig.py create mode 100644 examples/v2/rum-config/GetRumConfig.py create mode 100644 examples/v2/rum-config/UpdateRumConfig.py create mode 100644 src/datadog_api_client/v2/api/rum_config_api.py create mode 100644 src/datadog_api_client/v2/model/rum_config_attributes.py create mode 100644 src/datadog_api_client/v2/model/rum_config_create_attributes.py create mode 100644 src/datadog_api_client/v2/model/rum_config_create_data.py create mode 100644 src/datadog_api_client/v2/model/rum_config_create_request.py create mode 100644 src/datadog_api_client/v2/model/rum_config_data.py create mode 100644 src/datadog_api_client/v2/model/rum_config_response.py create mode 100644 src/datadog_api_client/v2/model/rum_config_type.py create mode 100644 src/datadog_api_client/v2/model/rum_config_update_attributes.py create mode 100644 src/datadog_api_client/v2/model/rum_config_update_data.py create mode 100644 src/datadog_api_client/v2/model/rum_config_update_request.py create mode 100644 tests/v2/features/rum_config.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c26a927e83..fcdeca7c7c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -73036,6 +73036,144 @@ components: type: string x-enum-varnames: - RULESET_STATUS + RumConfigAttributes: + description: Attributes of the RUM configuration. + properties: + disabled: + description: Whether the RUM configuration is disabled for the organization. + example: false + type: boolean + enforced_application_tags: + description: Whether application tags are enforced for the RUM applications in the organization. + example: true + type: boolean + enforced_application_tags_updated_at: + description: Timestamp of when the enforced application tags setting was last updated. + example: "2024-01-15T09:30:00.000Z" + format: date-time + type: string + enforced_application_tags_updated_by: + description: Handle of the user who last updated the enforced application tags setting. + example: "user@example.com" + type: string + ootb_metrics_version: + description: Version of the out-of-the-box metrics installed for the organization. + example: 5 + format: int64 + type: integer + ootb_metrics_version_installed_at: + description: Timestamp of when the out-of-the-box metrics version was installed. + example: "2024-01-15T09:30:00.000Z" + format: date-time + type: string + retention_filters_enabled: + description: Whether retention filters are enabled for the organization. + example: true + type: boolean + retention_filters_enabled_updated_at: + description: Timestamp of when the retention filters setting was last updated. + example: "2024-01-15T09:30:00.000Z" + format: date-time + type: string + retention_filters_enabled_updated_by: + description: Handle of the user or job who last updated the retention filters setting. + example: "contract-update-job" + type: string + required: + - enforced_application_tags + - retention_filters_enabled + type: object + RumConfigCreateAttributes: + description: Attributes of the RUM configuration to create. + properties: + enforced_application_tags: + description: Whether application tags are enforced for the RUM applications in the organization. + example: true + type: boolean + required: + - enforced_application_tags + type: object + RumConfigCreateData: + description: Object describing the RUM configuration to create. + properties: + attributes: + $ref: "#/components/schemas/RumConfigCreateAttributes" + type: + $ref: "#/components/schemas/RumConfigType" + required: + - type + - attributes + type: object + RumConfigCreateRequest: + description: Request body for creating the RUM configuration. + properties: + data: + $ref: "#/components/schemas/RumConfigCreateData" + required: + - data + type: object + RumConfigData: + description: The RUM configuration data. + properties: + attributes: + $ref: "#/components/schemas/RumConfigAttributes" + id: + description: The organization ID associated with the RUM configuration. + example: "1234" + type: string + type: + $ref: "#/components/schemas/RumConfigType" + required: + - id + - type + - attributes + type: object + RumConfigResponse: + description: The RUM configuration object. + properties: + data: + $ref: "#/components/schemas/RumConfigData" + required: + - data + type: object + RumConfigType: + default: rum_config + description: The type of the resource. The value should always be `rum_config`. + enum: + - rum_config + example: rum_config + type: string + x-enum-varnames: + - RUM_CONFIG + RumConfigUpdateAttributes: + description: Attributes of the RUM configuration to update. + properties: + enforced_application_tags: + description: Whether application tags are enforced for the RUM applications in the organization. + example: true + type: boolean + required: + - enforced_application_tags + type: object + RumConfigUpdateData: + description: Object describing the RUM configuration to update. + properties: + attributes: + $ref: "#/components/schemas/RumConfigUpdateAttributes" + type: + $ref: "#/components/schemas/RumConfigType" + required: + - type + - attributes + type: object + RumConfigUpdateRequest: + description: Request body for updating the RUM configuration. + properties: + data: + $ref: "#/components/schemas/RumConfigUpdateData" + required: + - data + type: object RumCrossProductSampling: description: The configuration for cross-product retention filters. properties: @@ -151423,6 +151561,153 @@ paths: operator: OR permissions: - rum_apps_write + /api/v2/rum/config: + get: + description: Get the RUM configuration for your organization. + operationId: GetRumConfig + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + disabled: false + enforced_application_tags: true + enforced_application_tags_updated_at: "2024-01-15T09:30:00.000Z" + enforced_application_tags_updated_by: "user@example.com" + ootb_metrics_version: 5 + ootb_metrics_version_installed_at: "2024-01-15T09:30:00.000Z" + retention_filters_enabled: true + retention_filters_enabled_updated_at: "2024-01-15T09:30:00.000Z" + retention_filters_enabled_updated_by: "contract-update-job" + id: "1234" + type: rum_config + schema: + $ref: "#/components/schemas/RumConfigResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get the RUM configuration + tags: + - Rum Config + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: |- + Update the RUM configuration for your organization. + Returns the RUM configuration object from the request body when the request is successful. + operationId: UpdateRumConfig + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enforced_application_tags: false + type: rum_config + schema: + $ref: "#/components/schemas/RumConfigUpdateRequest" + description: New definition of the RUM configuration. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + disabled: false + enforced_application_tags: false + enforced_application_tags_updated_at: "2024-01-15T09:30:00.000Z" + enforced_application_tags_updated_by: "user@example.com" + ootb_metrics_version: 5 + ootb_metrics_version_installed_at: "2024-01-15T09:30:00.000Z" + retention_filters_enabled: true + retention_filters_enabled_updated_at: "2024-01-15T09:30:00.000Z" + retention_filters_enabled_updated_by: "contract-update-job" + id: "1234" + type: rum_config + schema: + $ref: "#/components/schemas/RumConfigResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update the RUM configuration + tags: + - Rum Config + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Create the RUM configuration for your organization. + Returns the RUM configuration object from the request body when the request is successful. + operationId: CreateRumConfig + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enforced_application_tags: true + type: rum_config + schema: + $ref: "#/components/schemas/RumConfigCreateRequest" + description: The definition of the RUM configuration to create. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + disabled: false + enforced_application_tags: true + enforced_application_tags_updated_at: "2024-01-15T09:30:00.000Z" + enforced_application_tags_updated_by: "user@example.com" + ootb_metrics_version: 5 + ootb_metrics_version_installed_at: "2024-01-15T09:30:00.000Z" + retention_filters_enabled: true + retention_filters_enabled_updated_at: "2024-01-15T09:30:00.000Z" + retention_filters_enabled_updated_by: "contract-update-job" + id: "1234" + type: rum_config + schema: + $ref: "#/components/schemas/RumConfigResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create the RUM configuration + tags: + - Rum Config + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/rum/config/metrics: get: description: Get the list of configured RUM-based metrics with their definitions. @@ -176491,6 +176776,12 @@ tags: name: Roles - description: Auto-generated tag Rum Audience Management name: Rum Audience Management + - description: |- + Manage the [Real User Monitoring (RUM)](https://docs.datadoghq.com/real_user_monitoring/) configuration for your organization. + externalDocs: + description: Find out more at + url: https://docs.datadoghq.com/real_user_monitoring/ + name: Rum Config - description: |- Manage configuration of [RUM-based metrics](https://app.datadoghq.com/rum/generate-metrics) for your organization. externalDocs: diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 0086fc5d8f..f17519d73e 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -613,6 +613,13 @@ datadog\_api\_client.v2.api.rum\_audience\_management\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.rum\_config\_api module +--------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.rum_config_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.rum\_insights\_api module ----------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 972f49ebfb..63e5fcedae 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -31329,6 +31329,76 @@ datadog\_api\_client.v2.model.rum\_compute\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.rum\_config\_attributes module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_config_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_create\_attributes module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_config_create_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_create\_data module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_config_create_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_create\_request module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_config_create_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_data module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_config_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_response module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_config_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_type module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_config_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_update\_attributes module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_config_update_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_update\_data module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_config_update_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_config\_update\_request module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_config_update_request + :members: + :show-inheritance: + datadog\_api\_client.v2.model.rum\_cross\_product\_sampling module ------------------------------------------------------------------ diff --git a/examples/v2/rum-config/CreateRumConfig.py b/examples/v2/rum-config/CreateRumConfig.py new file mode 100644 index 0000000000..b82c0017e9 --- /dev/null +++ b/examples/v2/rum-config/CreateRumConfig.py @@ -0,0 +1,27 @@ +""" +Create the RUM configuration returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_config_api import RumConfigApi +from datadog_api_client.v2.model.rum_config_create_attributes import RumConfigCreateAttributes +from datadog_api_client.v2.model.rum_config_create_data import RumConfigCreateData +from datadog_api_client.v2.model.rum_config_create_request import RumConfigCreateRequest +from datadog_api_client.v2.model.rum_config_type import RumConfigType + +body = RumConfigCreateRequest( + data=RumConfigCreateData( + attributes=RumConfigCreateAttributes( + enforced_application_tags=True, + ), + type=RumConfigType.RUM_CONFIG, + ), +) + +configuration = Configuration() +configuration.unstable_operations["create_rum_config"] = True +with ApiClient(configuration) as api_client: + api_instance = RumConfigApi(api_client) + response = api_instance.create_rum_config(body=body) + + print(response) diff --git a/examples/v2/rum-config/GetRumConfig.py b/examples/v2/rum-config/GetRumConfig.py new file mode 100644 index 0000000000..9c34f12b23 --- /dev/null +++ b/examples/v2/rum-config/GetRumConfig.py @@ -0,0 +1,14 @@ +""" +Get the RUM configuration returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_config_api import RumConfigApi + +configuration = Configuration() +configuration.unstable_operations["get_rum_config"] = True +with ApiClient(configuration) as api_client: + api_instance = RumConfigApi(api_client) + response = api_instance.get_rum_config() + + print(response) diff --git a/examples/v2/rum-config/UpdateRumConfig.py b/examples/v2/rum-config/UpdateRumConfig.py new file mode 100644 index 0000000000..69aa41daec --- /dev/null +++ b/examples/v2/rum-config/UpdateRumConfig.py @@ -0,0 +1,27 @@ +""" +Update the RUM configuration returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_config_api import RumConfigApi +from datadog_api_client.v2.model.rum_config_type import RumConfigType +from datadog_api_client.v2.model.rum_config_update_attributes import RumConfigUpdateAttributes +from datadog_api_client.v2.model.rum_config_update_data import RumConfigUpdateData +from datadog_api_client.v2.model.rum_config_update_request import RumConfigUpdateRequest + +body = RumConfigUpdateRequest( + data=RumConfigUpdateData( + attributes=RumConfigUpdateAttributes( + enforced_application_tags=True, + ), + type=RumConfigType.RUM_CONFIG, + ), +) + +configuration = Configuration() +configuration.unstable_operations["update_rum_config"] = True +with ApiClient(configuration) as api_client: + api_instance = RumConfigApi(api_client) + response = api_instance.update_rum_config(body=body) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index a2f1ef3e38..54608a0717 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -628,6 +628,9 @@ def __init__( "v2.update_connection": False, "v2.get_pruned_trace_by_id": False, "v2.get_trace_by_id": False, + "v2.create_rum_config": False, + "v2.get_rum_config": False, + "v2.update_rum_config": False, "v2.query_aggregated_long_tasks": False, "v2.query_aggregated_signals_problems": False, "v2.query_aggregated_waterfall": False, diff --git a/src/datadog_api_client/v2/api/rum_config_api.py b/src/datadog_api_client/v2/api/rum_config_api.py new file mode 100644 index 0000000000..a5a8f0ca8e --- /dev/null +++ b/src/datadog_api_client/v2/api/rum_config_api.py @@ -0,0 +1,127 @@ +# 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_config_response import RumConfigResponse +from datadog_api_client.v2.model.rum_config_update_request import RumConfigUpdateRequest +from datadog_api_client.v2.model.rum_config_create_request import RumConfigCreateRequest + + +class RumConfigApi: + """ + Manage the `Real User Monitoring (RUM) `_ configuration for your organization. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._create_rum_config_endpoint = _Endpoint( + settings={ + "response_type": (RumConfigResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/rum/config", + "operation_id": "create_rum_config", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (RumConfigCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._get_rum_config_endpoint = _Endpoint( + settings={ + "response_type": (RumConfigResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/rum/config", + "operation_id": "get_rum_config", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._update_rum_config_endpoint = _Endpoint( + settings={ + "response_type": (RumConfigResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/rum/config", + "operation_id": "update_rum_config", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (RumConfigUpdateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def create_rum_config( + self, + body: RumConfigCreateRequest, + ) -> RumConfigResponse: + """Create the RUM configuration. + + Create the RUM configuration for your organization. + Returns the RUM configuration object from the request body when the request is successful. + + :param body: The definition of the RUM configuration to create. + :type body: RumConfigCreateRequest + :rtype: RumConfigResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_rum_config_endpoint.call_with_http_info(**kwargs) + + def get_rum_config( + self, + ) -> RumConfigResponse: + """Get the RUM configuration. + + Get the RUM configuration for your organization. + + :rtype: RumConfigResponse + """ + kwargs: Dict[str, Any] = {} + return self._get_rum_config_endpoint.call_with_http_info(**kwargs) + + def update_rum_config( + self, + body: RumConfigUpdateRequest, + ) -> RumConfigResponse: + """Update the RUM configuration. + + Update the RUM configuration for your organization. + Returns the RUM configuration object from the request body when the request is successful. + + :param body: New definition of the RUM configuration. + :type body: RumConfigUpdateRequest + :rtype: RumConfigResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._update_rum_config_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 3fc3ef52be..2ef032aa53 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -87,6 +87,7 @@ from datadog_api_client.v2.api.restriction_policies_api import RestrictionPoliciesApi from datadog_api_client.v2.api.roles_api import RolesApi from datadog_api_client.v2.api.rum_audience_management_api import RumAudienceManagementApi +from datadog_api_client.v2.api.rum_config_api import RumConfigApi from datadog_api_client.v2.api.rum_metrics_api import RumMetricsApi from datadog_api_client.v2.api.rum_replay_heatmaps_api import RumReplayHeatmapsApi from datadog_api_client.v2.api.rum_replay_playlists_api import RumReplayPlaylistsApi @@ -212,6 +213,7 @@ "RestrictionPoliciesApi", "RolesApi", "RumAudienceManagementApi", + "RumConfigApi", "RumMetricsApi", "RumReplayHeatmapsApi", "RumReplayPlaylistsApi", diff --git a/src/datadog_api_client/v2/model/rum_config_attributes.py b/src/datadog_api_client/v2/model/rum_config_attributes.py new file mode 100644 index 0000000000..dfe99e602d --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_attributes.py @@ -0,0 +1,104 @@ +# 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, + datetime, + unset, + UnsetType, +) + + +class RumConfigAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "disabled": (bool,), + "enforced_application_tags": (bool,), + "enforced_application_tags_updated_at": (datetime,), + "enforced_application_tags_updated_by": (str,), + "ootb_metrics_version": (int,), + "ootb_metrics_version_installed_at": (datetime,), + "retention_filters_enabled": (bool,), + "retention_filters_enabled_updated_at": (datetime,), + "retention_filters_enabled_updated_by": (str,), + } + + attribute_map = { + "disabled": "disabled", + "enforced_application_tags": "enforced_application_tags", + "enforced_application_tags_updated_at": "enforced_application_tags_updated_at", + "enforced_application_tags_updated_by": "enforced_application_tags_updated_by", + "ootb_metrics_version": "ootb_metrics_version", + "ootb_metrics_version_installed_at": "ootb_metrics_version_installed_at", + "retention_filters_enabled": "retention_filters_enabled", + "retention_filters_enabled_updated_at": "retention_filters_enabled_updated_at", + "retention_filters_enabled_updated_by": "retention_filters_enabled_updated_by", + } + + def __init__( + self_, + enforced_application_tags: bool, + retention_filters_enabled: bool, + disabled: Union[bool, UnsetType] = unset, + enforced_application_tags_updated_at: Union[datetime, UnsetType] = unset, + enforced_application_tags_updated_by: Union[str, UnsetType] = unset, + ootb_metrics_version: Union[int, UnsetType] = unset, + ootb_metrics_version_installed_at: Union[datetime, UnsetType] = unset, + retention_filters_enabled_updated_at: Union[datetime, UnsetType] = unset, + retention_filters_enabled_updated_by: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of the RUM configuration. + + :param disabled: Whether the RUM configuration is disabled for the organization. + :type disabled: bool, optional + + :param enforced_application_tags: Whether application tags are enforced for the RUM applications in the organization. + :type enforced_application_tags: bool + + :param enforced_application_tags_updated_at: Timestamp of when the enforced application tags setting was last updated. + :type enforced_application_tags_updated_at: datetime, optional + + :param enforced_application_tags_updated_by: Handle of the user who last updated the enforced application tags setting. + :type enforced_application_tags_updated_by: str, optional + + :param ootb_metrics_version: Version of the out-of-the-box metrics installed for the organization. + :type ootb_metrics_version: int, optional + + :param ootb_metrics_version_installed_at: Timestamp of when the out-of-the-box metrics version was installed. + :type ootb_metrics_version_installed_at: datetime, optional + + :param retention_filters_enabled: Whether retention filters are enabled for the organization. + :type retention_filters_enabled: bool + + :param retention_filters_enabled_updated_at: Timestamp of when the retention filters setting was last updated. + :type retention_filters_enabled_updated_at: datetime, optional + + :param retention_filters_enabled_updated_by: Handle of the user or job who last updated the retention filters setting. + :type retention_filters_enabled_updated_by: str, optional + """ + if disabled is not unset: + kwargs["disabled"] = disabled + if enforced_application_tags_updated_at is not unset: + kwargs["enforced_application_tags_updated_at"] = enforced_application_tags_updated_at + if enforced_application_tags_updated_by is not unset: + kwargs["enforced_application_tags_updated_by"] = enforced_application_tags_updated_by + if ootb_metrics_version is not unset: + kwargs["ootb_metrics_version"] = ootb_metrics_version + if ootb_metrics_version_installed_at is not unset: + kwargs["ootb_metrics_version_installed_at"] = ootb_metrics_version_installed_at + if retention_filters_enabled_updated_at is not unset: + kwargs["retention_filters_enabled_updated_at"] = retention_filters_enabled_updated_at + if retention_filters_enabled_updated_by is not unset: + kwargs["retention_filters_enabled_updated_by"] = retention_filters_enabled_updated_by + super().__init__(kwargs) + + self_.enforced_application_tags = enforced_application_tags + self_.retention_filters_enabled = retention_filters_enabled diff --git a/src/datadog_api_client/v2/model/rum_config_create_attributes.py b/src/datadog_api_client/v2/model/rum_config_create_attributes.py new file mode 100644 index 0000000000..9a94a999c3 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_create_attributes.py @@ -0,0 +1,33 @@ +# 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 ( + ModelNormal, + cached_property, +) + + +class RumConfigCreateAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "enforced_application_tags": (bool,), + } + + attribute_map = { + "enforced_application_tags": "enforced_application_tags", + } + + def __init__(self_, enforced_application_tags: bool, **kwargs): + """ + Attributes of the RUM configuration to create. + + :param enforced_application_tags: Whether application tags are enforced for the RUM applications in the organization. + :type enforced_application_tags: bool + """ + super().__init__(kwargs) + + self_.enforced_application_tags = enforced_application_tags diff --git a/src/datadog_api_client/v2/model/rum_config_create_data.py b/src/datadog_api_client/v2/model/rum_config_create_data.py new file mode 100644 index 0000000000..a4bbed8f40 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_create_data.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_config_create_attributes import RumConfigCreateAttributes + from datadog_api_client.v2.model.rum_config_type import RumConfigType + + +class RumConfigCreateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_config_create_attributes import RumConfigCreateAttributes + from datadog_api_client.v2.model.rum_config_type import RumConfigType + + return { + "attributes": (RumConfigCreateAttributes,), + "type": (RumConfigType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: RumConfigCreateAttributes, type: RumConfigType, **kwargs): + """ + Object describing the RUM configuration to create. + + :param attributes: Attributes of the RUM configuration to create. + :type attributes: RumConfigCreateAttributes + + :param type: The type of the resource. The value should always be ``rum_config``. + :type type: RumConfigType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/rum_config_create_request.py b/src/datadog_api_client/v2/model/rum_config_create_request.py new file mode 100644 index 0000000000..2c85d61d1c --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_create_request.py @@ -0,0 +1,40 @@ +# 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_config_create_data import RumConfigCreateData + + +class RumConfigCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_config_create_data import RumConfigCreateData + + return { + "data": (RumConfigCreateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: RumConfigCreateData, **kwargs): + """ + Request body for creating the RUM configuration. + + :param data: Object describing the RUM configuration to create. + :type data: RumConfigCreateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/rum_config_data.py b/src/datadog_api_client/v2/model/rum_config_data.py new file mode 100644 index 0000000000..63c0fb4722 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_data.py @@ -0,0 +1,54 @@ +# 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_config_attributes import RumConfigAttributes + from datadog_api_client.v2.model.rum_config_type import RumConfigType + + +class RumConfigData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_config_attributes import RumConfigAttributes + from datadog_api_client.v2.model.rum_config_type import RumConfigType + + return { + "attributes": (RumConfigAttributes,), + "id": (str,), + "type": (RumConfigType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: RumConfigAttributes, id: str, type: RumConfigType, **kwargs): + """ + The RUM configuration data. + + :param attributes: Attributes of the RUM configuration. + :type attributes: RumConfigAttributes + + :param id: The organization ID associated with the RUM configuration. + :type id: str + + :param type: The type of the resource. The value should always be ``rum_config``. + :type type: RumConfigType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/rum_config_response.py b/src/datadog_api_client/v2/model/rum_config_response.py new file mode 100644 index 0000000000..195d90b458 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_response.py @@ -0,0 +1,40 @@ +# 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_config_data import RumConfigData + + +class RumConfigResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_config_data import RumConfigData + + return { + "data": (RumConfigData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: RumConfigData, **kwargs): + """ + The RUM configuration object. + + :param data: The RUM configuration data. + :type data: RumConfigData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/rum_config_type.py b/src/datadog_api_client/v2/model/rum_config_type.py new file mode 100644 index 0000000000..f80828b747 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_type.py @@ -0,0 +1,35 @@ +# 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 RumConfigType(ModelSimple): + """ + The type of the resource. The value should always be `rum_config`. + + :param value: If omitted defaults to "rum_config". Must be one of ["rum_config"]. + :type value: str + """ + + allowed_values = { + "rum_config", + } + RUM_CONFIG: ClassVar["RumConfigType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RumConfigType.RUM_CONFIG = RumConfigType("rum_config") diff --git a/src/datadog_api_client/v2/model/rum_config_update_attributes.py b/src/datadog_api_client/v2/model/rum_config_update_attributes.py new file mode 100644 index 0000000000..14252ca81b --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_update_attributes.py @@ -0,0 +1,33 @@ +# 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 ( + ModelNormal, + cached_property, +) + + +class RumConfigUpdateAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "enforced_application_tags": (bool,), + } + + attribute_map = { + "enforced_application_tags": "enforced_application_tags", + } + + def __init__(self_, enforced_application_tags: bool, **kwargs): + """ + Attributes of the RUM configuration to update. + + :param enforced_application_tags: Whether application tags are enforced for the RUM applications in the organization. + :type enforced_application_tags: bool + """ + super().__init__(kwargs) + + self_.enforced_application_tags = enforced_application_tags diff --git a/src/datadog_api_client/v2/model/rum_config_update_data.py b/src/datadog_api_client/v2/model/rum_config_update_data.py new file mode 100644 index 0000000000..875542ac37 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_update_data.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_config_update_attributes import RumConfigUpdateAttributes + from datadog_api_client.v2.model.rum_config_type import RumConfigType + + +class RumConfigUpdateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_config_update_attributes import RumConfigUpdateAttributes + from datadog_api_client.v2.model.rum_config_type import RumConfigType + + return { + "attributes": (RumConfigUpdateAttributes,), + "type": (RumConfigType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: RumConfigUpdateAttributes, type: RumConfigType, **kwargs): + """ + Object describing the RUM configuration to update. + + :param attributes: Attributes of the RUM configuration to update. + :type attributes: RumConfigUpdateAttributes + + :param type: The type of the resource. The value should always be ``rum_config``. + :type type: RumConfigType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/rum_config_update_request.py b/src/datadog_api_client/v2/model/rum_config_update_request.py new file mode 100644 index 0000000000..0a98470a2d --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_config_update_request.py @@ -0,0 +1,40 @@ +# 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_config_update_data import RumConfigUpdateData + + +class RumConfigUpdateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_config_update_data import RumConfigUpdateData + + return { + "data": (RumConfigUpdateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: RumConfigUpdateData, **kwargs): + """ + Request body for updating the RUM configuration. + + :param data: Object describing the RUM configuration to update. + :type data: RumConfigUpdateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index ef624053e3..d993f913dd 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -6266,6 +6266,16 @@ from datadog_api_client.v2.model.ruleset_status_resp_data import RulesetStatusRespData from datadog_api_client.v2.model.ruleset_status_resp_data_attributes import RulesetStatusRespDataAttributes from datadog_api_client.v2.model.ruleset_status_resp_data_type import RulesetStatusRespDataType +from datadog_api_client.v2.model.rum_config_attributes import RumConfigAttributes +from datadog_api_client.v2.model.rum_config_create_attributes import RumConfigCreateAttributes +from datadog_api_client.v2.model.rum_config_create_data import RumConfigCreateData +from datadog_api_client.v2.model.rum_config_create_request import RumConfigCreateRequest +from datadog_api_client.v2.model.rum_config_data import RumConfigData +from datadog_api_client.v2.model.rum_config_response import RumConfigResponse +from datadog_api_client.v2.model.rum_config_type import RumConfigType +from datadog_api_client.v2.model.rum_config_update_attributes import RumConfigUpdateAttributes +from datadog_api_client.v2.model.rum_config_update_data import RumConfigUpdateData +from datadog_api_client.v2.model.rum_config_update_request import RumConfigUpdateRequest 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 @@ -13291,6 +13301,16 @@ "RulesetStatusRespData", "RulesetStatusRespDataAttributes", "RulesetStatusRespDataType", + "RumConfigAttributes", + "RumConfigCreateAttributes", + "RumConfigCreateData", + "RumConfigCreateRequest", + "RumConfigData", + "RumConfigResponse", + "RumConfigType", + "RumConfigUpdateAttributes", + "RumConfigUpdateData", + "RumConfigUpdateRequest", "RumCrossProductSampling", "RumCrossProductSamplingCreate", "RumCrossProductSamplingUpdate", diff --git a/tests/v2/features/rum_config.feature b/tests/v2/features/rum_config.feature new file mode 100644 index 0000000000..e403c3fc9b --- /dev/null +++ b/tests/v2/features/rum_config.feature @@ -0,0 +1,49 @@ +@endpoint(rum-config) @endpoint(rum-config-v2) +Feature: Rum Config + Manage the [Real User Monitoring + (RUM)](https://docs.datadoghq.com/real_user_monitoring/) configuration for + your organization. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RumConfig" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Create the RUM configuration returns "Bad Request" response + Given operation "CreateRumConfig" enabled + And new "CreateRumConfig" request + And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create the RUM configuration returns "Created" response + Given operation "CreateRumConfig" enabled + And new "CreateRumConfig" request + And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/rum-backend + Scenario: Get the RUM configuration returns "OK" response + Given operation "GetRumConfig" enabled + And new "GetRumConfig" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Update the RUM configuration returns "Bad Request" response + Given operation "UpdateRumConfig" enabled + And new "UpdateRumConfig" request + And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update the RUM configuration returns "OK" response + Given operation "UpdateRumConfig" enabled + And new "UpdateRumConfig" request + And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 211637b239..aafeaa1df8 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6120,6 +6120,24 @@ "type": "idempotent" } }, + "GetRumConfig": { + "tag": "Rum Config", + "undo": { + "type": "safe" + } + }, + "UpdateRumConfig": { + "tag": "Rum Config", + "undo": { + "type": "idempotent" + } + }, + "CreateRumConfig": { + "tag": "Rum Config", + "undo": { + "type": "idempotent" + } + }, "ListRumMetrics": { "tag": "Rum Metrics", "undo": {