diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6bc8997cfde..118358be9b9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -83168,7 +83168,7 @@ paths: - teams_read summary: Delete team connections tags: - - Team Connections + - Teams x-permission: operator: OR permissions: @@ -83247,7 +83247,7 @@ paths: - teams_read summary: List team connections tags: - - Team Connections + - Teams x-pagination: limitParam: page[size] pageParam: page[number] @@ -83291,7 +83291,7 @@ paths: - teams_read summary: Create team connections tags: - - Team Connections + - Teams x-permission: operator: OR permissions: @@ -86612,9 +86612,6 @@ tags: use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)." name: Synthetics -- description: View and manage relationships between Datadog teams and teams from - external sources, such as GitHub. - name: Team Connections - description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/) for more information. name: Teams diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.frozen b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.frozen index d0f2e850f25..70cc3602d60 100644 --- a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.frozen +++ b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:39.297Z \ No newline at end of file +2025-10-28T14:51:12.459Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.yml b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.yml index 3b071a43e29..6e4fa64b770 100644 --- a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:39 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:12 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsbadrequestresponse1764326919","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"64de7180-ffd3-417b-beb6-c6ea469b5b5f","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:39.863066Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsbadrequestresponse1764326919","service":"my-service","updated_at":"2025-11-28T10:48:39.863066Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"c7d0bed9-01dc-45d5-88ad-242123881f81","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:13.006792Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:13.006792Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:39 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:12 GMT request: body: encoding: UTF-8 @@ -34,7 +34,7 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/64de7180-ffd3-417b-beb6-c6ea469b5b5f/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/c7d0bed9-01dc-45d5-88ad-242123881f81/rules response: body: encoding: UTF-8 @@ -46,14 +46,14 @@ http_interactions: status: code: 400 message: Bad Request -- recorded_at: Fri, 28 Nov 2025 10:48:39 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:12 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/64de7180-ffd3-417b-beb6-c6ea469b5b5f + uri: https://api.datadoghq.com/api/v2/deployment_gates/c7d0bed9-01dc-45d5-88ad-242123881f81 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.frozen b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.frozen index a342e74d959..44db2e7bb5f 100644 --- a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:40.199Z \ No newline at end of file +2025-10-28T14:51:13.363Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.yml b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.yml index 16a26d2dceb..9be635aa9d6 100644 --- a/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.yml +++ b/cassettes/features/v2/deployment_gates/Create-deployment-rule-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:40 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:13 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1764326920","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"2abe97e8-438e-410e-9630-185bd3634d4d","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:40.314903Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1764326920","service":"my-service","updated_at":"2025-11-28T10:48:40.314903Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"58066a8e-44e7-4119-8ac6-a5ecc3b31c1b","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:13.477518Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:13.477518Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:40 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:13 GMT request: body: encoding: UTF-8 @@ -34,13 +34,13 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/2abe97e8-438e-410e-9630-185bd3634d4d/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/58066a8e-44e7-4119-8ac6-a5ecc3b31c1b/rules response: body: encoding: UTF-8 - string: '{"data":{"id":"3370e167-8ad1-4cce-8efe-4688ff6d862e","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:40.464432Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"2abe97e8-438e-410e-9630-185bd3634d4d","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:40.464432Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"8330bf79-6906-4cea-85d5-a4da6767458e","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:13.852895Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"58066a8e-44e7-4119-8ac6-a5ecc3b31c1b","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:13.852895Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -48,14 +48,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:40 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:13 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/2abe97e8-438e-410e-9630-185bd3634d4d/rules/3370e167-8ad1-4cce-8efe-4688ff6d862e + uri: https://api.datadoghq.com/api/v2/deployment_gates/58066a8e-44e7-4119-8ac6-a5ecc3b31c1b/rules/8330bf79-6906-4cea-85d5-a4da6767458e response: body: encoding: UTF-8 @@ -64,14 +64,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 28 Nov 2025 10:48:40 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:13 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/2abe97e8-438e-410e-9630-185bd3634d4d + uri: https://api.datadoghq.com/api/v2/deployment_gates/58066a8e-44e7-4119-8ac6-a5ecc3b31c1b response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.frozen b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.frozen index c903e462ff2..88c603c5ccf 100644 --- a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.frozen +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:40.779Z \ No newline at end of file +2025-10-28T14:51:14.192Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.yml b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.yml index a49e9a390b6..69a6a8b83f4 100644 --- a/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.yml +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:40 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentgatereturnsnocontentresponse1764326920","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"86e38caf-0d2a-4e72-93ac-9850957d2c6b","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:40.909837Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentgatereturnsnocontentresponse1764326920","service":"my-service","updated_at":"2025-11-28T10:48:40.909837Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"dba6d48b-b7ac-4ac8-b2d5-70e45b500eed","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:14.313688Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:14.313688Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,14 +23,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:40 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/86e38caf-0d2a-4e72-93ac-9850957d2c6b + uri: https://api.datadoghq.com/api/v2/deployment_gates/dba6d48b-b7ac-4ac8-b2d5-70e45b500eed response: body: encoding: UTF-8 @@ -39,14 +39,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 28 Nov 2025 10:48:40 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/86e38caf-0d2a-4e72-93ac-9850957d2c6b + uri: https://api.datadoghq.com/api/v2/deployment_gates/dba6d48b-b7ac-4ac8-b2d5-70e45b500eed response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.frozen b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.frozen index e0d912f1f64..6685aa65afe 100644 --- a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.frozen +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:41.219Z \ No newline at end of file +2025-10-28T14:51:14.630Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.yml b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.yml index e0a4735c251..b4acc589faf 100644 --- a/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.yml +++ b/cassettes/features/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentrulereturnsnocontentresponse1764326921","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"32ff7c01-1f90-4ae4-bef0-b759f1ad280f","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:41.325741Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentrulereturnsnocontentresponse1764326921","service":"my-service","updated_at":"2025-11-28T10:48:41.325741Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"8e202ae7-a86b-4f4a-a213-585801a42630","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:14.754979Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:14.754979Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: encoding: UTF-8 @@ -34,13 +34,13 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/32ff7c01-1f90-4ae4-bef0-b759f1ad280f/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630/rules response: body: encoding: UTF-8 - string: '{"data":{"id":"8229075f-8014-432c-9597-ba549ae5cd83","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:41.470358Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"32ff7c01-1f90-4ae4-bef0-b759f1ad280f","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:41.470358Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"31e6717f-2eaa-45e5-9559-a55ca9d45f8d","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:14.911642Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"8e202ae7-a86b-4f4a-a213-585801a42630","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:14.911642Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -48,14 +48,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/32ff7c01-1f90-4ae4-bef0-b759f1ad280f/rules/8229075f-8014-432c-9597-ba549ae5cd83 + uri: https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630/rules/31e6717f-2eaa-45e5-9559-a55ca9d45f8d response: body: encoding: UTF-8 @@ -64,14 +64,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/32ff7c01-1f90-4ae4-bef0-b759f1ad280f/rules/8229075f-8014-432c-9597-ba549ae5cd83 + uri: https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630/rules/31e6717f-2eaa-45e5-9559-a55ca9d45f8d response: body: encoding: UTF-8 @@ -83,14 +83,14 @@ http_interactions: status: code: 404 message: Not Found -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:14 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/32ff7c01-1f90-4ae4-bef0-b759f1ad280f + uri: https://api.datadoghq.com/api/v2/deployment_gates/8e202ae7-a86b-4f4a-a213-585801a42630 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.frozen b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.frozen index 13cea2df227..b38e931fdba 100644 --- a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.frozen +++ b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:41.902Z \ No newline at end of file +2025-10-28T14:51:15.372Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.yml b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.yml index cfccd875909..97a07b7a8ef 100644 --- a/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.yml +++ b/cassettes/features/v2/deployment_gates/Get-deployment-gate-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentgatereturnsokresponse1764326921","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"6fc0d64b-aa76-49f9-804b-5ba224951b53","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:42.011911Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentgatereturnsokresponse1764326921","service":"my-service","updated_at":"2025-11-28T10:48:42.011911Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ed4085c5-e8d3-4bf8-89a6-c257164d8952","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:15.478086Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:15.478086Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,19 +23,19 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/deployment_gates/6fc0d64b-aa76-49f9-804b-5ba224951b53 + uri: https://api.datadoghq.com/api/v2/deployment_gates/ed4085c5-e8d3-4bf8-89a6-c257164d8952 response: body: encoding: UTF-8 - string: '{"data":{"id":"6fc0d64b-aa76-49f9-804b-5ba224951b53","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:42.011911Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentgatereturnsokresponse1764326921","service":"my-service","updated_at":"2025-11-28T10:48:42.011911Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ed4085c5-e8d3-4bf8-89a6-c257164d8952","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:15.478086Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:15.478086Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -43,14 +43,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:41 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/6fc0d64b-aa76-49f9-804b-5ba224951b53 + uri: https://api.datadoghq.com/api/v2/deployment_gates/ed4085c5-e8d3-4bf8-89a6-c257164d8952 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.frozen b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.frozen index 3ae04f6f7ff..3246cdbd649 100644 --- a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.frozen +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:42.334Z \ No newline at end of file +2025-10-28T14:51:15.883Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.yml b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.yml index 1f9a5010c11..c4a5f134087 100644 --- a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsbadrequestresponse1764326922","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"10bfb87d-3e15-4889-895c-28fd41d71837","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:42.440107Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsbadrequestresponse1764326922","service":"my-service","updated_at":"2025-11-28T10:48:42.440107Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"d49e6d82-2dc4-45b6-ab50-4fb09feae18e","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:16.013862Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:16.013862Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: encoding: UTF-8 @@ -34,13 +34,13 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/10bfb87d-3e15-4889-895c-28fd41d71837/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/d49e6d82-2dc4-45b6-ab50-4fb09feae18e/rules response: body: encoding: UTF-8 - string: '{"data":{"id":"e8c6d6c6-c529-4c30-92f9-8d965a68b120","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:42.588675Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"10bfb87d-3e15-4889-895c-28fd41d71837","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:42.588675Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"611707d2-276e-4dc5-b754-db8f94eab0b5","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:16.184094Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"d49e6d82-2dc4-45b6-ab50-4fb09feae18e","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:16.184094Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -48,7 +48,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: null headers: @@ -67,14 +67,14 @@ http_interactions: status: code: 400 message: Bad Request -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/10bfb87d-3e15-4889-895c-28fd41d71837/rules/e8c6d6c6-c529-4c30-92f9-8d965a68b120 + uri: https://api.datadoghq.com/api/v2/deployment_gates/d49e6d82-2dc4-45b6-ab50-4fb09feae18e/rules/611707d2-276e-4dc5-b754-db8f94eab0b5 response: body: encoding: UTF-8 @@ -83,14 +83,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/10bfb87d-3e15-4889-895c-28fd41d71837 + uri: https://api.datadoghq.com/api/v2/deployment_gates/d49e6d82-2dc4-45b6-ab50-4fb09feae18e response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.frozen b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.frozen index dff9a2ed2ea..f1e5e963932 100644 --- a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:42.991Z \ No newline at end of file +2025-10-28T14:51:16.642Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.yml b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.yml index bdc8b7e3a0c..bc0ec7698ac 100644 --- a/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.yml +++ b/cassettes/features/v2/deployment_gates/Get-deployment-rule-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:16 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1764326922","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"701d9655-8d81-43d0-9954-cf24b4959b60","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:43.092215Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1764326922","service":"my-service","updated_at":"2025-11-28T10:48:43.092215Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:16.752908Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:16.752908Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:16 GMT request: body: encoding: UTF-8 @@ -34,13 +34,13 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/701d9655-8d81-43d0-9954-cf24b4959b60/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56/rules response: body: encoding: UTF-8 - string: '{"data":{"id":"c96cd32f-5c92-4bc7-9483-85a824b394a7","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:43.237862Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"701d9655-8d81-43d0-9954-cf24b4959b60","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:43.237862Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"a38ab685-4ef9-4000-a938-740da6c37296","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:16.947341Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:16.947341Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -48,20 +48,20 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:16 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/deployment_gates/701d9655-8d81-43d0-9954-cf24b4959b60/rules/c96cd32f-5c92-4bc7-9483-85a824b394a7 + uri: https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56/rules/a38ab685-4ef9-4000-a938-740da6c37296 response: body: encoding: UTF-8 - string: '{"data":{"id":"c96cd32f-5c92-4bc7-9483-85a824b394a7","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:43.237862Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"701d9655-8d81-43d0-9954-cf24b4959b60","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:43.237862Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"a38ab685-4ef9-4000-a938-740da6c37296","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:16.947341Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:16.947341Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -69,14 +69,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:16 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/701d9655-8d81-43d0-9954-cf24b4959b60/rules/c96cd32f-5c92-4bc7-9483-85a824b394a7 + uri: https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56/rules/a38ab685-4ef9-4000-a938-740da6c37296 response: body: encoding: UTF-8 @@ -85,14 +85,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 28 Nov 2025 10:48:42 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:16 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/701d9655-8d81-43d0-9954-cf24b4959b60 + uri: https://api.datadoghq.com/api/v2/deployment_gates/50df9de0-aa0c-4d7c-8fc8-811ee2ab4e56 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.frozen b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.frozen index 72fa1316f44..b67d99b534d 100644 --- a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.frozen +++ b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:43.738Z \ No newline at end of file +2025-10-28T14:51:17.586Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.yml b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.yml index 72bd31fdcce..dfc3bea02dd 100644 --- a/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.yml +++ b/cassettes/features/v2/deployment_gates/Update-deployment-gate-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:43 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:17 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentgatereturnsokresponse1764326923","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"6080b4ee-0fa6-4370-aafa-adb5b71c2fab","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:43.844073Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentgatereturnsokresponse1764326923","service":"my-service","updated_at":"2025-11-28T10:48:43.844073Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ef672c2e-81fc-4fcc-9690-392a9cf0d70c","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:17.693361Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:17.693361Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:43 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:17 GMT request: body: encoding: UTF-8 @@ -34,12 +34,12 @@ http_interactions: Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deployment_gates/6080b4ee-0fa6-4370-aafa-adb5b71c2fab + uri: https://api.datadoghq.com/api/v2/deployment_gates/ef672c2e-81fc-4fcc-9690-392a9cf0d70c response: body: encoding: UTF-8 - string: '{"data":{"id":"6080b4ee-0fa6-4370-aafa-adb5b71c2fab","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:43.844073Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentgatereturnsokresponse1764326923","service":"my-service","updated_at":"2025-11-28T10:48:44.028502Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ef672c2e-81fc-4fcc-9690-392a9cf0d70c","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:17.693361Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:17.841019Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -47,14 +47,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:43 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:17 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/6080b4ee-0fa6-4370-aafa-adb5b71c2fab + uri: https://api.datadoghq.com/api/v2/deployment_gates/ef672c2e-81fc-4fcc-9690-392a9cf0d70c response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.frozen b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.frozen index e708a507a68..1691ea92422 100644 --- a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.frozen +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:44.227Z \ No newline at end of file +2025-10-28T14:51:18.004Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.yml b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.yml index 02486d3c702..d5368b475bd 100644 --- a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsbadrequestresponse1764326924","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"f7fc03e3-86d9-4731-9baf-9b3a2f9239c3","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:44.325367Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsbadrequestresponse1764326924","service":"my-service","updated_at":"2025-11-28T10:48:44.325367Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:18.108594Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:18.108594Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: encoding: UTF-8 @@ -34,13 +34,13 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/f7fc03e3-86d9-4731-9baf-9b3a2f9239c3/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d/rules response: body: encoding: UTF-8 - string: '{"data":{"id":"63e71fe3-f002-4e46-bc24-772c7a743e95","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:44.453112Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"f7fc03e3-86d9-4731-9baf-9b3a2f9239c3","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:44.453112Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"189846d6-3c19-46e8-98d1-9d05a2f43361","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:18.251816Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:18.251816Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -48,7 +48,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: encoding: UTF-8 @@ -71,14 +71,14 @@ http_interactions: status: code: 400 message: Bad Request -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/f7fc03e3-86d9-4731-9baf-9b3a2f9239c3/rules/63e71fe3-f002-4e46-bc24-772c7a743e95 + uri: https://api.datadoghq.com/api/v2/deployment_gates/b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d/rules/189846d6-3c19-46e8-98d1-9d05a2f43361 response: body: encoding: UTF-8 @@ -87,14 +87,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/f7fc03e3-86d9-4731-9baf-9b3a2f9239c3 + uri: https://api.datadoghq.com/api/v2/deployment_gates/b2bd3ad3-f414-4f05-9ad6-248ed3f99f4d response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.frozen b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.frozen index 75b8801ebec..7ae0c5541e9 100644 --- a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.frozen @@ -1 +1 @@ -2025-11-28T10:48:44.855Z \ No newline at end of file +2025-10-28T14:51:18.721Z \ No newline at end of file diff --git a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.yml b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.yml index 98c7f7122d0..40221baeb2d 100644 --- a/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.yml +++ b/cassettes/features/v2/deployment_gates/Update-deployment-rule-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1764326924","service":"my-service"},"type":"deployment_gate"}}' + string: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"b9fe1de0-ba29-4f86-abbb-09ec15047772","type":"deployment_gate","attributes":{"created_at":"2025-11-28T10:48:44.953026Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1764326924","service":"my-service","updated_at":"2025-11-28T10:48:44.953026Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"301122dd-9022-40f0-886f-f9a6c227dc9a","type":"deployment_gate","attributes":{"created_at":"2025-10-28T14:51:18.845469Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-10-28T14:51:18.845469Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: encoding: UTF-8 @@ -34,13 +34,13 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/b9fe1de0-ba29-4f86-abbb-09ec15047772/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a/rules response: body: encoding: UTF-8 - string: '{"data":{"id":"04207b55-28e1-46e6-9aa1-ed45dd022e3e","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:45.086885Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"b9fe1de0-ba29-4f86-abbb-09ec15047772","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:45.086885Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"483937d1-efc4-4a7c-95a6-89bd6b2e4e75","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:19.007448Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"301122dd-9022-40f0-886f-f9a6c227dc9a","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:19.007448Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -48,7 +48,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: encoding: UTF-8 @@ -59,13 +59,13 @@ http_interactions: Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deployment_gates/b9fe1de0-ba29-4f86-abbb-09ec15047772/rules/04207b55-28e1-46e6-9aa1-ed45dd022e3e + uri: https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a/rules/483937d1-efc4-4a7c-95a6-89bd6b2e4e75 response: body: encoding: UTF-8 - string: '{"data":{"id":"04207b55-28e1-46e6-9aa1-ed45dd022e3e","type":"deployment_rule","attributes":{"created_at":"2025-11-28T10:48:45.086885Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"b9fe1de0-ba29-4f86-abbb-09ec15047772","name":"Updated - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-11-28T10:48:45.232653Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"483937d1-efc4-4a7c-95a6-89bd6b2e4e75","type":"deployment_rule","attributes":{"created_at":"2025-10-28T14:51:19.007448Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"301122dd-9022-40f0-886f-f9a6c227dc9a","name":"Updated + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-10-28T14:51:19.134366Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: Content-Type: @@ -73,14 +73,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/b9fe1de0-ba29-4f86-abbb-09ec15047772/rules/04207b55-28e1-46e6-9aa1-ed45dd022e3e + uri: https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a/rules/483937d1-efc4-4a7c-95a6-89bd6b2e4e75 response: body: encoding: UTF-8 @@ -89,14 +89,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 28 Nov 2025 10:48:44 GMT +- recorded_at: Tue, 28 Oct 2025 14:51:18 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/b9fe1de0-ba29-4f86-abbb-09ec15047772 + uri: https://api.datadoghq.com/api/v2/deployment_gates/301122dd-9022-40f0-886f-f9a6c227dc9a response: body: encoding: UTF-8 diff --git a/examples/v2/team-connections/CreateTeamConnections.rb b/examples/v2/teams/CreateTeamConnections.rb similarity index 95% rename from examples/v2/team-connections/CreateTeamConnections.rb rename to examples/v2/teams/CreateTeamConnections.rb index 6eeeb6b36ed..1a498252fd7 100644 --- a/examples/v2/team-connections/CreateTeamConnections.rb +++ b/examples/v2/teams/CreateTeamConnections.rb @@ -4,7 +4,7 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.create_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new # there is a valid "dd_team" in the system DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] diff --git a/examples/v2/team-connections/DeleteTeamConnections.rb b/examples/v2/teams/DeleteTeamConnections.rb similarity index 89% rename from examples/v2/team-connections/DeleteTeamConnections.rb rename to examples/v2/teams/DeleteTeamConnections.rb index 3f2f68055bc..779bb69a3e6 100644 --- a/examples/v2/team-connections/DeleteTeamConnections.rb +++ b/examples/v2/teams/DeleteTeamConnections.rb @@ -4,7 +4,7 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.delete_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new body = DatadogAPIClient::V2::TeamConnectionDeleteRequest.new({ data: [ diff --git a/examples/v2/team-connections/ListTeamConnections.rb b/examples/v2/teams/ListTeamConnections.rb similarity index 79% rename from examples/v2/team-connections/ListTeamConnections.rb rename to examples/v2/teams/ListTeamConnections.rb index 6833cc55565..811ff077fb6 100644 --- a/examples/v2/team-connections/ListTeamConnections.rb +++ b/examples/v2/teams/ListTeamConnections.rb @@ -4,5 +4,5 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.list_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new p api_instance.list_team_connections() diff --git a/examples/v2/team-connections/ListTeamConnections_1473516764.rb b/examples/v2/teams/ListTeamConnections_1473516764.rb similarity index 83% rename from examples/v2/team-connections/ListTeamConnections_1473516764.rb rename to examples/v2/teams/ListTeamConnections_1473516764.rb index cc3c645387c..94ca072c4bb 100644 --- a/examples/v2/team-connections/ListTeamConnections_1473516764.rb +++ b/examples/v2/teams/ListTeamConnections_1473516764.rb @@ -4,7 +4,7 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.list_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new opts = { filter_sources: [ "github", diff --git a/examples/v2/team-connections/ListTeamConnections_2418873869.rb b/examples/v2/teams/ListTeamConnections_2418873869.rb similarity index 82% rename from examples/v2/team-connections/ListTeamConnections_2418873869.rb rename to examples/v2/teams/ListTeamConnections_2418873869.rb index 31168ec1146..9cc7601b19e 100644 --- a/examples/v2/team-connections/ListTeamConnections_2418873869.rb +++ b/examples/v2/teams/ListTeamConnections_2418873869.rb @@ -4,5 +4,5 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.list_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new api_instance.list_team_connections_with_pagination() { |item| puts item } diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d85bc628294..0c941bbaa89 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3157,6 +3157,20 @@ "v2.GetTeamHierarchyLink" => { "link_id" => "String", }, + "v2.DeleteTeamConnections" => { + "body" => "TeamConnectionDeleteRequest", + }, + "v2.ListTeamConnections" => { + "page_size" => "Integer", + "page_number" => "Integer", + "filter_sources" => "Array", + "filter_team_ids" => "Array", + "filter_connected_team_ids" => "Array", + "filter_connection_ids" => "Array", + }, + "v2.CreateTeamConnections" => { + "body" => "TeamConnectionCreateRequest", + }, "v2.GetTeamSync" => { "filter_source" => "TeamSyncAttributesSource", }, @@ -3238,20 +3252,6 @@ "v2.GetUserMemberships" => { "user_uuid" => "String", }, - "v2.DeleteTeamConnections" => { - "body" => "TeamConnectionDeleteRequest", - }, - "v2.ListTeamConnections" => { - "page_size" => "Integer", - "page_number" => "Integer", - "filter_sources" => "Array", - "filter_team_ids" => "Array", - "filter_connected_team_ids" => "Array", - "filter_connection_ids" => "Array", - }, - "v2.CreateTeamConnections" => { - "body" => "TeamConnectionCreateRequest", - }, "v2.ListIncidentTeams" => { "include" => "IncidentRelatedObject", "page_size" => "Integer", diff --git a/features/v2/given.json b/features/v2/given.json index d1d4bce2f10..d919b983487 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -350,7 +350,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate-{{ unique_lower_alnum }}\",\n \"dry_run\": false\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}" } ], "step": "there is a valid \"deployment_gate\" in the system", @@ -1209,7 +1209,7 @@ "source": "data.data[0]", "step": "there is a valid \"team_connection\" in the system", "key": "team_connection", - "tag": "Team Connections", + "tag": "Teams", "operationId": "CreateTeamConnections" }, { diff --git a/features/v2/team_connections.feature b/features/v2/team_connections.feature deleted file mode 100644 index 7bbce889e1e..00000000000 --- a/features/v2/team_connections.feature +++ /dev/null @@ -1,93 +0,0 @@ -@endpoint(team-connections) @endpoint(team-connections-v2) -Feature: Team Connections - View and manage relationships between Datadog teams and teams from - external sources, such as GitHub. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "TeamConnections" API - - @skip @team:DataDog/aaa-omg - Scenario: Create team connections returns "Bad Request" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/aaa-omg - Scenario: Create team connections returns "Conflict" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]} - When the request is sent - Then the response status is 409 Conflict - - @skip @team:DataDog/aaa-omg - Scenario: Create team connections returns "Created" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And there is a valid "dd_team" in the system - And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]} - When the request is sent - Then the response status is 201 Created - And the response "data.data[0].attributes.source" is equal to "github" - And the response "data.data[0].attributes.managed_by" is equal to "datadog" - And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" - And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" - And the response "data.data[0].type" is equal to "team_connection" - - @skip @team:DataDog/aaa-omg - Scenario: Delete team connections returns "Bad Request" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"type": "team_connection"}]} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/aaa-omg - Scenario: Delete team connections returns "No Content" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/aaa-omg - Scenario: Delete team connections returns "Not Found" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/aaa-omg - Scenario: List team connections returns "Bad Request" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/aaa-omg - Scenario: List team connections returns "OK" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/aaa-omg @with-pagination - Scenario: List team connections returns "OK" response with pagination - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - When the request with pagination is sent - Then the response status is 200 OK - - @skip @team:DataDog/aaa-omg - Scenario: List team connections with filters returns "OK" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - And request contains "filter[sources]" parameter with value ["github"] - And request contains "page[size]" parameter with value 10 - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/teams.feature b/features/v2/teams.feature index faa1ca0889d..c2f52d0d96e 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -115,6 +115,60 @@ Feature: Teams And the response "data.attributes.visible_modules" is equal to ["m1","m2"] And the response "data.attributes.hidden_modules" is equal to ["m3"] + @skip @team:DataDog/aaa-omg + Scenario: Create team connections returns "Bad Request" response + Given operation "CreateTeamConnections" enabled + And new "CreateTeamConnections" request + And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-omg + Scenario: Create team connections returns "Conflict" response + Given operation "CreateTeamConnections" enabled + And new "CreateTeamConnections" request + And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]} + When the request is sent + Then the response status is 409 Conflict + + @skip @team:DataDog/aaa-omg + Scenario: Create team connections returns "Created" response + Given operation "CreateTeamConnections" enabled + And new "CreateTeamConnections" request + And there is a valid "dd_team" in the system + And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]} + When the request is sent + Then the response status is 201 Created + And the response "data.data[0].attributes.source" is equal to "github" + And the response "data.data[0].attributes.managed_by" is equal to "datadog" + And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" + And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" + And the response "data.data[0].type" is equal to "team_connection" + + @skip @team:DataDog/aaa-omg + Scenario: Delete team connections returns "Bad Request" response + Given operation "DeleteTeamConnections" enabled + And new "DeleteTeamConnections" request + And body with value {"data": [{"type": "team_connection"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-omg + Scenario: Delete team connections returns "No Content" response + Given operation "DeleteTeamConnections" enabled + And new "DeleteTeamConnections" request + And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/aaa-omg + Scenario: Delete team connections returns "Not Found" response + Given operation "DeleteTeamConnections" enabled + And new "DeleteTeamConnections" request + And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + When the request is sent + Then the response status is 404 Not Found + @team:DataDog/aaa-omg Scenario: Get a team hierarchy link returns "API error response." response Given new "GetTeamHierarchyLink" request @@ -341,6 +395,36 @@ Feature: Teams When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/aaa-omg + Scenario: List team connections returns "Bad Request" response + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-omg + Scenario: List team connections returns "OK" response + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/aaa-omg @with-pagination + Scenario: List team connections returns "OK" response with pagination + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + When the request with pagination is sent + Then the response status is 200 OK + + @skip @team:DataDog/aaa-omg + Scenario: List team connections with filters returns "OK" response + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + And request contains "filter[sources]" parameter with value ["github"] + And request contains "page[size]" parameter with value 10 + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/aaa-omg Scenario: Remove a member team returns "API error response." response Given operation "RemoveMemberTeam" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 7c226bf60d3..c63d009095c 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4450,19 +4450,19 @@ } }, "DeleteTeamConnections": { - "tag": "Team Connections", + "tag": "Teams", "undo": { "type": "idempotent" } }, "ListTeamConnections": { - "tag": "Team Connections", + "tag": "Teams", "undo": { "type": "safe" } }, "CreateTeamConnections": { - "tag": "Team Connections", + "tag": "Teams", "undo": { "operationId": "DeleteTeamConnections", "type": "unsafe" diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index e650d69e517..364a3d497dd 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -333,13 +333,13 @@ def initialize "v2.create_sca_resolve_vulnerable_symbols": false, "v2.create_sca_result": false, "v2.add_member_team": false, + "v2.create_team_connections": false, + "v2.delete_team_connections": false, "v2.get_team_sync": false, "v2.list_member_teams": false, + "v2.list_team_connections": false, "v2.remove_member_team": false, "v2.sync_teams": false, - "v2.create_team_connections": false, - "v2.delete_team_connections": false, - "v2.list_team_connections": false, "v2.create_incident_team": false, "v2.delete_incident_team": false, "v2.get_incident_team": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index b5a2184aca0..0a98d937549 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4646,7 +4646,6 @@ def overrides "v2.spans_metrics_api" => "SpansMetricsAPI", "v2.static_analysis_api" => "StaticAnalysisAPI", "v2.synthetics_api" => "SyntheticsAPI", - "v2.team_connections_api" => "TeamConnectionsAPI", "v2.teams_api" => "TeamsAPI", "v2.test_optimization_api" => "TestOptimizationAPI", "v2.usage_metering_api" => "UsageMeteringAPI", diff --git a/lib/datadog_api_client/v2/api/team_connections_api.rb b/lib/datadog_api_client/v2/api/team_connections_api.rb deleted file mode 100644 index 2a8e2d2b6cb..00000000000 --- a/lib/datadog_api_client/v2/api/team_connections_api.rb +++ /dev/null @@ -1,272 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'cgi' - -module DatadogAPIClient::V2 - class TeamConnectionsAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create team connections. - # - # @see #create_team_connections_with_http_info - def create_team_connections(body, opts = {}) - data, _status_code, _headers = create_team_connections_with_http_info(body, opts) - data - end - - # Create team connections. - # - # Create multiple team connections. - # - # @param body [TeamConnectionCreateRequest] - # @param opts [Hash] the optional parameters - # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers - def create_team_connections_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_team_connections".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_team_connections") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_team_connections")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TeamConnectionsAPI.create_team_connections ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling TeamConnectionsAPI.create_team_connections" - end - # resource path - local_var_path = '/api/v2/team/connections' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_team_connections, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TeamConnectionsAPI#create_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete team connections. - # - # @see #delete_team_connections_with_http_info - def delete_team_connections(body, opts = {}) - delete_team_connections_with_http_info(body, opts) - nil - end - - # Delete team connections. - # - # Delete multiple team connections. - # - # @param body [TeamConnectionDeleteRequest] - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_team_connections_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_team_connections".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_team_connections") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_team_connections")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TeamConnectionsAPI.delete_team_connections ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling TeamConnectionsAPI.delete_team_connections" - end - # resource path - local_var_path = '/api/v2/team/connections' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_team_connections, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TeamConnectionsAPI#delete_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List team connections. - # - # @see #list_team_connections_with_http_info - def list_team_connections(opts = {}) - data, _status_code, _headers = list_team_connections_with_http_info(opts) - data - end - - # List team connections. - # - # Returns all team connections. - # - # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_number Specific page number to return. - # @option opts [Array] :filter_sources Filter team connections by external source systems. - # @option opts [Array] :filter_team_ids Filter team connections by Datadog team IDs. - # @option opts [Array] :filter_connected_team_ids Filter team connections by connected team IDs from external systems. - # @option opts [Array] :filter_connection_ids Filter team connections by connection IDs. - # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers - def list_team_connections_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_team_connections".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_team_connections") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_team_connections")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TeamConnectionsAPI.list_team_connections ...' - end - # resource path - local_var_path = '/api/v2/team/connections' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? - query_params[:'filter[sources]'] = @api_client.build_collection_param(opts[:'filter_sources'], :csv) if !opts[:'filter_sources'].nil? - query_params[:'filter[team_ids]'] = @api_client.build_collection_param(opts[:'filter_team_ids'], :csv) if !opts[:'filter_team_ids'].nil? - query_params[:'filter[connected_team_ids]'] = @api_client.build_collection_param(opts[:'filter_connected_team_ids'], :csv) if !opts[:'filter_connected_team_ids'].nil? - query_params[:'filter[connection_ids]'] = @api_client.build_collection_param(opts[:'filter_connection_ids'], :csv) if !opts[:'filter_connection_ids'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_team_connections, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TeamConnectionsAPI#list_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List team connections. - # - # Provide a paginated version of {#list_team_connections}, returning all items. - # - # To use it you need to use a block: list_team_connections_with_pagination { |item| p item } - # - # @yield [TeamConnection] Paginated items - def list_team_connections_with_pagination(opts = {}) - api_version = "V2" - page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) - @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) - while true do - response = list_team_connections(opts) - @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } - if @api_client.get_attribute_from_path(response, "data").length < page_size - break - end - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) - end - end - end -end diff --git a/lib/datadog_api_client/v2/api/teams_api.rb b/lib/datadog_api_client/v2/api/teams_api.rb index f33f44e1775..d4cc6e99b74 100644 --- a/lib/datadog_api_client/v2/api/teams_api.rb +++ b/lib/datadog_api_client/v2/api/teams_api.rb @@ -242,6 +242,79 @@ def create_team_with_http_info(body, opts = {}) return data, status_code, headers end + # Create team connections. + # + # @see #create_team_connections_with_http_info + def create_team_connections(body, opts = {}) + data, _status_code, _headers = create_team_connections_with_http_info(body, opts) + data + end + + # Create team connections. + # + # Create multiple team connections. + # + # @param body [TeamConnectionCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers + def create_team_connections_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_team_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_team_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_team_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_connections ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_connections" + end + # resource path + local_var_path = '/api/v2/team/connections' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_team_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamsAPI#create_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a team link. # # @see #create_team_link_with_http_info @@ -451,6 +524,79 @@ def delete_team_with_http_info(team_id, opts = {}) return data, status_code, headers end + # Delete team connections. + # + # @see #delete_team_connections_with_http_info + def delete_team_connections(body, opts = {}) + delete_team_connections_with_http_info(body, opts) + nil + end + + # Delete team connections. + # + # Delete multiple team connections. + # + # @param body [TeamConnectionDeleteRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_team_connections_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_team_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_team_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_team_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_connections ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.delete_team_connections" + end + # resource path + local_var_path = '/api/v2/team/connections' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_team_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamsAPI#delete_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Remove a team link. # # @see #delete_team_link_with_http_info @@ -1268,6 +1414,106 @@ def list_member_teams_with_pagination(super_team_id, opts = {}) end end + # List team connections. + # + # @see #list_team_connections_with_http_info + def list_team_connections(opts = {}) + data, _status_code, _headers = list_team_connections_with_http_info(opts) + data + end + + # List team connections. + # + # Returns all team connections. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. + # @option opts [Integer] :page_number Specific page number to return. + # @option opts [Array] :filter_sources Filter team connections by external source systems. + # @option opts [Array] :filter_team_ids Filter team connections by Datadog team IDs. + # @option opts [Array] :filter_connected_team_ids Filter team connections by connected team IDs from external systems. + # @option opts [Array] :filter_connection_ids Filter team connections by connection IDs. + # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers + def list_team_connections_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_team_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_team_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_team_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamsAPI.list_team_connections ...' + end + # resource path + local_var_path = '/api/v2/team/connections' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'filter[sources]'] = @api_client.build_collection_param(opts[:'filter_sources'], :csv) if !opts[:'filter_sources'].nil? + query_params[:'filter[team_ids]'] = @api_client.build_collection_param(opts[:'filter_team_ids'], :csv) if !opts[:'filter_team_ids'].nil? + query_params[:'filter[connected_team_ids]'] = @api_client.build_collection_param(opts[:'filter_connected_team_ids'], :csv) if !opts[:'filter_connected_team_ids'].nil? + query_params[:'filter[connection_ids]'] = @api_client.build_collection_param(opts[:'filter_connection_ids'], :csv) if !opts[:'filter_connection_ids'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_team_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamsAPI#list_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List team connections. + # + # Provide a paginated version of {#list_team_connections}, returning all items. + # + # To use it you need to use a block: list_team_connections_with_pagination { |item| p item } + # + # @yield [TeamConnection] Paginated items + def list_team_connections_with_pagination(opts = {}) + api_version = "V2" + page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) + @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) + while true do + response = list_team_connections(opts) + @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } + if @api_client.get_attribute_from_path(response, "data").length < page_size + break + end + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) + end + end + # Get team hierarchy links. # # @see #list_team_hierarchy_links_with_http_info