Skip to content

Commit 00511dd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3c36851 of spec repo
1 parent ffa4c40 commit 00511dd

15 files changed

Lines changed: 289 additions & 110 deletions

.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": "b737cc4",
3-
"generated": "2025-07-28 13:11:36.840"
2+
"spec_repo_commit": "3c36851",
3+
"generated": "2025-07-28 19:44:15.469"
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 configuration(s).
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

docs/datadog_api_client.v2.model.rst

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4806,17 +4806,17 @@ datadog\_api\_client.v2.model.datadog\_integration\_update module
48064806
:members:
48074807
:show-inheritance:
48084808

4809-
datadog\_api\_client.v2.model.dataset module
4810-
--------------------------------------------
4809+
datadog\_api\_client.v2.model.dataset\_attributes\_request module
4810+
-----------------------------------------------------------------
48114811

4812-
.. automodule:: datadog_api_client.v2.model.dataset
4812+
.. automodule:: datadog_api_client.v2.model.dataset_attributes_request
48134813
:members:
48144814
:show-inheritance:
48154815

4816-
datadog\_api\_client.v2.model.dataset\_attributes module
4817-
--------------------------------------------------------
4816+
datadog\_api\_client.v2.model.dataset\_attributes\_response module
4817+
------------------------------------------------------------------
48184818

4819-
.. automodule:: datadog_api_client.v2.model.dataset_attributes
4819+
.. automodule:: datadog_api_client.v2.model.dataset_attributes_response
48204820
:members:
48214821
:show-inheritance:
48224822

@@ -4827,6 +4827,20 @@ datadog\_api\_client.v2.model.dataset\_create\_request module
48274827
:members:
48284828
:show-inheritance:
48294829

4830+
datadog\_api\_client.v2.model.dataset\_request module
4831+
-----------------------------------------------------
4832+
4833+
.. automodule:: datadog_api_client.v2.model.dataset_request
4834+
:members:
4835+
:show-inheritance:
4836+
4837+
datadog\_api\_client.v2.model.dataset\_response module
4838+
------------------------------------------------------
4839+
4840+
.. automodule:: datadog_api_client.v2.model.dataset_response
4841+
:members:
4842+
:show-inheritance:
4843+
48304844
datadog\_api\_client.v2.model.dataset\_response\_multi module
48314845
-------------------------------------------------------------
48324846

examples/v2/datasets/CreateDataset.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44

55
from datadog_api_client import ApiClient, Configuration
66
from datadog_api_client.v2.api.datasets_api import DatasetsApi
7-
from datadog_api_client.v2.model.dataset import Dataset
8-
from datadog_api_client.v2.model.dataset_attributes import DatasetAttributes
7+
from datadog_api_client.v2.model.dataset_attributes_request import DatasetAttributesRequest
98
from datadog_api_client.v2.model.dataset_create_request import DatasetCreateRequest
9+
from datadog_api_client.v2.model.dataset_request import DatasetRequest
1010
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct
1111

