Skip to content

Commit ef7e54b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a087507 of spec repo
1 parent 52a7477 commit ef7e54b

22 files changed

Lines changed: 1111 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21475,6 +21475,142 @@ components:
2147521475
data:
2147621476
$ref: "#/components/schemas/DatasetResponse"
2147721477
type: object
21478+
DatasetRestrictionOwnershipMode:
21479+
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.
21480+
enum:
21481+
- disabled
21482+
- team_tag_based
21483+
example: "team_tag_based"
21484+
type: string
21485+
x-enum-varnames:
21486+
- DISABLED
21487+
- TEAM_TAG_BASED
21488+
DatasetRestrictionPrincipal:
21489+
description: A user or role that is exempt from dataset restrictions and retains unrestricted access to all datasets for the product type.
21490+
properties:
21491+
id:
21492+
description: The unique identifier of the principal (a user UUID or role ID).
21493+
example: "abc123"
21494+
type: string
21495+
name:
21496+
description: The human-readable display name of the principal as shown in the Datadog UI.
21497+
example: "Datadog Admin Role"
21498+
type: string
21499+
type:
21500+
description: The kind of principal, such as `user` for an individual user account or `role` for a Datadog role.
21501+
example: "role"
21502+
type: string
21503+
required:
21504+
- type
21505+
- id
21506+
- name
21507+
type: object
21508+
DatasetRestrictionResponse:
21509+
description: Response containing the updated dataset restriction.
21510+
properties:
21511+
data:
21512+
$ref: "#/components/schemas/DatasetRestrictionResponseData"
21513+
required:
21514+
- data
21515+
type: object
21516+
DatasetRestrictionResponseAttributes:
21517+
description: The current configuration of a dataset restriction, including restriction mode, ownership mode, and exempt principals.
21518+
properties:
21519+
ownership_mode:
21520+
$ref: "#/components/schemas/DatasetRestrictionOwnershipMode"
21521+
restriction_key:
21522+
description: Internal key used by the restriction enforcement system to identify this restriction rule.
21523+
type: string
21524+
restriction_mode:
21525+
$ref: "#/components/schemas/DatasetRestrictionRestrictionMode"
21526+
unrestricted_principals:
21527+
description: Principals (users or roles) that are exempt from this restriction and retain full data access regardless of the restriction mode.
21528+
items:
21529+
$ref: "#/components/schemas/DatasetRestrictionPrincipal"
21530+
type: array
21531+
required:
21532+
- restriction_mode
21533+
type: object
21534+
DatasetRestrictionResponseData:
21535+
description: A single dataset restriction configuration for one product type.
21536+
properties:
21537+
attributes:
21538+
$ref: "#/components/schemas/DatasetRestrictionResponseAttributes"
21539+
id:
21540+
description: The Datadog product type this restriction applies to (for example, `rum`, `apm`, or `logs`).
21541+
example: "rum"
21542+
type: string
21543+
type:
21544+
$ref: "#/components/schemas/DatasetRestrictionsType"
21545+
required:
21546+
- type
21547+
- id
21548+
- attributes
21549+
type: object
21550+
DatasetRestrictionRestrictionMode:
21551+
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.
21552+
enum:
21553+
- standard
21554+
- default_hide
21555+
example: "default_hide"
21556+
type: string
21557+
x-enum-varnames:
21558+
- STANDARD
21559+
- DEFAULT_HIDE
21560+
DatasetRestrictionUpdateRequest:
21561+
description: Payload for updating a dataset restriction configuration.
21562+
properties:
21563+
data:
21564+
$ref: "#/components/schemas/DatasetRestrictionUpdateRequestData"
21565+
required:
21566+
- data
21567+
type: object
21568+
DatasetRestrictionUpdateRequestAttributes:
21569+
description: Editable attributes of a dataset restriction. Only `restriction_mode` is required; omitted optional fields retain their current values.
21570+
properties:
21571+
ownership_mode:
21572+
$ref: "#/components/schemas/DatasetRestrictionOwnershipMode"
21573+
restriction_mode:
21574+
$ref: "#/components/schemas/DatasetRestrictionRestrictionMode"
21575+
unrestricted_principals:
21576+
description: Principal identifiers (users or roles) that are exempt from the restriction and can always access all datasets for this product type.
21577+
items:
21578+
description: A unique identifier of a user or role principal.
21579+
type: string
21580+
type: array
21581+
required:
21582+
- restriction_mode
21583+
type: object
21584+
DatasetRestrictionUpdateRequestData:
21585+
description: Data object for a dataset restriction update.
21586+
properties:
21587+
attributes:
21588+
$ref: "#/components/schemas/DatasetRestrictionUpdateRequestAttributes"
21589+
type:
21590+
$ref: "#/components/schemas/DatasetRestrictionsType"
21591+
required:
21592+
- type
21593+
- attributes
21594+
type: object
21595+
DatasetRestrictionsListResponse:
21596+
description: Response containing the list of all dataset restriction configurations for the organization, one per product type.
21597+
properties:
21598+
data:
21599+
description: An array of dataset restriction objects, one for each configured product type.
21600+
items:
21601+
$ref: "#/components/schemas/DatasetRestrictionResponseData"
21602+
type: array
21603+
required:
21604+
- data
21605+
type: object
21606+
DatasetRestrictionsType:
21607+
description: JSON:API resource type for dataset restrictions.
21608+
enum:
21609+
- dataset_restrictions
21610+
example: "dataset_restrictions"
21611+
type: string
21612+
x-enum-varnames:
21613+
- DATASET_RESTRICTIONS
2147821614
DatasetType:
2147921615
default: dataset
2148021616
description: Resource type, always set to `dataset`.
@@ -97293,6 +97429,126 @@ paths:
9729397429
x-unstable: |-
9729497430
**Note**: This endpoint is in preview and is subject to change.
9729597431
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
97432+
/api/v2/dataset_restrictions:
97433+
get:
97434+
description: |-
97435+
Retrieve all dataset restriction configurations for the organization.
97436+
Returns one restriction object per configured product type (for example, RUM, APM, or Logs),
97437+
including the current restriction mode, ownership mode, and any unrestricted principals.
97438+
Requires the `user_access_read` permission.
97439+
operationId: ListDatasetRestrictions
97440+
responses:
97441+
"200":
97442+
content:
97443+
application/json:
97444+
examples:
97445+
default:
97446+
value:
97447+
data:
97448+
- attributes:
97449+
restriction_mode: "standard"
97450+
id: "rum"
97451+
type: "dataset_restrictions"
97452+
- attributes:
97453+
ownership_mode: "team_tag_based"
97454+
restriction_mode: "default_hide"
97455+
id: "apm"
97456+
type: "dataset_restrictions"
97457+
schema:
97458+
$ref: "#/components/schemas/DatasetRestrictionsListResponse"
97459+
description: OK
97460+
"403":
97461+
content:
97462+
application/json:
97463+
schema:
97464+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97465+
description: Forbidden
97466+
"404":
97467+
content:
97468+
application/json:
97469+
schema:
97470+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97471+
description: Not Found
97472+
"429":
97473+
$ref: "#/components/responses/TooManyRequestsResponse"
97474+
summary: List dataset restrictions
97475+
tags:
97476+
- Dataset Restrictions
97477+
x-unstable: |-
97478+
**Note**: This endpoint is in preview and is subject to change.
97479+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
97480+
/api/v2/dataset_restrictions/{product_type}:
97481+
post:
97482+
description: |-
97483+
Update the dataset restriction configuration for a specific product type.
97484+
Sets the restriction mode, optional ownership mode, and the list of principals
97485+
that are exempt from restrictions. Requires the `user_access_manage` permission.
97486+
Changes are audited and take effect immediately.
97487+
operationId: UpdateDatasetRestriction
97488+
parameters:
97489+
- description: The Datadog product type to configure restrictions for (for example, `rum`, `apm`, or `logs`).
97490+
example: "rum"
97491+
in: path
97492+
name: product_type
97493+
required: true
97494+
schema:
97495+
type: string
97496+
requestBody:
97497+
content:
97498+
application/json:
97499+
examples:
97500+
default:
97501+
value:
97502+
data:
97503+
attributes:
97504+
ownership_mode: "team_tag_based"
97505+
restriction_mode: "default_hide"
97506+
type: "dataset_restrictions"
97507+
schema:
97508+
$ref: "#/components/schemas/DatasetRestrictionUpdateRequest"
97509+
required: true
97510+
responses:
97511+
"200":
97512+
content:
97513+
application/json:
97514+
examples:
97515+
default:
97516+
value:
97517+
data:
97518+
attributes:
97519+
ownership_mode: "team_tag_based"
97520+
restriction_mode: "default_hide"
97521+
id: "rum"
97522+
type: "dataset_restrictions"
97523+
schema:
97524+
$ref: "#/components/schemas/DatasetRestrictionResponse"
97525+
description: OK
97526+
"400":
97527+
content:
97528+
application/json:
97529+
schema:
97530+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97531+
description: Bad Request
97532+
"403":
97533+
content:
97534+
application/json:
97535+
schema:
97536+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97537+
description: Forbidden
97538+
"404":
97539+
content:
97540+
application/json:
97541+
schema:
97542+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97543+
description: Not Found
97544+
"429":
97545+
$ref: "#/components/responses/TooManyRequestsResponse"
97546+
summary: Update a dataset restriction
97547+
tags:
97548+
- Dataset Restrictions
97549+
x-unstable: |-
97550+
**Note**: This endpoint is in preview and is subject to change.
97551+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
9729697552
/api/v2/datasets:
9729797553
get:
9729897554
description: Get all datasets that have been configured for an organization.
@@ -145632,6 +145888,8 @@ tags:
145632145888
- description: |-
145633145889
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.
145634145890
name: Data Deletion
145891+
- 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.
145892+
name: Dataset Restrictions
145635145893
- description: |-
145636145894
Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate
145637145895
access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ datadog\_api\_client.v2.api.data\_deletion\_api module
242242
:members:
243243
:show-inheritance:
244244

