From e226da85589cce9078992082dc92968a19437a37 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Mar 2026 13:23:47 +0000 Subject: [PATCH] Regenerate client from commit 39bbaf5 of spec repo --- .generator/schemas/v2/openapi.yaml | 175 ++++-------------- docs/datadog_api_client.v2.model.rst | 74 ++------ .../v2/reference-tables/BatchRowsQuery.py | 31 ---- examples/v2/reference-tables/DeleteRows.py | 4 +- .../v2/api/reference_tables_api.py | 38 ---- .../model/batch_delete_rows_request_array.py | 10 +- ...r.py => batch_delete_rows_request_data.py} | 4 +- .../v2/model/batch_rows_query_data_type.py | 35 ---- .../v2/model/batch_rows_query_request.py | 42 ----- .../v2/model/batch_rows_query_request_data.py | 58 ------ ...atch_rows_query_request_data_attributes.py | 40 ---- .../v2/model/batch_rows_query_response.py | 42 ----- .../model/batch_rows_query_response_data.py | 68 ------- ..._rows_query_response_data_relationships.py | 46 ----- ..._query_response_data_relationships_rows.py | 42 ----- ..._deployment_rule_params_data_attributes.py | 2 +- ...ns_faulty_deployment_detection_response.py | 47 +++++ ...eployment_rule_response_data_attributes.py | 18 +- .../v2/model/deployment_rules_options.py | 2 +- .../deployment_rules_options_response.py | 48 +++++ ..._deployment_rule_params_data_attributes.py | 2 +- src/datadog_api_client/v2/models/__init__.py | 30 +-- ...deployment_rule_returns_ok_response.frozen | 2 +- ...e_deployment_rule_returns_ok_response.yaml | 18 +- ...deployment_rule_returns_ok_response.frozen | 2 +- ...t_deployment_rule_returns_ok_response.yaml | 26 +-- ...deployment_rule_returns_ok_response.frozen | 2 +- ...e_deployment_rule_returns_ok_response.yaml | 26 +-- tests/v2/features/deployment_gates.feature | 3 + tests/v2/features/reference_tables.feature | 21 --- tests/v2/features/undo.json | 6 - 31 files changed, 220 insertions(+), 744 deletions(-) delete mode 100644 examples/v2/reference-tables/BatchRowsQuery.py rename src/datadog_api_client/v2/model/{table_row_resource_identifier.py => batch_delete_rows_request_data.py} (90%) delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_data_type.py delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_request.py delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_request_data.py delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_request_data_attributes.py delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_response.py delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_response_data.py delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships.py delete mode 100644 src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships_rows.py create mode 100644 src/datadog_api_client/v2/model/deployment_rule_options_faulty_deployment_detection_response.py create mode 100644 src/datadog_api_client/v2/model/deployment_rules_options_response.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a27042d9b8..eb8fb19b9f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -7475,89 +7475,23 @@ components: properties: data: items: - $ref: '#/components/schemas/TableRowResourceIdentifier' + $ref: '#/components/schemas/BatchDeleteRowsRequestData' maxItems: 200 type: array required: - data type: object - BatchRowsQueryDataType: - default: reference-tables-batch-rows-query - description: Resource type identifier for batch queries of reference table rows. - enum: - - reference-tables-batch-rows-query - example: reference-tables-batch-rows-query - type: string - x-enum-varnames: - - REFERENCE_TABLES_BATCH_ROWS_QUERY - BatchRowsQueryRequest: - properties: - data: - $ref: '#/components/schemas/BatchRowsQueryRequestData' - type: object - BatchRowsQueryRequestData: - properties: - attributes: - $ref: '#/components/schemas/BatchRowsQueryRequestDataAttributes' - type: - $ref: '#/components/schemas/BatchRowsQueryDataType' - required: - - type - type: object - BatchRowsQueryRequestDataAttributes: - properties: - row_ids: - example: - - row_id_1 - - row_id_2 - items: - type: string - type: array - table_id: - example: 00000000-0000-0000-0000-000000000000 - type: string - required: - - row_ids - - table_id - type: object - BatchRowsQueryResponse: - example: - data: - id: 00000000-0000-0000-0000-000000000000 - relationships: - rows: - data: - - id: row_id_1 - type: row - - id: row_id_2 - type: row - type: reference-tables-batch-rows-query - properties: - data: - $ref: '#/components/schemas/BatchRowsQueryResponseData' - type: object - BatchRowsQueryResponseData: + BatchDeleteRowsRequestData: + description: Row resource containing a single row identifier for deletion. properties: id: + example: primary_key_value type: string - relationships: - $ref: '#/components/schemas/BatchRowsQueryResponseDataRelationships' type: - $ref: '#/components/schemas/BatchRowsQueryDataType' + $ref: '#/components/schemas/TableRowResourceDataType' required: - type - type: object - BatchRowsQueryResponseDataRelationships: - properties: - rows: - $ref: '#/components/schemas/BatchRowsQueryResponseDataRelationshipsRows' - type: object - BatchRowsQueryResponseDataRelationshipsRows: - properties: - data: - items: - $ref: '#/components/schemas/TableRowResourceIdentifier' - type: array + - id type: object BatchUpsertRowsRequestArray: description: The request body for creating or updating multiple rows into a @@ -21037,6 +20971,29 @@ components: type: string type: array type: object + DeploymentRuleOptionsFaultyDeploymentDetectionResponse: + additionalProperties: false + description: Faulty deployment detection options returned in deployment rule + responses. The `excluded_resources` field is always present, which allows + disambiguating this type from monitor options when both share a `duration` + field. + properties: + duration: + description: The duration for faulty deployment detection. + example: 3600 + format: int64 + type: integer + excluded_resources: + description: Resources to exclude from faulty deployment detection. + example: + - resource1 + - resource2 + items: + type: string + type: array + required: + - excluded_resources + type: object DeploymentRuleOptionsMonitor: additionalProperties: false description: Monitor options for deployment rules. @@ -21099,7 +21056,7 @@ components: example: My deployment rule type: string options: - $ref: '#/components/schemas/DeploymentRulesOptions' + $ref: '#/components/schemas/DeploymentRulesOptionsResponse' type: $ref: '#/components/schemas/DeploymentRuleResponseDataAttributesType' updated_at: @@ -21164,11 +21121,18 @@ components: - id type: object DeploymentRulesOptions: - description: Options for deployment rule response representing either faulty + description: Options for deployment rule requests representing either faulty deployment detection or monitor options. oneOf: - $ref: '#/components/schemas/DeploymentRuleOptionsFaultyDeploymentDetection' - $ref: '#/components/schemas/DeploymentRuleOptionsMonitor' + DeploymentRulesOptionsResponse: + description: Options returned in deployment rule responses representing either + faulty deployment detection or monitor options. Faulty deployment detection + responses always include `excluded_resources`, making the two variants unambiguous. + oneOf: + - $ref: '#/components/schemas/DeploymentRuleOptionsFaultyDeploymentDetectionResponse' + - $ref: '#/components/schemas/DeploymentRuleOptionsMonitor' DetachCaseRequest: description: Request for detaching security findings from their case. properties: @@ -67019,18 +66983,6 @@ components: type: string x-enum-varnames: - ROW - TableRowResourceIdentifier: - description: Row resource containing a single row identifier. - properties: - id: - example: primary_key_value - type: string - type: - $ref: '#/components/schemas/TableRowResourceDataType' - required: - - type - - id - type: object TagsEventAttribute: description: Array of tags associated with your event. example: @@ -96466,57 +96418,6 @@ paths: operator: OR permissions: - timeseries_query - /api/v2/reference-tables/queries/batch-rows: - post: - description: Batch query reference table rows by their primary key values. Returns - only found rows in the included array. - operationId: BatchRowsQuery - requestBody: - content: - application/json: - examples: - happy_path: - summary: Batch query reference table rows by their primary key values. - value: - data: - attributes: - row_ids: - - row_id_1 - - row_id_2 - table_id: 00000000-0000-0000-0000-000000000000 - type: reference-tables-batch-rows-query - schema: - $ref: '#/components/schemas/BatchRowsQueryRequest' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/BatchRowsQueryResponse' - description: Successfully retrieved rows. Some or all requested rows were - found. Response includes found rows in the included section. - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Internal Server Error - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Batch rows query - tags: - - Reference Tables /api/v2/reference-tables/tables: get: description: List all reference tables in this organization. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index f5afeb297a..a4772abcc1 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -2769,59 +2769,10 @@ datadog\_api\_client.v2.model.batch\_delete\_rows\_request\_array module :members: :show-inheritance: -datadog\_api\_client.v2.model.batch\_rows\_query\_data\_type module -------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.batch_rows_query_data_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.batch\_rows\_query\_request module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.batch_rows_query_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.batch\_rows\_query\_request\_data module ----------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.batch_rows_query_request_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.batch\_rows\_query\_request\_data\_attributes module ----------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.batch_rows_query_request_data_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.batch\_rows\_query\_response module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.batch_rows_query_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.batch\_rows\_query\_response\_data module +datadog\_api\_client.v2.model.batch\_delete\_rows\_request\_data module ----------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.batch_rows_query_response_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.batch\_rows\_query\_response\_data\_relationships module --------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.batch_rows_query_response_data_relationships - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.batch\_rows\_query\_response\_data\_relationships\_rows module --------------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.batch_rows_query_response_data_relationships_rows +.. automodule:: datadog_api_client.v2.model.batch_delete_rows_request_data :members: :show-inheritance: @@ -8425,6 +8376,13 @@ datadog\_api\_client.v2.model.deployment\_rule\_options\_faulty\_deployment\_det :members: :show-inheritance: +datadog\_api\_client.v2.model.deployment\_rule\_options\_faulty\_deployment\_detection\_response module +------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deployment_rule_options_faulty_deployment_detection_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.deployment\_rule\_options\_monitor module ----------------------------------------------------------------------- @@ -8481,6 +8439,13 @@ datadog\_api\_client.v2.model.deployment\_rules\_options module :members: :show-inheritance: +datadog\_api\_client.v2.model.deployment\_rules\_options\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deployment_rules_options_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.detach\_case\_request module ---------------------------------------------------------- @@ -29355,13 +29320,6 @@ datadog\_api\_client.v2.model.table\_row\_resource\_data\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.table\_row\_resource\_identifier module ---------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.table_row_resource_identifier - :members: - :show-inheritance: - datadog\_api\_client.v2.model.tags\_event\_attribute module ----------------------------------------------------------- diff --git a/examples/v2/reference-tables/BatchRowsQuery.py b/examples/v2/reference-tables/BatchRowsQuery.py deleted file mode 100644 index fbc48be53f..0000000000 --- a/examples/v2/reference-tables/BatchRowsQuery.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found -rows in the included section." response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi -from datadog_api_client.v2.model.batch_rows_query_data_type import BatchRowsQueryDataType -from datadog_api_client.v2.model.batch_rows_query_request import BatchRowsQueryRequest -from datadog_api_client.v2.model.batch_rows_query_request_data import BatchRowsQueryRequestData -from datadog_api_client.v2.model.batch_rows_query_request_data_attributes import BatchRowsQueryRequestDataAttributes - -body = BatchRowsQueryRequest( - data=BatchRowsQueryRequestData( - attributes=BatchRowsQueryRequestDataAttributes( - row_ids=[ - "row_id_1", - "row_id_2", - ], - table_id="00000000-0000-0000-0000-000000000000", - ), - type=BatchRowsQueryDataType.REFERENCE_TABLES_BATCH_ROWS_QUERY, - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = ReferenceTablesApi(api_client) - response = api_instance.batch_rows_query(body=body) - - print(response) diff --git a/examples/v2/reference-tables/DeleteRows.py b/examples/v2/reference-tables/DeleteRows.py index 0b2f41cca7..27f60273ea 100644 --- a/examples/v2/reference-tables/DeleteRows.py +++ b/examples/v2/reference-tables/DeleteRows.py @@ -5,12 +5,12 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi from datadog_api_client.v2.model.batch_delete_rows_request_array import BatchDeleteRowsRequestArray +from datadog_api_client.v2.model.batch_delete_rows_request_data import BatchDeleteRowsRequestData from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType -from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier body = BatchDeleteRowsRequestArray( data=[ - TableRowResourceIdentifier( + BatchDeleteRowsRequestData( id="primary_key_value", type=TableRowResourceDataType.ROW, ), diff --git a/src/datadog_api_client/v2/api/reference_tables_api.py b/src/datadog_api_client/v2/api/reference_tables_api.py index ff381a18e6..771c174fa3 100644 --- a/src/datadog_api_client/v2/api/reference_tables_api.py +++ b/src/datadog_api_client/v2/api/reference_tables_api.py @@ -11,8 +11,6 @@ UnsetType, unset, ) -from datadog_api_client.v2.model.batch_rows_query_response import BatchRowsQueryResponse -from datadog_api_client.v2.model.batch_rows_query_request import BatchRowsQueryRequest from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array from datadog_api_client.v2.model.reference_table_sort_type import ReferenceTableSortType from datadog_api_client.v2.model.table_result_v2 import TableResultV2 @@ -35,26 +33,6 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client - self._batch_rows_query_endpoint = _Endpoint( - settings={ - "response_type": (BatchRowsQueryResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/reference-tables/queries/batch-rows", - "operation_id": "batch_rows_query", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "body": { - "required": True, - "openapi_types": (BatchRowsQueryRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - self._create_reference_table_endpoint = _Endpoint( settings={ "response_type": (TableResultV2,), @@ -303,22 +281,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - def batch_rows_query( - self, - body: BatchRowsQueryRequest, - ) -> BatchRowsQueryResponse: - """Batch rows query. - - Batch query reference table rows by their primary key values. Returns only found rows in the included array. - - :type body: BatchRowsQueryRequest - :rtype: BatchRowsQueryResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["body"] = body - - return self._batch_rows_query_endpoint.call_with_http_info(**kwargs) - def create_reference_table( self, body: CreateTableRequest, diff --git a/src/datadog_api_client/v2/model/batch_delete_rows_request_array.py b/src/datadog_api_client/v2/model/batch_delete_rows_request_array.py index 13462d542e..ce31506ce4 100644 --- a/src/datadog_api_client/v2/model/batch_delete_rows_request_array.py +++ b/src/datadog_api_client/v2/model/batch_delete_rows_request_array.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier + from datadog_api_client.v2.model.batch_delete_rows_request_data import BatchDeleteRowsRequestData class BatchDeleteRowsRequestArray(ModelNormal): @@ -24,22 +24,22 @@ class BatchDeleteRowsRequestArray(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier + from datadog_api_client.v2.model.batch_delete_rows_request_data import BatchDeleteRowsRequestData return { - "data": ([TableRowResourceIdentifier],), + "data": ([BatchDeleteRowsRequestData],), } attribute_map = { "data": "data", } - def __init__(self_, data: List[TableRowResourceIdentifier], **kwargs): + def __init__(self_, data: List[BatchDeleteRowsRequestData], **kwargs): """ The request body for deleting multiple rows from a reference table. :param data: - :type data: [TableRowResourceIdentifier] + :type data: [BatchDeleteRowsRequestData] """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_row_resource_identifier.py b/src/datadog_api_client/v2/model/batch_delete_rows_request_data.py similarity index 90% rename from src/datadog_api_client/v2/model/table_row_resource_identifier.py rename to src/datadog_api_client/v2/model/batch_delete_rows_request_data.py index 5ba481afab..ecdb976771 100644 --- a/src/datadog_api_client/v2/model/table_row_resource_identifier.py +++ b/src/datadog_api_client/v2/model/batch_delete_rows_request_data.py @@ -15,7 +15,7 @@ from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType -class TableRowResourceIdentifier(ModelNormal): +class BatchDeleteRowsRequestData(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType @@ -32,7 +32,7 @@ def openapi_types(_): def __init__(self_, id: str, type: TableRowResourceDataType, **kwargs): """ - Row resource containing a single row identifier. + Row resource containing a single row identifier for deletion. :param id: :type id: str diff --git a/src/datadog_api_client/v2/model/batch_rows_query_data_type.py b/src/datadog_api_client/v2/model/batch_rows_query_data_type.py deleted file mode 100644 index 4f54ac4a24..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_data_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class BatchRowsQueryDataType(ModelSimple): - """ - Resource type identifier for batch queries of reference table rows. - - :param value: If omitted defaults to "reference-tables-batch-rows-query". Must be one of ["reference-tables-batch-rows-query"]. - :type value: str - """ - - allowed_values = { - "reference-tables-batch-rows-query", - } - REFERENCE_TABLES_BATCH_ROWS_QUERY: ClassVar["BatchRowsQueryDataType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -BatchRowsQueryDataType.REFERENCE_TABLES_BATCH_ROWS_QUERY = BatchRowsQueryDataType("reference-tables-batch-rows-query") diff --git a/src/datadog_api_client/v2/model/batch_rows_query_request.py b/src/datadog_api_client/v2/model/batch_rows_query_request.py deleted file mode 100644 index f1d2823956..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_request.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.batch_rows_query_request_data import BatchRowsQueryRequestData - - -class BatchRowsQueryRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.batch_rows_query_request_data import BatchRowsQueryRequestData - - return { - "data": (BatchRowsQueryRequestData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[BatchRowsQueryRequestData, UnsetType] = unset, **kwargs): - """ - - - :param data: - :type data: BatchRowsQueryRequestData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/batch_rows_query_request_data.py b/src/datadog_api_client/v2/model/batch_rows_query_request_data.py deleted file mode 100644 index 879ce6f7c3..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_request_data.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.batch_rows_query_request_data_attributes import BatchRowsQueryRequestDataAttributes - from datadog_api_client.v2.model.batch_rows_query_data_type import BatchRowsQueryDataType - - -class BatchRowsQueryRequestData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.batch_rows_query_request_data_attributes import ( - BatchRowsQueryRequestDataAttributes, - ) - from datadog_api_client.v2.model.batch_rows_query_data_type import BatchRowsQueryDataType - - return { - "attributes": (BatchRowsQueryRequestDataAttributes,), - "type": (BatchRowsQueryDataType,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__( - self_, - type: BatchRowsQueryDataType, - attributes: Union[BatchRowsQueryRequestDataAttributes, UnsetType] = unset, - **kwargs, - ): - """ - - - :param attributes: - :type attributes: BatchRowsQueryRequestDataAttributes, optional - - :param type: Resource type identifier for batch queries of reference table rows. - :type type: BatchRowsQueryDataType - """ - if attributes is not unset: - kwargs["attributes"] = attributes - super().__init__(kwargs) - - self_.type = type diff --git a/src/datadog_api_client/v2/model/batch_rows_query_request_data_attributes.py b/src/datadog_api_client/v2/model/batch_rows_query_request_data_attributes.py deleted file mode 100644 index 3edf53ba81..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_request_data_attributes.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class BatchRowsQueryRequestDataAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "row_ids": ([str],), - "table_id": (str,), - } - - attribute_map = { - "row_ids": "row_ids", - "table_id": "table_id", - } - - def __init__(self_, row_ids: List[str], table_id: str, **kwargs): - """ - - - :param row_ids: - :type row_ids: [str] - - :param table_id: - :type table_id: str - """ - super().__init__(kwargs) - - self_.row_ids = row_ids - self_.table_id = table_id diff --git a/src/datadog_api_client/v2/model/batch_rows_query_response.py b/src/datadog_api_client/v2/model/batch_rows_query_response.py deleted file mode 100644 index 5b1e5afc0c..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.batch_rows_query_response_data import BatchRowsQueryResponseData - - -class BatchRowsQueryResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.batch_rows_query_response_data import BatchRowsQueryResponseData - - return { - "data": (BatchRowsQueryResponseData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[BatchRowsQueryResponseData, UnsetType] = unset, **kwargs): - """ - - - :param data: - :type data: BatchRowsQueryResponseData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/batch_rows_query_response_data.py b/src/datadog_api_client/v2/model/batch_rows_query_response_data.py deleted file mode 100644 index 33b6d8fa69..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_response_data.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.batch_rows_query_response_data_relationships import ( - BatchRowsQueryResponseDataRelationships, - ) - from datadog_api_client.v2.model.batch_rows_query_data_type import BatchRowsQueryDataType - - -class BatchRowsQueryResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.batch_rows_query_response_data_relationships import ( - BatchRowsQueryResponseDataRelationships, - ) - from datadog_api_client.v2.model.batch_rows_query_data_type import BatchRowsQueryDataType - - return { - "id": (str,), - "relationships": (BatchRowsQueryResponseDataRelationships,), - "type": (BatchRowsQueryDataType,), - } - - attribute_map = { - "id": "id", - "relationships": "relationships", - "type": "type", - } - - def __init__( - self_, - type: BatchRowsQueryDataType, - id: Union[str, UnsetType] = unset, - relationships: Union[BatchRowsQueryResponseDataRelationships, UnsetType] = unset, - **kwargs, - ): - """ - - - :param id: - :type id: str, optional - - :param relationships: - :type relationships: BatchRowsQueryResponseDataRelationships, optional - - :param type: Resource type identifier for batch queries of reference table rows. - :type type: BatchRowsQueryDataType - """ - if id is not unset: - kwargs["id"] = id - if relationships is not unset: - kwargs["relationships"] = relationships - super().__init__(kwargs) - - self_.type = type diff --git a/src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships.py b/src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships.py deleted file mode 100644 index 0da1e8ea1e..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.batch_rows_query_response_data_relationships_rows import ( - BatchRowsQueryResponseDataRelationshipsRows, - ) - - -class BatchRowsQueryResponseDataRelationships(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.batch_rows_query_response_data_relationships_rows import ( - BatchRowsQueryResponseDataRelationshipsRows, - ) - - return { - "rows": (BatchRowsQueryResponseDataRelationshipsRows,), - } - - attribute_map = { - "rows": "rows", - } - - def __init__(self_, rows: Union[BatchRowsQueryResponseDataRelationshipsRows, UnsetType] = unset, **kwargs): - """ - - - :param rows: - :type rows: BatchRowsQueryResponseDataRelationshipsRows, optional - """ - if rows is not unset: - kwargs["rows"] = rows - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships_rows.py b/src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships_rows.py deleted file mode 100644 index 25c48117ca..0000000000 --- a/src/datadog_api_client/v2/model/batch_rows_query_response_data_relationships_rows.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier - - -class BatchRowsQueryResponseDataRelationshipsRows(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier - - return { - "data": ([TableRowResourceIdentifier],), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[List[TableRowResourceIdentifier], UnsetType] = unset, **kwargs): - """ - - - :param data: - :type data: [TableRowResourceIdentifier], optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_deployment_rule_params_data_attributes.py b/src/datadog_api_client/v2/model/create_deployment_rule_params_data_attributes.py index 504e7e7c96..360ec10722 100644 --- a/src/datadog_api_client/v2/model/create_deployment_rule_params_data_attributes.py +++ b/src/datadog_api_client/v2/model/create_deployment_rule_params_data_attributes.py @@ -59,7 +59,7 @@ def __init__( :param name: The name of the deployment rule. :type name: str - :param options: Options for deployment rule response representing either faulty deployment detection or monitor options. + :param options: Options for deployment rule requests representing either faulty deployment detection or monitor options. :type options: DeploymentRulesOptions :param type: The type of the deployment rule (faulty_deployment_detection or monitor). diff --git a/src/datadog_api_client/v2/model/deployment_rule_options_faulty_deployment_detection_response.py b/src/datadog_api_client/v2/model/deployment_rule_options_faulty_deployment_detection_response.py new file mode 100644 index 0000000000..66aafce6c4 --- /dev/null +++ b/src/datadog_api_client/v2/model/deployment_rule_options_faulty_deployment_detection_response.py @@ -0,0 +1,47 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeploymentRuleOptionsFaultyDeploymentDetectionResponse(ModelNormal): + @cached_property + def additional_properties_type(_): + return None + + @cached_property + def openapi_types(_): + return { + "duration": (int,), + "excluded_resources": ([str],), + } + + attribute_map = { + "duration": "duration", + "excluded_resources": "excluded_resources", + } + + def __init__(self_, excluded_resources: List[str], duration: Union[int, UnsetType] = unset, **kwargs): + """ + Faulty deployment detection options returned in deployment rule responses. The ``excluded_resources`` field is always present, which allows disambiguating this type from monitor options when both share a ``duration`` field. + + :param duration: The duration for faulty deployment detection. + :type duration: int, optional + + :param excluded_resources: Resources to exclude from faulty deployment detection. + :type excluded_resources: [str] + """ + if duration is not unset: + kwargs["duration"] = duration + super().__init__(kwargs) + + self_.excluded_resources = excluded_resources diff --git a/src/datadog_api_client/v2/model/deployment_rule_response_data_attributes.py b/src/datadog_api_client/v2/model/deployment_rule_response_data_attributes.py index 874e36f6bf..6791ef213d 100644 --- a/src/datadog_api_client/v2/model/deployment_rule_response_data_attributes.py +++ b/src/datadog_api_client/v2/model/deployment_rule_response_data_attributes.py @@ -18,15 +18,15 @@ from datadog_api_client.v2.model.deployment_rule_response_data_attributes_created_by import ( DeploymentRuleResponseDataAttributesCreatedBy, ) - from datadog_api_client.v2.model.deployment_rules_options import DeploymentRulesOptions + from datadog_api_client.v2.model.deployment_rules_options_response import DeploymentRulesOptionsResponse from datadog_api_client.v2.model.deployment_rule_response_data_attributes_type import ( DeploymentRuleResponseDataAttributesType, ) from datadog_api_client.v2.model.deployment_rule_response_data_attributes_updated_by import ( DeploymentRuleResponseDataAttributesUpdatedBy, ) - from datadog_api_client.v2.model.deployment_rule_options_faulty_deployment_detection import ( - DeploymentRuleOptionsFaultyDeploymentDetection, + from datadog_api_client.v2.model.deployment_rule_options_faulty_deployment_detection_response import ( + DeploymentRuleOptionsFaultyDeploymentDetectionResponse, ) from datadog_api_client.v2.model.deployment_rule_options_monitor import DeploymentRuleOptionsMonitor @@ -37,7 +37,7 @@ def openapi_types(_): from datadog_api_client.v2.model.deployment_rule_response_data_attributes_created_by import ( DeploymentRuleResponseDataAttributesCreatedBy, ) - from datadog_api_client.v2.model.deployment_rules_options import DeploymentRulesOptions + from datadog_api_client.v2.model.deployment_rules_options_response import DeploymentRulesOptionsResponse from datadog_api_client.v2.model.deployment_rule_response_data_attributes_type import ( DeploymentRuleResponseDataAttributesType, ) @@ -51,7 +51,7 @@ def openapi_types(_): "dry_run": (bool,), "gate_id": (str,), "name": (str,), - "options": (DeploymentRulesOptions,), + "options": (DeploymentRulesOptionsResponse,), "type": (DeploymentRuleResponseDataAttributesType,), "updated_at": (datetime,), "updated_by": (DeploymentRuleResponseDataAttributesUpdatedBy,), @@ -77,7 +77,9 @@ def __init__( gate_id: str, name: str, options: Union[ - DeploymentRulesOptions, DeploymentRuleOptionsFaultyDeploymentDetection, DeploymentRuleOptionsMonitor + DeploymentRulesOptionsResponse, + DeploymentRuleOptionsFaultyDeploymentDetectionResponse, + DeploymentRuleOptionsMonitor, ], type: DeploymentRuleResponseDataAttributesType, updated_at: Union[datetime, UnsetType] = unset, @@ -102,8 +104,8 @@ def __init__( :param name: The name of the deployment rule. :type name: str - :param options: Options for deployment rule response representing either faulty deployment detection or monitor options. - :type options: DeploymentRulesOptions + :param options: Options returned in deployment rule responses representing either faulty deployment detection or monitor options. Faulty deployment detection responses always include ``excluded_resources`` , making the two variants unambiguous. + :type options: DeploymentRulesOptionsResponse :param type: The type of the deployment rule. :type type: DeploymentRuleResponseDataAttributesType diff --git a/src/datadog_api_client/v2/model/deployment_rules_options.py b/src/datadog_api_client/v2/model/deployment_rules_options.py index 5aaa95dd0a..7fd585eb36 100644 --- a/src/datadog_api_client/v2/model/deployment_rules_options.py +++ b/src/datadog_api_client/v2/model/deployment_rules_options.py @@ -13,7 +13,7 @@ class DeploymentRulesOptions(ModelComposed): def __init__(self, **kwargs): """ - Options for deployment rule response representing either faulty deployment detection or monitor options. + Options for deployment rule requests representing either faulty deployment detection or monitor options. :param duration: The duration for faulty deployment detection. :type duration: int, optional diff --git a/src/datadog_api_client/v2/model/deployment_rules_options_response.py b/src/datadog_api_client/v2/model/deployment_rules_options_response.py new file mode 100644 index 0000000000..4c1c9b0240 --- /dev/null +++ b/src/datadog_api_client/v2/model/deployment_rules_options_response.py @@ -0,0 +1,48 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class DeploymentRulesOptionsResponse(ModelComposed): + def __init__(self, **kwargs): + """ + Options returned in deployment rule responses representing either faulty deployment detection or monitor options. Faulty deployment detection responses always include ``excluded_resources`` , making the two variants unambiguous. + + :param duration: The duration for faulty deployment detection. + :type duration: int, optional + + :param excluded_resources: Resources to exclude from faulty deployment detection. + :type excluded_resources: [str] + + :param query: Monitors that match this query are evaluated. + :type query: str + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.deployment_rule_options_faulty_deployment_detection_response import ( + DeploymentRuleOptionsFaultyDeploymentDetectionResponse, + ) + from datadog_api_client.v2.model.deployment_rule_options_monitor import DeploymentRuleOptionsMonitor + + return { + "oneOf": [ + DeploymentRuleOptionsFaultyDeploymentDetectionResponse, + DeploymentRuleOptionsMonitor, + ], + } diff --git a/src/datadog_api_client/v2/model/update_deployment_rule_params_data_attributes.py b/src/datadog_api_client/v2/model/update_deployment_rule_params_data_attributes.py index cc51b544a3..2ebceaef1f 100644 --- a/src/datadog_api_client/v2/model/update_deployment_rule_params_data_attributes.py +++ b/src/datadog_api_client/v2/model/update_deployment_rule_params_data_attributes.py @@ -54,7 +54,7 @@ def __init__( :param name: The name of the deployment rule. :type name: str - :param options: Options for deployment rule response representing either faulty deployment detection or monitor options. + :param options: Options for deployment rule requests representing either faulty deployment detection or monitor options. :type options: DeploymentRulesOptions """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index ac4604fa22..01e335dba3 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -526,18 +526,7 @@ from datadog_api_client.v2.model.azure_uc_config_post_request_type import AzureUCConfigPostRequestType from datadog_api_client.v2.model.azure_uc_configs_response import AzureUCConfigsResponse from datadog_api_client.v2.model.batch_delete_rows_request_array import BatchDeleteRowsRequestArray -from datadog_api_client.v2.model.batch_rows_query_data_type import BatchRowsQueryDataType -from datadog_api_client.v2.model.batch_rows_query_request import BatchRowsQueryRequest -from datadog_api_client.v2.model.batch_rows_query_request_data import BatchRowsQueryRequestData -from datadog_api_client.v2.model.batch_rows_query_request_data_attributes import BatchRowsQueryRequestDataAttributes -from datadog_api_client.v2.model.batch_rows_query_response import BatchRowsQueryResponse -from datadog_api_client.v2.model.batch_rows_query_response_data import BatchRowsQueryResponseData -from datadog_api_client.v2.model.batch_rows_query_response_data_relationships import ( - BatchRowsQueryResponseDataRelationships, -) -from datadog_api_client.v2.model.batch_rows_query_response_data_relationships_rows import ( - BatchRowsQueryResponseDataRelationshipsRows, -) +from datadog_api_client.v2.model.batch_delete_rows_request_data import BatchDeleteRowsRequestData from datadog_api_client.v2.model.batch_upsert_rows_request_array import BatchUpsertRowsRequestArray from datadog_api_client.v2.model.batch_upsert_rows_request_data import BatchUpsertRowsRequestData from datadog_api_client.v2.model.batch_upsert_rows_request_data_attributes import BatchUpsertRowsRequestDataAttributes @@ -1704,6 +1693,9 @@ from datadog_api_client.v2.model.deployment_rule_options_faulty_deployment_detection import ( DeploymentRuleOptionsFaultyDeploymentDetection, ) +from datadog_api_client.v2.model.deployment_rule_options_faulty_deployment_detection_response import ( + DeploymentRuleOptionsFaultyDeploymentDetectionResponse, +) from datadog_api_client.v2.model.deployment_rule_options_monitor import DeploymentRuleOptionsMonitor from datadog_api_client.v2.model.deployment_rule_response import DeploymentRuleResponse from datadog_api_client.v2.model.deployment_rule_response_data import DeploymentRuleResponseData @@ -1718,6 +1710,7 @@ DeploymentRuleResponseDataAttributesUpdatedBy, ) from datadog_api_client.v2.model.deployment_rules_options import DeploymentRulesOptions +from datadog_api_client.v2.model.deployment_rules_options_response import DeploymentRulesOptionsResponse from datadog_api_client.v2.model.detach_case_request import DetachCaseRequest from datadog_api_client.v2.model.detach_case_request_data import DetachCaseRequestData from datadog_api_client.v2.model.detach_case_request_data_relationships import DetachCaseRequestDataRelationships @@ -5980,7 +5973,6 @@ from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData from datadog_api_client.v2.model.table_row_resource_data_attributes import TableRowResourceDataAttributes from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType -from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute from datadog_api_client.v2.model.team import Team from datadog_api_client.v2.model.team_attributes import TeamAttributes @@ -6857,14 +6849,7 @@ "AzureUCConfigPostRequestType", "AzureUCConfigsResponse", "BatchDeleteRowsRequestArray", - "BatchRowsQueryDataType", - "BatchRowsQueryRequest", - "BatchRowsQueryRequestData", - "BatchRowsQueryRequestDataAttributes", - "BatchRowsQueryResponse", - "BatchRowsQueryResponseData", - "BatchRowsQueryResponseDataRelationships", - "BatchRowsQueryResponseDataRelationshipsRows", + "BatchDeleteRowsRequestData", "BatchUpsertRowsRequestArray", "BatchUpsertRowsRequestData", "BatchUpsertRowsRequestDataAttributes", @@ -7703,6 +7688,7 @@ "DeploymentRelationshipData", "DeploymentRuleDataType", "DeploymentRuleOptionsFaultyDeploymentDetection", + "DeploymentRuleOptionsFaultyDeploymentDetectionResponse", "DeploymentRuleOptionsMonitor", "DeploymentRuleResponse", "DeploymentRuleResponseData", @@ -7711,6 +7697,7 @@ "DeploymentRuleResponseDataAttributesType", "DeploymentRuleResponseDataAttributesUpdatedBy", "DeploymentRulesOptions", + "DeploymentRulesOptionsResponse", "DetachCaseRequest", "DetachCaseRequestData", "DetachCaseRequestDataRelationships", @@ -10665,7 +10652,6 @@ "TableRowResourceData", "TableRowResourceDataAttributes", "TableRowResourceDataType", - "TableRowResourceIdentifier", "TagsEventAttribute", "Team", "TeamAttributes", diff --git a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen index 63e0f66692..106c0df992 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-10T09:23:50.780Z \ No newline at end of file +2026-03-11T14:49:58.105Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml index 5b4e8f9fd6..ea6dcd389b 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1765358630","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1773240598","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"24d967fe-1dec-4957-bf77-7eda18a65d47","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:50.813397Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1765358630","service":"my-service","updated_at":"2025-12-10T09:23:50.813397Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"2f5dd6f5-d95a-484e-854d-deef73efb664","type":"deployment_gate","attributes":{"created_at":"2026-03-11T14:49:58.708133Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1773240598","service":"my-service","updated_at":"2026-03-11T14:49:58.708133Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/2f5dd6f5-d95a-484e-854d-deef73efb664/rules response: body: - string: '{"data":{"id":"ebe85a93-a82d-49ec-8925-6d3d569012bb","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:50.871951Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"24d967fe-1dec-4957-bf77-7eda18a65d47","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:50.871951Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"cd2c3087-0e8b-4696-a8a1-7af14e218e46","type":"deployment_rule","attributes":{"created_at":"2026-03-11T14:49:59.023723Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"2f5dd6f5-d95a-484e-854d-deef73efb664","name":"My + deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection","updated_at":"2026-03-11T14:49:59.023723Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -46,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47/rules/ebe85a93-a82d-49ec-8925-6d3d569012bb + uri: https://api.datadoghq.com/api/v2/deployment_gates/2f5dd6f5-d95a-484e-854d-deef73efb664/rules/cd2c3087-0e8b-4696-a8a1-7af14e218e46 response: body: string: '' @@ -60,7 +60,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47 + uri: https://api.datadoghq.com/api/v2/deployment_gates/2f5dd6f5-d95a-484e-854d-deef73efb664 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen index 3a24fa1404..96c9be060e 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-10T09:23:51.998Z \ No newline at end of file +2026-03-11T14:49:59.730Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml index 0b5c6caf5c..b7371d4848 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1765358631","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1773240599","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"6177e46c-44dc-453d-8af8-8af86aa93c29","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:52.029575Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1765358631","service":"my-service","updated_at":"2025-12-10T09:23:52.029575Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"90ad7166-3050-4215-8613-4d7c6b4dda91","type":"deployment_gate","attributes":{"created_at":"2026-03-11T14:49:59.951101Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1773240599","service":"my-service","updated_at":"2026-03-11T14:49:59.951101Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/90ad7166-3050-4215-8613-4d7c6b4dda91/rules response: body: - string: '{"data":{"id":"38e32cd3-d245-49c1-85c5-b039ef868a18","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.079318Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"6177e46c-44dc-453d-8af8-8af86aa93c29","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.079318Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"734c6f92-ac07-42ea-afbb-84a1f5971b57","type":"deployment_rule","attributes":{"created_at":"2026-03-11T14:50:00.24535Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"90ad7166-3050-4215-8613-4d7c6b4dda91","name":"My + deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection","updated_at":"2026-03-11T14:50:00.24535Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -46,12 +46,12 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules/38e32cd3-d245-49c1-85c5-b039ef868a18 + uri: https://api.datadoghq.com/api/v2/deployment_gates/90ad7166-3050-4215-8613-4d7c6b4dda91/rules/734c6f92-ac07-42ea-afbb-84a1f5971b57 response: body: - string: '{"data":{"id":"38e32cd3-d245-49c1-85c5-b039ef868a18","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.079318Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"6177e46c-44dc-453d-8af8-8af86aa93c29","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.079318Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"734c6f92-ac07-42ea-afbb-84a1f5971b57","type":"deployment_rule","attributes":{"created_at":"2026-03-11T14:50:00.24535Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"90ad7166-3050-4215-8613-4d7c6b4dda91","name":"My + deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection","updated_at":"2026-03-11T14:50:00.24535Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -65,7 +65,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules/38e32cd3-d245-49c1-85c5-b039ef868a18 + uri: https://api.datadoghq.com/api/v2/deployment_gates/90ad7166-3050-4215-8613-4d7c6b4dda91/rules/734c6f92-ac07-42ea-afbb-84a1f5971b57 response: body: string: '' @@ -79,7 +79,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29 + uri: https://api.datadoghq.com/api/v2/deployment_gates/90ad7166-3050-4215-8613-4d7c6b4dda91 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen index aceddb95a6..e74a02fe59 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-10T09:23:52.700Z \ No newline at end of file +2026-03-11T14:50:01.182Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml index 6e79da9d12..419c6b8538 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1765358632","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1773240601","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"3acb9ac2-abba-4579-8697-79493b221d41","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:52.735765Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1765358632","service":"my-service","updated_at":"2025-12-10T09:23:52.735765Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ad028916-c8f6-4489-bce4-f6216adfc63e","type":"deployment_gate","attributes":{"created_at":"2026-03-11T14:50:01.37369Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1773240601","service":"my-service","updated_at":"2026-03-11T14:50:01.37369Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/ad028916-c8f6-4489-bce4-f6216adfc63e/rules response: body: - string: '{"data":{"id":"ee04f24f-a980-4a28-a839-29911a632978","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.782282Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"3acb9ac2-abba-4579-8697-79493b221d41","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.782282Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"930a603b-c799-4749-a465-3a9b4beb7dfb","type":"deployment_rule","attributes":{"created_at":"2026-03-11T14:50:01.635616Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"ad028916-c8f6-4489-bce4-f6216adfc63e","name":"My + deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection","updated_at":"2026-03-11T14:50:01.635616Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -48,12 +48,12 @@ interactions: content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules/ee04f24f-a980-4a28-a839-29911a632978 + uri: https://api.datadoghq.com/api/v2/deployment_gates/ad028916-c8f6-4489-bce4-f6216adfc63e/rules/930a603b-c799-4749-a465-3a9b4beb7dfb response: body: - string: '{"data":{"id":"ee04f24f-a980-4a28-a839-29911a632978","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.782282Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"3acb9ac2-abba-4579-8697-79493b221d41","name":"Updated - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.843771Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"930a603b-c799-4749-a465-3a9b4beb7dfb","type":"deployment_rule","attributes":{"created_at":"2026-03-11T14:50:01.635616Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"ad028916-c8f6-4489-bce4-f6216adfc63e","name":"Updated + deployment rule","options":{"excluded_resources":[]},"type":"faulty_deployment_detection","updated_at":"2026-03-11T14:50:01.929612Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -67,7 +67,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules/ee04f24f-a980-4a28-a839-29911a632978 + uri: https://api.datadoghq.com/api/v2/deployment_gates/ad028916-c8f6-4489-bce4-f6216adfc63e/rules/930a603b-c799-4749-a465-3a9b4beb7dfb response: body: string: '' @@ -81,7 +81,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41 + uri: https://api.datadoghq.com/api/v2/deployment_gates/ad028916-c8f6-4489-bce4-f6216adfc63e response: body: string: '' diff --git a/tests/v2/features/deployment_gates.feature b/tests/v2/features/deployment_gates.feature index cb0c5a1262..7dc5575c56 100644 --- a/tests/v2/features/deployment_gates.feature +++ b/tests/v2/features/deployment_gates.feature @@ -62,6 +62,7 @@ Feature: Deployment Gates And body with value {"data": {"attributes": {"dry_run": false, "name": "My deployment rule", "options": {"excluded_resources": []}, "type": "faulty_deployment_detection"}, "type": "deployment_rule"}} When the request is sent Then the response status is 200 OK + And the response "data.attributes.options.excluded_resources" is equal to [] @team:DataDog/ci-app-backend Scenario: Delete deployment gate returns "Bad Request" response @@ -206,6 +207,7 @@ Feature: Deployment Gates And request contains "id" parameter from "deployment_rule.data.id" When the request is sent Then the response status is 200 OK + And the response "data.attributes.options.excluded_resources" is equal to [] @generated @skip @team:DataDog/ci-app-backend Scenario: Get rules for a deployment gate returns "Bad request." response @@ -304,3 +306,4 @@ Feature: Deployment Gates And body with value {"data": {"attributes": {"dry_run": false, "name": "Updated deployment rule", "options": {"excluded_resources": []}}, "type": "deployment_rule"}} When the request is sent Then the response status is 200 OK + And the response "data.attributes.options.excluded_resources" is equal to [] diff --git a/tests/v2/features/reference_tables.feature b/tests/v2/features/reference_tables.feature index 0ba8738c6b..db0f84a6e5 100644 --- a/tests/v2/features/reference_tables.feature +++ b/tests/v2/features/reference_tables.feature @@ -7,27 +7,6 @@ Feature: Reference Tables And a valid "appKeyAuth" key in the system And an instance of "ReferenceTables" API - @generated @skip @team:DataDog/redapl-experiences - Scenario: Batch rows query returns "Bad Request" response - Given new "BatchRowsQuery" request - And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/redapl-experiences - Scenario: Batch rows query returns "Not Found" response - Given new "BatchRowsQuery" request - And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/redapl-experiences - Scenario: Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section." response - Given new "BatchRowsQuery" request - And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}} - When the request is sent - Then the response status is 200 Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section. - @generated @skip @team:DataDog/redapl-experiences Scenario: Create reference table returns "Bad Request" response Given new "CreateReferenceTable" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index a04c9b283b..e33094f9f8 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -3963,12 +3963,6 @@ "type": "idempotent" } }, - "BatchRowsQuery": { - "tag": "Reference Tables", - "undo": { - "type": "safe" - } - }, "ListTables": { "tag": "Reference Tables", "undo": {