1212
body = DatasetCreateRequest(
13-
data=Dataset(
14-
attributes=DatasetAttributes(
15-
created_at=None,
13+
data=DatasetRequest(
14+
attributes=DatasetAttributesRequest(
1615
name="Security Audit Dataset",
1716
principals=[
1817
"role:86245fce-0a4e-11f0-92bd-da7ad0900002",
@@ -26,7 +25,6 @@
2625
),
2726
],
2827
),
29-
id="123e4567-e89b-12d3-a456-426614174000",
3028
type="dataset",
3129
),
3230
)

examples/v2/datasets/UpdateDataset.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44

55
from datadog_api_client import ApiClient, Configuration
66
from datadog_api_client.v2.api.datasets_api import DatasetsApi
7-
from datadog_api_client.v2.model.dataset import Dataset
8-
from datadog_api_client.v2.model.dataset_attributes import DatasetAttributes
7+
from datadog_api_client.v2.model.dataset_attributes_request import DatasetAttributesRequest
8+
from datadog_api_client.v2.model.dataset_request import DatasetRequest
99
from datadog_api_client.v2.model.dataset_update_request import DatasetUpdateRequest
1010
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct
1111

1212
body = DatasetUpdateRequest(
13-
data=Dataset(
14-
attributes=DatasetAttributes(
15-
created_at=None,
13+
data=DatasetRequest(
14+
attributes=DatasetAttributesRequest(
1615
name="Security Audit Dataset",
1716
principals=[
1817
"role:86245fce-0a4e-11f0-92bd-da7ad0900002",
@@ -26,7 +25,6 @@
2625
),
2726
],
2827
),
29-
id="123e4567-e89b-12d3-a456-426614174000",
3028
type="dataset",
3129
),
3230
)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct
16+
17+
18+
class DatasetAttributesRequest(ModelNormal):
19+
@cached_property
20+
def openapi_types(_):
21+
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct
22+
23+
return {
24+
"name": (str,),
25+
"principals": ([str],),
26+
"product_filters": ([FiltersPerProduct],),
27+
}
28+
29+
attribute_map = {
30+
"name": "name",
31+
"principals": "principals",
32+
"product_filters": "product_filters",
33+
}
34+
35+
def __init__(self_, name: str, principals: List[str], product_filters: List[FiltersPerProduct], **kwargs):
36+
"""
37+
Dataset metadata and configuration(s).
38+
39+
:param name: Name of the dataset.
40+
:type name: str
41+
42+
:param principals: List of access principals, formatted as ``principal_type:id``. Principal can be 'team' or 'role'.
43+
:type principals: [str]
44+
45+
:param product_filters: List of product-specific filters.
46+
:type product_filters: [FiltersPerProduct]
47+
"""
48+
super().__init__(kwargs)
49+
50+
self_.name = name
51+
self_.principals = principals
52+
self_.product_filters = product_filters

src/datadog_api_client/v2/model/dataset_attributes.py renamed to src/datadog_api_client/v2/model/dataset_attributes_response.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct
2121

2222

23-
class DatasetAttributes(ModelNormal):
23+
class DatasetAttributesResponse(ModelNormal):
2424
@cached_property
2525
def openapi_types(_):
2626
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct
@@ -43,11 +43,11 @@ def openapi_types(_):
4343

4444
def __init__(
4545
self_,
46-
name: str,
47-
principals: List[str],
48-
product_filters: List[FiltersPerProduct],
4946
created_at: Union[datetime, none_type, UnsetType] = unset,
5047
created_by: Union[UUID, UnsetType] = unset,
48+
name: Union[str, UnsetType] = unset,
49+
principals: Union[List[str], UnsetType] = unset,
50+
product_filters: Union[List[FiltersPerProduct], UnsetType] = unset,
5151
**kwargs,
5252
):
5353
"""
@@ -60,20 +60,22 @@ def __init__(
6060
:type created_by: UUID, optional
6161
6262
:param name: Name of the dataset.
63-
:type name: str
63+
:type name: str, optional
6464
6565
:param principals: List of access principals, formatted as ``principal_type:id``. Principal can be 'team' or 'role'.
66-
:type principals: [str]
66+
:type principals: [str], optional
6767
6868
:param product_filters: List of product-specific filters.
69-
:type product_filters: [FiltersPerProduct]
69+
:type product_filters: [FiltersPerProduct], optional
7070
"""
7171
if created_at is not unset:
7272
kwargs["created_at"] = created_at
7373
if created_by is not unset:
7474
kwargs["created_by"] = created_by
75+
if name is not unset:
76+
kwargs["name"] = name
77+
if principals is not unset:
78+
kwargs["principals"] = principals
79+
if product_filters is not unset:
80+
kwargs["product_filters"] = product_filters
7581
super().__init__(kwargs)
76-
77-
self_.name = name
78-
self_.principals = principals
79-
self_.product_filters = product_filters

src/datadog_api_client/v2/model/dataset_create_request.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212

1313

1414
if TYPE_CHECKING:
15-
from datadog_api_client.v2.model.dataset import Dataset
15+
from datadog_api_client.v2.model.dataset_request import DatasetRequest
1616

1717

1818
class DatasetCreateRequest(ModelNormal):
1919
@cached_property
2020
def openapi_types(_):
21-
from datadog_api_client.v2.model.dataset import Dataset
21+
from datadog_api_client.v2.model.dataset_request import DatasetRequest
2222

2323
return {
24-
"data": (Dataset,),
24+
"data": (DatasetRequest,),
2525
}
2626

2727
attribute_map = {
2828
"data": "data",
2929
}
3030

31-
def __init__(self_, data: Dataset, **kwargs):
31+
def __init__(self_, data: DatasetRequest, **kwargs):
3232
"""
3333
Create request for a dataset.
3434
35-
:param data: Dataset object.
35+
:param data: **Dataset object.**
3636
3737
**Datasets Constraints**
3838
@@ -52,7 +52,7 @@ def __init__(self_, data: Dataset, **kwargs):
5252
5353
* Tag values must be unique within a single dataset.
5454
* A tag value used in one dataset cannot be reused in another dataset of the same telemetry type.
55-
:type data: Dataset
55+
:type data: DatasetRequest
5656
"""
5757
super().__init__(kwargs)
5858

0 commit comments

Comments
 (0)