Skip to content

Commit c2ea199

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a087507 of spec repo
1 parent 25ce205 commit c2ea199

20 files changed

Lines changed: 1768 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
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List dataset restrictions returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_dataset_restrictions".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::DatasetRestrictionsAPI.new
8+
p api_instance.list_dataset_restrictions()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Update a dataset restriction returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_dataset_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::DatasetRestrictionsAPI.new
8+
9+
body = DatadogAPIClient::V2::DatasetRestrictionUpdateRequest.new({
10+
data: DatadogAPIClient::V2::DatasetRestrictionUpdateRequestData.new({
11+
attributes: DatadogAPIClient::V2::DatasetRestrictionUpdateRequestAttributes.new({
12+
ownership_mode: DatadogAPIClient::V2::DatasetRestrictionOwnershipMode::TEAM_TAG_BASED,
13+
restriction_mode: DatadogAPIClient::V2::DatasetRestrictionRestrictionMode::DEFAULT_HIDE,
14+
unrestricted_principals: [],
15+
}),
16+
type: DatadogAPIClient::V2::DatasetRestrictionsType::DATASET_RESTRICTIONS,
17+
}),
18+
})
19+
p api_instance.update_dataset_restriction("product_type", body)

features/scenarios_model_mapping.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,10 @@
23052305
"token" => "String",
23062306
"body" => "SecureEmbedUpdateRequest",
23072307
},
2308+
"v2.UpdateDatasetRestriction" => {
2309+
"product_type" => "String",
2310+
"body" => "DatasetRestrictionUpdateRequest",
2311+
},
23082312
"v2.CreateDataset" => {
23092313
"body" => "DatasetCreateRequest",
23102314
},
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
@endpoint(dataset-restrictions) @endpoint(dataset-restrictions-v2)
2+
Feature: Dataset Restrictions
3+
Configure dataset-level access restrictions per Datadog product type.
4+
Dataset restrictions control whether data is visible by default or hidden
5+
until explicitly granted, and how ownership-based access is determined.
6+
7+
Background:
8+
Given a valid "apiKeyAuth" key in the system
9+
And a valid "appKeyAuth" key in the system
10+
And an instance of "DatasetRestrictions" API
11+
12+
@generated @skip @team:DataDog/access-policies-lifecycle
13+
Scenario: List dataset restrictions returns "Not Found" response
14+
Given operation "ListDatasetRestrictions" enabled
15+
And new "ListDatasetRestrictions" request
16+
When the request is sent
17+
Then the response status is 404 Not Found
18+
19+
@generated @skip @team:DataDog/access-policies-lifecycle
20+
Scenario: List dataset restrictions returns "OK" response
21+
Given operation "ListDatasetRestrictions" enabled
22+
And new "ListDatasetRestrictions" request
23+
When the request is sent
24+
Then the response status is 200 OK
25+
26+
@generated @skip @team:DataDog/access-policies-lifecycle
27+
Scenario: Update a dataset restriction returns "Bad Request" response
28+
Given operation "UpdateDatasetRestriction" enabled
29+
And new "UpdateDatasetRestriction" request
30+
And request contains "product_type" parameter from "REPLACE.ME"
31+
And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}}
32+
When the request is sent
33+
Then the response status is 400 Bad Request
34+
35+
@generated @skip @team:DataDog/access-policies-lifecycle
36+
Scenario: Update a dataset restriction returns "Not Found" response
37+
Given operation "UpdateDatasetRestriction" enabled
38+
And new "UpdateDatasetRestriction" request
39+
And request contains "product_type" parameter from "REPLACE.ME"
40+
And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}}
41+
When the request is sent
42+
Then the response status is 404 Not Found
43+
44+
@generated @skip @team:DataDog/access-policies-lifecycle
45+
Scenario: Update a dataset restriction returns "OK" response
46+
Given operation "UpdateDatasetRestriction" enabled
47+
And new "UpdateDatasetRestriction" request
48+
And request contains "product_type" parameter from "REPLACE.ME"
49+
And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}}
50+
When the request is sent
51+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,6 +1602,19 @@
16021602
"type": "idempotent"
16031603
}
16041604
},
1605+
"ListDatasetRestrictions": {
1606+
"tag": "Dataset Restrictions",
1607+
"undo": {
1608+
"type": "safe"
1609+
}
1610+
},
1611+
"UpdateDatasetRestriction": {
1612+
"tag": "Dataset Restrictions",
1613+
"undo": {
1614+
"operationId": "UpdateDatasetRestriction",
1615+
"type": "idempotent"
1616+
}
1617+
},
16051618
"GetAllDatasets": {
16061619
"tag": "Datasets",
16071620
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ def initialize
297297
"v2.delete_dashboard_secure_embed": false,
298298
"v2.get_dashboard_secure_embed": false,
299299
"v2.update_dashboard_secure_embed": false,
300+
"v2.list_dataset_restrictions": false,
301+
"v2.update_dataset_restriction": false,
300302
"v2.create_dataset": false,
301303
"v2.delete_dataset": false,
302304
"v2.get_all_datasets": false,

0 commit comments

Comments
 (0)