diff --git a/.apigentools-info b/.apigentools-info index a777fbf825..314a0cc70d 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-27 17:12:13.841874", - "spec_repo_commit": "ed439f7c" + "regenerated": "2025-06-03 09:24:16.469657", + "spec_repo_commit": "5906d277" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-27 17:12:13.857049", - "spec_repo_commit": "ed439f7c" + "regenerated": "2025-06-03 09:24:16.484530", + "spec_repo_commit": "5906d277" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5c41dee7d8..2fd91a6868 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -743,7 +743,7 @@ components: description: 'Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, - `connection`, `connection-group`.' + `connection`, `connection-group`, `rum-application`.' example: dashboard:abc-def-ghi in: path name: resource_id @@ -54215,6 +54215,8 @@ paths: - Connection Groups: `connection-group` + - RUM Applications: `rum-application` + #### Supported relations for resources @@ -54254,7 +54256,9 @@ paths: Connections | `viewer`, `resolver`, `editor` - Connection Groups | `viewer`, `editor`' + Connection Groups | `viewer`, `editor` + + RUM Application | `viewer`, `editor`' operationId: UpdateRestrictionPolicy parameters: - $ref: '#/components/parameters/ResourceID' diff --git a/src/datadog_api_client/v2/api/restriction_policies_api.py b/src/datadog_api_client/v2/api/restriction_policies_api.py index 8c9e25dd1e..9ad3afe47e 100644 --- a/src/datadog_api_client/v2/api/restriction_policies_api.py +++ b/src/datadog_api_client/v2/api/restriction_policies_api.py @@ -112,7 +112,7 @@ def delete_restriction_policy( Deletes the restriction policy associated with a specified resource. - :param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group``. + :param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application``. :type resource_id: str :rtype: None """ @@ -129,7 +129,7 @@ def get_restriction_policy( Retrieves the restriction policy associated with a specified resource. - :param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group``. + :param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application``. :type resource_id: str :rtype: RestrictionPolicyResponse """ @@ -170,6 +170,7 @@ def update_restriction_policy( * App Builder Apps: ``app-builder-app`` * Connections: ``connection`` * Connection Groups: ``connection-group`` + * RUM Applications: ``rum-application`` **Supported relations for resources** @@ -212,9 +213,11 @@ def update_restriction_policy( - ``viewer`` , ``resolver`` , ``editor`` * - Connection Groups - ``viewer`` , ``editor`` + * - RUM Application + - ``viewer`` , ``editor`` - :param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group``. + :param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application``. :type resource_id: str :param body: Restriction policy payload :type body: RestrictionPolicyUpdateRequest diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.frozen index 454c4bb29a..55dce406e3 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:43.940Z \ No newline at end of file +2025-04-03T20:58:02.871Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.yaml index cce8cd2cc1..c4d0d5fb96 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_bad_request_response-1744280983","host:abc"]},"name":"test + body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_bad_request_response-1743713882","host:abc"]},"name":"test rule","recipients":["@slack-test-channel","@jira-test"]},"type":"monitor-notification-rule"}}' headers: accept: diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.frozen index 86ab3de39b..d20cd994c4 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:44.273Z \ No newline at end of file +2025-04-03T20:58:03.005Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.yaml index dc45878038..083550788b 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1744280984"]},"name":"test + body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1743713883"]},"name":"test rule","recipients":["slack-test-channel","jira-test"]},"type":"monitor-notification-rule"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule response: body: - string: '{"data":{"type":"monitor-notification-rule","attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1744280984"]},"recipients":["slack-test-channel","jira-test"],"name":"test - rule","created_at":"2025-04-10T10:29:44.595607+00:00","modified_at":"1970-01-01T00:00:00+00:00"},"id":"a3323ef6-2a04-4ef9-8de8-cbcff5c3c203","relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]} + string: '{"data":{"type":"monitor-notification-rule","id":"55959a04-463a-4579-8386-8c2ca120aa52","attributes":{"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1743713883"]},"created_at":"2025-04-03T20:58:03.137650+00:00","recipients":["slack-test-channel","jira-test"],"name":"test + rule","modified_at":"1970-01-01T00:00:00+00:00"}}} ' headers: @@ -27,7 +27,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/a3323ef6-2a04-4ef9-8de8-cbcff5c3c203 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/55959a04-463a-4579-8386-8c2ca120aa52 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.frozen index 2590d462ec..3c3eea7d14 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:46.694Z \ No newline at end of file +2025-04-03T20:58:03.324Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.yaml index 769387c1b7..8b56c2ce67 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.yaml @@ -8,7 +8,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/00000000-0000-1234-0000-000000000000 response: body: - string: '{"errors":["Monitor Notification Rule not found"]}' + string: '{"errors":["Monitor notification rule not found"]}' headers: content-type: - application/json diff --git a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.frozen index c1dc706f2c..66abae37fd 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:47.053Z \ No newline at end of file +2025-04-03T20:58:03.428Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.yaml index 63e33bbea1..b67af1b26d 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1744280987"]},"name":"test + body: '{"data":{"attributes":{"filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1743713883"]},"name":"test rule","recipients":["slack-monitor-app"]},"type":"monitor-notification-rule"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule response: body: - string: '{"data":{"type":"monitor-notification-rule","relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}},"attributes":{"filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1744280987"]},"created_at":"2025-04-10T10:29:47.326243+00:00","name":"test - rule","recipients":["slack-monitor-app"],"modified_at":"1970-01-01T00:00:00+00:00"},"id":"66e399af-c07e-414d-b4f2-93e196d7b7b7"},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]} + string: '{"data":{"type":"monitor-notification-rule","id":"cef4c2c7-27b3-4259-9bdd-ec434b4a8a0e","attributes":{"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"test + rule","created_at":"2025-04-03T20:58:03.555501+00:00","modified_at":"1970-01-01T00:00:00+00:00","filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1743713883"]},"recipients":["slack-monitor-app"]}}} ' headers: @@ -27,7 +27,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/66e399af-c07e-414d-b4f2-93e196d7b7b7 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/cef4c2c7-27b3-4259-9bdd-ec434b4a8a0e response: body: string: '' @@ -43,10 +43,10 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/66e399af-c07e-414d-b4f2-93e196d7b7b7 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/cef4c2c7-27b3-4259-9bdd-ec434b4a8a0e response: body: - string: '{"errors":["Monitor Notification Rule not found"]}' + string: '{"errors":["Monitor notification rule not found"]}' headers: content-type: - application/json diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.frozen index 4d52b4ac38..a8e729593b 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:52.213Z \ No newline at end of file +2025-04-03T20:58:03.884Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.yaml index 2373ba2783..b3f0738218 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_not_found_response.yaml @@ -8,7 +8,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/00000000-0000-1234-0000-000000000000 response: body: - string: '{"errors":["Monitor Notification Rule not found"]}' + string: '{"errors":["Monitor notification rule not found"]}' headers: content-type: - application/json diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.frozen index 23fa2591c9..3563f67840 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:52.537Z \ No newline at end of file +2025-04-03T20:58:04.007Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.yaml index 4735413fb7..9867f849c5 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_a_monitor_notification_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["app:test-get_a_monitor_notification_rule_returns_ok_response-1744280992"]},"name":"test + body: '{"data":{"attributes":{"filter":{"tags":["app:test-get_a_monitor_notification_rule_returns_ok_response-1743713884"]},"name":"test rule","recipients":["slack-monitor-app"]},"type":"monitor-notification-rule"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule response: body: - string: '{"data":{"type":"monitor-notification-rule","attributes":{"created_at":"2025-04-10T10:29:52.938158+00:00","filter":{"tags":["app:test-get_a_monitor_notification_rule_returns_ok_response-1744280992"]},"recipients":["slack-monitor-app"],"name":"test - rule","modified_at":"1970-01-01T00:00:00+00:00"},"id":"97afb4ac-6953-445f-9a0a-d225673449a6","relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]} + string: '{"data":{"type":"monitor-notification-rule","attributes":{"filter":{"tags":["app:test-get_a_monitor_notification_rule_returns_ok_response-1743713884"]},"created_at":"2025-04-03T20:58:04.156763+00:00","recipients":["slack-monitor-app"],"modified_at":"1970-01-01T00:00:00+00:00","creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"test + rule"},"id":"8e0ab047-d891-476c-8fb1-da4d80ddc129"}} ' headers: @@ -27,11 +27,11 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/97afb4ac-6953-445f-9a0a-d225673449a6 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/8e0ab047-d891-476c-8fb1-da4d80ddc129 response: body: - string: '{"data":{"type":"monitor-notification-rule","attributes":{"name":"test - rule","created_at":"2025-04-10T10:29:52.938158+00:00","recipients":["slack-monitor-app"],"filter":{"tags":["app:test-get_a_monitor_notification_rule_returns_ok_response-1744280992"]},"modified_at":"2025-04-10T10:29:52.948837+00:00"},"id":"97afb4ac-6953-445f-9a0a-d225673449a6"}} + string: '{"data":{"type":"monitor-notification-rule","attributes":{"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"test + rule","created_at":"2025-04-03T20:58:04.156763+00:00","recipients":["slack-monitor-app"],"modified_at":"2025-04-03T20:58:04.164001+00:00","filter":{"tags":["app:test-get_a_monitor_notification_rule_returns_ok_response-1743713884"]}},"id":"8e0ab047-d891-476c-8fb1-da4d80ddc129"}} ' headers: @@ -46,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/97afb4ac-6953-445f-9a0a-d225673449a6 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/8e0ab047-d891-476c-8fb1-da4d80ddc129 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.frozen index 2681e36773..1b1c436dad 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:54.937Z \ No newline at end of file +2025-04-03T20:58:04.487Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.yaml index 240a547129..9b2c57d601 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_all_monitor_notification_rules_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["app:test-get_all_monitor_notification_rules_returns_ok_response-1744280994"]},"name":"test + body: '{"data":{"attributes":{"filter":{"tags":["app:test-get_all_monitor_notification_rules_returns_ok_response-1743713884"]},"name":"test rule","recipients":["slack-monitor-app"]},"type":"monitor-notification-rule"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule response: body: - string: '{"data":{"type":"monitor-notification-rule","attributes":{"name":"test - rule","filter":{"tags":["app:test-get_all_monitor_notification_rules_returns_ok_response-1744280994"]},"recipients":["slack-monitor-app"],"modified_at":"1970-01-01T00:00:00+00:00","created_at":"2025-04-10T10:29:55.362004+00:00"},"relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}},"id":"b7122864-6517-45d3-8dc1-f226a08dd8f4"},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]} + string: '{"data":{"type":"monitor-notification-rule","attributes":{"filter":{"tags":["app:test-get_all_monitor_notification_rules_returns_ok_response-1743713884"]},"recipients":["slack-monitor-app"],"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","modified_at":"1970-01-01T00:00:00+00:00","name":"test + rule","created_at":"2025-04-03T20:58:04.604345+00:00"},"id":"6e5b7a93-37b5-44b8-9098-2d31b6dd84b6"}} ' headers: @@ -30,8 +30,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule response: body: - string: '{"data":[{"type":"monitor-notification-rule","attributes":{"filter":{"tags":["app:test-get_all_monitor_notification_rules_returns_ok_response-1744280994"]},"name":"test - rule","recipients":["slack-monitor-app"],"modified_at":"2025-04-10T10:29:55.373154+00:00","created_at":"2025-04-10T10:29:55.362004+00:00"},"id":"b7122864-6517-45d3-8dc1-f226a08dd8f4"}]} + string: '{"data":[{"type":"monitor-notification-rule","id":"6e5b7a93-37b5-44b8-9098-2d31b6dd84b6","attributes":{"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"test + rule","recipients":["slack-monitor-app"],"created_at":"2025-04-03T20:58:04.604345+00:00","filter":{"tags":["app:test-get_all_monitor_notification_rules_returns_ok_response-1743713884"]},"modified_at":"2025-04-03T20:58:04.616893+00:00"}}]} ' headers: @@ -46,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/b7122864-6517-45d3-8dc1-f226a08dd8f4 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/6e5b7a93-37b5-44b8-9098-2d31b6dd84b6 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.frozen index c547acf2ee..f00bc0a89c 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:56.210Z \ No newline at end of file +2025-04-03T20:58:04.953Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.yaml index 525bb7b3ef..fc6511550c 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_bad_request_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_bad_request_response-1744280996"]},"name":"test + body: '{"data":{"attributes":{"filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_bad_request_response-1743713884"]},"name":"test rule","recipients":["slack-monitor-app"]},"type":"monitor-notification-rule"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule response: body: - string: '{"data":{"type":"monitor-notification-rule","attributes":{"filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_bad_request_response-1744280996"]},"created_at":"2025-04-10T10:29:56.523436+00:00","recipients":["slack-monitor-app"],"name":"test - rule","modified_at":"1970-01-01T00:00:00+00:00"},"id":"f26ba0a6-1e84-4984-b061-4172a25a1332","relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]} + string: '{"data":{"type":"monitor-notification-rule","attributes":{"filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_bad_request_response-1743713884"]},"recipients":["slack-monitor-app"],"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","modified_at":"1970-01-01T00:00:00+00:00","name":"test + rule","created_at":"2025-04-03T20:58:05.080336+00:00"},"id":"30523422-5ed5-477d-b310-211ab89031dc"}} ' headers: @@ -22,15 +22,15 @@ interactions: code: 200 message: OK - request: - body: '{"data":{"attributes":{"filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_bad_request_response-1744280996","host:abc"]},"name":"updated - rule","recipients":["@slack-test-channel"]},"id":"f26ba0a6-1e84-4984-b061-4172a25a1332","type":"monitor-notification-rule"}}' + body: '{"data":{"attributes":{"filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_bad_request_response-1743713884","host:abc"]},"name":"updated + rule","recipients":["@slack-test-channel"]},"id":"30523422-5ed5-477d-b310-211ab89031dc","type":"monitor-notification-rule"}}' headers: accept: - application/json content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/f26ba0a6-1e84-4984-b061-4172a25a1332 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/30523422-5ed5-477d-b310-211ab89031dc response: body: string: '{"errors":["Invalid recipients: Recipient handle should not start with @@ -47,7 +47,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/f26ba0a6-1e84-4984-b061-4172a25a1332 + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/30523422-5ed5-477d-b310-211ab89031dc response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.frozen index 2eae355308..becae1657e 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:57.263Z \ No newline at end of file +2025-04-03T20:58:05.447Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.yaml index 8464bd0b74..935c3c6f15 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_not_found_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_not_found_response-1744280997","host:abc"]},"name":"updated + body: '{"data":{"attributes":{"filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_not_found_response-1743713885","host:abc"]},"name":"updated rule","recipients":["slack-test-channel","jira-test"]},"id":"00000000-0000-1234-0000-000000000000","type":"monitor-notification-rule"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/00000000-0000-1234-0000-000000000000 response: body: - string: '{"errors":["Monitor Notification Rule not found"]}' + string: '{"errors":["Monitor notification rule not found"]}' headers: content-type: - application/json diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.frozen index b7d42a4489..bb1ae03788 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-04-10T10:29:57.629Z \ No newline at end of file +2025-04-03T20:58:05.597Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.yaml index 917ed73291..a632659937 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_a_monitor_notification_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_ok_response-1744280997"]},"name":"test + body: '{"data":{"attributes":{"filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_ok_response-1743713885"]},"name":"test rule","recipients":["slack-monitor-app"]},"type":"monitor-notification-rule"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/monitor/notification_rule response: body: - string: '{"data":{"type":"monitor-notification-rule","attributes":{"name":"test - rule","recipients":["slack-monitor-app"],"modified_at":"1970-01-01T00:00:00+00:00","filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_ok_response-1744280997"]},"created_at":"2025-04-10T10:29:57.930349+00:00"},"id":"da2c8a3b-94ea-49be-a85b-39c5eff99d6a","relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]} + string: '{"data":{"type":"monitor-notification-rule","attributes":{"recipients":["slack-monitor-app"],"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","created_at":"2025-04-03T20:58:05.737805+00:00","modified_at":"1970-01-01T00:00:00+00:00","filter":{"tags":["app:test-update_a_monitor_notification_rule_returns_ok_response-1743713885"]},"name":"test + rule"},"id":"f81c2483-18e3-4db3-ad1d-56e2e0ce41ef"}} ' headers: @@ -22,19 +22,19 @@ interactions: code: 200 message: OK - request: - body: '{"data":{"attributes":{"filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_ok_response-1744280997","host:abc"]},"name":"updated - rule","recipients":["slack-test-channel"]},"id":"da2c8a3b-94ea-49be-a85b-39c5eff99d6a","type":"monitor-notification-rule"}}' + body: '{"data":{"attributes":{"filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_ok_response-1743713885","host:abc"]},"name":"updated + rule","recipients":["slack-test-channel"]},"id":"f81c2483-18e3-4db3-ad1d-56e2e0ce41ef","type":"monitor-notification-rule"}}' headers: accept: - application/json content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/da2c8a3b-94ea-49be-a85b-39c5eff99d6a + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/f81c2483-18e3-4db3-ad1d-56e2e0ce41ef response: body: - string: '{"data":{"type":"monitor-notification-rule","id":"da2c8a3b-94ea-49be-a85b-39c5eff99d6a","attributes":{"modified_at":"2025-04-10T10:29:58.320928+00:00","recipients":["slack-test-channel"],"name":"updated - rule","filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_ok_response-1744280997","host:abc"]},"created_at":"2025-04-10T10:29:57.930349+00:00"},"relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]} + string: '{"data":{"type":"monitor-notification-rule","attributes":{"recipients":["slack-test-channel"],"created_at":"2025-04-03T20:58:05.737806+00:00","filter":{"tags":["test:test-update_a_monitor_notification_rule_returns_ok_response-1743713885","host:abc"]},"name":"updated + rule","modified_at":"2025-04-03T20:58:05.889695+00:00","creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0"},"id":"f81c2483-18e3-4db3-ad1d-56e2e0ce41ef"}} ' headers: @@ -49,7 +49,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/da2c8a3b-94ea-49be-a85b-39c5eff99d6a + uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/f81c2483-18e3-4db3-ad1d-56e2e0ce41ef response: body: string: ''