diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a27042d9b8..b5c3f6a5a0 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 @@ -67019,18 +66953,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: @@ -68309,6 +68231,8 @@ components: properties: frequency: $ref: '#/components/schemas/TeamSyncAttributesFrequency' + selection_state: + $ref: '#/components/schemas/TeamSyncAttributesSelectionState' source: $ref: '#/components/schemas/TeamSyncAttributesSource' sync_membership: @@ -68332,6 +68256,15 @@ components: - ONCE - CONTINUOUSLY - PAUSED + TeamSyncAttributesSelectionState: + description: 'Specifies which teams or organizations to sync. When + + provided, synchronization is limited to the specified + + items and their subtrees.' + items: + $ref: '#/components/schemas/TeamSyncSelectionStateItem' + type: array TeamSyncAttributesSource: description: The external source platform for team synchronization. Only "github" is supported. @@ -68342,6 +68275,7 @@ components: x-enum-varnames: - GITHUB TeamSyncAttributesSyncMembership: + default: false description: Whether to sync members from the external team to the Datadog team. Defaults to `false` when not provided. example: true @@ -68404,6 +68338,78 @@ components: $ref: '#/components/schemas/TeamSyncData' type: array type: object + TeamSyncSelectionStateExternalId: + description: The external identifier for a team or organization in the source + platform. + properties: + type: + $ref: '#/components/schemas/TeamSyncSelectionStateExternalIdType' + value: + $ref: '#/components/schemas/TeamSyncSelectionStateExternalIdValue' + required: + - type + - value + type: object + TeamSyncSelectionStateExternalIdType: + description: 'The type of external identifier for the selection state item. + + For GitHub synchronization, the allowed values are `team` and + + `organization`.' + enum: + - team + - organization + example: team + type: string + x-enum-varnames: + - TEAM + - ORGANIZATION + TeamSyncSelectionStateExternalIdValue: + description: 'The external identifier value from the source + + platform. For GitHub, this is the string + + representation of a GitHub organization ID or team + + ID.' + example: '1' + type: string + TeamSyncSelectionStateItem: + description: Identifies a team or organization hierarchy to include in synchronization. + properties: + external_id: + $ref: '#/components/schemas/TeamSyncSelectionStateExternalId' + operation: + $ref: '#/components/schemas/TeamSyncSelectionStateOperation' + scope: + $ref: '#/components/schemas/TeamSyncSelectionStateScope' + required: + - external_id + type: object + TeamSyncSelectionStateOperation: + description: 'The operation to perform on the selected hierarchy. + + When set to `include`, synchronization covers the + + referenced teams or organizations.' + enum: + - include + example: include + type: string + x-enum-varnames: + - INCLUDE + TeamSyncSelectionStateScope: + description: 'The scope of the selection. When set to `subtree`, + + synchronization includes the referenced team or + + organization and everything nested under it.' + enum: + - subtree + example: subtree + type: string + x-enum-varnames: + - SUBTREE TeamTarget: description: Represents a team target for an escalation policy step, including the team's ID and resource type. @@ -96466,57 +96472,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. @@ -108064,12 +108019,6 @@ paths: description: OK '403': $ref: '#/components/responses/ForbiddenResponse' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Team sync configurations not found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: @@ -108085,8 +108034,8 @@ paths: permissions: - teams_read post: - description: 'This endpoint attempts to link your existing Datadog teams with - GitHub teams by matching their names. + description: 'This endpoint configures synchronization between your existing + Datadog teams and GitHub teams by matching their names. It evaluates all current Datadog teams and compares them against teams in the GitHub organization @@ -108101,6 +108050,13 @@ paths: or created. + Optionally, provide `selection_state` to limit synchronization + + to specific teams or organizations and their subtrees, instead + + of syncing all teams. + + [A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/), and the GitHub App integrated with Datadog must have the `Members Read` permission. @@ -108122,6 +108078,8 @@ paths: responses: '200': description: OK + '204': + description: No Content '403': $ref: '#/components/responses/ForbiddenResponse' '429': diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index f5afeb297a..5eb8e281a9 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: @@ -29355,13 +29306,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 ----------------------------------------------------------- @@ -30076,6 +30020,41 @@ datadog\_api\_client.v2.model.team\_sync\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.team\_sync\_selection\_state\_external\_id module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_external_id + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.team\_sync\_selection\_state\_external\_id\_type module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_external_id_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.team\_sync\_selection\_state\_item module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.team\_sync\_selection\_state\_operation module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_operation + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.team\_sync\_selection\_state\_scope module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_scope + :members: + :show-inheritance: + datadog\_api\_client.v2.model.team\_target 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/examples/v2/teams/SyncTeams_3215592344.py b/examples/v2/teams/SyncTeams_3215592344.py deleted file mode 100644 index 18e47d2f42..0000000000 --- a/examples/v2/teams/SyncTeams_3215592344.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Sync teams returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.teams_api import TeamsApi -from datadog_api_client.v2.model.team_sync_attributes import TeamSyncAttributes -from datadog_api_client.v2.model.team_sync_attributes_source import TeamSyncAttributesSource -from datadog_api_client.v2.model.team_sync_attributes_type import TeamSyncAttributesType -from datadog_api_client.v2.model.team_sync_bulk_type import TeamSyncBulkType -from datadog_api_client.v2.model.team_sync_data import TeamSyncData -from datadog_api_client.v2.model.team_sync_request import TeamSyncRequest - -body = TeamSyncRequest( - data=TeamSyncData( - attributes=TeamSyncAttributes( - source=TeamSyncAttributesSource.GITHUB, - type=TeamSyncAttributesType.LINK, - ), - type=TeamSyncBulkType.TEAM_SYNC_BULK, - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = TeamsApi(api_client) - api_instance.sync_teams(body=body) 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/api/teams_api.py b/src/datadog_api_client/v2/api/teams_api.py index e5b6af700e..f0cea6d425 100644 --- a/src/datadog_api_client/v2/api/teams_api.py +++ b/src/datadog_api_client/v2/api/teams_api.py @@ -1972,13 +1972,17 @@ def sync_teams( ) -> None: """Link Teams with GitHub Teams. - This endpoint attempts to link your existing Datadog teams with GitHub teams by matching their names. + This endpoint configures synchronization between your existing Datadog teams and GitHub teams by matching their names. It evaluates all current Datadog teams and compares them against teams in the GitHub organization connected to your Datadog account, based on Datadog Team handle and GitHub Team slug (lowercased and kebab-cased). This operation is read-only on the GitHub side, no teams will be modified or created. + Optionally, provide ``selection_state`` to limit synchronization + to specific teams or organizations and their subtrees, instead + of syncing all teams. + `A GitHub organization must be connected to your Datadog account `_ , and the GitHub App integrated with Datadog must have the ``Members Read`` permission. Matching is performed by comparing the Datadog team handle to the GitHub team slug using a normalized exact match; case is ignored and spaces are removed. No modifications are made 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_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/team_sync_attributes.py b/src/datadog_api_client/v2/model/team_sync_attributes.py index fe18232f01..431ae8de98 100644 --- a/src/datadog_api_client/v2/model/team_sync_attributes.py +++ b/src/datadog_api_client/v2/model/team_sync_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -15,6 +15,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.team_sync_attributes_frequency import TeamSyncAttributesFrequency + from datadog_api_client.v2.model.team_sync_selection_state_item import TeamSyncSelectionStateItem from datadog_api_client.v2.model.team_sync_attributes_source import TeamSyncAttributesSource from datadog_api_client.v2.model.team_sync_attributes_type import TeamSyncAttributesType @@ -23,11 +24,13 @@ class TeamSyncAttributes(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.team_sync_attributes_frequency import TeamSyncAttributesFrequency + from datadog_api_client.v2.model.team_sync_selection_state_item import TeamSyncSelectionStateItem from datadog_api_client.v2.model.team_sync_attributes_source import TeamSyncAttributesSource from datadog_api_client.v2.model.team_sync_attributes_type import TeamSyncAttributesType return { "frequency": (TeamSyncAttributesFrequency,), + "selection_state": ([TeamSyncSelectionStateItem],), "source": (TeamSyncAttributesSource,), "sync_membership": (bool,), "type": (TeamSyncAttributesType,), @@ -35,6 +38,7 @@ def openapi_types(_): attribute_map = { "frequency": "frequency", + "selection_state": "selection_state", "source": "source", "sync_membership": "sync_membership", "type": "type", @@ -45,6 +49,7 @@ def __init__( source: TeamSyncAttributesSource, type: TeamSyncAttributesType, frequency: Union[TeamSyncAttributesFrequency, UnsetType] = unset, + selection_state: Union[List[TeamSyncSelectionStateItem], UnsetType] = unset, sync_membership: Union[bool, UnsetType] = unset, **kwargs, ): @@ -54,6 +59,11 @@ def __init__( :param frequency: How often the sync process should be run. Defaults to ``once`` when not provided. :type frequency: TeamSyncAttributesFrequency, optional + :param selection_state: Specifies which teams or organizations to sync. When + provided, synchronization is limited to the specified + items and their subtrees. + :type selection_state: [TeamSyncSelectionStateItem], optional + :param source: The external source platform for team synchronization. Only "github" is supported. :type source: TeamSyncAttributesSource @@ -65,6 +75,8 @@ def __init__( """ if frequency is not unset: kwargs["frequency"] = frequency + if selection_state is not unset: + kwargs["selection_state"] = selection_state if sync_membership is not unset: kwargs["sync_membership"] = sync_membership super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/team_sync_selection_state_external_id.py b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id.py new file mode 100644 index 0000000000..b36dd1e491 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id.py @@ -0,0 +1,55 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_sync_selection_state_external_id_type import ( + TeamSyncSelectionStateExternalIdType, + ) + + +class TeamSyncSelectionStateExternalId(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_sync_selection_state_external_id_type import ( + TeamSyncSelectionStateExternalIdType, + ) + + return { + "type": (TeamSyncSelectionStateExternalIdType,), + "value": (str,), + } + + attribute_map = { + "type": "type", + "value": "value", + } + + def __init__(self_, type: TeamSyncSelectionStateExternalIdType, value: str, **kwargs): + """ + The external identifier for a team or organization in the source platform. + + :param type: The type of external identifier for the selection state item. + For GitHub synchronization, the allowed values are ``team`` and + ``organization``. + :type type: TeamSyncSelectionStateExternalIdType + + :param value: The external identifier value from the source + platform. For GitHub, this is the string + representation of a GitHub organization ID or team + ID. + :type value: str + """ + super().__init__(kwargs) + + self_.type = type + self_.value = value diff --git a/src/datadog_api_client/v2/model/team_sync_selection_state_external_id_type.py b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id_type.py new file mode 100644 index 0000000000..68d4e2c90e --- /dev/null +++ b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id_type.py @@ -0,0 +1,40 @@ +# 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 TeamSyncSelectionStateExternalIdType(ModelSimple): + """ + The type of external identifier for the selection state item. + For GitHub synchronization, the allowed values are `team` and + `organization`. + + :param value: Must be one of ["team", "organization"]. + :type value: str + """ + + allowed_values = { + "team", + "organization", + } + TEAM: ClassVar["TeamSyncSelectionStateExternalIdType"] + ORGANIZATION: ClassVar["TeamSyncSelectionStateExternalIdType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TeamSyncSelectionStateExternalIdType.TEAM = TeamSyncSelectionStateExternalIdType("team") +TeamSyncSelectionStateExternalIdType.ORGANIZATION = TeamSyncSelectionStateExternalIdType("organization") diff --git a/src/datadog_api_client/v2/model/team_sync_selection_state_item.py b/src/datadog_api_client/v2/model/team_sync_selection_state_item.py new file mode 100644 index 0000000000..c548f3f103 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_sync_selection_state_item.py @@ -0,0 +1,70 @@ +# 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.team_sync_selection_state_external_id import TeamSyncSelectionStateExternalId + from datadog_api_client.v2.model.team_sync_selection_state_operation import TeamSyncSelectionStateOperation + from datadog_api_client.v2.model.team_sync_selection_state_scope import TeamSyncSelectionStateScope + + +class TeamSyncSelectionStateItem(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_sync_selection_state_external_id import TeamSyncSelectionStateExternalId + from datadog_api_client.v2.model.team_sync_selection_state_operation import TeamSyncSelectionStateOperation + from datadog_api_client.v2.model.team_sync_selection_state_scope import TeamSyncSelectionStateScope + + return { + "external_id": (TeamSyncSelectionStateExternalId,), + "operation": (TeamSyncSelectionStateOperation,), + "scope": (TeamSyncSelectionStateScope,), + } + + attribute_map = { + "external_id": "external_id", + "operation": "operation", + "scope": "scope", + } + + def __init__( + self_, + external_id: TeamSyncSelectionStateExternalId, + operation: Union[TeamSyncSelectionStateOperation, UnsetType] = unset, + scope: Union[TeamSyncSelectionStateScope, UnsetType] = unset, + **kwargs, + ): + """ + Identifies a team or organization hierarchy to include in synchronization. + + :param external_id: The external identifier for a team or organization in the source platform. + :type external_id: TeamSyncSelectionStateExternalId + + :param operation: The operation to perform on the selected hierarchy. + When set to ``include`` , synchronization covers the + referenced teams or organizations. + :type operation: TeamSyncSelectionStateOperation, optional + + :param scope: The scope of the selection. When set to ``subtree`` , + synchronization includes the referenced team or + organization and everything nested under it. + :type scope: TeamSyncSelectionStateScope, optional + """ + if operation is not unset: + kwargs["operation"] = operation + if scope is not unset: + kwargs["scope"] = scope + super().__init__(kwargs) + + self_.external_id = external_id diff --git a/src/datadog_api_client/v2/model/batch_rows_query_data_type.py b/src/datadog_api_client/v2/model/team_sync_selection_state_operation.py similarity index 53% rename from src/datadog_api_client/v2/model/batch_rows_query_data_type.py rename to src/datadog_api_client/v2/model/team_sync_selection_state_operation.py index 4f54ac4a24..f5068c4811 100644 --- a/src/datadog_api_client/v2/model/batch_rows_query_data_type.py +++ b/src/datadog_api_client/v2/model/team_sync_selection_state_operation.py @@ -12,18 +12,20 @@ from typing import ClassVar -class BatchRowsQueryDataType(ModelSimple): +class TeamSyncSelectionStateOperation(ModelSimple): """ - Resource type identifier for batch queries of reference table rows. + The operation to perform on the selected hierarchy. + When set to `include`, synchronization covers the + referenced teams or organizations. - :param value: If omitted defaults to "reference-tables-batch-rows-query". Must be one of ["reference-tables-batch-rows-query"]. + :param value: If omitted defaults to "include". Must be one of ["include"]. :type value: str """ allowed_values = { - "reference-tables-batch-rows-query", + "include", } - REFERENCE_TABLES_BATCH_ROWS_QUERY: ClassVar["BatchRowsQueryDataType"] + INCLUDE: ClassVar["TeamSyncSelectionStateOperation"] @cached_property def openapi_types(_): @@ -32,4 +34,4 @@ def openapi_types(_): } -BatchRowsQueryDataType.REFERENCE_TABLES_BATCH_ROWS_QUERY = BatchRowsQueryDataType("reference-tables-batch-rows-query") +TeamSyncSelectionStateOperation.INCLUDE = TeamSyncSelectionStateOperation("include") diff --git a/src/datadog_api_client/v2/model/team_sync_selection_state_scope.py b/src/datadog_api_client/v2/model/team_sync_selection_state_scope.py new file mode 100644 index 0000000000..5518b78d8e --- /dev/null +++ b/src/datadog_api_client/v2/model/team_sync_selection_state_scope.py @@ -0,0 +1,37 @@ +# 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 TeamSyncSelectionStateScope(ModelSimple): + """ + The scope of the selection. When set to `subtree`, + synchronization includes the referenced team or + organization and everything nested under it. + + :param value: If omitted defaults to "subtree". Must be one of ["subtree"]. + :type value: str + """ + + allowed_values = { + "subtree", + } + SUBTREE: ClassVar["TeamSyncSelectionStateScope"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TeamSyncSelectionStateScope.SUBTREE = TeamSyncSelectionStateScope("subtree") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index ac4604fa22..9d47c8ac75 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 @@ -5980,7 +5969,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 @@ -6105,6 +6093,11 @@ from datadog_api_client.v2.model.team_sync_data import TeamSyncData from datadog_api_client.v2.model.team_sync_request import TeamSyncRequest from datadog_api_client.v2.model.team_sync_response import TeamSyncResponse +from datadog_api_client.v2.model.team_sync_selection_state_external_id import TeamSyncSelectionStateExternalId +from datadog_api_client.v2.model.team_sync_selection_state_external_id_type import TeamSyncSelectionStateExternalIdType +from datadog_api_client.v2.model.team_sync_selection_state_item import TeamSyncSelectionStateItem +from datadog_api_client.v2.model.team_sync_selection_state_operation import TeamSyncSelectionStateOperation +from datadog_api_client.v2.model.team_sync_selection_state_scope import TeamSyncSelectionStateScope from datadog_api_client.v2.model.team_target import TeamTarget from datadog_api_client.v2.model.team_target_type import TeamTargetType from datadog_api_client.v2.model.team_type import TeamType @@ -6857,14 +6850,7 @@ "AzureUCConfigPostRequestType", "AzureUCConfigsResponse", "BatchDeleteRowsRequestArray", - "BatchRowsQueryDataType", - "BatchRowsQueryRequest", - "BatchRowsQueryRequestData", - "BatchRowsQueryRequestDataAttributes", - "BatchRowsQueryResponse", - "BatchRowsQueryResponseData", - "BatchRowsQueryResponseDataRelationships", - "BatchRowsQueryResponseDataRelationshipsRows", + "BatchDeleteRowsRequestData", "BatchUpsertRowsRequestArray", "BatchUpsertRowsRequestData", "BatchUpsertRowsRequestDataAttributes", @@ -10665,7 +10651,6 @@ "TableRowResourceData", "TableRowResourceDataAttributes", "TableRowResourceDataType", - "TableRowResourceIdentifier", "TagsEventAttribute", "Team", "TeamAttributes", @@ -10768,6 +10753,11 @@ "TeamSyncData", "TeamSyncRequest", "TeamSyncResponse", + "TeamSyncSelectionStateExternalId", + "TeamSyncSelectionStateExternalIdType", + "TeamSyncSelectionStateItem", + "TeamSyncSelectionStateOperation", + "TeamSyncSelectionStateScope", "TeamTarget", "TeamTargetType", "TeamType", diff --git a/tests/v2/cassettes/test_scenarios/test_get_team_sync_configurations_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_team_sync_configurations_returns_ok_response.frozen new file mode 100644 index 0000000000..1332175b3b --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_team_sync_configurations_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-03-04T16:01:00.945Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_team_sync_configurations_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_team_sync_configurations_returns_ok_response.yaml new file mode 100644 index 0000000000..32050b75d8 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_team_sync_configurations_returns_ok_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/team/sync?filter%5Bsource%5D=github + response: + body: + string: '{"data":[{"id":"3d33cc55-aea4-4801-bb75-139d347298c9","type":"team_sync_bulk","attributes":{"frequency":"once","selection_state":[{"external_id":{"type":"organization","value":"1"},"operation":"include","scope":"subtree"}],"source":"github","sync_membership":false,"type":"link"}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_link_teams_with_github_teams_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_link_teams_with_github_teams_returns_no_content_response.frozen new file mode 100644 index 0000000000..8e230ad671 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_link_teams_with_github_teams_returns_no_content_response.frozen @@ -0,0 +1 @@ +2026-03-04T16:01:34.366Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_sync_teams_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_link_teams_with_github_teams_returns_no_content_response.yaml similarity index 51% rename from tests/v2/cassettes/test_scenarios/test_sync_teams_returns_ok_response.yaml rename to tests/v2/cassettes/test_scenarios/test_link_teams_with_github_teams_returns_no_content_response.yaml index 53217b4c1c..2c763c4501 100644 --- a/tests/v2/cassettes/test_scenarios/test_sync_teams_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_link_teams_with_github_teams_returns_no_content_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"source":"github","type":"link"},"type":"team_sync_bulk"}}' + body: '{"data":{"attributes":{"selection_state":[{"external_id":{"type":"organization","value":"1"}}],"source":"github","type":"link"},"type":"team_sync_bulk"}}' headers: accept: - '*/*' @@ -11,10 +11,8 @@ interactions: response: body: string: '' - headers: - content-type: - - text/plain + headers: {} status: - code: 200 - message: OK + code: 204 + message: No Content version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_sync_teams_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_sync_teams_returns_ok_response.frozen deleted file mode 100644 index 8723edd4fb..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_sync_teams_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-15T17:48:19.712Z \ No newline at end of file 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/teams.feature b/tests/v2/features/teams.feature index 26bf0130d4..480e3215e9 100644 --- a/tests/v2/features/teams.feature +++ b/tests/v2/features/teams.feature @@ -431,20 +431,13 @@ Feature: Teams Then the response status is 200 OK And the response "data" has length 1 - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Get team sync configurations returns "OK" response Given new "GetTeamSync" request - And request contains "filter[source]" parameter from "REPLACE.ME" + And request contains "filter[source]" parameter with value "github" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-omg - Scenario: Get team sync configurations returns "Team sync configurations not found" response - Given new "GetTeamSync" request - And request contains "filter[source]" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Team sync configurations not found - @generated @skip @team:DataDog/aaa-omg Scenario: Get user memberships returns "API error response." response Given new "GetUserMemberships" request @@ -461,6 +454,13 @@ Feature: Teams Then the response status is 200 Represents a user's association to a team And the response "data" has length 0 + @team:DataDog/aaa-omg + Scenario: Link Teams with GitHub Teams returns "No Content" response + Given new "SyncTeams" request + And body with value {"data": {"attributes": {"source": "github", "type": "link", "selection_state": [{"external_id": {"type": "organization", "value": "1"}}]}, "type": "team_sync_bulk"}} + When the request is sent + Then the response status is 204 No Content + @generated @skip @team:DataDog/aaa-omg Scenario: Link Teams with GitHub Teams returns "OK" response Given new "SyncTeams" request @@ -582,13 +582,6 @@ Feature: Teams When the request is sent Then the response status is 204 No Content - @replay-only @team:DataDog/aaa-omg - Scenario: Sync teams returns "OK" response - Given new "SyncTeams" request - And body with value {"data": {"attributes": {"source": "github", "type": "link"}, "type": "team_sync_bulk"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/aaa-omg Scenario: Update a team link returns "API error response." response Given new "UpdateTeamLink" 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": {