245+
datadog\_api\_client.v2.api.dataset\_restrictions\_api module
246+
-------------------------------------------------------------
247+
248+
.. automodule:: datadog_api_client.v2.api.dataset_restrictions_api
249+
:members:
250+
:show-inheritance:
251+
245252
datadog\_api\_client.v2.api.datasets\_api module
246253
------------------------------------------------
247254

docs/datadog_api_client.v2.model.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8404,6 +8404,83 @@ datadog\_api\_client.v2.model.dataset\_response\_single module
84048404
:members:
84058405
:show-inheritance:
84068406

8407+
datadog\_api\_client.v2.model.dataset\_restriction\_ownership\_mode module
8408+
--------------------------------------------------------------------------
8409+
8410+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_ownership_mode
8411+
:members:
8412+
:show-inheritance:
8413+
8414+
datadog\_api\_client.v2.model.dataset\_restriction\_principal module
8415+
--------------------------------------------------------------------
8416+
8417+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_principal
8418+
:members:
8419+
:show-inheritance:
8420+
8421+
datadog\_api\_client.v2.model.dataset\_restriction\_response module
8422+
-------------------------------------------------------------------
8423+
8424+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_response
8425+
:members:
8426+
:show-inheritance:
8427+
8428+
datadog\_api\_client.v2.model.dataset\_restriction\_response\_attributes module
8429+
-------------------------------------------------------------------------------
8430+
8431+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_response_attributes
8432+
:members:
8433+
:show-inheritance:
8434+
8435+
datadog\_api\_client.v2.model.dataset\_restriction\_response\_data module
8436+
-------------------------------------------------------------------------
8437+
8438+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_response_data
8439+
:members:
8440+
:show-inheritance:
8441+
8442+
datadog\_api\_client.v2.model.dataset\_restriction\_restriction\_mode module
8443+
----------------------------------------------------------------------------
8444+
8445+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_restriction_mode
8446+
:members:
8447+
:show-inheritance:
8448+
8449+
datadog\_api\_client.v2.model.dataset\_restriction\_update\_request module
8450+
--------------------------------------------------------------------------
8451+
8452+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_update_request
8453+
:members:
8454+
:show-inheritance:
8455+
8456+
datadog\_api\_client.v2.model.dataset\_restriction\_update\_request\_attributes module
8457+
--------------------------------------------------------------------------------------
8458+
8459+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_update_request_attributes
8460+
:members:
8461+
:show-inheritance:
8462+
8463+
datadog\_api\_client.v2.model.dataset\_restriction\_update\_request\_data module
8464+
--------------------------------------------------------------------------------
8465+
8466+
.. automodule:: datadog_api_client.v2.model.dataset_restriction_update_request_data
8467+
:members:
8468+
:show-inheritance:
8469+
8470+
datadog\_api\_client.v2.model.dataset\_restrictions\_list\_response module
8471+
--------------------------------------------------------------------------
8472+
8473+
.. automodule:: datadog_api_client.v2.model.dataset_restrictions_list_response
8474+
:members:
8475+
:show-inheritance:
8476+
8477+
datadog\_api\_client.v2.model.dataset\_restrictions\_type module
8478+
----------------------------------------------------------------
8479+
8480+
.. automodule:: datadog_api_client.v2.model.dataset_restrictions_type
8481+
:members:
8482+
:show-inheritance:
8483+
84078484
datadog\_api\_client.v2.model.dataset\_type module
84088485
--------------------------------------------------
84098486

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
List dataset restrictions returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.dataset_restrictions_api import DatasetRestrictionsApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_dataset_restrictions"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = DatasetRestrictionsApi(api_client)
12+
response = api_instance.list_dataset_restrictions()
13+
14+
print(response)

0 commit comments

Comments
 (0)