Skip to content

Commit ba46444

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c3fa3e8 of spec repo
1 parent fe47a89 commit ba46444

File tree

14 files changed

+408
-115
lines changed

14 files changed

+408
-115
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "0fe80dc",
3-
"generated": "2025-07-28 18:48:10.409"
2+
"spec_repo_commit": "c3fa3e8",
3+
"generated": "2025-07-28 20:23:49.904"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 68 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12477,31 +12477,33 @@ components:
1247712477
required:
1247812478
- type
1247912479
type: object
12480-
Dataset:
12481-
description: "Dataset object.\n\n### Datasets Constraints\n- **Tag Limit per
12482-
Dataset**:\n - Each restricted dataset supports a maximum of 10 key:value
12483-
pairs per product.\n\n- **Tag Key Rules per Telemetry Type**:\n - Only one
12484-
tag key or attribute may be used to define access within a single telemetry
12485-
type.\n - The same or different tag key may be used across different telemetry
12486-
types.\n\n- **Tag Value Uniqueness**:\n - Tag values must be unique within
12487-
a single dataset.\n - A tag value used in one dataset cannot be reused in
12488-
another dataset of the same telemetry type."
12480+
DatasetAttributesRequest:
12481+
description: Dataset metadata and configurations.
1248912482
properties:
12490-
attributes:
12491-
$ref: '#/components/schemas/DatasetAttributes'
12492-
id:
12493-
description: Unique identifier for the dataset.
12494-
example: 123e4567-e89b-12d3-a456-426614174000
12495-
type: string
12496-
type:
12497-
description: Resource type, always "dataset".
12498-
example: dataset
12483+
name:
12484+
description: Name of the dataset.
12485+
example: Security Audit Dataset
1249912486
type: string
12487+
principals:
12488+
description: List of access principals, formatted as `principal_type:id`.
12489+
Principal can be 'team' or 'role'.
12490+
example:
12491+
- role:86245fce-0a4e-11f0-92bd-da7ad0900002
12492+
items:
12493+
example: role:86245fce-0a4e-11f0-92bd-da7ad0900002
12494+
type: string
12495+
type: array
12496+
product_filters:
12497+
description: List of product-specific filters.
12498+
items:
12499+
$ref: '#/components/schemas/FiltersPerProduct'
12500+
type: array
1250012501
required:
12501-
- type
12502-
- attributes
12502+
- name
12503+
- product_filters
12504+
- principals
1250312505
type: object
12504-
DatasetAttributes:
12506+
DatasetAttributesResponse:
1250512507
description: Dataset metadata and configuration(s).
1250612508
properties:
1250712509
created_at:
@@ -12531,26 +12533,63 @@ components:
1253112533
items:
1253212534
$ref: '#/components/schemas/FiltersPerProduct'
1253312535
type: array
12534-
required:
12535-
- name
12536-
- product_filters
12537-
- principals
1253812536
type: object
1253912537
DatasetCreateRequest:
1254012538
description: Create request for a dataset.
1254112539
properties:
1254212540
data:
12543-
$ref: '#/components/schemas/Dataset'
12541+
$ref: '#/components/schemas/DatasetRequest'
1254412542
required:
1254512543
- data
1254612544
type: object
12545+
DatasetRequest:
12546+
description: "## Dataset object.\n\n# Datasets Constraints\n- **Tag limit per
12547+
dataset**:\n - Each restricted dataset supports a maximum of 10 key:value
12548+
pairs per product.\n\n- **Tag key rules per telemetry type**:\n - Only one
12549+
tag key or attribute may be used to define access within a single telemetry
12550+
type.\n - The same or different tag key may be used across different telemetry
12551+
types.\n\n- **Tag value uniqueness**:\n - Tag values must be unique within
12552+
a single dataset.\n - A tag value used in one dataset cannot be reused in
12553+
another dataset of the same telemetry type."
12554+
properties:
12555+
attributes:
12556+
$ref: '#/components/schemas/DatasetAttributesRequest'
12557+
type:
12558+
description: Resource type, always "dataset".
12559+
example: dataset
12560+
type: string
12561+
required:
12562+
- type
12563+
- attributes
12564+
type: object
12565+
DatasetResponse:
12566+
description: "## Dataset object.\n\n# Datasets Constraints\n- **Tag Limit per
12567+
Dataset**:\n - Each restricted dataset supports a maximum of 10 key:value
12568+
pairs per product.\n\n- **Tag Key Rules per Telemetry Type**:\n - Only one
12569+
tag key or attribute may be used to define access within a single telemetry
12570+
type.\n - The same or different tag key may be used across different telemetry
12571+
types.\n\n- **Tag Value Uniqueness**:\n - Tag values must be unique within
12572+
a single dataset.\n - A tag value used in one dataset cannot be reused in
12573+
another dataset of the same telemetry type."
12574+
properties:
12575+
attributes:
12576+
$ref: '#/components/schemas/DatasetAttributesResponse'
12577+
id:
12578+
description: Unique identifier for the dataset.
12579+
example: 123e4567-e89b-12d3-a456-426614174000
12580+
type: string
12581+
type:
12582+
description: Resource type, always "dataset".
12583+
example: dataset
12584+
type: string
12585+
type: object
1254712586
DatasetResponseMulti:
1254812587
description: Response containing a list of datasets.
1254912588
properties:
1255012589
data:
1255112590
description: The list of datasets returned in response.
1255212591
items:
12553-
$ref: '#/components/schemas/Dataset'
12592+
$ref: '#/components/schemas/DatasetResponse'
1255412593
type: array
1255512594
required:
1255612595
- data
@@ -12559,15 +12598,15 @@ components:
1255912598
description: Response containing a single dataset object.
1256012599
properties:
1256112600
data:
12562-
$ref: '#/components/schemas/Dataset'
12601+
$ref: '#/components/schemas/DatasetResponse'
1256312602
required:
1256412603
- data
1256512604
type: object
1256612605
DatasetUpdateRequest:
1256712606
description: Edit request for a dataset.
1256812607
properties:
1256912608
data:
12570-
$ref: '#/components/schemas/Dataset'
12609+
$ref: '#/components/schemas/DatasetRequest'
1257112610
required:
1257212611
- data
1257312612
type: object

