From fc92137bf3797ff4e114626f5421b4a514895d74 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 8 May 2026 16:47:24 +0000 Subject: [PATCH] Regenerate client from commit 3f0117f of spec repo --- .generator/schemas/v2/openapi.yaml | 281 ++++++++++++++++++ docs/datadog_api_client.v2.api.rst | 7 + docs/datadog_api_client.v2.model.rst | 77 +++++ .../ListDatasetRestrictions.py | 14 + .../UpdateDatasetRestriction.py | 33 ++ src/datadog_api_client/configuration.py | 2 + .../v2/api/dataset_restrictions_api.py | 106 +++++++ src/datadog_api_client/v2/apis/__init__.py | 2 + .../dataset_restriction_ownership_mode.py | 40 +++ .../v2/model/dataset_restriction_principal.py | 47 +++ .../v2/model/dataset_restriction_response.py | 40 +++ ...dataset_restriction_response_attributes.py | 80 +++++ .../dataset_restriction_response_data.py | 59 ++++ .../dataset_restriction_restriction_mode.py | 40 +++ .../dataset_restriction_update_request.py | 42 +++ ...t_restriction_update_request_attributes.py | 70 +++++ ...dataset_restriction_update_request_data.py | 53 ++++ .../dataset_restrictions_list_response.py | 41 +++ .../v2/model/dataset_restrictions_type.py | 35 +++ src/datadog_api_client/v2/models/__init__.py | 24 ++ .../v2/features/dataset_restrictions.feature | 51 ++++ tests/v2/features/undo.json | 13 + 22 files changed, 1157 insertions(+) create mode 100644 examples/v2/dataset-restrictions/ListDatasetRestrictions.py create mode 100644 examples/v2/dataset-restrictions/UpdateDatasetRestriction.py create mode 100644 src/datadog_api_client/v2/api/dataset_restrictions_api.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_ownership_mode.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_principal.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_response.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_response_attributes.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_response_data.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_restriction_mode.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_update_request.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_update_request_attributes.py create mode 100644 src/datadog_api_client/v2/model/dataset_restriction_update_request_data.py create mode 100644 src/datadog_api_client/v2/model/dataset_restrictions_list_response.py create mode 100644 src/datadog_api_client/v2/model/dataset_restrictions_type.py create mode 100644 tests/v2/features/dataset_restrictions.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 18755c0511..60073dd538 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -21475,6 +21475,162 @@ components: data: $ref: "#/components/schemas/DatasetResponse" type: object + DatasetRestrictionOwnershipMode: + description: |- + Controls how dataset ownership is determined. `disabled` turns off ownership-based access + entirely. `team_tag_based` assigns dataset ownership based on the team tags applied to the + data, allowing team members to see their own team's datasets. + enum: + - disabled + - team_tag_based + example: "team_tag_based" + type: string + x-enum-varnames: + - DISABLED + - TEAM_TAG_BASED + DatasetRestrictionPrincipal: + description: |- + A user or role that is exempt from dataset restrictions and retains unrestricted + access to all datasets for the product type. + properties: + id: + description: The unique identifier of the principal (a user UUID or role ID). + example: "abc123" + type: string + name: + description: The human-readable display name of the principal as shown in the Datadog UI. + example: "Datadog Admin Role" + type: string + type: + description: |- + The kind of principal, such as `user` for an individual user account or `role` + for a Datadog role. + example: "role" + type: string + required: + - type + - id + - name + type: object + DatasetRestrictionResponse: + description: Response containing the updated dataset restriction. + properties: + data: + $ref: "#/components/schemas/DatasetRestrictionResponseData" + required: + - data + type: object + DatasetRestrictionResponseAttributes: + description: |- + The current configuration of a dataset restriction, including restriction mode, + ownership mode, and exempt principals. + properties: + ownership_mode: + $ref: "#/components/schemas/DatasetRestrictionOwnershipMode" + restriction_key: + description: Internal key used by the restriction enforcement system to identify this restriction rule. + type: string + restriction_mode: + $ref: "#/components/schemas/DatasetRestrictionRestrictionMode" + unrestricted_principals: + description: |- + Principals (users or roles) that are exempt from this restriction and retain + full data access regardless of the restriction mode. + items: + $ref: "#/components/schemas/DatasetRestrictionPrincipal" + type: array + required: + - restriction_mode + type: object + DatasetRestrictionResponseData: + description: A single dataset restriction configuration for one product type. + properties: + attributes: + $ref: "#/components/schemas/DatasetRestrictionResponseAttributes" + id: + description: The Datadog product type this restriction applies to (for example, `rum`, `apm`, or `logs`). + example: "rum" + type: string + type: + $ref: "#/components/schemas/DatasetRestrictionsType" + required: + - type + - id + - attributes + type: object + DatasetRestrictionRestrictionMode: + description: |- + Controls the default data visibility for the product type. `standard` makes data visible + to all users with appropriate product access. `default_hide` hides data by default and + requires explicit grants for each dataset. + enum: + - standard + - default_hide + example: "default_hide" + type: string + x-enum-varnames: + - STANDARD + - DEFAULT_HIDE + DatasetRestrictionUpdateRequest: + description: Payload for updating a dataset restriction configuration. + properties: + data: + $ref: "#/components/schemas/DatasetRestrictionUpdateRequestData" + required: + - data + type: object + DatasetRestrictionUpdateRequestAttributes: + description: |- + Editable attributes of a dataset restriction. Only `restriction_mode` is required; + omitted optional fields retain their current values. + properties: + ownership_mode: + $ref: "#/components/schemas/DatasetRestrictionOwnershipMode" + restriction_mode: + $ref: "#/components/schemas/DatasetRestrictionRestrictionMode" + unrestricted_principals: + description: |- + Principal identifiers (users or roles) that are exempt from the restriction and + can always access all datasets for this product type. + items: + description: A unique identifier of a user or role principal. + type: string + type: array + required: + - restriction_mode + type: object + DatasetRestrictionUpdateRequestData: + description: Data object for a dataset restriction update. + properties: + attributes: + $ref: "#/components/schemas/DatasetRestrictionUpdateRequestAttributes" + type: + $ref: "#/components/schemas/DatasetRestrictionsType" + required: + - type + - attributes + type: object + DatasetRestrictionsListResponse: + description: |- + Response containing the list of all dataset restriction configurations for the + organization, one per product type. + properties: + data: + description: An array of dataset restriction objects, one for each configured product type. + items: + $ref: "#/components/schemas/DatasetRestrictionResponseData" + type: array + required: + - data + type: object + DatasetRestrictionsType: + description: JSON:API resource type for dataset restrictions. + enum: + - dataset_restrictions + example: "dataset_restrictions" + type: string + x-enum-varnames: + - DATASET_RESTRICTIONS DatasetType: default: dataset description: Resource type, always set to `dataset`. @@ -97605,6 +97761,126 @@ paths: 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/dataset_restrictions: + get: + description: |- + Retrieve all dataset restriction configurations for the organization. + Returns one restriction object per configured product type (for example, RUM, APM, or Logs), + including the current restriction mode, ownership mode, and any unrestricted principals. + Requires the `user_access_read` permission. + operationId: ListDatasetRestrictions + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + restriction_mode: "standard" + id: "rum" + type: "dataset_restrictions" + - attributes: + ownership_mode: "team_tag_based" + restriction_mode: "default_hide" + id: "apm" + type: "dataset_restrictions" + schema: + $ref: "#/components/schemas/DatasetRestrictionsListResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List dataset restrictions + tags: + - Dataset Restrictions + 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/dataset_restrictions/{product_type}: + post: + description: |- + Update the dataset restriction configuration for a specific product type. + Sets the restriction mode, optional ownership mode, and the list of principals + that are exempt from restrictions. Requires the `user_access_manage` permission. + Changes are audited and take effect immediately. + operationId: UpdateDatasetRestriction + parameters: + - description: The Datadog product type to configure restrictions for (for example, `rum`, `apm`, or `logs`). + example: "rum" + in: path + name: product_type + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + ownership_mode: "team_tag_based" + restriction_mode: "default_hide" + type: "dataset_restrictions" + schema: + $ref: "#/components/schemas/DatasetRestrictionUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + ownership_mode: "team_tag_based" + restriction_mode: "default_hide" + id: "rum" + type: "dataset_restrictions" + schema: + $ref: "#/components/schemas/DatasetRestrictionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a dataset restriction + tags: + - Dataset Restrictions + 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/datasets: get: description: Get all datasets that have been configured for an organization. @@ -146005,6 +146281,11 @@ tags: - description: |- The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively. name: Data Deletion + - description: |- + Configure dataset-level access restrictions per Datadog product type. Dataset restrictions + control whether data is visible by default or hidden until explicitly granted, and how + ownership-based access is determined. + name: Dataset Restrictions - description: |- Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index b680ccf114..3559c8b9c7 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -235,6 +235,13 @@ datadog\_api\_client.v2.api.data\_deletion\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.dataset\_restrictions\_api module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.dataset_restrictions_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.datasets\_api module ------------------------------------------------ diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 4acfd1f380..0b381a5e7c 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -8404,6 +8404,83 @@ datadog\_api\_client.v2.model.dataset\_response\_single module :members: :show-inheritance: +datadog\_api\_client.v2.model.dataset\_restriction\_ownership\_mode module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_ownership_mode + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_principal module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_principal + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_response module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_response\_attributes module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_response\_data module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_restriction\_mode module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_restriction_mode + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_update\_request module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_update_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_update\_request\_attributes module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_update_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restriction\_update\_request\_data module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restriction_update_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restrictions\_list\_response module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restrictions_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dataset\_restrictions\_type module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dataset_restrictions_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.dataset\_type module -------------------------------------------------- diff --git a/examples/v2/dataset-restrictions/ListDatasetRestrictions.py b/examples/v2/dataset-restrictions/ListDatasetRestrictions.py new file mode 100644 index 0000000000..e48895e07a --- /dev/null +++ b/examples/v2/dataset-restrictions/ListDatasetRestrictions.py @@ -0,0 +1,14 @@ +""" +List dataset restrictions returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dataset_restrictions_api import DatasetRestrictionsApi + +configuration = Configuration() +configuration.unstable_operations["list_dataset_restrictions"] = True +with ApiClient(configuration) as api_client: + api_instance = DatasetRestrictionsApi(api_client) + response = api_instance.list_dataset_restrictions() + + print(response) diff --git a/examples/v2/dataset-restrictions/UpdateDatasetRestriction.py b/examples/v2/dataset-restrictions/UpdateDatasetRestriction.py new file mode 100644 index 0000000000..bc098a9fc4 --- /dev/null +++ b/examples/v2/dataset-restrictions/UpdateDatasetRestriction.py @@ -0,0 +1,33 @@ +""" +Update a dataset restriction returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dataset_restrictions_api import DatasetRestrictionsApi +from datadog_api_client.v2.model.dataset_restriction_ownership_mode import DatasetRestrictionOwnershipMode +from datadog_api_client.v2.model.dataset_restriction_restriction_mode import DatasetRestrictionRestrictionMode +from datadog_api_client.v2.model.dataset_restriction_update_request import DatasetRestrictionUpdateRequest +from datadog_api_client.v2.model.dataset_restriction_update_request_attributes import ( + DatasetRestrictionUpdateRequestAttributes, +) +from datadog_api_client.v2.model.dataset_restriction_update_request_data import DatasetRestrictionUpdateRequestData +from datadog_api_client.v2.model.dataset_restrictions_type import DatasetRestrictionsType + +body = DatasetRestrictionUpdateRequest( + data=DatasetRestrictionUpdateRequestData( + attributes=DatasetRestrictionUpdateRequestAttributes( + ownership_mode=DatasetRestrictionOwnershipMode.TEAM_TAG_BASED, + restriction_mode=DatasetRestrictionRestrictionMode.DEFAULT_HIDE, + unrestricted_principals=[], + ), + type=DatasetRestrictionsType.DATASET_RESTRICTIONS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["update_dataset_restriction"] = True +with ApiClient(configuration) as api_client: + api_instance = DatasetRestrictionsApi(api_client) + response = api_instance.update_dataset_restriction(product_type="product_type", body=body) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index f20de3cba4..4aae933aef 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -354,6 +354,8 @@ def __init__( "v2.delete_dashboard_secure_embed": False, "v2.get_dashboard_secure_embed": False, "v2.update_dashboard_secure_embed": False, + "v2.list_dataset_restrictions": False, + "v2.update_dataset_restriction": False, "v2.create_dataset": False, "v2.delete_dataset": False, "v2.get_all_datasets": False, diff --git a/src/datadog_api_client/v2/api/dataset_restrictions_api.py b/src/datadog_api_client/v2/api/dataset_restrictions_api.py new file mode 100644 index 0000000000..9c0b76303a --- /dev/null +++ b/src/datadog_api_client/v2/api/dataset_restrictions_api.py @@ -0,0 +1,106 @@ +# 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.dataset_restrictions_list_response import DatasetRestrictionsListResponse +from datadog_api_client.v2.model.dataset_restriction_response import DatasetRestrictionResponse +from datadog_api_client.v2.model.dataset_restriction_update_request import DatasetRestrictionUpdateRequest + + +class DatasetRestrictionsApi: + """ + Configure dataset-level access restrictions per Datadog product type. Dataset restrictions + control whether data is visible by default or hidden until explicitly granted, and how + ownership-based access is determined. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._list_dataset_restrictions_endpoint = _Endpoint( + settings={ + "response_type": (DatasetRestrictionsListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dataset_restrictions", + "operation_id": "list_dataset_restrictions", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._update_dataset_restriction_endpoint = _Endpoint( + settings={ + "response_type": (DatasetRestrictionResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dataset_restrictions/{product_type}", + "operation_id": "update_dataset_restriction", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "product_type": { + "required": True, + "openapi_types": (str,), + "attribute": "product_type", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (DatasetRestrictionUpdateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def list_dataset_restrictions( + self, + ) -> DatasetRestrictionsListResponse: + """List dataset restrictions. + + Retrieve all dataset restriction configurations for the organization. + Returns one restriction object per configured product type (for example, RUM, APM, or Logs), + including the current restriction mode, ownership mode, and any unrestricted principals. + Requires the ``user_access_read`` permission. + + :rtype: DatasetRestrictionsListResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_dataset_restrictions_endpoint.call_with_http_info(**kwargs) + + def update_dataset_restriction( + self, + product_type: str, + body: DatasetRestrictionUpdateRequest, + ) -> DatasetRestrictionResponse: + """Update a dataset restriction. + + Update the dataset restriction configuration for a specific product type. + Sets the restriction mode, optional ownership mode, and the list of principals + that are exempt from restrictions. Requires the ``user_access_manage`` permission. + Changes are audited and take effect immediately. + + :param product_type: The Datadog product type to configure restrictions for (for example, ``rum`` , ``apm`` , or ``logs`` ). + :type product_type: str + :type body: DatasetRestrictionUpdateRequest + :rtype: DatasetRestrictionResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["product_type"] = product_type + + kwargs["body"] = body + + return self._update_dataset_restriction_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 7635b44174..2e8fbb660a 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -32,6 +32,7 @@ from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi from datadog_api_client.v2.api.dashboard_secure_embed_api import DashboardSecureEmbedApi from datadog_api_client.v2.api.data_deletion_api import DataDeletionApi +from datadog_api_client.v2.api.dataset_restrictions_api import DatasetRestrictionsApi from datadog_api_client.v2.api.datasets_api import DatasetsApi from datadog_api_client.v2.api.deployment_gates_api import DeploymentGatesApi from datadog_api_client.v2.api.domain_allowlist_api import DomainAllowlistApi @@ -145,6 +146,7 @@ "DashboardListsApi", "DashboardSecureEmbedApi", "DataDeletionApi", + "DatasetRestrictionsApi", "DatasetsApi", "DeploymentGatesApi", "DomainAllowlistApi", diff --git a/src/datadog_api_client/v2/model/dataset_restriction_ownership_mode.py b/src/datadog_api_client/v2/model/dataset_restriction_ownership_mode.py new file mode 100644 index 0000000000..480b5205dc --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_ownership_mode.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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DatasetRestrictionOwnershipMode(ModelSimple): + """ + Controls how dataset ownership is determined. `disabled` turns off ownership-based access + entirely. `team_tag_based` assigns dataset ownership based on the team tags applied to the + data, allowing team members to see their own team's datasets. + + :param value: Must be one of ["disabled", "team_tag_based"]. + :type value: str + """ + + allowed_values = { + "disabled", + "team_tag_based", + } + DISABLED: ClassVar["DatasetRestrictionOwnershipMode"] + TEAM_TAG_BASED: ClassVar["DatasetRestrictionOwnershipMode"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DatasetRestrictionOwnershipMode.DISABLED = DatasetRestrictionOwnershipMode("disabled") +DatasetRestrictionOwnershipMode.TEAM_TAG_BASED = DatasetRestrictionOwnershipMode("team_tag_based") diff --git a/src/datadog_api_client/v2/model/dataset_restriction_principal.py b/src/datadog_api_client/v2/model/dataset_restriction_principal.py new file mode 100644 index 0000000000..416b67c217 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_principal.py @@ -0,0 +1,47 @@ +# 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 DatasetRestrictionPrincipal(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "name": (str,), + "type": (str,), + } + + attribute_map = { + "id": "id", + "name": "name", + "type": "type", + } + + def __init__(self_, id: str, name: str, type: str, **kwargs): + """ + A user or role that is exempt from dataset restrictions and retains unrestricted + access to all datasets for the product type. + + :param id: The unique identifier of the principal (a user UUID or role ID). + :type id: str + + :param name: The human-readable display name of the principal as shown in the Datadog UI. + :type name: str + + :param type: The kind of principal, such as ``user`` for an individual user account or ``role`` + for a Datadog role. + :type type: str + """ + super().__init__(kwargs) + + self_.id = id + self_.name = name + self_.type = type diff --git a/src/datadog_api_client/v2/model/dataset_restriction_response.py b/src/datadog_api_client/v2/model/dataset_restriction_response.py new file mode 100644 index 0000000000..bc637b5c56 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_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.dataset_restriction_response_data import DatasetRestrictionResponseData + + +class DatasetRestrictionResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_restriction_response_data import DatasetRestrictionResponseData + + return { + "data": (DatasetRestrictionResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DatasetRestrictionResponseData, **kwargs): + """ + Response containing the updated dataset restriction. + + :param data: A single dataset restriction configuration for one product type. + :type data: DatasetRestrictionResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dataset_restriction_response_attributes.py b/src/datadog_api_client/v2/model/dataset_restriction_response_attributes.py new file mode 100644 index 0000000000..3283dad081 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_response_attributes.py @@ -0,0 +1,80 @@ +# 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.dataset_restriction_ownership_mode import DatasetRestrictionOwnershipMode + from datadog_api_client.v2.model.dataset_restriction_restriction_mode import DatasetRestrictionRestrictionMode + from datadog_api_client.v2.model.dataset_restriction_principal import DatasetRestrictionPrincipal + + +class DatasetRestrictionResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_restriction_ownership_mode import DatasetRestrictionOwnershipMode + from datadog_api_client.v2.model.dataset_restriction_restriction_mode import DatasetRestrictionRestrictionMode + from datadog_api_client.v2.model.dataset_restriction_principal import DatasetRestrictionPrincipal + + return { + "ownership_mode": (DatasetRestrictionOwnershipMode,), + "restriction_key": (str,), + "restriction_mode": (DatasetRestrictionRestrictionMode,), + "unrestricted_principals": ([DatasetRestrictionPrincipal],), + } + + attribute_map = { + "ownership_mode": "ownership_mode", + "restriction_key": "restriction_key", + "restriction_mode": "restriction_mode", + "unrestricted_principals": "unrestricted_principals", + } + + def __init__( + self_, + restriction_mode: DatasetRestrictionRestrictionMode, + ownership_mode: Union[DatasetRestrictionOwnershipMode, UnsetType] = unset, + restriction_key: Union[str, UnsetType] = unset, + unrestricted_principals: Union[List[DatasetRestrictionPrincipal], UnsetType] = unset, + **kwargs, + ): + """ + The current configuration of a dataset restriction, including restriction mode, + ownership mode, and exempt principals. + + :param ownership_mode: Controls how dataset ownership is determined. ``disabled`` turns off ownership-based access + entirely. ``team_tag_based`` assigns dataset ownership based on the team tags applied to the + data, allowing team members to see their own team's datasets. + :type ownership_mode: DatasetRestrictionOwnershipMode, optional + + :param restriction_key: Internal key used by the restriction enforcement system to identify this restriction rule. + :type restriction_key: str, optional + + :param restriction_mode: Controls the default data visibility for the product type. ``standard`` makes data visible + to all users with appropriate product access. ``default_hide`` hides data by default and + requires explicit grants for each dataset. + :type restriction_mode: DatasetRestrictionRestrictionMode + + :param unrestricted_principals: Principals (users or roles) that are exempt from this restriction and retain + full data access regardless of the restriction mode. + :type unrestricted_principals: [DatasetRestrictionPrincipal], optional + """ + if ownership_mode is not unset: + kwargs["ownership_mode"] = ownership_mode + if restriction_key is not unset: + kwargs["restriction_key"] = restriction_key + if unrestricted_principals is not unset: + kwargs["unrestricted_principals"] = unrestricted_principals + super().__init__(kwargs) + + self_.restriction_mode = restriction_mode diff --git a/src/datadog_api_client/v2/model/dataset_restriction_response_data.py b/src/datadog_api_client/v2/model/dataset_restriction_response_data.py new file mode 100644 index 0000000000..009377d90b --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_response_data.py @@ -0,0 +1,59 @@ +# 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.dataset_restriction_response_attributes import DatasetRestrictionResponseAttributes + from datadog_api_client.v2.model.dataset_restrictions_type import DatasetRestrictionsType + + +class DatasetRestrictionResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_restriction_response_attributes import ( + DatasetRestrictionResponseAttributes, + ) + from datadog_api_client.v2.model.dataset_restrictions_type import DatasetRestrictionsType + + return { + "attributes": (DatasetRestrictionResponseAttributes,), + "id": (str,), + "type": (DatasetRestrictionsType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, attributes: DatasetRestrictionResponseAttributes, id: str, type: DatasetRestrictionsType, **kwargs + ): + """ + A single dataset restriction configuration for one product type. + + :param attributes: The current configuration of a dataset restriction, including restriction mode, + ownership mode, and exempt principals. + :type attributes: DatasetRestrictionResponseAttributes + + :param id: The Datadog product type this restriction applies to (for example, ``rum`` , ``apm`` , or ``logs`` ). + :type id: str + + :param type: JSON:API resource type for dataset restrictions. + :type type: DatasetRestrictionsType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/dataset_restriction_restriction_mode.py b/src/datadog_api_client/v2/model/dataset_restriction_restriction_mode.py new file mode 100644 index 0000000000..067c548bc1 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_restriction_mode.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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DatasetRestrictionRestrictionMode(ModelSimple): + """ + Controls the default data visibility for the product type. `standard` makes data visible + to all users with appropriate product access. `default_hide` hides data by default and + requires explicit grants for each dataset. + + :param value: Must be one of ["standard", "default_hide"]. + :type value: str + """ + + allowed_values = { + "standard", + "default_hide", + } + STANDARD: ClassVar["DatasetRestrictionRestrictionMode"] + DEFAULT_HIDE: ClassVar["DatasetRestrictionRestrictionMode"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DatasetRestrictionRestrictionMode.STANDARD = DatasetRestrictionRestrictionMode("standard") +DatasetRestrictionRestrictionMode.DEFAULT_HIDE = DatasetRestrictionRestrictionMode("default_hide") diff --git a/src/datadog_api_client/v2/model/dataset_restriction_update_request.py b/src/datadog_api_client/v2/model/dataset_restriction_update_request.py new file mode 100644 index 0000000000..a260958165 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_update_request.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dataset_restriction_update_request_data import DatasetRestrictionUpdateRequestData + + +class DatasetRestrictionUpdateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_restriction_update_request_data import ( + DatasetRestrictionUpdateRequestData, + ) + + return { + "data": (DatasetRestrictionUpdateRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DatasetRestrictionUpdateRequestData, **kwargs): + """ + Payload for updating a dataset restriction configuration. + + :param data: Data object for a dataset restriction update. + :type data: DatasetRestrictionUpdateRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dataset_restriction_update_request_attributes.py b/src/datadog_api_client/v2/model/dataset_restriction_update_request_attributes.py new file mode 100644 index 0000000000..9826d0d57e --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_update_request_attributes.py @@ -0,0 +1,70 @@ +# 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.dataset_restriction_ownership_mode import DatasetRestrictionOwnershipMode + from datadog_api_client.v2.model.dataset_restriction_restriction_mode import DatasetRestrictionRestrictionMode + + +class DatasetRestrictionUpdateRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_restriction_ownership_mode import DatasetRestrictionOwnershipMode + from datadog_api_client.v2.model.dataset_restriction_restriction_mode import DatasetRestrictionRestrictionMode + + return { + "ownership_mode": (DatasetRestrictionOwnershipMode,), + "restriction_mode": (DatasetRestrictionRestrictionMode,), + "unrestricted_principals": ([str],), + } + + attribute_map = { + "ownership_mode": "ownership_mode", + "restriction_mode": "restriction_mode", + "unrestricted_principals": "unrestricted_principals", + } + + def __init__( + self_, + restriction_mode: DatasetRestrictionRestrictionMode, + ownership_mode: Union[DatasetRestrictionOwnershipMode, UnsetType] = unset, + unrestricted_principals: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Editable attributes of a dataset restriction. Only ``restriction_mode`` is required; + omitted optional fields retain their current values. + + :param ownership_mode: Controls how dataset ownership is determined. ``disabled`` turns off ownership-based access + entirely. ``team_tag_based`` assigns dataset ownership based on the team tags applied to the + data, allowing team members to see their own team's datasets. + :type ownership_mode: DatasetRestrictionOwnershipMode, optional + + :param restriction_mode: Controls the default data visibility for the product type. ``standard`` makes data visible + to all users with appropriate product access. ``default_hide`` hides data by default and + requires explicit grants for each dataset. + :type restriction_mode: DatasetRestrictionRestrictionMode + + :param unrestricted_principals: Principal identifiers (users or roles) that are exempt from the restriction and + can always access all datasets for this product type. + :type unrestricted_principals: [str], optional + """ + if ownership_mode is not unset: + kwargs["ownership_mode"] = ownership_mode + if unrestricted_principals is not unset: + kwargs["unrestricted_principals"] = unrestricted_principals + super().__init__(kwargs) + + self_.restriction_mode = restriction_mode diff --git a/src/datadog_api_client/v2/model/dataset_restriction_update_request_data.py b/src/datadog_api_client/v2/model/dataset_restriction_update_request_data.py new file mode 100644 index 0000000000..7b4fded093 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restriction_update_request_data.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 typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dataset_restriction_update_request_attributes import ( + DatasetRestrictionUpdateRequestAttributes, + ) + from datadog_api_client.v2.model.dataset_restrictions_type import DatasetRestrictionsType + + +class DatasetRestrictionUpdateRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_restriction_update_request_attributes import ( + DatasetRestrictionUpdateRequestAttributes, + ) + from datadog_api_client.v2.model.dataset_restrictions_type import DatasetRestrictionsType + + return { + "attributes": (DatasetRestrictionUpdateRequestAttributes,), + "type": (DatasetRestrictionsType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: DatasetRestrictionUpdateRequestAttributes, type: DatasetRestrictionsType, **kwargs): + """ + Data object for a dataset restriction update. + + :param attributes: Editable attributes of a dataset restriction. Only ``restriction_mode`` is required; + omitted optional fields retain their current values. + :type attributes: DatasetRestrictionUpdateRequestAttributes + + :param type: JSON:API resource type for dataset restrictions. + :type type: DatasetRestrictionsType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/dataset_restrictions_list_response.py b/src/datadog_api_client/v2/model/dataset_restrictions_list_response.py new file mode 100644 index 0000000000..8bfb1cd553 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restrictions_list_response.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 typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dataset_restriction_response_data import DatasetRestrictionResponseData + + +class DatasetRestrictionsListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dataset_restriction_response_data import DatasetRestrictionResponseData + + return { + "data": ([DatasetRestrictionResponseData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[DatasetRestrictionResponseData], **kwargs): + """ + Response containing the list of all dataset restriction configurations for the + organization, one per product type. + + :param data: An array of dataset restriction objects, one for each configured product type. + :type data: [DatasetRestrictionResponseData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/dataset_restrictions_type.py b/src/datadog_api_client/v2/model/dataset_restrictions_type.py new file mode 100644 index 0000000000..c1d35aeee5 --- /dev/null +++ b/src/datadog_api_client/v2/model/dataset_restrictions_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 DatasetRestrictionsType(ModelSimple): + """ + JSON:API resource type for dataset restrictions. + + :param value: If omitted defaults to "dataset_restrictions". Must be one of ["dataset_restrictions"]. + :type value: str + """ + + allowed_values = { + "dataset_restrictions", + } + DATASET_RESTRICTIONS: ClassVar["DatasetRestrictionsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DatasetRestrictionsType.DATASET_RESTRICTIONS = DatasetRestrictionsType("dataset_restrictions") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 05eb4d066a..51bdb3c0e2 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1687,6 +1687,19 @@ from datadog_api_client.v2.model.dataset_response import DatasetResponse from datadog_api_client.v2.model.dataset_response_multi import DatasetResponseMulti from datadog_api_client.v2.model.dataset_response_single import DatasetResponseSingle +from datadog_api_client.v2.model.dataset_restriction_ownership_mode import DatasetRestrictionOwnershipMode +from datadog_api_client.v2.model.dataset_restriction_principal import DatasetRestrictionPrincipal +from datadog_api_client.v2.model.dataset_restriction_response import DatasetRestrictionResponse +from datadog_api_client.v2.model.dataset_restriction_response_attributes import DatasetRestrictionResponseAttributes +from datadog_api_client.v2.model.dataset_restriction_response_data import DatasetRestrictionResponseData +from datadog_api_client.v2.model.dataset_restriction_restriction_mode import DatasetRestrictionRestrictionMode +from datadog_api_client.v2.model.dataset_restriction_update_request import DatasetRestrictionUpdateRequest +from datadog_api_client.v2.model.dataset_restriction_update_request_attributes import ( + DatasetRestrictionUpdateRequestAttributes, +) +from datadog_api_client.v2.model.dataset_restriction_update_request_data import DatasetRestrictionUpdateRequestData +from datadog_api_client.v2.model.dataset_restrictions_list_response import DatasetRestrictionsListResponse +from datadog_api_client.v2.model.dataset_restrictions_type import DatasetRestrictionsType from datadog_api_client.v2.model.dataset_type import DatasetType from datadog_api_client.v2.model.dataset_update_request import DatasetUpdateRequest from datadog_api_client.v2.model.datastore import Datastore @@ -8746,6 +8759,17 @@ "DatasetResponse", "DatasetResponseMulti", "DatasetResponseSingle", + "DatasetRestrictionOwnershipMode", + "DatasetRestrictionPrincipal", + "DatasetRestrictionResponse", + "DatasetRestrictionResponseAttributes", + "DatasetRestrictionResponseData", + "DatasetRestrictionRestrictionMode", + "DatasetRestrictionUpdateRequest", + "DatasetRestrictionUpdateRequestAttributes", + "DatasetRestrictionUpdateRequestData", + "DatasetRestrictionsListResponse", + "DatasetRestrictionsType", "DatasetType", "DatasetUpdateRequest", "Datastore", diff --git a/tests/v2/features/dataset_restrictions.feature b/tests/v2/features/dataset_restrictions.feature new file mode 100644 index 0000000000..6a08480abd --- /dev/null +++ b/tests/v2/features/dataset_restrictions.feature @@ -0,0 +1,51 @@ +@endpoint(dataset-restrictions) @endpoint(dataset-restrictions-v2) +Feature: Dataset Restrictions + Configure dataset-level access restrictions per Datadog product type. + Dataset restrictions control whether data is visible by default or hidden + until explicitly granted, and how ownership-based access is determined. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "DatasetRestrictions" API + + @generated @skip @team:DataDog/access-enforcement + Scenario: List dataset restrictions returns "Not Found" response + Given operation "ListDatasetRestrictions" enabled + And new "ListDatasetRestrictions" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/access-enforcement + Scenario: List dataset restrictions returns "OK" response + Given operation "ListDatasetRestrictions" enabled + And new "ListDatasetRestrictions" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/access-enforcement + Scenario: Update a dataset restriction returns "Bad Request" response + Given operation "UpdateDatasetRestriction" enabled + And new "UpdateDatasetRestriction" request + And request contains "product_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/access-enforcement + Scenario: Update a dataset restriction returns "Not Found" response + Given operation "UpdateDatasetRestriction" enabled + And new "UpdateDatasetRestriction" request + And request contains "product_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/access-enforcement + Scenario: Update a dataset restriction returns "OK" response + Given operation "UpdateDatasetRestriction" enabled + And new "UpdateDatasetRestriction" request + And request contains "product_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}} + 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 8f3cc28492..71f8bfc1b5 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1602,6 +1602,19 @@ "type": "idempotent" } }, + "ListDatasetRestrictions": { + "tag": "Dataset Restrictions", + "undo": { + "type": "safe" + } + }, + "UpdateDatasetRestriction": { + "tag": "Dataset Restrictions", + "undo": { + "operationId": "UpdateDatasetRestriction", + "type": "idempotent" + } + }, "GetAllDatasets": { "tag": "Datasets", "undo": {