From 7e5cf42642236c1eaad2aa1c0efa5f30eb804e94 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 7 May 2026 21:11:30 +0000 Subject: [PATCH] Regenerate client from commit 68371c5 of spec repo --- .generator/schemas/v2/openapi.yaml | 446 ------------------ docs/datadog_api_client.v2.api.rst | 7 - docs/datadog_api_client.v2.model.rst | 91 ---- .../v2/incident-teams/CreateIncidentTeam.py | 27 -- .../v2/incident-teams/DeleteIncidentTeam.py | 18 - examples/v2/incident-teams/GetIncidentTeam.py | 20 - .../v2/incident-teams/ListIncidentTeams.py | 20 - .../v2/incident-teams/UpdateIncidentTeam.py | 32 -- src/datadog_api_client/configuration.py | 5 - .../v2/api/incident_teams_api.py | 287 ----------- src/datadog_api_client/v2/apis/__init__.py | 2 - .../model/incident_team_create_attributes.py | 33 -- .../v2/model/incident_team_create_data.py | 69 --- .../v2/model/incident_team_create_request.py | 40 -- .../v2/model/incident_team_included_items.py | 47 -- .../v2/model/incident_team_relationships.py | 54 --- .../v2/model/incident_team_response.py | 60 --- .../incident_team_response_attributes.py | 61 --- .../v2/model/incident_team_response_data.py | 77 --- .../v2/model/incident_team_type.py | 35 -- .../model/incident_team_update_attributes.py | 33 -- .../v2/model/incident_team_update_data.py | 77 --- .../v2/model/incident_team_update_request.py | 40 -- .../v2/model/incident_teams_response.py | 71 --- src/datadog_api_client/v2/models/__init__.py | 26 - ...ident_team_returns_created_response.frozen | 1 - ...ncident_team_returns_created_response.yaml | 38 -- ...g_incident_team_returns_ok_response.frozen | 1 - ...ing_incident_team_returns_ok_response.yaml | 54 --- ..._incident_teams_returns_ok_response.frozen | 1 - ...ll_incident_teams_returns_ok_response.yaml | 56 --- ...n_incident_team_returns_ok_response.frozen | 1 - ..._an_incident_team_returns_ok_response.yaml | 56 --- ...g_incident_team_returns_ok_response.frozen | 1 - ...ing_incident_team_returns_ok_response.yaml | 58 --- tests/v2/features/given.json | 12 - tests/v2/features/incident_teams.feature | 146 ------ tests/v2/features/undo.json | 37 -- 38 files changed, 2140 deletions(-) delete mode 100644 examples/v2/incident-teams/CreateIncidentTeam.py delete mode 100644 examples/v2/incident-teams/DeleteIncidentTeam.py delete mode 100644 examples/v2/incident-teams/GetIncidentTeam.py delete mode 100644 examples/v2/incident-teams/ListIncidentTeams.py delete mode 100644 examples/v2/incident-teams/UpdateIncidentTeam.py delete mode 100644 src/datadog_api_client/v2/api/incident_teams_api.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_create_attributes.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_create_data.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_create_request.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_included_items.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_relationships.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_response.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_response_attributes.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_response_data.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_type.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_update_attributes.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_update_data.py delete mode 100644 src/datadog_api_client/v2/model/incident_team_update_request.py delete mode 100644 src/datadog_api_client/v2/model/incident_teams_response.py delete mode 100644 tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.yaml delete mode 100644 tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.yaml delete mode 100644 tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.yaml delete mode 100644 tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.yaml delete mode 100644 tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.yaml delete mode 100644 tests/v2/features/incident_teams.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 440627d7e6..a1bdb3e8a2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -698,28 +698,6 @@ components: schema: example: "ExampleServiceName" type: string - IncidentTeamIDPathParameter: - description: The ID of the incident team. - in: path - name: team_id - required: true - schema: - type: string - IncidentTeamIncludeQueryParameter: - description: Specifies which types of related objects should be included in the response. - in: query - name: "include" - required: false - schema: - $ref: "#/components/schemas/IncidentRelatedObject" - IncidentTeamSearchQueryParameter: - description: A search query that filters teams by name. - in: query - name: "filter" - required: false - schema: - example: "ExampleTeamName" - type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -34691,158 +34669,6 @@ components: - SEV_3 - SEV_4 - SEV_5 - IncidentTeamCreateAttributes: - description: The incident team's attributes for a create request. - properties: - name: - description: Name of the incident team. - example: "team name" - type: string - required: - - name - type: object - IncidentTeamCreateData: - description: Incident Team data for a create request. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamCreateAttributes" - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - required: - - type - type: object - IncidentTeamCreateRequest: - description: Create request with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamCreateData" - required: - - data - type: object - IncidentTeamIncludedItems: - description: An object related to an incident team which is present in the included payload. - oneOf: - - $ref: "#/components/schemas/User" - IncidentTeamRelationships: - description: The incident team's relationships. - properties: - created_by: - $ref: "#/components/schemas/RelationshipToUser" - last_modified_by: - $ref: "#/components/schemas/RelationshipToUser" - readOnly: true - type: object - IncidentTeamResponse: - description: Response with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamResponseData" - included: - description: Included objects from relationships. - items: - $ref: "#/components/schemas/IncidentTeamIncludedItems" - readOnly: true - type: array - required: - - data - type: object - IncidentTeamResponseAttributes: - description: The incident team's attributes from a response. - properties: - created: - description: Timestamp of when the incident team was created. - format: date-time - readOnly: true - type: string - modified: - description: Timestamp of when the incident team was modified. - format: date-time - readOnly: true - type: string - name: - description: Name of the incident team. - example: "team name" - type: string - type: object - IncidentTeamResponseData: - description: Incident Team data from a response. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamResponseAttributes" - id: - description: The incident team's ID. - example: "00000000-7ea3-0000-000a-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - type: object - IncidentTeamType: - default: teams - description: Incident Team resource type. - enum: - - teams - example: teams - type: string - x-enum-varnames: - - TEAMS - IncidentTeamUpdateAttributes: - description: The incident team's attributes for an update request. - properties: - name: - description: Name of the incident team. - example: "team name" - type: string - required: - - name - type: object - IncidentTeamUpdateData: - description: Incident Team data for an update request. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamUpdateAttributes" - id: - description: The incident team's ID. - example: "00000000-7ea3-0000-0001-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - required: - - type - type: object - IncidentTeamUpdateRequest: - description: Update request with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamUpdateData" - required: - - data - type: object - IncidentTeamsResponse: - description: Response with a list of incident team payloads. - properties: - data: - description: An array of incident teams. - example: [{"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0000-000000000000", "type": "teams"}] - items: - $ref: "#/components/schemas/IncidentTeamResponseData" - type: array - included: - description: Included related resources which the user requested. - items: - $ref: "#/components/schemas/IncidentTeamIncludedItems" - readOnly: true - type: array - meta: - $ref: "#/components/schemas/IncidentResponseMeta" - required: - - data - type: "object" IncidentTimelineCellCreateAttributes: description: The timeline cell's attributes for a create request. oneOf: @@ -142701,276 +142527,6 @@ paths: operator: OR permissions: - teams_read - /api/v2/teams: - get: - deprecated: true - description: >- - Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. - operationId: ListIncidentTeams - parameters: - - $ref: "#/components/parameters/IncidentTeamIncludeQueryParameter" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/PageOffset" - - $ref: "#/components/parameters/IncidentTeamSearchQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000002 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamsResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get a list of all incident teams - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - post: - deprecated: true - description: Creates a new incident team. - operationId: CreateIncidentTeam - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamCreateRequest" - description: Incident Team Payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000001 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: CREATED - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Create a new incident team - tags: - - Incident Teams - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - /api/v2/teams/{team_id}: - delete: - deprecated: true - description: Deletes an existing incident team. - operationId: DeleteIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - responses: - "204": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Delete an existing incident team - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - get: - deprecated: true - description: |- - Get details of an incident team. If the `include[users]` query parameter is provided, - the included attribute will contain the users related to these incident teams. - operationId: GetIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - - $ref: "#/components/parameters/IncidentTeamIncludeQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000004 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get details of an incident team - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - patch: - deprecated: true - description: >- - Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. - operationId: UpdateIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-7ea3-0000-0001-000000000000 - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamUpdateRequest" - description: Incident Team Payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000003 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Update an existing incident team - tags: - - Incident Teams - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). /api/v2/test/flaky-test-management/tests: patch: description: |- @@ -145709,8 +145265,6 @@ tags: name: IP Allowlist - description: Create, update, delete, and retrieve services which can be associated with incidents. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incident Services - - description: The Incident Teams endpoints are deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/) to create, update, delete, and retrieve teams which can be associated with incidents. - name: Incident Teams - description: Manage incident response, as well as associated attachments, metadata, and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incidents - description: |- diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 79ecbd0439..eadbd91123 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -347,13 +347,6 @@ datadog\_api\_client.v2.api.incident\_services\_api module :members: :show-inheritance: -datadog\_api\_client.v2.api.incident\_teams\_api module -------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.api.incident_teams_api - :members: - :show-inheritance: - datadog\_api\_client.v2.api.incidents\_api module ------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index a897eca3b3..24c76a55e1 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -14613,97 +14613,6 @@ datadog\_api\_client.v2.model.incident\_severity module :members: :show-inheritance: -datadog\_api\_client.v2.model.incident\_team\_create\_attributes module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.incident_team_create_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_create\_data module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.incident_team_create_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_create\_request module --------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_create_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_included\_items module --------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_included_items - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_relationships module ------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_relationships - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_response module -------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_response\_attributes module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_response_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_response\_data module -------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_response_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_type module ---------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_update\_attributes module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.incident_team_update_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_update\_data module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.incident_team_update_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_team\_update\_request module --------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_team_update_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_teams\_response module --------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_teams_response - :members: - :show-inheritance: - datadog\_api\_client.v2.model.incident\_timeline\_cell\_create\_attributes module --------------------------------------------------------------------------------- diff --git a/examples/v2/incident-teams/CreateIncidentTeam.py b/examples/v2/incident-teams/CreateIncidentTeam.py deleted file mode 100644 index 5d44ae9740..0000000000 --- a/examples/v2/incident-teams/CreateIncidentTeam.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Create a new incident team returns "CREATED" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.incident_teams_api import IncidentTeamsApi -from datadog_api_client.v2.model.incident_team_create_attributes import IncidentTeamCreateAttributes -from datadog_api_client.v2.model.incident_team_create_data import IncidentTeamCreateData -from datadog_api_client.v2.model.incident_team_create_request import IncidentTeamCreateRequest -from datadog_api_client.v2.model.incident_team_type import IncidentTeamType - -body = IncidentTeamCreateRequest( - data=IncidentTeamCreateData( - type=IncidentTeamType.TEAMS, - attributes=IncidentTeamCreateAttributes( - name="Example-Incident-Team", - ), - ), -) - -configuration = Configuration() -configuration.unstable_operations["create_incident_team"] = True -with ApiClient(configuration) as api_client: - api_instance = IncidentTeamsApi(api_client) - response = api_instance.create_incident_team(body=body) - - print(response) diff --git a/examples/v2/incident-teams/DeleteIncidentTeam.py b/examples/v2/incident-teams/DeleteIncidentTeam.py deleted file mode 100644 index 23964ec61e..0000000000 --- a/examples/v2/incident-teams/DeleteIncidentTeam.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Delete an existing incident team returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.incident_teams_api import IncidentTeamsApi - -# there is a valid "team" in the system -TEAM_DATA_ID = environ["TEAM_DATA_ID"] - -configuration = Configuration() -configuration.unstable_operations["delete_incident_team"] = True -with ApiClient(configuration) as api_client: - api_instance = IncidentTeamsApi(api_client) - api_instance.delete_incident_team( - team_id=TEAM_DATA_ID, - ) diff --git a/examples/v2/incident-teams/GetIncidentTeam.py b/examples/v2/incident-teams/GetIncidentTeam.py deleted file mode 100644 index 5ab29e39b7..0000000000 --- a/examples/v2/incident-teams/GetIncidentTeam.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Get details of an incident team returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.incident_teams_api import IncidentTeamsApi - -# there is a valid "team" in the system -TEAM_DATA_ID = environ["TEAM_DATA_ID"] - -configuration = Configuration() -configuration.unstable_operations["get_incident_team"] = True -with ApiClient(configuration) as api_client: - api_instance = IncidentTeamsApi(api_client) - response = api_instance.get_incident_team( - team_id=TEAM_DATA_ID, - ) - - print(response) diff --git a/examples/v2/incident-teams/ListIncidentTeams.py b/examples/v2/incident-teams/ListIncidentTeams.py deleted file mode 100644 index b671c07ee8..0000000000 --- a/examples/v2/incident-teams/ListIncidentTeams.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Get a list of all incident teams returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.incident_teams_api import IncidentTeamsApi - -# there is a valid "team" in the system -TEAM_DATA_ATTRIBUTES_NAME = environ["TEAM_DATA_ATTRIBUTES_NAME"] - -configuration = Configuration() -configuration.unstable_operations["list_incident_teams"] = True -with ApiClient(configuration) as api_client: - api_instance = IncidentTeamsApi(api_client) - response = api_instance.list_incident_teams( - filter=TEAM_DATA_ATTRIBUTES_NAME, - ) - - print(response) diff --git a/examples/v2/incident-teams/UpdateIncidentTeam.py b/examples/v2/incident-teams/UpdateIncidentTeam.py deleted file mode 100644 index 31fb7af119..0000000000 --- a/examples/v2/incident-teams/UpdateIncidentTeam.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Update an existing incident team returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.incident_teams_api import IncidentTeamsApi -from datadog_api_client.v2.model.incident_team_type import IncidentTeamType -from datadog_api_client.v2.model.incident_team_update_attributes import IncidentTeamUpdateAttributes -from datadog_api_client.v2.model.incident_team_update_data import IncidentTeamUpdateData -from datadog_api_client.v2.model.incident_team_update_request import IncidentTeamUpdateRequest - -# there is a valid "team" in the system -TEAM_DATA_ATTRIBUTES_NAME = environ["TEAM_DATA_ATTRIBUTES_NAME"] -TEAM_DATA_ID = environ["TEAM_DATA_ID"] - -body = IncidentTeamUpdateRequest( - data=IncidentTeamUpdateData( - type=IncidentTeamType.TEAMS, - attributes=IncidentTeamUpdateAttributes( - name="team name-updated", - ), - ), -) - -configuration = Configuration() -configuration.unstable_operations["update_incident_team"] = True -with ApiClient(configuration) as api_client: - api_instance = IncidentTeamsApi(api_client) - response = api_instance.update_incident_team(team_id=TEAM_DATA_ID, body=body) - - print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 6e38061ac6..b48d1aba19 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -520,11 +520,6 @@ def __init__( "v2.add_member_team": False, "v2.list_member_teams": False, "v2.remove_member_team": False, - "v2.create_incident_team": False, - "v2.delete_incident_team": False, - "v2.get_incident_team": False, - "v2.list_incident_teams": False, - "v2.update_incident_team": False, } ) diff --git a/src/datadog_api_client/v2/api/incident_teams_api.py b/src/datadog_api_client/v2/api/incident_teams_api.py deleted file mode 100644 index 7a1b765b44..0000000000 --- a/src/datadog_api_client/v2/api/incident_teams_api.py +++ /dev/null @@ -1,287 +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 Any, Dict, Union -import warnings - -from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint -from datadog_api_client.configuration import Configuration -from datadog_api_client.model_utils import ( - UnsetType, - unset, -) -from datadog_api_client.v2.model.incident_teams_response import IncidentTeamsResponse -from datadog_api_client.v2.model.incident_related_object import IncidentRelatedObject -from datadog_api_client.v2.model.incident_team_response import IncidentTeamResponse -from datadog_api_client.v2.model.incident_team_create_request import IncidentTeamCreateRequest -from datadog_api_client.v2.model.incident_team_update_request import IncidentTeamUpdateRequest - - -class IncidentTeamsApi: - """ - The Incident Teams endpoints are deprecated. See the `Teams API endpoints `_ to create, update, delete, and retrieve teams which can be associated with incidents. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient(Configuration()) - self.api_client = api_client - - self._create_incident_team_endpoint = _Endpoint( - settings={ - "response_type": (IncidentTeamResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/teams", - "operation_id": "create_incident_team", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "body": { - "required": True, - "openapi_types": (IncidentTeamCreateRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._delete_incident_team_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/teams/{team_id}", - "operation_id": "delete_incident_team", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "team_id": { - "required": True, - "openapi_types": (str,), - "attribute": "team_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["*/*"], - }, - api_client=api_client, - ) - - self._get_incident_team_endpoint = _Endpoint( - settings={ - "response_type": (IncidentTeamResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/teams/{team_id}", - "operation_id": "get_incident_team", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "team_id": { - "required": True, - "openapi_types": (str,), - "attribute": "team_id", - "location": "path", - }, - "include": { - "openapi_types": (IncidentRelatedObject,), - "attribute": "include", - "location": "query", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._list_incident_teams_endpoint = _Endpoint( - settings={ - "response_type": (IncidentTeamsResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/teams", - "operation_id": "list_incident_teams", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "include": { - "openapi_types": (IncidentRelatedObject,), - "attribute": "include", - "location": "query", - }, - "page_size": { - "openapi_types": (int,), - "attribute": "page[size]", - "location": "query", - }, - "page_offset": { - "openapi_types": (int,), - "attribute": "page[offset]", - "location": "query", - }, - "filter": { - "openapi_types": (str,), - "attribute": "filter", - "location": "query", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._update_incident_team_endpoint = _Endpoint( - settings={ - "response_type": (IncidentTeamResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/teams/{team_id}", - "operation_id": "update_incident_team", - "http_method": "PATCH", - "version": "v2", - }, - params_map={ - "team_id": { - "required": True, - "openapi_types": (str,), - "attribute": "team_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (IncidentTeamUpdateRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - def create_incident_team( - self, - body: IncidentTeamCreateRequest, - ) -> IncidentTeamResponse: - """Create a new incident team. **Deprecated**. - - Creates a new incident team. - - :param body: Incident Team Payload. - :type body: IncidentTeamCreateRequest - :rtype: IncidentTeamResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["body"] = body - - warnings.warn("create_incident_team is deprecated", DeprecationWarning, stacklevel=2) - return self._create_incident_team_endpoint.call_with_http_info(**kwargs) - - def delete_incident_team( - self, - team_id: str, - ) -> None: - """Delete an existing incident team. **Deprecated**. - - Deletes an existing incident team. - - :param team_id: The ID of the incident team. - :type team_id: str - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["team_id"] = team_id - - warnings.warn("delete_incident_team is deprecated", DeprecationWarning, stacklevel=2) - return self._delete_incident_team_endpoint.call_with_http_info(**kwargs) - - def get_incident_team( - self, - team_id: str, - *, - include: Union[IncidentRelatedObject, UnsetType] = unset, - ) -> IncidentTeamResponse: - """Get details of an incident team. **Deprecated**. - - Get details of an incident team. If the ``include[users]`` query parameter is provided, - the included attribute will contain the users related to these incident teams. - - :param team_id: The ID of the incident team. - :type team_id: str - :param include: Specifies which types of related objects should be included in the response. - :type include: IncidentRelatedObject, optional - :rtype: IncidentTeamResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["team_id"] = team_id - - if include is not unset: - kwargs["include"] = include - - warnings.warn("get_incident_team is deprecated", DeprecationWarning, stacklevel=2) - return self._get_incident_team_endpoint.call_with_http_info(**kwargs) - - def list_incident_teams( - self, - *, - include: Union[IncidentRelatedObject, UnsetType] = unset, - page_size: Union[int, UnsetType] = unset, - page_offset: Union[int, UnsetType] = unset, - filter: Union[str, UnsetType] = unset, - ) -> IncidentTeamsResponse: - """Get a list of all incident teams. **Deprecated**. - - Get all incident teams for the requesting user's organization. If the ``include[users]`` query parameter is provided, the included attribute will contain the users related to these incident teams. - - :param include: Specifies which types of related objects should be included in the response. - :type include: IncidentRelatedObject, optional - :param page_size: Size for a given page. The maximum allowed value is 100. - :type page_size: int, optional - :param page_offset: Specific offset to use as the beginning of the returned page. - :type page_offset: int, optional - :param filter: A search query that filters teams by name. - :type filter: str, optional - :rtype: IncidentTeamsResponse - """ - kwargs: Dict[str, Any] = {} - if include is not unset: - kwargs["include"] = include - - if page_size is not unset: - kwargs["page_size"] = page_size - - if page_offset is not unset: - kwargs["page_offset"] = page_offset - - if filter is not unset: - kwargs["filter"] = filter - - warnings.warn("list_incident_teams is deprecated", DeprecationWarning, stacklevel=2) - return self._list_incident_teams_endpoint.call_with_http_info(**kwargs) - - def update_incident_team( - self, - team_id: str, - body: IncidentTeamUpdateRequest, - ) -> IncidentTeamResponse: - """Update an existing incident team. **Deprecated**. - - Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. - - :param team_id: The ID of the incident team. - :type team_id: str - :param body: Incident Team Payload. - :type body: IncidentTeamUpdateRequest - :rtype: IncidentTeamResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["team_id"] = team_id - - kwargs["body"] = body - - warnings.warn("update_incident_team is deprecated", DeprecationWarning, stacklevel=2) - return self._update_incident_team_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 3d8270c1b1..c227cd899a 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -48,7 +48,6 @@ from datadog_api_client.v2.api.high_availability_multi_region_api import HighAvailabilityMultiRegionApi from datadog_api_client.v2.api.ip_allowlist_api import IPAllowlistApi from datadog_api_client.v2.api.incident_services_api import IncidentServicesApi -from datadog_api_client.v2.api.incident_teams_api import IncidentTeamsApi from datadog_api_client.v2.api.incidents_api import IncidentsApi from datadog_api_client.v2.api.integrations_api import IntegrationsApi from datadog_api_client.v2.api.jira_integration_api import JiraIntegrationApi @@ -160,7 +159,6 @@ "HighAvailabilityMultiRegionApi", "IPAllowlistApi", "IncidentServicesApi", - "IncidentTeamsApi", "IncidentsApi", "IntegrationsApi", "JiraIntegrationApi", diff --git a/src/datadog_api_client/v2/model/incident_team_create_attributes.py b/src/datadog_api_client/v2/model/incident_team_create_attributes.py deleted file mode 100644 index 16cba3aac0..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_create_attributes.py +++ /dev/null @@ -1,33 +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 ( - ModelNormal, - cached_property, -) - - -class IncidentTeamCreateAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "name": (str,), - } - - attribute_map = { - "name": "name", - } - - def __init__(self_, name: str, **kwargs): - """ - The incident team's attributes for a create request. - - :param name: Name of the incident team. - :type name: str - """ - super().__init__(kwargs) - - self_.name = name diff --git a/src/datadog_api_client/v2/model/incident_team_create_data.py b/src/datadog_api_client/v2/model/incident_team_create_data.py deleted file mode 100644 index 9e3d924445..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_create_data.py +++ /dev/null @@ -1,69 +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.incident_team_create_attributes import IncidentTeamCreateAttributes - from datadog_api_client.v2.model.incident_team_relationships import IncidentTeamRelationships - from datadog_api_client.v2.model.incident_team_type import IncidentTeamType - - -class IncidentTeamCreateData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_team_create_attributes import IncidentTeamCreateAttributes - from datadog_api_client.v2.model.incident_team_relationships import IncidentTeamRelationships - from datadog_api_client.v2.model.incident_team_type import IncidentTeamType - - return { - "attributes": (IncidentTeamCreateAttributes,), - "relationships": (IncidentTeamRelationships,), - "type": (IncidentTeamType,), - } - - attribute_map = { - "attributes": "attributes", - "relationships": "relationships", - "type": "type", - } - read_only_vars = { - "relationships", - } - - def __init__( - self_, - type: IncidentTeamType, - attributes: Union[IncidentTeamCreateAttributes, UnsetType] = unset, - relationships: Union[IncidentTeamRelationships, UnsetType] = unset, - **kwargs, - ): - """ - Incident Team data for a create request. - - :param attributes: The incident team's attributes for a create request. - :type attributes: IncidentTeamCreateAttributes, optional - - :param relationships: The incident team's relationships. - :type relationships: IncidentTeamRelationships, optional - - :param type: Incident Team resource type. - :type type: IncidentTeamType - """ - if attributes is not unset: - kwargs["attributes"] = attributes - if relationships is not unset: - kwargs["relationships"] = relationships - super().__init__(kwargs) - - self_.type = type diff --git a/src/datadog_api_client/v2/model/incident_team_create_request.py b/src/datadog_api_client/v2/model/incident_team_create_request.py deleted file mode 100644 index 16224bc225..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_create_request.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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.incident_team_create_data import IncidentTeamCreateData - - -class IncidentTeamCreateRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_team_create_data import IncidentTeamCreateData - - return { - "data": (IncidentTeamCreateData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: IncidentTeamCreateData, **kwargs): - """ - Create request with an incident team payload. - - :param data: Incident Team data for a create request. - :type data: IncidentTeamCreateData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/incident_team_included_items.py b/src/datadog_api_client/v2/model/incident_team_included_items.py deleted file mode 100644 index de414125cc..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_included_items.py +++ /dev/null @@ -1,47 +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 ( - ModelComposed, - cached_property, -) - - -class IncidentTeamIncludedItems(ModelComposed): - def __init__(self, **kwargs): - """ - An object related to an incident team which is present in the included payload. - - :param attributes: Attributes of user object returned by the API. - :type attributes: UserAttributes, optional - - :param id: ID of the user. - :type id: str, optional - - :param relationships: Relationships of the user object returned by the API. - :type relationships: UserResponseRelationships, optional - - :param type: Users resource type. - :type type: UsersType, optional - """ - 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.user import User - - return { - "oneOf": [ - User, - ], - } diff --git a/src/datadog_api_client/v2/model/incident_team_relationships.py b/src/datadog_api_client/v2/model/incident_team_relationships.py deleted file mode 100644 index 27b4c84128..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_relationships.py +++ /dev/null @@ -1,54 +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.relationship_to_user import RelationshipToUser - - -class IncidentTeamRelationships(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.relationship_to_user import RelationshipToUser - - return { - "created_by": (RelationshipToUser,), - "last_modified_by": (RelationshipToUser,), - } - - attribute_map = { - "created_by": "created_by", - "last_modified_by": "last_modified_by", - } - - def __init__( - self_, - created_by: Union[RelationshipToUser, UnsetType] = unset, - last_modified_by: Union[RelationshipToUser, UnsetType] = unset, - **kwargs, - ): - """ - The incident team's relationships. - - :param created_by: Relationship to user. - :type created_by: RelationshipToUser, optional - - :param last_modified_by: Relationship to user. - :type last_modified_by: RelationshipToUser, optional - """ - if created_by is not unset: - kwargs["created_by"] = created_by - if last_modified_by is not unset: - kwargs["last_modified_by"] = last_modified_by - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/incident_team_response.py b/src/datadog_api_client/v2/model/incident_team_response.py deleted file mode 100644 index bd6ea13135..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_response.py +++ /dev/null @@ -1,60 +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.incident_team_response_data import IncidentTeamResponseData - from datadog_api_client.v2.model.incident_team_included_items import IncidentTeamIncludedItems - from datadog_api_client.v2.model.user import User - - -class IncidentTeamResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_team_response_data import IncidentTeamResponseData - from datadog_api_client.v2.model.incident_team_included_items import IncidentTeamIncludedItems - - return { - "data": (IncidentTeamResponseData,), - "included": ([IncidentTeamIncludedItems],), - } - - attribute_map = { - "data": "data", - "included": "included", - } - read_only_vars = { - "included", - } - - def __init__( - self_, - data: IncidentTeamResponseData, - included: Union[List[Union[IncidentTeamIncludedItems, User]], UnsetType] = unset, - **kwargs, - ): - """ - Response with an incident team payload. - - :param data: Incident Team data from a response. - :type data: IncidentTeamResponseData - - :param included: Included objects from relationships. - :type included: [IncidentTeamIncludedItems], optional - """ - if included is not unset: - kwargs["included"] = included - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/incident_team_response_attributes.py b/src/datadog_api_client/v2/model/incident_team_response_attributes.py deleted file mode 100644 index d6b29f1da1..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_response_attributes.py +++ /dev/null @@ -1,61 +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 - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - datetime, - unset, - UnsetType, -) - - -class IncidentTeamResponseAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "created": (datetime,), - "modified": (datetime,), - "name": (str,), - } - - attribute_map = { - "created": "created", - "modified": "modified", - "name": "name", - } - read_only_vars = { - "created", - "modified", - } - - def __init__( - self_, - created: Union[datetime, UnsetType] = unset, - modified: Union[datetime, UnsetType] = unset, - name: Union[str, UnsetType] = unset, - **kwargs, - ): - """ - The incident team's attributes from a response. - - :param created: Timestamp of when the incident team was created. - :type created: datetime, optional - - :param modified: Timestamp of when the incident team was modified. - :type modified: datetime, optional - - :param name: Name of the incident team. - :type name: str, optional - """ - if created is not unset: - kwargs["created"] = created - if modified is not unset: - kwargs["modified"] = modified - if name is not unset: - kwargs["name"] = name - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/incident_team_response_data.py b/src/datadog_api_client/v2/model/incident_team_response_data.py deleted file mode 100644 index d830a01a3f..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_response_data.py +++ /dev/null @@ -1,77 +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.incident_team_response_attributes import IncidentTeamResponseAttributes - from datadog_api_client.v2.model.incident_team_relationships import IncidentTeamRelationships - from datadog_api_client.v2.model.incident_team_type import IncidentTeamType - - -class IncidentTeamResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_team_response_attributes import IncidentTeamResponseAttributes - from datadog_api_client.v2.model.incident_team_relationships import IncidentTeamRelationships - from datadog_api_client.v2.model.incident_team_type import IncidentTeamType - - return { - "attributes": (IncidentTeamResponseAttributes,), - "id": (str,), - "relationships": (IncidentTeamRelationships,), - "type": (IncidentTeamType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "relationships": "relationships", - "type": "type", - } - read_only_vars = { - "relationships", - } - - def __init__( - self_, - attributes: Union[IncidentTeamResponseAttributes, UnsetType] = unset, - id: Union[str, UnsetType] = unset, - relationships: Union[IncidentTeamRelationships, UnsetType] = unset, - type: Union[IncidentTeamType, UnsetType] = unset, - **kwargs, - ): - """ - Incident Team data from a response. - - :param attributes: The incident team's attributes from a response. - :type attributes: IncidentTeamResponseAttributes, optional - - :param id: The incident team's ID. - :type id: str, optional - - :param relationships: The incident team's relationships. - :type relationships: IncidentTeamRelationships, optional - - :param type: Incident Team resource type. - :type type: IncidentTeamType, optional - """ - if attributes is not unset: - kwargs["attributes"] = attributes - if id is not unset: - kwargs["id"] = id - if relationships is not unset: - kwargs["relationships"] = relationships - if type is not unset: - kwargs["type"] = type - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/incident_team_type.py b/src/datadog_api_client/v2/model/incident_team_type.py deleted file mode 100644 index d4d9882a89..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_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 IncidentTeamType(ModelSimple): - """ - Incident Team resource type. - - :param value: If omitted defaults to "teams". Must be one of ["teams"]. - :type value: str - """ - - allowed_values = { - "teams", - } - TEAMS: ClassVar["IncidentTeamType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -IncidentTeamType.TEAMS = IncidentTeamType("teams") diff --git a/src/datadog_api_client/v2/model/incident_team_update_attributes.py b/src/datadog_api_client/v2/model/incident_team_update_attributes.py deleted file mode 100644 index 771d82db65..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_update_attributes.py +++ /dev/null @@ -1,33 +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 ( - ModelNormal, - cached_property, -) - - -class IncidentTeamUpdateAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "name": (str,), - } - - attribute_map = { - "name": "name", - } - - def __init__(self_, name: str, **kwargs): - """ - The incident team's attributes for an update request. - - :param name: Name of the incident team. - :type name: str - """ - super().__init__(kwargs) - - self_.name = name diff --git a/src/datadog_api_client/v2/model/incident_team_update_data.py b/src/datadog_api_client/v2/model/incident_team_update_data.py deleted file mode 100644 index 1139788e06..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_update_data.py +++ /dev/null @@ -1,77 +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.incident_team_update_attributes import IncidentTeamUpdateAttributes - from datadog_api_client.v2.model.incident_team_relationships import IncidentTeamRelationships - from datadog_api_client.v2.model.incident_team_type import IncidentTeamType - - -class IncidentTeamUpdateData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_team_update_attributes import IncidentTeamUpdateAttributes - from datadog_api_client.v2.model.incident_team_relationships import IncidentTeamRelationships - from datadog_api_client.v2.model.incident_team_type import IncidentTeamType - - return { - "attributes": (IncidentTeamUpdateAttributes,), - "id": (str,), - "relationships": (IncidentTeamRelationships,), - "type": (IncidentTeamType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "relationships": "relationships", - "type": "type", - } - read_only_vars = { - "relationships", - } - - def __init__( - self_, - type: IncidentTeamType, - attributes: Union[IncidentTeamUpdateAttributes, UnsetType] = unset, - id: Union[str, UnsetType] = unset, - relationships: Union[IncidentTeamRelationships, UnsetType] = unset, - **kwargs, - ): - """ - Incident Team data for an update request. - - :param attributes: The incident team's attributes for an update request. - :type attributes: IncidentTeamUpdateAttributes, optional - - :param id: The incident team's ID. - :type id: str, optional - - :param relationships: The incident team's relationships. - :type relationships: IncidentTeamRelationships, optional - - :param type: Incident Team resource type. - :type type: IncidentTeamType - """ - if attributes is not unset: - kwargs["attributes"] = attributes - 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/incident_team_update_request.py b/src/datadog_api_client/v2/model/incident_team_update_request.py deleted file mode 100644 index 1f53225d9c..0000000000 --- a/src/datadog_api_client/v2/model/incident_team_update_request.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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.incident_team_update_data import IncidentTeamUpdateData - - -class IncidentTeamUpdateRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_team_update_data import IncidentTeamUpdateData - - return { - "data": (IncidentTeamUpdateData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: IncidentTeamUpdateData, **kwargs): - """ - Update request with an incident team payload. - - :param data: Incident Team data for an update request. - :type data: IncidentTeamUpdateData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/incident_teams_response.py b/src/datadog_api_client/v2/model/incident_teams_response.py deleted file mode 100644 index 95ef922163..0000000000 --- a/src/datadog_api_client/v2/model/incident_teams_response.py +++ /dev/null @@ -1,71 +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.incident_team_response_data import IncidentTeamResponseData - from datadog_api_client.v2.model.incident_team_included_items import IncidentTeamIncludedItems - from datadog_api_client.v2.model.incident_response_meta import IncidentResponseMeta - from datadog_api_client.v2.model.user import User - - -class IncidentTeamsResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_team_response_data import IncidentTeamResponseData - from datadog_api_client.v2.model.incident_team_included_items import IncidentTeamIncludedItems - from datadog_api_client.v2.model.incident_response_meta import IncidentResponseMeta - - return { - "data": ([IncidentTeamResponseData],), - "included": ([IncidentTeamIncludedItems],), - "meta": (IncidentResponseMeta,), - } - - attribute_map = { - "data": "data", - "included": "included", - "meta": "meta", - } - read_only_vars = { - "included", - "meta", - } - - def __init__( - self_, - data: List[IncidentTeamResponseData], - included: Union[List[Union[IncidentTeamIncludedItems, User]], UnsetType] = unset, - meta: Union[IncidentResponseMeta, UnsetType] = unset, - **kwargs, - ): - """ - Response with a list of incident team payloads. - - :param data: An array of incident teams. - :type data: [IncidentTeamResponseData] - - :param included: Included related resources which the user requested. - :type included: [IncidentTeamIncludedItems], optional - - :param meta: The metadata object containing pagination metadata. - :type meta: IncidentResponseMeta, optional - """ - if included is not unset: - kwargs["included"] = included - if meta is not unset: - kwargs["meta"] = meta - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f1cb60da57..69f640e8d0 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2799,19 +2799,6 @@ from datadog_api_client.v2.model.incident_service_update_request import IncidentServiceUpdateRequest from datadog_api_client.v2.model.incident_services_response import IncidentServicesResponse from datadog_api_client.v2.model.incident_severity import IncidentSeverity -from datadog_api_client.v2.model.incident_team_create_attributes import IncidentTeamCreateAttributes -from datadog_api_client.v2.model.incident_team_create_data import IncidentTeamCreateData -from datadog_api_client.v2.model.incident_team_create_request import IncidentTeamCreateRequest -from datadog_api_client.v2.model.incident_team_included_items import IncidentTeamIncludedItems -from datadog_api_client.v2.model.incident_team_relationships import IncidentTeamRelationships -from datadog_api_client.v2.model.incident_team_response import IncidentTeamResponse -from datadog_api_client.v2.model.incident_team_response_attributes import IncidentTeamResponseAttributes -from datadog_api_client.v2.model.incident_team_response_data import IncidentTeamResponseData -from datadog_api_client.v2.model.incident_team_type import IncidentTeamType -from datadog_api_client.v2.model.incident_team_update_attributes import IncidentTeamUpdateAttributes -from datadog_api_client.v2.model.incident_team_update_data import IncidentTeamUpdateData -from datadog_api_client.v2.model.incident_team_update_request import IncidentTeamUpdateRequest -from datadog_api_client.v2.model.incident_teams_response import IncidentTeamsResponse from datadog_api_client.v2.model.incident_timeline_cell_create_attributes import IncidentTimelineCellCreateAttributes from datadog_api_client.v2.model.incident_timeline_cell_markdown_content_type import ( IncidentTimelineCellMarkdownContentType, @@ -9595,19 +9582,6 @@ "IncidentServiceUpdateRequest", "IncidentServicesResponse", "IncidentSeverity", - "IncidentTeamCreateAttributes", - "IncidentTeamCreateData", - "IncidentTeamCreateRequest", - "IncidentTeamIncludedItems", - "IncidentTeamRelationships", - "IncidentTeamResponse", - "IncidentTeamResponseAttributes", - "IncidentTeamResponseData", - "IncidentTeamType", - "IncidentTeamUpdateAttributes", - "IncidentTeamUpdateData", - "IncidentTeamUpdateRequest", - "IncidentTeamsResponse", "IncidentTimelineCellCreateAttributes", "IncidentTimelineCellMarkdownContentType", "IncidentTimelineCellMarkdownCreateAttributes", diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.frozen deleted file mode 100644 index 1d02b7f5cb..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.507Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.yaml deleted file mode 100644 index fc0d118665..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_a_new_incident_team_returns_created_response.yaml +++ /dev/null @@ -1,38 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"name":"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973"},"type":"teams"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - string: '{"data":{"type":"teams","id":"ad2b4266-f087-5b33-9da5-e726f61fd9b0","attributes":{"name":"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973","created":"2023-11-06T21:59:33.756628+00:00","modified":"2023-11-06T21:59:33.756628+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/ad2b4266-f087-5b33-9da5-e726f61fd9b0 - response: - body: - string: '' - headers: - content-type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.frozen deleted file mode 100644 index ddd60cfaee..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.925Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.yaml deleted file mode 100644 index d9a54b6594..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_an_existing_incident_team_returns_ok_response.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"name":"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973"},"type":"teams"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - string: '{"data":{"type":"teams","id":"a5250cc2-827f-509c-8159-2e0ccfb43cd3","attributes":{"name":"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973","created":"2023-11-06T21:59:34.043971+00:00","modified":"2023-11-06T21:59:34.043971+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3 - response: - body: - string: '' - headers: - content-type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3 - response: - body: - string: '' - headers: - content-type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.frozen deleted file mode 100644 index fe3e133ece..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.298Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.yaml deleted file mode 100644 index a870cbeab1..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_get_a_list_of_all_incident_teams_returns_ok_response.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"name":"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974"},"type":"teams"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - string: '{"data":{"type":"teams","id":"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8","attributes":{"name":"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.424755+00:00","modified":"2023-11-06T21:59:34.424755+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/teams?filter=Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974 - response: - body: - string: '{"data":[{"type":"teams","id":"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8","attributes":{"name":"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.424755+00:00","modified":"2023-11-06T21:59:34.424755+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}],"meta":{"pagination":{"offset":0,"next_offset":1,"size":1,"total":3852},"sort":"ASC","total":3852}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8 - response: - body: - string: '' - headers: - content-type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.frozen deleted file mode 100644 index 5791822ade..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.734Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.yaml deleted file mode 100644 index 09d54b650e..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_get_details_of_an_incident_team_returns_ok_response.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"name":"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974"},"type":"teams"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - string: '{"data":{"type":"teams","id":"98da5ea5-4d67-5296-b971-b8cd48f3e5f3","attributes":{"name":"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.850054+00:00","modified":"2023-11-06T21:59:34.850054+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3 - response: - body: - string: '{"data":{"type":"teams","id":"98da5ea5-4d67-5296-b971-b8cd48f3e5f3","attributes":{"name":"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.850054+00:00","modified":"2023-11-06T21:59:34.850054+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3 - response: - body: - string: '' - headers: - content-type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.frozen deleted file mode 100644 index 95003d7bde..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:35.100Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.yaml deleted file mode 100644 index a92c77bbb8..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_an_existing_incident_team_returns_ok_response.yaml +++ /dev/null @@ -1,58 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975"},"type":"teams"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - string: '{"data":{"type":"teams","id":"90c4f5c8-5965-533e-8b56-cffad17e03bf","attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975","created":"2023-11-06T21:59:35.219247+00:00","modified":"2023-11-06T21:59:35.219247+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: '{"data":{"attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated"},"type":"teams"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: PATCH - uri: https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf - response: - body: - string: '{"data":{"type":"teams","id":"90c4f5c8-5965-533e-8b56-cffad17e03bf","attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated","created":"2023-11-06T21:59:35.219247+00:00","modified":"2023-11-06T21:59:35.364568+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf - response: - body: - string: '' - headers: - content-type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 98e2edab7a..48979b4fe7 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -1533,18 +1533,6 @@ "tag": "Teams", "operationId": "CreateTeamNotificationRule" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\"\n },\n \"type\": \"teams\"\n }\n}" - } - ], - "step": "there is a valid \"team\" in the system", - "key": "team", - "tag": "Incident Teams", - "operationId": "CreateIncidentTeam" - }, { "parameters": [ { diff --git a/tests/v2/features/incident_teams.feature b/tests/v2/features/incident_teams.feature deleted file mode 100644 index 5bbb492639..0000000000 --- a/tests/v2/features/incident_teams.feature +++ /dev/null @@ -1,146 +0,0 @@ -@endpoint(incident-teams) @endpoint(incident-teams-v2) -Feature: Incident Teams - The Incident Teams endpoints are deprecated. See the [Teams API - endpoints](https://docs.datadoghq.com/api/latest/teams/) to create, - update, delete, and retrieve teams which can be associated with incidents. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "IncidentTeams" API - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident team returns "Bad Request" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:Datadog/incident-app - Scenario: Create a new incident team returns "CREATED" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"type": "teams", "attributes": {"name": "{{ unique }}"}}} - When the request is sent - Then the response status is 201 CREATED - And the response "data.type" is equal to "teams" - And the response "data.attributes.name" is equal to "{{ unique }}" - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident team returns "Not Found" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "Bad Request" response - Given operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "Not Found" response - Given operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "OK" response - Given there is a valid "team" in the system - And operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - When the request is sent - Then the response status is 204 OK - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "Bad Request" response - Given operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "Not Found" response - Given operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "OK" response - Given there is a valid "team" in the system - And operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - And request contains "filter" parameter from "team.data.attributes.name" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].type" is equal to "teams" - And the response "data[0].attributes.name" has the same value as "team.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident team returns "Bad Request" response - Given operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident team returns "Not Found" response - Given operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get details of an incident team returns "OK" response - Given there is a valid "team" in the system - And operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "teams" - And the response "data.id" is equal to "{{ team.data.id }}" - And the response "data.attributes.name" has the same value as "team.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident team returns "Bad Request" response - Given operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident team returns "Not Found" response - Given operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Update an existing incident team returns "OK" response - Given there is a valid "team" in the system - And operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - And body with value {"data": {"type": "teams", "attributes": {"name": "{{ team.data.attributes.name }}-updated"}}} - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "teams" - And the response "data.id" is equal to "{{ team.data.id }}" - And the response "data.attributes.name" is equal to "{{ team.data.attributes.name }}-updated" diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index d5a8323e27..473ed7c85a 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6958,43 +6958,6 @@ "type": "idempotent" } }, - "ListIncidentTeams": { - "tag": "Incident Teams", - "undo": { - "type": "safe" - } - }, - "CreateIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "operationId": "DeleteIncidentTeam", - "parameters": [ - { - "name": "team_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "idempotent" - } - }, - "GetIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "safe" - } - }, - "UpdateIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "idempotent" - } - }, "UpdateFlakyTests": { "tag": "Test Optimization", "undo": {