examples/v2/datasets/CreateDataset.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
api_instance = DatadogAPIClient::V2::DatasetsAPI.new
55

66
body = DatadogAPIClient::V2::DatasetCreateRequest.new({
7-
data: DatadogAPIClient::V2::Dataset.new({
8-
attributes: DatadogAPIClient::V2::DatasetAttributes.new({
9-
created_at: nil,
7+
data: DatadogAPIClient::V2::DatasetRequest.new({
8+
attributes: DatadogAPIClient::V2::DatasetAttributesRequest.new({
109
name: "Security Audit Dataset",
1110
principals: [
1211
"role:86245fce-0a4e-11f0-92bd-da7ad0900002",
@@ -20,7 +19,6 @@
2019
}),
2120
],
2221
}),
23-
id: "123e4567-e89b-12d3-a456-426614174000",
2422
type: "dataset",
2523
}),
2624
})

examples/v2/datasets/UpdateDataset.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
api_instance = DatadogAPIClient::V2::DatasetsAPI.new
55

66
body = DatadogAPIClient::V2::DatasetUpdateRequest.new({
7-
data: DatadogAPIClient::V2::Dataset.new({
8-
attributes: DatadogAPIClient::V2::DatasetAttributes.new({
9-
created_at: nil,
7+
data: DatadogAPIClient::V2::DatasetRequest.new({
8+
attributes: DatadogAPIClient::V2::DatasetAttributesRequest.new({
109
name: "Security Audit Dataset",
1110
principals: [
1211
"role:86245fce-0a4e-11f0-92bd-da7ad0900002",
@@ -20,7 +19,6 @@
2019
}),
2120
],
2221
}),
23-
id: "123e4567-e89b-12d3-a456-426614174000",
2422
type: "dataset",
2523
}),
2624
})

features/v2/datasets.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ Feature: Datasets
1414
@generated @skip @team:DataDog/aaa-granular-access
1515
Scenario: Create a dataset returns "Bad Request" response
1616
Given new "CreateDataset" request
17-
And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}}
17+
And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "type": "dataset"}}
1818
When the request is sent
1919
Then the response status is 400 Bad Request
2020

2121
@generated @skip @team:DataDog/aaa-granular-access
2222
Scenario: Create a dataset returns "Conflict" response
2323
Given new "CreateDataset" request
24-
And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}}
24+
And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "type": "dataset"}}
2525
When the request is sent
2626
Then the response status is 409 Conflict
2727

2828
@generated @skip @team:DataDog/aaa-granular-access
2929
Scenario: Create a dataset returns "OK" response
3030
Given new "CreateDataset" request
31-
And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}}
31+
And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "type": "dataset"}}
3232
When the request is sent
3333
Then the response status is 200 OK
3434

@@ -57,23 +57,23 @@ Feature: Datasets
5757
Scenario: Edit a dataset returns "Bad Request" response
5858
Given new "UpdateDataset" request
5959
And request contains "dataset_id" parameter from "REPLACE.ME"
60-
And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}}
60+
And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "type": "dataset"}}
6161
When the request is sent
6262
Then the response status is 400 Bad Request
6363

