diff --git a/.generated-info b/.generated-info index 857f15a717c7..3857c08112ff 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "ab8171f", - "generated": "2025-07-31 17:34:54.078" + "spec_repo_commit": "672a533", + "generated": "2025-07-31 18:08:57.015" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9e86624abd19..ea57695f0533 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -13145,31 +13145,33 @@ components: required: - type type: object - Dataset: - description: "Dataset object.\n\n### Datasets Constraints\n- **Tag Limit per - Dataset**:\n - Each restricted dataset supports a maximum of 10 key:value - pairs per product.\n\n- **Tag Key Rules per Telemetry Type**:\n - Only one - tag key or attribute may be used to define access within a single telemetry - type.\n - The same or different tag key may be used across different telemetry - types.\n\n- **Tag Value Uniqueness**:\n - Tag values must be unique within - a single dataset.\n - A tag value used in one dataset cannot be reused in - another dataset of the same telemetry type." + DatasetAttributesRequest: + description: Dataset metadata and configurations. properties: - attributes: - $ref: '#/components/schemas/DatasetAttributes' - id: - description: Unique identifier for the dataset. - example: 123e4567-e89b-12d3-a456-426614174000 - type: string - type: - description: Resource type, always "dataset". - example: dataset + name: + description: Name of the dataset. + example: Security Audit Dataset type: string + principals: + description: List of access principals, formatted as `principal_type:id`. + Principal can be 'team' or 'role'. + example: + - role:94172442-be03-11e9-a77a-3b7612558ac1 + items: + example: role:94172442-be03-11e9-a77a-3b7612558ac1 + type: string + type: array + product_filters: + description: List of product-specific filters. + items: + $ref: '#/components/schemas/FiltersPerProduct' + type: array required: - - type - - attributes + - name + - product_filters + - principals type: object - DatasetAttributes: + DatasetAttributesResponse: description: Dataset metadata and configuration(s). properties: created_at: @@ -13199,43 +13201,76 @@ components: items: $ref: '#/components/schemas/FiltersPerProduct' type: array - required: - - name - - product_filters - - principals type: object DatasetCreateRequest: description: Create request for a dataset. properties: data: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetRequest' required: - data type: object + DatasetRequest: + description: "**Datasets Object Constraints**\n- **Tag limit per dataset**:\n + \ - Each restricted dataset supports a maximum of 10 key:value pairs per product.\n\n- + **Tag key rules per telemetry type**:\n - Only one tag key or attribute may + be used to define access within a single telemetry type.\n - The same or + different tag key may be used across different telemetry types.\n\n- **Tag + value uniqueness**:\n - Tag values must be unique within a single dataset.\n + \ - A tag value used in one dataset cannot be reused in another dataset of + the same telemetry type." + properties: + attributes: + $ref: '#/components/schemas/DatasetAttributesRequest' + type: + description: Resource type, always "dataset". + example: dataset + type: string + required: + - type + - attributes + type: object + DatasetResponse: + description: "**Datasets Object Constraints**\n- **Tag Limit per Dataset**:\n + \ - Each restricted dataset supports a maximum of 10 key:value pairs per product.\n\n- + **Tag Key Rules per Telemetry Type**:\n - Only one tag key or attribute may + be used to define access within a single telemetry type.\n - The same or + different tag key may be used across different telemetry types.\n\n- **Tag + Value Uniqueness**:\n - Tag values must be unique within a single dataset.\n + \ - A tag value used in one dataset cannot be reused in another dataset of + the same telemetry type." + properties: + attributes: + $ref: '#/components/schemas/DatasetAttributesResponse' + id: + description: Unique identifier for the dataset. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: + description: Resource type, always "dataset". + example: dataset + type: string + type: object DatasetResponseMulti: description: Response containing a list of datasets. properties: data: description: The list of datasets returned in response. items: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetResponse' type: array - required: - - data type: object DatasetResponseSingle: description: Response containing a single dataset object. properties: data: - $ref: '#/components/schemas/Dataset' - required: - - data + $ref: '#/components/schemas/DatasetResponse' type: object DatasetUpdateRequest: description: Edit request for a dataset. properties: data: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetRequest' required: - data type: object @@ -49913,6 +49948,9 @@ paths: operator: OR permissions: - user_access_read + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' post: description: Create a dataset with the configurations in the request. operationId: CreateDataset @@ -49924,7 +49962,7 @@ paths: attributes: name: Test RUM Dataset principals: - - role:23bacb30-1c59-11f0-a596-da7ad0900002 + - role:94172442-be03-11e9-a77a-3b7612558ac1 product_filters: - filters: - '@application.id:application_123' @@ -49962,6 +50000,9 @@ paths: operator: OR permissions: - user_access_manage + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/datasets/{dataset_id}: delete: description: Deletes the dataset associated with the ID. @@ -49989,6 +50030,9 @@ paths: x-permission: operator: OPEN permissions: [] + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' get: description: Retrieves the dataset associated with the ID. operationId: GetDataset @@ -50019,6 +50063,9 @@ paths: x-permission: operator: OPEN permissions: [] + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' put: description: Edits the dataset associated with the ID. operationId: UpdateDataset @@ -50057,6 +50104,9 @@ paths: x-permission: operator: OPEN permissions: [] + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/deletion/data/{product}: post: description: Creates a data deletion request by providing a query and a timeframe diff --git a/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Bad-Request-response_430521186/frozen.json b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Bad-Request-response_430521186/frozen.json new file mode 100644 index 000000000000..55e9aafcc29d --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Bad-Request-response_430521186/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:57.144Z" diff --git a/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Bad-Request-response_430521186/recording.har b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Bad-Request-response_430521186/recording.har new file mode 100644 index 000000000000..cbc6b1a54107 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Bad-Request-response_430521186/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Datasets/Create a dataset returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "15dba2ce708ff0e12a5fcc843f353d7d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 22, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"test\":\"bad_request\"}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 66, + "content": { + "mimeType": "application/json", + "size": 66, + "text": "{\"errors\":[\"Invalid request: Request body contains invalid json\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 677, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-07-29T20:35:57.148Z", + "time": 169 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Conflict-response_2550608988/frozen.json b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Conflict-response_2550608988/frozen.json new file mode 100644 index 000000000000..0c6cb533dfa1 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Conflict-response_2550608988/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:57.324Z" diff --git a/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Conflict-response_2550608988/recording.har b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Conflict-response_2550608988/recording.har new file mode 100644 index 000000000000..90b9c53e974e --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-Conflict-response_2550608988/recording.har @@ -0,0 +1,162 @@ +{ + "log": { + "_recordingName": "Datasets/Create a dataset returns \"Conflict\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "32c558cf4a2ef914f443ab94000addc9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:ABCD\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"7cbada94-7d01-4e73-8c74-ea70fb3b3088\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:35:57.326Z", + "time": 176 + }, + { + "_id": "32c558cf4a2ef914f443ab94000addc9", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:ABCD\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 114, + "content": { + "mimeType": "application/json", + "size": 114, + "text": "{\"errors\":[\"Invalid request: [DatasetNameConflict] dataset with name \\\"Security Audit Dataset\\\" already exists\"]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 409, + "statusText": "Conflict" + }, + "startedDateTime": "2025-07-29T20:35:57.509Z", + "time": 167 + }, + { + "_id": "f569dd34ba2b185ce3320a771e7e15c2", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/7cbada94-7d01-4e73-8c74-ea70fb3b3088" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 657, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-07-29T20:35:57.685Z", + "time": 148 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-OK-response_1489201120/frozen.json b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-OK-response_1489201120/frozen.json new file mode 100644 index 000000000000..efae8001ea8b --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-OK-response_1489201120/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:57.839Z" diff --git a/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-OK-response_1489201120/recording.har b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-OK-response_1489201120/recording.har new file mode 100644 index 000000000000..33eda457f532 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Create-a-dataset-returns-OK-response_1489201120/recording.har @@ -0,0 +1,109 @@ +{ + "log": { + "_recordingName": "Datasets/Create a dataset returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "32c558cf4a2ef914f443ab94000addc9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:ABCD\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"86f67664-8b7b-49ae-b671-919ebe11886c\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:35:57.843Z", + "time": 214 + }, + { + "_id": "e15cf98473c5d05e382ba27da41631f3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/86f67664-8b7b-49ae-b671-919ebe11886c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 657, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-07-29T20:35:58.064Z", + "time": 181 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Bad-Request-response_3463824271/frozen.json b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Bad-Request-response_3463824271/frozen.json new file mode 100644 index 000000000000..607e76f1f417 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Bad-Request-response_3463824271/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:58.251Z" diff --git a/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Bad-Request-response_3463824271/recording.har b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Bad-Request-response_3463824271/recording.har new file mode 100644 index 000000000000..ee9a3883b3db --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Bad-Request-response_3463824271/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Datasets/Delete a dataset returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "265bc0a6583e816be699e28a0e8f4c87", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 505, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/malformed_id" + }, + "response": { + "bodySize": 113, + "content": { + "mimeType": "application/json", + "size": 113, + "text": "{\"errors\":[\"Invalid request: [UUIDInvalidValue] \\\"malformed_id\\\" is not a valid UUID: invalid UUID length: 12\"]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-07-29T20:35:58.255Z", + "time": 167 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-No-Content-response_2964057451/frozen.json b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-No-Content-response_2964057451/frozen.json new file mode 100644 index 000000000000..f099b5cd8e2f --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-No-Content-response_2964057451/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:58.429Z" diff --git a/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-No-Content-response_2964057451/recording.har b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-No-Content-response_2964057451/recording.har new file mode 100644 index 000000000000..fe38937eae39 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-No-Content-response_2964057451/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "Datasets/Delete a dataset returns \"No Content\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "32c558cf4a2ef914f443ab94000addc9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:ABCD\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"60ee6562-48f5-455f-bdb4-fd3f5f899978\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:35:58.433Z", + "time": 181 + }, + { + "_id": "e6d82f135ad34466edde778425f3614b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/60ee6562-48f5-455f-bdb4-fd3f5f899978" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 657, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-07-29T20:35:58.621Z", + "time": 185 + }, + { + "_id": "e6d82f135ad34466edde778425f3614b", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/60ee6562-48f5-455f-bdb4-fd3f5f899978" + }, + "response": { + "bodySize": 109, + "content": { + "mimeType": "application/json", + "size": 109, + "text": "{\"errors\":[\"Invalid request: [DatasetNotFound] dataset \\\"60ee6562-48f5-455f-bdb4-fd3f5f899978\\\" not found\"]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-07-29T20:35:58.814Z", + "time": 175 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Not-Found-response_1477191432/frozen.json b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Not-Found-response_1477191432/frozen.json new file mode 100644 index 000000000000..098dba628d46 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Not-Found-response_1477191432/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:58.996Z" diff --git a/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Not-Found-response_1477191432/recording.har b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Not-Found-response_1477191432/recording.har new file mode 100644 index 000000000000..ca39c540e334 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Delete-a-dataset-returns-Not-Found-response_1477191432/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Datasets/Delete a dataset returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a216acc59a331cb3f1530656435998f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/00000000-0000-0000-0000-000000000000" + }, + "response": { + "bodySize": 109, + "content": { + "mimeType": "application/json", + "size": 109, + "text": "{\"errors\":[\"Invalid request: [DatasetNotFound] dataset \\\"00000000-0000-0000-0000-000000000000\\\" not found\"]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-07-29T20:35:59.000Z", + "time": 172 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-Bad-Request-response_4202968422/frozen.json b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-Bad-Request-response_4202968422/frozen.json new file mode 100644 index 000000000000..8b9044fc0384 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-Bad-Request-response_4202968422/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:59.180Z" diff --git a/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-Bad-Request-response_4202968422/recording.har b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-Bad-Request-response_4202968422/recording.har new file mode 100644 index 000000000000..f76e99c1f7f0 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-Bad-Request-response_4202968422/recording.har @@ -0,0 +1,62 @@ +{ + "log": { + "_recordingName": "Datasets/Edit a dataset returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "98c186af66166aeb0513fa2b1140d02f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 566, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/malformed_id" + }, + "response": { + "bodySize": 66, + "content": { + "mimeType": "application/json", + "size": 66, + "text": "{\"errors\":[\"Invalid request: Request body contains invalid json\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 675, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-07-29T20:35:59.183Z", + "time": 206 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-OK-response_1996941164/frozen.json b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-OK-response_1996941164/frozen.json new file mode 100644 index 000000000000..b508eb93c6ed --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-OK-response_1996941164/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:35:59.399Z" diff --git a/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-OK-response_1996941164/recording.har b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-OK-response_1996941164/recording.har new file mode 100644 index 000000000000..0fa141359514 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Edit-a-dataset-returns-OK-response_1996941164/recording.har @@ -0,0 +1,162 @@ +{ + "log": { + "_recordingName": "Datasets/Edit a dataset returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "32c558cf4a2ef914f443ab94000addc9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:ABCD\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"2bf848a1-b18a-4602-8348-814a53862c52\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 678, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:35:59.403Z", + "time": 187 + }, + { + "_id": "3dd90d49904250c7d2c0d10377768bbb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 592, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:1234\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/2bf848a1-b18a-4602-8348-814a53862c52" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"2bf848a1-b18a-4602-8348-814a53862c52\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:1234\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 676, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:35:59.599Z", + "time": 216 + }, + { + "_id": "202139393ba18fe0e52d054b00f716c1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/2bf848a1-b18a-4602-8348-814a53862c52" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 657, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-07-29T20:35:59.820Z", + "time": 183 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-Bad-Request-response_721770438/frozen.json b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-Bad-Request-response_721770438/frozen.json new file mode 100644 index 000000000000..1c9b7abc9e42 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-Bad-Request-response_721770438/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:36:00.009Z" diff --git a/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-Bad-Request-response_721770438/recording.har b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-Bad-Request-response_721770438/recording.har new file mode 100644 index 000000000000..7698fcc5ef83 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-Bad-Request-response_721770438/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Datasets/Get a single dataset by ID returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "2bf51849cca5524a24b4d999943d9ea9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 512, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/malformed_id" + }, + "response": { + "bodySize": 113, + "content": { + "mimeType": "application/json", + "size": 113, + "text": "{\"errors\":[\"Invalid request: [UUIDInvalidValue] \\\"malformed_id\\\" is not a valid UUID: invalid UUID length: 12\"]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 676, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-07-29T20:36:00.013Z", + "time": 164 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-OK-response_3806328524/frozen.json b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-OK-response_3806328524/frozen.json new file mode 100644 index 000000000000..1ec027045845 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-OK-response_3806328524/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:36:00.186Z" diff --git a/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-OK-response_3806328524/recording.har b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-OK-response_3806328524/recording.har new file mode 100644 index 000000000000..947f0cef5f23 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Get-a-single-dataset-by-ID-returns-OK-response_3806328524/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "Datasets/Get a single dataset by ID returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "32c558cf4a2ef914f443ab94000addc9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:ABCD\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"9e576299-3cc1-4145-8aad-67a1ab914829\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 679, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:36:00.189Z", + "time": 173 + }, + { + "_id": "5f6432cf6e61c956e2a57822c9c7a3ac", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 536, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/9e576299-3cc1-4145-8aad-67a1ab914829" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"9e576299-3cc1-4145-8aad-67a1ab914829\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 676, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:36:00.367Z", + "time": 160 + }, + { + "_id": "347efd0618b898bdc9c7745a1d2f53cf", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/9e576299-3cc1-4145-8aad-67a1ab914829" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 658, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-07-29T20:36:00.534Z", + "time": 173 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Datasets_304632144/Get-all-datasets-returns-OK-response_3243326099/frozen.json b/cassettes/v2/Datasets_304632144/Get-all-datasets-returns-OK-response_3243326099/frozen.json new file mode 100644 index 000000000000..a63c849bc5b0 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Get-all-datasets-returns-OK-response_3243326099/frozen.json @@ -0,0 +1 @@ +"2025-07-29T20:36:00.713Z" diff --git a/cassettes/v2/Datasets_304632144/Get-all-datasets-returns-OK-response_3243326099/recording.har b/cassettes/v2/Datasets_304632144/Get-all-datasets-returns-OK-response_3243326099/recording.har new file mode 100644 index 000000000000..a2adbf30e7b2 --- /dev/null +++ b/cassettes/v2/Datasets_304632144/Get-all-datasets-returns-OK-response_3243326099/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "Datasets/Get all datasets returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "32c558cf4a2ef914f443ab94000addc9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Security Audit Dataset\",\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"product_filters\":[{\"filters\":[\"@application.id:ABCD\"],\"product\":\"metrics\"}]},\"type\":\"dataset\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 255, + "content": { + "mimeType": "application/json", + "size": 255, + "text": "{\"data\":{\"type\":\"dataset\",\"id\":\"b0f617b4-affb-4411-970a-2c157933514c\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"]}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 679, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:36:00.717Z", + "time": 177 + }, + { + "_id": "c38493f7b33f3354897ce07393c8ebdf", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 503, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets" + }, + "response": { + "bodySize": 351, + "content": { + "mimeType": "application/json", + "size": 351, + "text": "{\"data\":[{\"type\":\"dataset\",\"id\":\"b0f617b4-affb-4411-970a-2c157933514c\",\"attributes\":{\"name\":\"Security Audit Dataset\",\"product_filters\":[{\"product\":\"metrics\",\"filters\":[\"@application.id:ABCD\"]}],\"principals\":[\"role:94172442-be03-11e9-a77a-3b7612558ac1\"],\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created_at\":\"2025-07-29T20:36:00.94442Z\"}}]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 675, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-07-29T20:36:00.901Z", + "time": 155 + }, + { + "_id": "c45d65527feb2f60bba655c4c2d537ff", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/datasets/b0f617b4-affb-4411-970a-2c157933514c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 657, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-07-29T20:36:01.062Z", + "time": 195 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/datasets/CreateDataset.ts b/examples/v2/datasets/CreateDataset.ts index 88464051826e..28d6e65d6b02 100644 --- a/examples/v2/datasets/CreateDataset.ts +++ b/examples/v2/datasets/CreateDataset.ts @@ -5,23 +5,22 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createDataset"] = true; const apiInstance = new v2.DatasetsApi(configuration); const params: v2.DatasetsApiCreateDatasetRequest = { body: { data: { attributes: { - createdAt: undefined, name: "Security Audit Dataset", - principals: ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], + principals: ["role:94172442-be03-11e9-a77a-3b7612558ac1"], productFilters: [ { filters: ["@application.id:ABCD"], - product: "logs", + product: "metrics", }, ], }, - id: "123e4567-e89b-12d3-a456-426614174000", type: "dataset", }, }, diff --git a/examples/v2/datasets/DeleteDataset.ts b/examples/v2/datasets/DeleteDataset.ts index 8c3052cd3fe1..a8b52ea48d31 100644 --- a/examples/v2/datasets/DeleteDataset.ts +++ b/examples/v2/datasets/DeleteDataset.ts @@ -5,10 +5,14 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteDataset"] = true; const apiInstance = new v2.DatasetsApi(configuration); +// there is a valid "dataset" in the system +const DATASET_DATA_ID = process.env.DATASET_DATA_ID as string; + const params: v2.DatasetsApiDeleteDatasetRequest = { - datasetId: "dataset_id", + datasetId: DATASET_DATA_ID, }; apiInstance diff --git a/examples/v2/datasets/GetAllDatasets.ts b/examples/v2/datasets/GetAllDatasets.ts index e6544371fc4c..ec730d2dbe83 100644 --- a/examples/v2/datasets/GetAllDatasets.ts +++ b/examples/v2/datasets/GetAllDatasets.ts @@ -5,6 +5,7 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getAllDatasets"] = true; const apiInstance = new v2.DatasetsApi(configuration); apiInstance diff --git a/examples/v2/datasets/GetDataset.ts b/examples/v2/datasets/GetDataset.ts index 9c26e4c8350a..785b4b93ddb0 100644 --- a/examples/v2/datasets/GetDataset.ts +++ b/examples/v2/datasets/GetDataset.ts @@ -5,10 +5,14 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getDataset"] = true; const apiInstance = new v2.DatasetsApi(configuration); +// there is a valid "dataset" in the system +const DATASET_DATA_ID = process.env.DATASET_DATA_ID as string; + const params: v2.DatasetsApiGetDatasetRequest = { - datasetId: "dataset_id", + datasetId: DATASET_DATA_ID, }; apiInstance diff --git a/examples/v2/datasets/UpdateDataset.ts b/examples/v2/datasets/UpdateDataset.ts index bd6405d85294..820d772a60bb 100644 --- a/examples/v2/datasets/UpdateDataset.ts +++ b/examples/v2/datasets/UpdateDataset.ts @@ -5,27 +5,29 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateDataset"] = true; const apiInstance = new v2.DatasetsApi(configuration); +// there is a valid "dataset" in the system +const DATASET_DATA_ID = process.env.DATASET_DATA_ID as string; + const params: v2.DatasetsApiUpdateDatasetRequest = { body: { data: { attributes: { - createdAt: undefined, name: "Security Audit Dataset", - principals: ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], + principals: ["role:94172442-be03-11e9-a77a-3b7612558ac1"], productFilters: [ { - filters: ["@application.id:ABCD"], - product: "logs", + filters: ["@application.id:1234"], + product: "metrics", }, ], }, - id: "123e4567-e89b-12d3-a456-426614174000", type: "dataset", }, }, - datasetId: "dataset_id", + datasetId: DATASET_DATA_ID, }; apiInstance diff --git a/features/v2/datasets.feature b/features/v2/datasets.feature index 4a220a3c8450..f4d4ac7888b1 100644 --- a/features/v2/datasets.feature +++ b/features/v2/datasets.feature @@ -11,95 +11,113 @@ Feature: Datasets And a valid "appKeyAuth" key in the system And an instance of "Datasets" API - @generated @skip @team:DataDog/aaa-granular-access + @skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-typescript @skip-validation @team:DataDog/aaa-granular-access Scenario: Create a dataset returns "Bad Request" response Given new "CreateDataset" request - 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"}} + And operation "CreateDataset" enabled + And body with value {"test": "bad_request"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Create a dataset returns "Conflict" response - Given new "CreateDataset" request - 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"}} + Given there is a valid "dataset" in the system + And operation "CreateDataset" enabled + And new "CreateDataset" request + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 409 Conflict - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Create a dataset returns "OK" response Given new "CreateDataset" request - 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"}} + And operation "CreateDataset" enabled + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Delete a dataset returns "Bad Request" response Given new "DeleteDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + And operation "DeleteDataset" enabled + And request contains "dataset_id" parameter with value "malformed_id" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Delete a dataset returns "No Content" response - Given new "DeleteDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + Given there is a valid "dataset" in the system + And operation "DeleteDataset" enabled + And new "DeleteDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Delete a dataset returns "Not Found" response Given new "DeleteDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + And operation "DeleteDataset" enabled + And request contains "dataset_id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/aaa-granular-access + @skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-typescript @skip-validation @team:DataDog/aaa-granular-access Scenario: Edit a dataset returns "Bad Request" response Given new "UpdateDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" - 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"}} + And operation "UpdateDataset" enabled + And request contains "dataset_id" parameter with value "malformed_id" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @skip @team:DataDog/aaa-granular-access Scenario: Edit a dataset returns "Not Found" response - Given new "UpdateDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" - 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"}} + Given there is a valid "dataset" in the system + And operation "UpdateDataset" enabled + And new "UpdateDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:1234"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Edit a dataset returns "OK" response - Given new "UpdateDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" - 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"}} + Given there is a valid "dataset" in the system + And operation "UpdateDataset" enabled + And new "UpdateDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:1234"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Get a single dataset by ID returns "Bad Request" response Given new "GetDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + And operation "GetDataset" enabled + And request contains "dataset_id" parameter with value "malformed_id" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @skip @team:DataDog/aaa-granular-access Scenario: Get a single dataset by ID returns "Not Found" response - Given new "GetDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + Given operation "GetDataset" enabled + And new "GetDataset" request + And request contains "dataset_id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Get a single dataset by ID returns "OK" response - Given new "GetDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + Given there is a valid "dataset" in the system + And operation "GetDataset" enabled + And new "GetDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Get all datasets returns "OK" response - Given new "GetAllDatasets" request + Given there is a valid "dataset" in the system + And operation "GetAllDatasets" enabled + And new "GetAllDatasets" request When the request is sent Then the response status is 200 OK diff --git a/features/v2/given.json b/features/v2/given.json index 9a7a55576893..d1f630f71a85 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -176,6 +176,19 @@ "tag": "Dashboard Lists", "operationId": "CreateDashboardListItems" }, + { + "parameters": [ + { + "name": "body", + "origin": "request", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"Security Audit Dataset\",\n \"principals\": [\n \"role:94172442-be03-11e9-a77a-3b7612558ac1\"\n ],\n \"product_filters\": [\n {\n \"filters\": [\n \"@application.id:ABCD\"\n ],\n \"product\": \"metrics\"\n }\n ]\n },\n \"type\": \"dataset\"\n }\n}" + } + ], + "step": "there is a valid \"dataset\" in the system", + "key": "dataset", + "tag": "Datasets", + "operationId": "CreateDataset" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 53bef5692a43..40ab14773c47 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -875,7 +875,7 @@ "operationId": "DeleteDataset", "parameters": [ { - "name": "id", + "name": "dataset_id", "source": "data.id" } ], diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 38329ac6ce85..2e3e44e4fe3e 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -241,6 +241,11 @@ export function createConfiguration( "v2.listVulnerableAssets": false, "v2.muteFindings": false, "v2.runHistoricalJob": false, + "v2.createDataset": false, + "v2.deleteDataset": false, + "v2.getAllDatasets": false, + "v2.getDataset": false, + "v2.updateDataset": false, "v2.cancelDataDeletionRequest": false, "v2.createDataDeletionRequest": false, "v2.getDataDeletionRequests": false, diff --git a/packages/datadog-api-client-v2/apis/DatasetsApi.ts b/packages/datadog-api-client-v2/apis/DatasetsApi.ts index 4e25571be67a..d13c0899d714 100644 --- a/packages/datadog-api-client-v2/apis/DatasetsApi.ts +++ b/packages/datadog-api-client-v2/apis/DatasetsApi.ts @@ -29,6 +29,11 @@ export class DatasetsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + logger.warn("Using unstable operation 'createDataset'"); + if (!_config.unstableOperations["v2.createDataset"]) { + throw new Error("Unstable operation 'createDataset' is disabled"); + } + // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError("body", "createDataset"); @@ -71,6 +76,11 @@ export class DatasetsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + logger.warn("Using unstable operation 'deleteDataset'"); + if (!_config.unstableOperations["v2.deleteDataset"]) { + throw new Error("Unstable operation 'deleteDataset' is disabled"); + } + // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new RequiredError("datasetId", "deleteDataset"); @@ -104,6 +114,11 @@ export class DatasetsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + logger.warn("Using unstable operation 'getAllDatasets'"); + if (!_config.unstableOperations["v2.getAllDatasets"]) { + throw new Error("Unstable operation 'getAllDatasets' is disabled"); + } + // Path Params const localVarPath = "/api/v2/datasets"; @@ -130,6 +145,11 @@ export class DatasetsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + logger.warn("Using unstable operation 'getDataset'"); + if (!_config.unstableOperations["v2.getDataset"]) { + throw new Error("Unstable operation 'getDataset' is disabled"); + } + // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new RequiredError("datasetId", "getDataset"); @@ -165,6 +185,11 @@ export class DatasetsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + logger.warn("Using unstable operation 'updateDataset'"); + if (!_config.unstableOperations["v2.updateDataset"]) { + throw new Error("Unstable operation 'updateDataset' is disabled"); + } + // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new RequiredError("datasetId", "updateDataset"); diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 5b296edf682a..788ac007134f 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -1502,9 +1502,11 @@ export { DataRelationshipsTeams } from "./models/DataRelationshipsTeams"; export { DataRelationshipsTeamsDataItems } from "./models/DataRelationshipsTeamsDataItems"; export { DataRelationshipsTeamsDataItemsType } from "./models/DataRelationshipsTeamsDataItemsType"; export { DataScalarColumn } from "./models/DataScalarColumn"; -export { Dataset } from "./models/Dataset"; -export { DatasetAttributes } from "./models/DatasetAttributes"; +export { DatasetAttributesRequest } from "./models/DatasetAttributesRequest"; +export { DatasetAttributesResponse } from "./models/DatasetAttributesResponse"; export { DatasetCreateRequest } from "./models/DatasetCreateRequest"; +export { DatasetRequest } from "./models/DatasetRequest"; +export { DatasetResponse } from "./models/DatasetResponse"; export { DatasetResponseMulti } from "./models/DatasetResponseMulti"; export { DatasetResponseSingle } from "./models/DatasetResponseSingle"; export { DatasetUpdateRequest } from "./models/DatasetUpdateRequest"; diff --git a/packages/datadog-api-client-v2/models/DatasetAttributesRequest.ts b/packages/datadog-api-client-v2/models/DatasetAttributesRequest.ts new file mode 100644 index 000000000000..6d989a6554a9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DatasetAttributesRequest.ts @@ -0,0 +1,72 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { FiltersPerProduct } from "./FiltersPerProduct"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Dataset metadata and configurations. + */ +export class DatasetAttributesRequest { + /** + * Name of the dataset. + */ + "name": string; + /** + * List of access principals, formatted as `principal_type:id`. Principal can be 'team' or 'role'. + */ + "principals": Array; + /** + * List of product-specific filters. + */ + "productFilters": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + principals: { + baseName: "principals", + type: "Array", + required: true, + }, + productFilters: { + baseName: "product_filters", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DatasetAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DatasetAttributes.ts b/packages/datadog-api-client-v2/models/DatasetAttributesResponse.ts similarity index 88% rename from packages/datadog-api-client-v2/models/DatasetAttributes.ts rename to packages/datadog-api-client-v2/models/DatasetAttributesResponse.ts index 466a1907901f..60895da23482 100644 --- a/packages/datadog-api-client-v2/models/DatasetAttributes.ts +++ b/packages/datadog-api-client-v2/models/DatasetAttributesResponse.ts @@ -10,7 +10,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** * Dataset metadata and configuration(s). */ -export class DatasetAttributes { +export class DatasetAttributesResponse { /** * Timestamp when the dataset was created. */ @@ -22,15 +22,15 @@ export class DatasetAttributes { /** * Name of the dataset. */ - "name": string; + "name"?: string; /** * List of access principals, formatted as `principal_type:id`. Principal can be 'team' or 'role'. */ - "principals": Array; + "principals"?: Array; /** * List of product-specific filters. */ - "productFilters": Array; + "productFilters"?: Array; /** * A container for additional, undeclared properties. @@ -61,17 +61,14 @@ export class DatasetAttributes { name: { baseName: "name", type: "string", - required: true, }, principals: { baseName: "principals", type: "Array", - required: true, }, productFilters: { baseName: "product_filters", type: "Array", - required: true, }, additionalProperties: { baseName: "additionalProperties", @@ -83,7 +80,7 @@ export class DatasetAttributes { * @ignore */ static getAttributeTypeMap(): AttributeTypeMap { - return DatasetAttributes.attributeTypeMap; + return DatasetAttributesResponse.attributeTypeMap; } public constructor() {} diff --git a/packages/datadog-api-client-v2/models/DatasetCreateRequest.ts b/packages/datadog-api-client-v2/models/DatasetCreateRequest.ts index b4b5668b0aba..dadcd5f41ad6 100644 --- a/packages/datadog-api-client-v2/models/DatasetCreateRequest.ts +++ b/packages/datadog-api-client-v2/models/DatasetCreateRequest.ts @@ -3,7 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { Dataset } from "./Dataset"; +import { DatasetRequest } from "./DatasetRequest"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -12,21 +12,19 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class DatasetCreateRequest { /** - * Dataset object. - * - * ### Datasets Constraints - * - **Tag Limit per Dataset**: + * **Datasets Object Constraints** + * - **Tag limit per dataset**: * - Each restricted dataset supports a maximum of 10 key:value pairs per product. * - * - **Tag Key Rules per Telemetry Type**: + * - **Tag key rules per telemetry type**: * - Only one tag key or attribute may be used to define access within a single telemetry type. * - The same or different tag key may be used across different telemetry types. * - * - **Tag Value Uniqueness**: + * - **Tag value uniqueness**: * - Tag values must be unique within a single dataset. * - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. */ - "data": Dataset; + "data": DatasetRequest; /** * A container for additional, undeclared properties. @@ -46,7 +44,7 @@ export class DatasetCreateRequest { static readonly attributeTypeMap: AttributeTypeMap = { data: { baseName: "data", - type: "Dataset", + type: "DatasetRequest", required: true, }, additionalProperties: { diff --git a/packages/datadog-api-client-v2/models/DatasetRequest.ts b/packages/datadog-api-client-v2/models/DatasetRequest.ts new file mode 100644 index 000000000000..b0331ddf5e21 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DatasetRequest.ts @@ -0,0 +1,73 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { DatasetAttributesRequest } from "./DatasetAttributesRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * **Datasets Object Constraints** + * - **Tag limit per dataset**: + * - Each restricted dataset supports a maximum of 10 key:value pairs per product. + * + * - **Tag key rules per telemetry type**: + * - Only one tag key or attribute may be used to define access within a single telemetry type. + * - The same or different tag key may be used across different telemetry types. + * + * - **Tag value uniqueness**: + * - Tag values must be unique within a single dataset. + * - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. + */ +export class DatasetRequest { + /** + * Dataset metadata and configurations. + */ + "attributes": DatasetAttributesRequest; + /** + * Resource type, always "dataset". + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "DatasetAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DatasetRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/Dataset.ts b/packages/datadog-api-client-v2/models/DatasetResponse.ts similarity index 85% rename from packages/datadog-api-client-v2/models/Dataset.ts rename to packages/datadog-api-client-v2/models/DatasetResponse.ts index 765270cb4532..8d410d7c2786 100644 --- a/packages/datadog-api-client-v2/models/Dataset.ts +++ b/packages/datadog-api-client-v2/models/DatasetResponse.ts @@ -3,14 +3,12 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { DatasetAttributes } from "./DatasetAttributes"; +import { DatasetAttributesResponse } from "./DatasetAttributesResponse"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Dataset object. - * - * ### Datasets Constraints + * **Datasets Object Constraints** * - **Tag Limit per Dataset**: * - Each restricted dataset supports a maximum of 10 key:value pairs per product. * @@ -22,11 +20,11 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * - Tag values must be unique within a single dataset. * - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. */ -export class Dataset { +export class DatasetResponse { /** * Dataset metadata and configuration(s). */ - "attributes": DatasetAttributes; + "attributes"?: DatasetAttributesResponse; /** * Unique identifier for the dataset. */ @@ -34,7 +32,7 @@ export class Dataset { /** * Resource type, always "dataset". */ - "type": string; + "type"?: string; /** * A container for additional, undeclared properties. @@ -54,8 +52,7 @@ export class Dataset { static readonly attributeTypeMap: AttributeTypeMap = { attributes: { baseName: "attributes", - type: "DatasetAttributes", - required: true, + type: "DatasetAttributesResponse", }, id: { baseName: "id", @@ -64,7 +61,6 @@ export class Dataset { type: { baseName: "type", type: "string", - required: true, }, additionalProperties: { baseName: "additionalProperties", @@ -76,7 +72,7 @@ export class Dataset { * @ignore */ static getAttributeTypeMap(): AttributeTypeMap { - return Dataset.attributeTypeMap; + return DatasetResponse.attributeTypeMap; } public constructor() {} diff --git a/packages/datadog-api-client-v2/models/DatasetResponseMulti.ts b/packages/datadog-api-client-v2/models/DatasetResponseMulti.ts index 24a81242a341..d459dfbdcefd 100644 --- a/packages/datadog-api-client-v2/models/DatasetResponseMulti.ts +++ b/packages/datadog-api-client-v2/models/DatasetResponseMulti.ts @@ -3,7 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { Dataset } from "./Dataset"; +import { DatasetResponse } from "./DatasetResponse"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -14,7 +14,7 @@ export class DatasetResponseMulti { /** * The list of datasets returned in response. */ - "data": Array; + "data"?: Array; /** * A container for additional, undeclared properties. @@ -34,8 +34,7 @@ export class DatasetResponseMulti { static readonly attributeTypeMap: AttributeTypeMap = { data: { baseName: "data", - type: "Array", - required: true, + type: "Array", }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/DatasetResponseSingle.ts b/packages/datadog-api-client-v2/models/DatasetResponseSingle.ts index 4acc4cfc40a6..ef2758251270 100644 --- a/packages/datadog-api-client-v2/models/DatasetResponseSingle.ts +++ b/packages/datadog-api-client-v2/models/DatasetResponseSingle.ts @@ -3,7 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { Dataset } from "./Dataset"; +import { DatasetResponse } from "./DatasetResponse"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -12,9 +12,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class DatasetResponseSingle { /** - * Dataset object. - * - * ### Datasets Constraints + * **Datasets Object Constraints** * - **Tag Limit per Dataset**: * - Each restricted dataset supports a maximum of 10 key:value pairs per product. * @@ -26,7 +24,7 @@ export class DatasetResponseSingle { * - Tag values must be unique within a single dataset. * - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. */ - "data": Dataset; + "data"?: DatasetResponse; /** * A container for additional, undeclared properties. @@ -46,8 +44,7 @@ export class DatasetResponseSingle { static readonly attributeTypeMap: AttributeTypeMap = { data: { baseName: "data", - type: "Dataset", - required: true, + type: "DatasetResponse", }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/DatasetUpdateRequest.ts b/packages/datadog-api-client-v2/models/DatasetUpdateRequest.ts index 338ba47d2e76..ba39533088ad 100644 --- a/packages/datadog-api-client-v2/models/DatasetUpdateRequest.ts +++ b/packages/datadog-api-client-v2/models/DatasetUpdateRequest.ts @@ -3,7 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { Dataset } from "./Dataset"; +import { DatasetRequest } from "./DatasetRequest"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -12,21 +12,19 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class DatasetUpdateRequest { /** - * Dataset object. - * - * ### Datasets Constraints - * - **Tag Limit per Dataset**: + * **Datasets Object Constraints** + * - **Tag limit per dataset**: * - Each restricted dataset supports a maximum of 10 key:value pairs per product. * - * - **Tag Key Rules per Telemetry Type**: + * - **Tag key rules per telemetry type**: * - Only one tag key or attribute may be used to define access within a single telemetry type. * - The same or different tag key may be used across different telemetry types. * - * - **Tag Value Uniqueness**: + * - **Tag value uniqueness**: * - Tag values must be unique within a single dataset. * - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. */ - "data": Dataset; + "data": DatasetRequest; /** * A container for additional, undeclared properties. @@ -46,7 +44,7 @@ export class DatasetUpdateRequest { static readonly attributeTypeMap: AttributeTypeMap = { data: { baseName: "data", - type: "Dataset", + type: "DatasetRequest", required: true, }, additionalProperties: { diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 5168d4b226f8..142eed1632fb 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -563,9 +563,11 @@ import { DatadogAPIKey } from "./DatadogAPIKey"; import { DatadogAPIKeyUpdate } from "./DatadogAPIKeyUpdate"; import { DatadogIntegration } from "./DatadogIntegration"; import { DatadogIntegrationUpdate } from "./DatadogIntegrationUpdate"; -import { Dataset } from "./Dataset"; -import { DatasetAttributes } from "./DatasetAttributes"; +import { DatasetAttributesRequest } from "./DatasetAttributesRequest"; +import { DatasetAttributesResponse } from "./DatasetAttributesResponse"; import { DatasetCreateRequest } from "./DatasetCreateRequest"; +import { DatasetRequest } from "./DatasetRequest"; +import { DatasetResponse } from "./DatasetResponse"; import { DatasetResponseMulti } from "./DatasetResponseMulti"; import { DatasetResponseSingle } from "./DatasetResponseSingle"; import { DatasetUpdateRequest } from "./DatasetUpdateRequest"; @@ -4090,9 +4092,11 @@ const typeMap: { [index: string]: any } = { DatadogAPIKeyUpdate: DatadogAPIKeyUpdate, DatadogIntegration: DatadogIntegration, DatadogIntegrationUpdate: DatadogIntegrationUpdate, - Dataset: Dataset, - DatasetAttributes: DatasetAttributes, + DatasetAttributesRequest: DatasetAttributesRequest, + DatasetAttributesResponse: DatasetAttributesResponse, DatasetCreateRequest: DatasetCreateRequest, + DatasetRequest: DatasetRequest, + DatasetResponse: DatasetResponse, DatasetResponseMulti: DatasetResponseMulti, DatasetResponseSingle: DatasetResponseSingle, DatasetUpdateRequest: DatasetUpdateRequest,