6464
@generated @skip @team:DataDog/aaa-granular-access
6565
Scenario: Edit a dataset returns "Not Found" response
6666
Given new "UpdateDataset" request
6767
And request contains "dataset_id" parameter from "REPLACE.ME"
68-
And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}}
68+
And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "type": "dataset"}}
6969
When the request is sent
7070
Then the response status is 404 Not Found
7171

7272
@generated @skip @team:DataDog/aaa-granular-access
7373
Scenario: Edit a dataset returns "OK" response
7474
Given new "UpdateDataset" request
7575
And request contains "dataset_id" parameter from "REPLACE.ME"
76-
And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}}
76+
And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "type": "dataset"}}
7777
When the request is sent
7878
Then the response status is 200 OK
7979

lib/datadog_api_client/inflector.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,9 +1618,11 @@ def overrides
16181618
"v2.data_relationships_teams_data_items" => "DataRelationshipsTeamsDataItems",
16191619
"v2.data_relationships_teams_data_items_type" => "DataRelationshipsTeamsDataItemsType",
16201620
"v2.data_scalar_column" => "DataScalarColumn",
1621-
"v2.dataset" => "Dataset",
1622-
"v2.dataset_attributes" => "DatasetAttributes",
1621+
"v2.dataset_attributes_request" => "DatasetAttributesRequest",
1622+
"v2.dataset_attributes_response" => "DatasetAttributesResponse",
16231623
"v2.dataset_create_request" => "DatasetCreateRequest",
1624+
"v2.dataset_request" => "DatasetRequest",
1625+
"v2.dataset_response" => "DatasetResponse",
16241626
"v2.dataset_response_multi" => "DatasetResponseMulti",
16251627
"v2.dataset_response_single" => "DatasetResponseSingle",
16261628
"v2.dataset_update_request" => "DatasetUpdateRequest",

lib/datadog_api_client/v2/models/dataset_attributes.rb renamed to lib/datadog_api_client/v2/models/dataset_attributes_request.rb

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,10 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# Dataset metadata and configuration(s).
21-
class DatasetAttributes
20+
# Dataset metadata and configurations.
21+
class DatasetAttributesRequest
2222
include BaseGenericModel
2323

24-
# Timestamp when the dataset was created.
25-
attr_accessor :created_at
26-
27-
# Unique ID of the user who created the dataset.
28-
attr_accessor :created_by
29-
3024
# Name of the dataset.
3125
attr_reader :name
3226

@@ -42,8 +36,6 @@ class DatasetAttributes
4236
# @!visibility private
4337
def self.attribute_map
4438
{
45-
:'created_at' => :'created_at',
46-
:'created_by' => :'created_by',
4739
:'name' => :'name',
4840
:'principals' => :'principals',
4941
:'product_filters' => :'product_filters'
@@ -54,28 +46,18 @@ def self.attribute_map
5446
# @!visibility private
5547
def self.openapi_types
5648
{
57-
:'created_at' => :'Time',
58-
:'created_by' => :'UUID',
5949
:'name' => :'String',
6050
:'principals' => :'Array<String>',
6151
:'product_filters' => :'Array<FiltersPerProduct>'
6252
}
6353
end
6454

65-
# List of attributes with nullable: true
66-
# @!visibility private
67-
def self.openapi_nullable
68-
Set.new([
69-
:'created_at',
70-
])
71-
end
72-
7355
# Initializes the object
7456
# @param attributes [Hash] Model attributes in the form of hash
7557
# @!visibility private
7658
def initialize(attributes = {})
7759
if (!attributes.is_a?(Hash))
78-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatasetAttributes` initialize method"
60+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatasetAttributesRequest` initialize method"
7961
end
8062

8163
self.additional_properties = {}
@@ -88,14 +70,6 @@ def initialize(attributes = {})
8870
end
8971
}
9072

91-
if attributes.key?(:'created_at')
92-
self.created_at = attributes[:'created_at']
93-
end
94-
95-
if attributes.key?(:'created_by')
96-
self.created_by = attributes[:'created_by']
97-
end
98-
9973
if attributes.key?(:'name')
10074
self.name = attributes[:'name']
10175
end
@@ -179,8 +153,6 @@ def to_hash
179153
def ==(o)
180154
return true if self.equal?(o)
181155
self.class == o.class &&
182-
created_at == o.created_at &&
183-
created_by == o.created_by &&
184156
name == o.name &&
185157
principals == o.principals &&
186158
product_filters == o.product_filters &&
@@ -191,7 +163,7 @@ def ==(o)
191163
# @return [Integer] Hash code
192164
# @!visibility private
193165
def hash
194-
[created_at, created_by, name, principals, product_filters, additional_properties].hash
166+
[name, principals, product_filters, additional_properties].hash
195167
end
196168
end
197169
end

0 commit comments

Comments
 (0)