From 298ef3f59cf8f5a7f5b58b41c197faed37a83a28 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 16 Dec 2025 18:27:42 +0000 Subject: [PATCH] Regenerate client from commit f202d5e of spec repo --- .generator/schemas/v2/openapi.yaml | 455 +----------------- docs/datadog_api_client.v2.model.rst | 133 ----- .../on-call/CreateUserNotificationChannel.py | 39 -- .../on-call/DeleteUserNotificationChannel.py | 21 - .../v2/on-call/GetUserNotificationChannel.py | 23 - .../on-call/ListUserNotificationChannels.py | 19 - examples/v2/reference-tables/UpsertRows.py | 1 + src/datadog_api_client/configuration.py | 3 - src/datadog_api_client/v2/api/on_call_api.py | 192 -------- ...tch_upsert_rows_request_data_attributes.py | 22 +- ...reate_email_notification_channel_config.py | 64 --- .../create_notification_channel_attributes.py | 57 --- .../create_notification_channel_config.py | 53 -- .../model/create_notification_channel_data.py | 58 --- ...reate_phone_notification_channel_config.py | 48 -- ...reate_user_notification_channel_request.py | 40 -- .../list_notification_channels_response.py | 42 -- .../v2/model/notification_channel.py | 42 -- .../model/notification_channel_attributes.py | 63 --- .../v2/model/notification_channel_config.py | 69 --- .../v2/model/notification_channel_data.py | 64 --- .../notification_channel_email_config.py | 64 --- .../notification_channel_email_config_type.py | 35 -- .../notification_channel_email_format_type.py | 38 -- .../notification_channel_phone_config.py | 86 ---- .../notification_channel_phone_config_type.py | 35 -- .../model/notification_channel_push_config.py | 52 -- .../notification_channel_push_config_type.py | 35 -- .../v2/model/notification_channel_type.py | 35 -- src/datadog_api_client/v2/models/__init__.py | 38 -- ...for_a_user_returns_created_response.frozen | 1 - ...l_for_a_user_returns_created_response.yaml | 56 --- ..._a_user_returns_no_content_response.frozen | 1 - ...or_a_user_returns_no_content_response.yaml | 70 --- ...nnel_for_a_user_returns_ok_response.frozen | 1 - ...hannel_for_a_user_returns_ok_response.yaml | 72 --- ...nels_for_a_user_returns_ok_response.frozen | 1 - ...annels_for_a_user_returns_ok_response.yaml | 72 --- tests/v2/features/given.json | 16 - tests/v2/features/incidents.feature | 6 +- tests/v2/features/on-call.feature | 107 ---- tests/v2/features/reference_tables.feature | 6 +- tests/v2/features/undo.json | 24 - 43 files changed, 23 insertions(+), 2336 deletions(-) delete mode 100644 examples/v2/on-call/CreateUserNotificationChannel.py delete mode 100644 examples/v2/on-call/DeleteUserNotificationChannel.py delete mode 100644 examples/v2/on-call/GetUserNotificationChannel.py delete mode 100644 examples/v2/on-call/ListUserNotificationChannels.py delete mode 100644 src/datadog_api_client/v2/model/create_email_notification_channel_config.py delete mode 100644 src/datadog_api_client/v2/model/create_notification_channel_attributes.py delete mode 100644 src/datadog_api_client/v2/model/create_notification_channel_config.py delete mode 100644 src/datadog_api_client/v2/model/create_notification_channel_data.py delete mode 100644 src/datadog_api_client/v2/model/create_phone_notification_channel_config.py delete mode 100644 src/datadog_api_client/v2/model/create_user_notification_channel_request.py delete mode 100644 src/datadog_api_client/v2/model/list_notification_channels_response.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_attributes.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_config.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_data.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_email_config.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_email_config_type.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_email_format_type.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_phone_config.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_phone_config_type.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_push_config.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_push_config_type.py delete mode 100644 src/datadog_api_client/v2/model/notification_channel_type.py delete mode 100644 tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.yaml delete mode 100644 tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.yaml delete mode 100644 tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.yaml delete mode 100644 tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.frozen delete mode 100644 tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.yaml diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 42168cb0f3..7c89835b6e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6968,15 +6968,21 @@ components: BatchUpsertRowsRequestDataAttributes: description: Attributes containing row data values for row creation or update operations. + example: + values: + age: 25 + example_key_value: primary_key_value + name: row_name properties: values: additionalProperties: - x-required-field: true - description: Key-value pairs representing row data, where keys are field - names from the schema. - example: - example_key_value: primary_key_value - name: row_name + oneOf: + - type: string + - format: int32 + maximum: 2147483647 + type: integer + description: Key-value pairs representing row data, where keys are schema + field names and values match the corresponding column types. type: object required: - values @@ -13195,27 +13201,6 @@ components: - options - type type: object - CreateEmailNotificationChannelConfig: - description: Configuration to create an e-mail notification channel - properties: - address: - description: The e-mail address to be notified - example: '' - type: string - formats: - description: Preferred content formats for notifications. - example: - - html - items: - $ref: '#/components/schemas/NotificationChannelEmailFormatType' - type: array - type: - $ref: '#/components/schemas/NotificationChannelEmailConfigType' - required: - - type - - address - - formats - type: object CreateIncidentNotificationRuleRequest: description: Create request for a notification rule. properties: @@ -13303,29 +13288,6 @@ components: - findings - project type: object - CreateNotificationChannelAttributes: - description: Attributes for creating an on-call notification channel. - properties: - config: - $ref: '#/components/schemas/CreateNotificationChannelConfig' - description: Notification channel configuration - type: object - CreateNotificationChannelConfig: - description: Defines the configuration for creating an On-Call notification - channel - oneOf: - - $ref: '#/components/schemas/CreatePhoneNotificationChannelConfig' - - $ref: '#/components/schemas/CreateEmailNotificationChannelConfig' - CreateNotificationChannelData: - description: Data for creating an on-call notification channel - properties: - attributes: - $ref: '#/components/schemas/CreateNotificationChannelAttributes' - type: - $ref: '#/components/schemas/NotificationChannelType' - required: - - type - type: object CreateNotificationRuleParameters: description: Body of the notification rule create request. properties: @@ -13486,19 +13448,6 @@ components: type: string x-enum-varnames: - PAGES - CreatePhoneNotificationChannelConfig: - description: Configuration to create a phone notification channel - properties: - number: - description: The E-164 formatted phone number (e.g. +3371234567) - example: '' - type: string - type: - $ref: '#/components/schemas/NotificationChannelPhoneConfigType' - required: - - type - - number - type: object CreateRuleRequest: description: Scorecard create rule request. properties: @@ -14065,23 +14014,6 @@ components: type: string x-enum-varnames: - UPLOAD - CreateUserNotificationChannelRequest: - description: A top-level wrapper for creating a notification channel for a user - example: - data: - attributes: - config: - address: foo@bar.com - formats: - - html - type: email - type: notification_channels - properties: - data: - $ref: '#/components/schemas/CreateNotificationChannelData' - required: - - data - type: object CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -30579,14 +30511,6 @@ components: meta: $ref: '#/components/schemas/KindResponseMeta' type: object - ListNotificationChannelsResponse: - description: Response type for listing notification channels for a user - properties: - data: - items: - $ref: '#/components/schemas/NotificationChannelData' - type: array - type: object ListPipelinesResponse: description: Represents the response payload containing a list of pipelines and associated metadata. @@ -34761,174 +34685,6 @@ components: required: - notebookTrigger type: object - NotificationChannel: - description: A top-level wrapper for a user notification channel - example: - data: - attributes: - config: - address: foo@bar.com - formats: - - html - type: email - id: 27590dae-47be-4a7d-9abf-8f4e45124020 - type: notification_channels - properties: - data: - $ref: '#/components/schemas/NotificationChannelData' - type: object - NotificationChannelAttributes: - description: Attributes for an on-call notification channel. - properties: - active: - description: Whether the notification channel is currently active. - type: boolean - config: - $ref: '#/components/schemas/NotificationChannelConfig' - description: Notification channel configuration - type: object - NotificationChannelConfig: - description: Defines the configuration for an On-Call notification channel - oneOf: - - $ref: '#/components/schemas/NotificationChannelPhoneConfig' - - $ref: '#/components/schemas/NotificationChannelEmailConfig' - - $ref: '#/components/schemas/NotificationChannelPushConfig' - NotificationChannelData: - description: Data for an on-call notification channel - properties: - attributes: - $ref: '#/components/schemas/NotificationChannelAttributes' - id: - description: Unique identifier for the channel - type: string - type: - $ref: '#/components/schemas/NotificationChannelType' - required: - - type - type: object - NotificationChannelEmailConfig: - description: Email notification channel configuration - properties: - address: - description: The e-mail address to be notified - example: '' - type: string - formats: - description: Preferred content formats for notifications. - example: - - html - items: - $ref: '#/components/schemas/NotificationChannelEmailFormatType' - type: array - type: - $ref: '#/components/schemas/NotificationChannelEmailConfigType' - required: - - type - - address - - formats - type: object - NotificationChannelEmailConfigType: - default: email - description: Indicates that the notification channel is an e-mail address - enum: - - email - example: email - type: string - x-enum-varnames: - - EMAIL - NotificationChannelEmailFormatType: - default: html - description: Specifies the format of the e-mail that is sent for On-Call notifications - enum: - - html - - text - example: html - type: string - x-enum-varnames: - - HTML - - TEXT - NotificationChannelPhoneConfig: - description: Phone notification channel configuration - properties: - formatted_number: - description: The formatted international version of Number (e.g. +33 7 1 - 23 45 67). - example: '' - type: string - number: - description: The E-164 formatted phone number (e.g. +3371234567) - example: '' - type: string - region: - description: The ISO 3166-1 alpha-2 two-letter country code. - example: '' - type: string - sms_subscribed_at: - description: If present, the date the user subscribed this number to SMS - messages - format: date-time - nullable: true - type: string - type: - $ref: '#/components/schemas/NotificationChannelPhoneConfigType' - verified: - description: Indicates whether this phone has been verified by the user - in Datadog On-Call - example: false - type: boolean - required: - - type - - number - - formatted_number - - region - - verified - type: object - NotificationChannelPhoneConfigType: - default: phone - description: Indicates that the notification channel is a phone - enum: - - phone - example: phone - type: string - x-enum-varnames: - - PHONE - NotificationChannelPushConfig: - description: Push notification channel configuration - properties: - application_name: - description: The name of the application used to receive push notifications - example: '' - type: string - device_name: - description: The name of the mobile device being used - example: '' - type: string - type: - $ref: '#/components/schemas/NotificationChannelPushConfigType' - required: - - type - - device_name - - application_name - type: object - NotificationChannelPushConfigType: - default: push - description: Indicates that the notification channel is a mobile device for - push notifications - enum: - - push - example: push - type: string - x-enum-varnames: - - PUSH - NotificationChannelType: - default: notification_channels - description: Indicates that the resource is of type 'notification_channels'. - enum: - - notification_channels - example: notification_channels - type: string - x-enum-varnames: - - NOTIFICATION_CHANNELS NotificationRule: description: 'Notification rules allow full control over notifications generated by the various Datadog security products. @@ -69334,9 +69090,6 @@ paths: operator: OR permissions: - incident_read - x-unstable: '**Note**: This endpoint is in Preview. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: description: Create an impact for an incident. operationId: CreateIncidentImpact @@ -69380,9 +69133,6 @@ paths: operator: OR permissions: - incident_write - x-unstable: '**Note**: This endpoint is in Preview. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents/{incident_id}/impacts/{impact_id}: delete: description: Delete an incident impact. @@ -69413,9 +69163,6 @@ paths: operator: OR permissions: - incident_write - x-unstable: '**Note**: This endpoint is in Preview. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents/{incident_id}/relationships/integrations: get: description: Get all integration metadata for an incident. @@ -75991,184 +75738,6 @@ paths: operator: AND permissions: - on_call_write - /api/v2/on-call/users/{user_id}/notification-channels: - get: - description: List the notification channels for a user. The authenticated user - must be the target user or have the `on_call_admin` permission - operationId: ListUserNotificationChannels - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ListNotificationChannelsResponse' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '401': - $ref: '#/components/responses/UnauthorizedResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List On-Call notification channels for a user - tags: - - On-Call - x-permission: - operator: AND - permissions: - - on_call_read - post: - description: Create a new notification channel for a user. The authenticated - user must be the target user or have the `on_call_admin` permission - operationId: CreateUserNotificationChannel - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateUserNotificationChannelRequest' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationChannel' - description: Created - '400': - $ref: '#/components/responses/BadRequestResponse' - '401': - $ref: '#/components/responses/UnauthorizedResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Create an On-Call notification channel for a user - tags: - - On-Call - x-permission: - operator: AND - permissions: - - on_call_respond - /api/v2/on-call/users/{user_id}/notification-channels/{channel_id}: - delete: - description: Delete a notification channel for a user. The authenticated user - must be the target user or have the `on_call_admin` permission - operationId: DeleteUserNotificationChannel - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: The channel ID - in: path - name: channel_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestResponse' - '401': - $ref: '#/components/responses/UnauthorizedResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Delete an On-Call notification channel for a user - tags: - - On-Call - x-permission: - operator: AND - permissions: - - on_call_respond - get: - description: Get a notification channel for a user. The authenticated user must - be the target user or have the `on_call_admin` permission - operationId: GetUserNotificationChannel - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: The channel ID - in: path - name: channel_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationChannel' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '401': - $ref: '#/components/responses/UnauthorizedResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Get an On-Call notification channel for a user - tags: - - On-Call - x-permission: - operator: AND - permissions: - - on_call_read /api/v2/org_configs: get: description: Returns all Org Configs (name, description, and value). diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 4560690bfe..43287f22da 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -5268,13 +5268,6 @@ datadog\_api\_client.v2.model.create\_deployment\_rule\_params\_data\_attributes :members: :show-inheritance: -datadog\_api\_client.v2.model.create\_email\_notification\_channel\_config module ---------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_email_notification_channel_config - :members: - :show-inheritance: - datadog\_api\_client.v2.model.create\_incident\_notification\_rule\_request module ---------------------------------------------------------------------------------- @@ -5317,27 +5310,6 @@ datadog\_api\_client.v2.model.create\_jira\_issue\_request\_data\_relationships :members: :show-inheritance: -datadog\_api\_client.v2.model.create\_notification\_channel\_attributes module ------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_notification_channel_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.create\_notification\_channel\_config module --------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_notification_channel_config - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.create\_notification\_channel\_data module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_notification_channel_data - :members: - :show-inheritance: - datadog\_api\_client.v2.model.create\_notification\_rule\_parameters module --------------------------------------------------------------------------- @@ -5436,13 +5408,6 @@ datadog\_api\_client.v2.model.create\_page\_response\_data\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.create\_phone\_notification\_channel\_config module ---------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_phone_notification_channel_config - :members: - :show-inheritance: - datadog\_api\_client.v2.model.create\_rule\_request module ---------------------------------------------------------- @@ -5688,13 +5653,6 @@ datadog\_api\_client.v2.model.create\_upload\_response\_data\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.create\_user\_notification\_channel\_request module ---------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_user_notification_channel_request - :members: - :show-inheritance: - datadog\_api\_client.v2.model.create\_workflow\_request module -------------------------------------------------------------- @@ -13087,13 +13045,6 @@ datadog\_api\_client.v2.model.list\_kind\_catalog\_response module :members: :show-inheritance: -datadog\_api\_client.v2.model.list\_notification\_channels\_response module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_notification_channels_response - :members: - :show-inheritance: - datadog\_api\_client.v2.model.list\_pipelines\_response module -------------------------------------------------------------- @@ -15124,90 +15075,6 @@ datadog\_api\_client.v2.model.notebook\_trigger\_wrapper module :members: :show-inheritance: -datadog\_api\_client.v2.model.notification\_channel module ----------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_attributes module ----------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_config module ------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_config - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_data module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_email\_config module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_email_config - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_email\_config\_type module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_email_config_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_email\_format\_type module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_email_format_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_phone\_config module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_phone_config - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_phone\_config\_type module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_phone_config_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_push\_config module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_push_config - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_push\_config\_type module ------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_push_config_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notification\_channel\_type module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notification_channel_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.notification\_rule module ------------------------------------------------------- diff --git a/examples/v2/on-call/CreateUserNotificationChannel.py b/examples/v2/on-call/CreateUserNotificationChannel.py deleted file mode 100644 index a7c6a8163c..0000000000 --- a/examples/v2/on-call/CreateUserNotificationChannel.py +++ /dev/null @@ -1,39 +0,0 @@ -""" -Create an On-Call notification channel for a user returns "Created" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.on_call_api import OnCallApi -from datadog_api_client.v2.model.create_email_notification_channel_config import CreateEmailNotificationChannelConfig -from datadog_api_client.v2.model.create_notification_channel_attributes import CreateNotificationChannelAttributes -from datadog_api_client.v2.model.create_notification_channel_data import CreateNotificationChannelData -from datadog_api_client.v2.model.create_user_notification_channel_request import CreateUserNotificationChannelRequest -from datadog_api_client.v2.model.notification_channel_email_config_type import NotificationChannelEmailConfigType -from datadog_api_client.v2.model.notification_channel_email_format_type import NotificationChannelEmailFormatType -from datadog_api_client.v2.model.notification_channel_type import NotificationChannelType - -# there is a valid "user" in the system -USER_DATA_ID = environ["USER_DATA_ID"] - -body = CreateUserNotificationChannelRequest( - data=CreateNotificationChannelData( - attributes=CreateNotificationChannelAttributes( - config=CreateEmailNotificationChannelConfig( - address="foo@bar.com", - formats=[ - NotificationChannelEmailFormatType.HTML, - ], - type=NotificationChannelEmailConfigType.EMAIL, - ), - ), - type=NotificationChannelType.NOTIFICATION_CHANNELS, - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OnCallApi(api_client) - response = api_instance.create_user_notification_channel(user_id=USER_DATA_ID, body=body) - - print(response) diff --git a/examples/v2/on-call/DeleteUserNotificationChannel.py b/examples/v2/on-call/DeleteUserNotificationChannel.py deleted file mode 100644 index 169ca07980..0000000000 --- a/examples/v2/on-call/DeleteUserNotificationChannel.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Delete an On-Call notification channel for a user returns "No Content" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.on_call_api import OnCallApi - -# there is a valid "user" in the system -USER_DATA_ID = environ["USER_DATA_ID"] - -# there is a valid "oncall_email_notification_channel" in the system -ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID = environ["ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID"] - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OnCallApi(api_client) - api_instance.delete_user_notification_channel( - user_id=USER_DATA_ID, - channel_id=ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID, - ) diff --git a/examples/v2/on-call/GetUserNotificationChannel.py b/examples/v2/on-call/GetUserNotificationChannel.py deleted file mode 100644 index 4675c1f8fd..0000000000 --- a/examples/v2/on-call/GetUserNotificationChannel.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Get an On-Call notification channel for a user returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.on_call_api import OnCallApi - -# there is a valid "user" in the system -USER_DATA_ID = environ["USER_DATA_ID"] - -# there is a valid "oncall_email_notification_channel" in the system -ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID = environ["ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID"] - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OnCallApi(api_client) - response = api_instance.get_user_notification_channel( - user_id=USER_DATA_ID, - channel_id=ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID, - ) - - print(response) diff --git a/examples/v2/on-call/ListUserNotificationChannels.py b/examples/v2/on-call/ListUserNotificationChannels.py deleted file mode 100644 index fe8ecbfb1e..0000000000 --- a/examples/v2/on-call/ListUserNotificationChannels.py +++ /dev/null @@ -1,19 +0,0 @@ -""" -List On-Call notification channels for a user returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.on_call_api import OnCallApi - -# there is a valid "user" in the system -USER_DATA_ID = environ["USER_DATA_ID"] - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OnCallApi(api_client) - response = api_instance.list_user_notification_channels( - user_id=USER_DATA_ID, - ) - - print(response) diff --git a/examples/v2/reference-tables/UpsertRows.py b/examples/v2/reference-tables/UpsertRows.py index b6f1fa9616..620cefbb7c 100644 --- a/examples/v2/reference-tables/UpsertRows.py +++ b/examples/v2/reference-tables/UpsertRows.py @@ -14,6 +14,7 @@ BatchUpsertRowsRequestData( attributes=BatchUpsertRowsRequestDataAttributes( values=dict( + age=25, example_key_value="primary_key_value", name="row_name", ), diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index f2bc317595..33223cea87 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -307,14 +307,12 @@ def __init__( "v2.update_deployment_gate": False, "v2.update_deployment_rule": False, "v2.create_incident": False, - "v2.create_incident_impact": False, "v2.create_incident_integration": False, "v2.create_incident_notification_rule": False, "v2.create_incident_notification_template": False, "v2.create_incident_todo": False, "v2.create_incident_type": False, "v2.delete_incident": False, - "v2.delete_incident_impact": False, "v2.delete_incident_integration": False, "v2.delete_incident_notification_rule": False, "v2.delete_incident_notification_template": False, @@ -327,7 +325,6 @@ def __init__( "v2.get_incident_todo": False, "v2.get_incident_type": False, "v2.list_incident_attachments": False, - "v2.list_incident_impacts": False, "v2.list_incident_integrations": False, "v2.list_incident_notification_rules": False, "v2.list_incident_notification_templates": False, diff --git a/src/datadog_api_client/v2/api/on_call_api.py b/src/datadog_api_client/v2/api/on_call_api.py index 92d82e2b71..cdebda07c1 100644 --- a/src/datadog_api_client/v2/api/on_call_api.py +++ b/src/datadog_api_client/v2/api/on_call_api.py @@ -21,9 +21,6 @@ from datadog_api_client.v2.model.team_on_call_responders import TeamOnCallResponders from datadog_api_client.v2.model.team_routing_rules import TeamRoutingRules from datadog_api_client.v2.model.team_routing_rules_request import TeamRoutingRulesRequest -from datadog_api_client.v2.model.list_notification_channels_response import ListNotificationChannelsResponse -from datadog_api_client.v2.model.notification_channel import NotificationChannel -from datadog_api_client.v2.model.create_user_notification_channel_request import CreateUserNotificationChannelRequest class OnCallApi: @@ -87,32 +84,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - self._create_user_notification_channel_endpoint = _Endpoint( - settings={ - "response_type": (NotificationChannel,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/on-call/users/{user_id}/notification-channels", - "operation_id": "create_user_notification_channel", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "user_id": { - "required": True, - "openapi_types": (str,), - "attribute": "user_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (CreateUserNotificationChannelRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - self._delete_on_call_escalation_policy_endpoint = _Endpoint( settings={ "response_type": None, @@ -159,35 +130,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - self._delete_user_notification_channel_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/on-call/users/{user_id}/notification-channels/{channel_id}", - "operation_id": "delete_user_notification_channel", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "user_id": { - "required": True, - "openapi_types": (str,), - "attribute": "user_id", - "location": "path", - }, - "channel_id": { - "required": True, - "openapi_types": (str,), - "attribute": "channel_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["*/*"], - }, - api_client=api_client, - ) - self._get_on_call_escalation_policy_endpoint = _Endpoint( settings={ "response_type": (EscalationPolicy,), @@ -333,58 +275,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - self._get_user_notification_channel_endpoint = _Endpoint( - settings={ - "response_type": (NotificationChannel,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/on-call/users/{user_id}/notification-channels/{channel_id}", - "operation_id": "get_user_notification_channel", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "user_id": { - "required": True, - "openapi_types": (str,), - "attribute": "user_id", - "location": "path", - }, - "channel_id": { - "required": True, - "openapi_types": (str,), - "attribute": "channel_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._list_user_notification_channels_endpoint = _Endpoint( - settings={ - "response_type": (ListNotificationChannelsResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/on-call/users/{user_id}/notification-channels", - "operation_id": "list_user_notification_channels", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "user_id": { - "required": True, - "openapi_types": (str,), - "attribute": "user_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - self._set_on_call_team_routing_rules_endpoint = _Endpoint( settings={ "response_type": (TeamRoutingRules,), @@ -524,27 +414,6 @@ def create_on_call_schedule( return self._create_on_call_schedule_endpoint.call_with_http_info(**kwargs) - def create_user_notification_channel( - self, - user_id: str, - body: CreateUserNotificationChannelRequest, - ) -> NotificationChannel: - """Create an On-Call notification channel for a user. - - Create a new notification channel for a user. The authenticated user must be the target user or have the ``on_call_admin`` permission - - :param user_id: The user ID - :type user_id: str - :type body: CreateUserNotificationChannelRequest - :rtype: NotificationChannel - """ - kwargs: Dict[str, Any] = {} - kwargs["user_id"] = user_id - - kwargs["body"] = body - - return self._create_user_notification_channel_endpoint.call_with_http_info(**kwargs) - def delete_on_call_escalation_policy( self, policy_id: str, @@ -579,28 +448,6 @@ def delete_on_call_schedule( return self._delete_on_call_schedule_endpoint.call_with_http_info(**kwargs) - def delete_user_notification_channel( - self, - user_id: str, - channel_id: str, - ) -> None: - """Delete an On-Call notification channel for a user. - - Delete a notification channel for a user. The authenticated user must be the target user or have the ``on_call_admin`` permission - - :param user_id: The user ID - :type user_id: str - :param channel_id: The channel ID - :type channel_id: str - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["user_id"] = user_id - - kwargs["channel_id"] = channel_id - - return self._delete_user_notification_channel_endpoint.call_with_http_info(**kwargs) - def get_on_call_escalation_policy( self, policy_id: str, @@ -727,45 +574,6 @@ def get_team_on_call_users( return self._get_team_on_call_users_endpoint.call_with_http_info(**kwargs) - def get_user_notification_channel( - self, - user_id: str, - channel_id: str, - ) -> NotificationChannel: - """Get an On-Call notification channel for a user. - - Get a notification channel for a user. The authenticated user must be the target user or have the ``on_call_admin`` permission - - :param user_id: The user ID - :type user_id: str - :param channel_id: The channel ID - :type channel_id: str - :rtype: NotificationChannel - """ - kwargs: Dict[str, Any] = {} - kwargs["user_id"] = user_id - - kwargs["channel_id"] = channel_id - - return self._get_user_notification_channel_endpoint.call_with_http_info(**kwargs) - - def list_user_notification_channels( - self, - user_id: str, - ) -> ListNotificationChannelsResponse: - """List On-Call notification channels for a user. - - List the notification channels for a user. The authenticated user must be the target user or have the ``on_call_admin`` permission - - :param user_id: The user ID - :type user_id: str - :rtype: ListNotificationChannelsResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["user_id"] = user_id - - return self._list_user_notification_channels_endpoint.call_with_http_info(**kwargs) - def set_on_call_team_routing_rules( self, team_id: str, diff --git a/src/datadog_api_client/v2/model/batch_upsert_rows_request_data_attributes.py b/src/datadog_api_client/v2/model/batch_upsert_rows_request_data_attributes.py index c1ea9d9a6a..0ae3102233 100644 --- a/src/datadog_api_client/v2/model/batch_upsert_rows_request_data_attributes.py +++ b/src/datadog_api_client/v2/model/batch_upsert_rows_request_data_attributes.py @@ -3,15 +3,11 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict +from typing import Dict, Union from datadog_api_client.model_utils import ( ModelNormal, cached_property, - date, - datetime, - none_type, - UUID, ) @@ -22,16 +18,8 @@ def openapi_types(_): "values": ( { str: ( - bool, - date, - datetime, - dict, - float, - int, - list, str, - UUID, - none_type, + int, ) }, ), @@ -41,12 +29,12 @@ def openapi_types(_): "values": "values", } - def __init__(self_, values: Dict[str, Any], **kwargs): + def __init__(self_, values: Dict[str, Union[str, int]], **kwargs): """ Attributes containing row data values for row creation or update operations. - :param values: Key-value pairs representing row data, where keys are field names from the schema. - :type values: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)} + :param values: Key-value pairs representing row data, where keys are schema field names and values match the corresponding column types. + :type values: {str: (str, int,)} """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_email_notification_channel_config.py b/src/datadog_api_client/v2/model/create_email_notification_channel_config.py deleted file mode 100644 index 8d6c5cdba7..0000000000 --- a/src/datadog_api_client/v2/model/create_email_notification_channel_config.py +++ /dev/null @@ -1,64 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_email_format_type import NotificationChannelEmailFormatType - from datadog_api_client.v2.model.notification_channel_email_config_type import NotificationChannelEmailConfigType - - -class CreateEmailNotificationChannelConfig(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_email_format_type import ( - NotificationChannelEmailFormatType, - ) - from datadog_api_client.v2.model.notification_channel_email_config_type import ( - NotificationChannelEmailConfigType, - ) - - return { - "address": (str,), - "formats": ([NotificationChannelEmailFormatType],), - "type": (NotificationChannelEmailConfigType,), - } - - attribute_map = { - "address": "address", - "formats": "formats", - "type": "type", - } - - def __init__( - self_, - address: str, - formats: List[NotificationChannelEmailFormatType], - type: NotificationChannelEmailConfigType, - **kwargs, - ): - """ - Configuration to create an e-mail notification channel - - :param address: The e-mail address to be notified - :type address: str - - :param formats: Preferred content formats for notifications. - :type formats: [NotificationChannelEmailFormatType] - - :param type: Indicates that the notification channel is an e-mail address - :type type: NotificationChannelEmailConfigType - """ - super().__init__(kwargs) - - self_.address = address - self_.formats = formats - self_.type = type diff --git a/src/datadog_api_client/v2/model/create_notification_channel_attributes.py b/src/datadog_api_client/v2/model/create_notification_channel_attributes.py deleted file mode 100644 index f687066d45..0000000000 --- a/src/datadog_api_client/v2/model/create_notification_channel_attributes.py +++ /dev/null @@ -1,57 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.create_notification_channel_config import CreateNotificationChannelConfig - from datadog_api_client.v2.model.create_phone_notification_channel_config import ( - CreatePhoneNotificationChannelConfig, - ) - from datadog_api_client.v2.model.create_email_notification_channel_config import ( - CreateEmailNotificationChannelConfig, - ) - - -class CreateNotificationChannelAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.create_notification_channel_config import CreateNotificationChannelConfig - - return { - "config": (CreateNotificationChannelConfig,), - } - - attribute_map = { - "config": "config", - } - - def __init__( - self_, - config: Union[ - CreateNotificationChannelConfig, - CreatePhoneNotificationChannelConfig, - CreateEmailNotificationChannelConfig, - UnsetType, - ] = unset, - **kwargs, - ): - """ - Attributes for creating an on-call notification channel. - - :param config: Defines the configuration for creating an On-Call notification channel - :type config: CreateNotificationChannelConfig, optional - """ - if config is not unset: - kwargs["config"] = config - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_notification_channel_config.py b/src/datadog_api_client/v2/model/create_notification_channel_config.py deleted file mode 100644 index 5bd8481d35..0000000000 --- a/src/datadog_api_client/v2/model/create_notification_channel_config.py +++ /dev/null @@ -1,53 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelComposed, - cached_property, -) - - -class CreateNotificationChannelConfig(ModelComposed): - def __init__(self, **kwargs): - """ - Defines the configuration for creating an On-Call notification channel - - :param number: The E-164 formatted phone number (e.g. +3371234567) - :type number: str - - :param type: Indicates that the notification channel is a phone - :type type: NotificationChannelPhoneConfigType - - :param address: The e-mail address to be notified - :type address: str - - :param formats: Preferred content formats for notifications. - :type formats: [NotificationChannelEmailFormatType] - """ - super().__init__(kwargs) - - @cached_property - def _composed_schemas(_): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - from datadog_api_client.v2.model.create_phone_notification_channel_config import ( - CreatePhoneNotificationChannelConfig, - ) - from datadog_api_client.v2.model.create_email_notification_channel_config import ( - CreateEmailNotificationChannelConfig, - ) - - return { - "oneOf": [ - CreatePhoneNotificationChannelConfig, - CreateEmailNotificationChannelConfig, - ], - } diff --git a/src/datadog_api_client/v2/model/create_notification_channel_data.py b/src/datadog_api_client/v2/model/create_notification_channel_data.py deleted file mode 100644 index e6275c232b..0000000000 --- a/src/datadog_api_client/v2/model/create_notification_channel_data.py +++ /dev/null @@ -1,58 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.create_notification_channel_attributes import CreateNotificationChannelAttributes - from datadog_api_client.v2.model.notification_channel_type import NotificationChannelType - - -class CreateNotificationChannelData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.create_notification_channel_attributes import ( - CreateNotificationChannelAttributes, - ) - from datadog_api_client.v2.model.notification_channel_type import NotificationChannelType - - return { - "attributes": (CreateNotificationChannelAttributes,), - "type": (NotificationChannelType,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__( - self_, - type: NotificationChannelType, - attributes: Union[CreateNotificationChannelAttributes, UnsetType] = unset, - **kwargs, - ): - """ - Data for creating an on-call notification channel - - :param attributes: Attributes for creating an on-call notification channel. - :type attributes: CreateNotificationChannelAttributes, optional - - :param type: Indicates that the resource is of type 'notification_channels'. - :type type: NotificationChannelType - """ - if attributes is not unset: - kwargs["attributes"] = attributes - super().__init__(kwargs) - - self_.type = type diff --git a/src/datadog_api_client/v2/model/create_phone_notification_channel_config.py b/src/datadog_api_client/v2/model/create_phone_notification_channel_config.py deleted file mode 100644 index 3c0609612a..0000000000 --- a/src/datadog_api_client/v2/model/create_phone_notification_channel_config.py +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_phone_config_type import NotificationChannelPhoneConfigType - - -class CreatePhoneNotificationChannelConfig(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_phone_config_type import ( - NotificationChannelPhoneConfigType, - ) - - return { - "number": (str,), - "type": (NotificationChannelPhoneConfigType,), - } - - attribute_map = { - "number": "number", - "type": "type", - } - - def __init__(self_, number: str, type: NotificationChannelPhoneConfigType, **kwargs): - """ - Configuration to create a phone notification channel - - :param number: The E-164 formatted phone number (e.g. +3371234567) - :type number: str - - :param type: Indicates that the notification channel is a phone - :type type: NotificationChannelPhoneConfigType - """ - super().__init__(kwargs) - - self_.number = number - self_.type = type diff --git a/src/datadog_api_client/v2/model/create_user_notification_channel_request.py b/src/datadog_api_client/v2/model/create_user_notification_channel_request.py deleted file mode 100644 index f3838c9fd7..0000000000 --- a/src/datadog_api_client/v2/model/create_user_notification_channel_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.create_notification_channel_data import CreateNotificationChannelData - - -class CreateUserNotificationChannelRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.create_notification_channel_data import CreateNotificationChannelData - - return { - "data": (CreateNotificationChannelData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: CreateNotificationChannelData, **kwargs): - """ - A top-level wrapper for creating a notification channel for a user - - :param data: Data for creating an on-call notification channel - :type data: CreateNotificationChannelData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/list_notification_channels_response.py b/src/datadog_api_client/v2/model/list_notification_channels_response.py deleted file mode 100644 index 93d91b93d0..0000000000 --- a/src/datadog_api_client/v2/model/list_notification_channels_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_data import NotificationChannelData - - -class ListNotificationChannelsResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_data import NotificationChannelData - - return { - "data": ([NotificationChannelData],), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[List[NotificationChannelData], UnsetType] = unset, **kwargs): - """ - Response type for listing notification channels for a user - - :param data: - :type data: [NotificationChannelData], optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/notification_channel.py b/src/datadog_api_client/v2/model/notification_channel.py deleted file mode 100644 index c8b73067c2..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_data import NotificationChannelData - - -class NotificationChannel(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_data import NotificationChannelData - - return { - "data": (NotificationChannelData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[NotificationChannelData, UnsetType] = unset, **kwargs): - """ - A top-level wrapper for a user notification channel - - :param data: Data for an on-call notification channel - :type data: NotificationChannelData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/notification_channel_attributes.py b/src/datadog_api_client/v2/model/notification_channel_attributes.py deleted file mode 100644 index 4950663547..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_attributes.py +++ /dev/null @@ -1,63 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_config import NotificationChannelConfig - from datadog_api_client.v2.model.notification_channel_phone_config import NotificationChannelPhoneConfig - from datadog_api_client.v2.model.notification_channel_email_config import NotificationChannelEmailConfig - from datadog_api_client.v2.model.notification_channel_push_config import NotificationChannelPushConfig - - -class NotificationChannelAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_config import NotificationChannelConfig - - return { - "active": (bool,), - "config": (NotificationChannelConfig,), - } - - attribute_map = { - "active": "active", - "config": "config", - } - - def __init__( - self_, - active: Union[bool, UnsetType] = unset, - config: Union[ - NotificationChannelConfig, - NotificationChannelPhoneConfig, - NotificationChannelEmailConfig, - NotificationChannelPushConfig, - UnsetType, - ] = unset, - **kwargs, - ): - """ - Attributes for an on-call notification channel. - - :param active: Whether the notification channel is currently active. - :type active: bool, optional - - :param config: Defines the configuration for an On-Call notification channel - :type config: NotificationChannelConfig, optional - """ - if active is not unset: - kwargs["active"] = active - if config is not unset: - kwargs["config"] = config - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/notification_channel_config.py b/src/datadog_api_client/v2/model/notification_channel_config.py deleted file mode 100644 index e11da6ede1..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_config.py +++ /dev/null @@ -1,69 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelComposed, - cached_property, -) - - -class NotificationChannelConfig(ModelComposed): - def __init__(self, **kwargs): - """ - Defines the configuration for an On-Call notification channel - - :param formatted_number: The formatted international version of Number (e.g. +33 7 1 23 45 67). - :type formatted_number: str - - :param number: The E-164 formatted phone number (e.g. +3371234567) - :type number: str - - :param region: The ISO 3166-1 alpha-2 two-letter country code. - :type region: str - - :param sms_subscribed_at: If present, the date the user subscribed this number to SMS messages - :type sms_subscribed_at: datetime, none_type, optional - - :param type: Indicates that the notification channel is a phone - :type type: NotificationChannelPhoneConfigType - - :param verified: Indicates whether this phone has been verified by the user in Datadog On-Call - :type verified: bool - - :param address: The e-mail address to be notified - :type address: str - - :param formats: Preferred content formats for notifications. - :type formats: [NotificationChannelEmailFormatType] - - :param application_name: The name of the application used to receive push notifications - :type application_name: str - - :param device_name: The name of the mobile device being used - :type device_name: str - """ - super().__init__(kwargs) - - @cached_property - def _composed_schemas(_): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - from datadog_api_client.v2.model.notification_channel_phone_config import NotificationChannelPhoneConfig - from datadog_api_client.v2.model.notification_channel_email_config import NotificationChannelEmailConfig - from datadog_api_client.v2.model.notification_channel_push_config import NotificationChannelPushConfig - - return { - "oneOf": [ - NotificationChannelPhoneConfig, - NotificationChannelEmailConfig, - NotificationChannelPushConfig, - ], - } diff --git a/src/datadog_api_client/v2/model/notification_channel_data.py b/src/datadog_api_client/v2/model/notification_channel_data.py deleted file mode 100644 index 210b251de9..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_data.py +++ /dev/null @@ -1,64 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_attributes import NotificationChannelAttributes - from datadog_api_client.v2.model.notification_channel_type import NotificationChannelType - - -class NotificationChannelData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_attributes import NotificationChannelAttributes - from datadog_api_client.v2.model.notification_channel_type import NotificationChannelType - - return { - "attributes": (NotificationChannelAttributes,), - "id": (str,), - "type": (NotificationChannelType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__( - self_, - type: NotificationChannelType, - attributes: Union[NotificationChannelAttributes, UnsetType] = unset, - id: Union[str, UnsetType] = unset, - **kwargs, - ): - """ - Data for an on-call notification channel - - :param attributes: Attributes for an on-call notification channel. - :type attributes: NotificationChannelAttributes, optional - - :param id: Unique identifier for the channel - :type id: str, optional - - :param type: Indicates that the resource is of type 'notification_channels'. - :type type: NotificationChannelType - """ - if attributes is not unset: - kwargs["attributes"] = attributes - if id is not unset: - kwargs["id"] = id - super().__init__(kwargs) - - self_.type = type diff --git a/src/datadog_api_client/v2/model/notification_channel_email_config.py b/src/datadog_api_client/v2/model/notification_channel_email_config.py deleted file mode 100644 index 5fbdaff26f..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_email_config.py +++ /dev/null @@ -1,64 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_email_format_type import NotificationChannelEmailFormatType - from datadog_api_client.v2.model.notification_channel_email_config_type import NotificationChannelEmailConfigType - - -class NotificationChannelEmailConfig(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_email_format_type import ( - NotificationChannelEmailFormatType, - ) - from datadog_api_client.v2.model.notification_channel_email_config_type import ( - NotificationChannelEmailConfigType, - ) - - return { - "address": (str,), - "formats": ([NotificationChannelEmailFormatType],), - "type": (NotificationChannelEmailConfigType,), - } - - attribute_map = { - "address": "address", - "formats": "formats", - "type": "type", - } - - def __init__( - self_, - address: str, - formats: List[NotificationChannelEmailFormatType], - type: NotificationChannelEmailConfigType, - **kwargs, - ): - """ - Email notification channel configuration - - :param address: The e-mail address to be notified - :type address: str - - :param formats: Preferred content formats for notifications. - :type formats: [NotificationChannelEmailFormatType] - - :param type: Indicates that the notification channel is an e-mail address - :type type: NotificationChannelEmailConfigType - """ - super().__init__(kwargs) - - self_.address = address - self_.formats = formats - self_.type = type diff --git a/src/datadog_api_client/v2/model/notification_channel_email_config_type.py b/src/datadog_api_client/v2/model/notification_channel_email_config_type.py deleted file mode 100644 index 49c995342c..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_email_config_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class NotificationChannelEmailConfigType(ModelSimple): - """ - Indicates that the notification channel is an e-mail address - - :param value: If omitted defaults to "email". Must be one of ["email"]. - :type value: str - """ - - allowed_values = { - "email", - } - EMAIL: ClassVar["NotificationChannelEmailConfigType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -NotificationChannelEmailConfigType.EMAIL = NotificationChannelEmailConfigType("email") diff --git a/src/datadog_api_client/v2/model/notification_channel_email_format_type.py b/src/datadog_api_client/v2/model/notification_channel_email_format_type.py deleted file mode 100644 index d6e7faccca..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_email_format_type.py +++ /dev/null @@ -1,38 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class NotificationChannelEmailFormatType(ModelSimple): - """ - Specifies the format of the e-mail that is sent for On-Call notifications - - :param value: If omitted defaults to "html". Must be one of ["html", "text"]. - :type value: str - """ - - allowed_values = { - "html", - "text", - } - HTML: ClassVar["NotificationChannelEmailFormatType"] - TEXT: ClassVar["NotificationChannelEmailFormatType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -NotificationChannelEmailFormatType.HTML = NotificationChannelEmailFormatType("html") -NotificationChannelEmailFormatType.TEXT = NotificationChannelEmailFormatType("text") diff --git a/src/datadog_api_client/v2/model/notification_channel_phone_config.py b/src/datadog_api_client/v2/model/notification_channel_phone_config.py deleted file mode 100644 index 34eb783f02..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_phone_config.py +++ /dev/null @@ -1,86 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - datetime, - none_type, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_phone_config_type import NotificationChannelPhoneConfigType - - -class NotificationChannelPhoneConfig(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_phone_config_type import ( - NotificationChannelPhoneConfigType, - ) - - return { - "formatted_number": (str,), - "number": (str,), - "region": (str,), - "sms_subscribed_at": (datetime, none_type), - "type": (NotificationChannelPhoneConfigType,), - "verified": (bool,), - } - - attribute_map = { - "formatted_number": "formatted_number", - "number": "number", - "region": "region", - "sms_subscribed_at": "sms_subscribed_at", - "type": "type", - "verified": "verified", - } - - def __init__( - self_, - formatted_number: str, - number: str, - region: str, - type: NotificationChannelPhoneConfigType, - verified: bool, - sms_subscribed_at: Union[datetime, none_type, UnsetType] = unset, - **kwargs, - ): - """ - Phone notification channel configuration - - :param formatted_number: The formatted international version of Number (e.g. +33 7 1 23 45 67). - :type formatted_number: str - - :param number: The E-164 formatted phone number (e.g. +3371234567) - :type number: str - - :param region: The ISO 3166-1 alpha-2 two-letter country code. - :type region: str - - :param sms_subscribed_at: If present, the date the user subscribed this number to SMS messages - :type sms_subscribed_at: datetime, none_type, optional - - :param type: Indicates that the notification channel is a phone - :type type: NotificationChannelPhoneConfigType - - :param verified: Indicates whether this phone has been verified by the user in Datadog On-Call - :type verified: bool - """ - if sms_subscribed_at is not unset: - kwargs["sms_subscribed_at"] = sms_subscribed_at - super().__init__(kwargs) - - self_.formatted_number = formatted_number - self_.number = number - self_.region = region - self_.type = type - self_.verified = verified diff --git a/src/datadog_api_client/v2/model/notification_channel_phone_config_type.py b/src/datadog_api_client/v2/model/notification_channel_phone_config_type.py deleted file mode 100644 index 7990002395..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_phone_config_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class NotificationChannelPhoneConfigType(ModelSimple): - """ - Indicates that the notification channel is a phone - - :param value: If omitted defaults to "phone". Must be one of ["phone"]. - :type value: str - """ - - allowed_values = { - "phone", - } - PHONE: ClassVar["NotificationChannelPhoneConfigType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -NotificationChannelPhoneConfigType.PHONE = NotificationChannelPhoneConfigType("phone") diff --git a/src/datadog_api_client/v2/model/notification_channel_push_config.py b/src/datadog_api_client/v2/model/notification_channel_push_config.py deleted file mode 100644 index 3b054dbd6f..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_push_config.py +++ /dev/null @@ -1,52 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notification_channel_push_config_type import NotificationChannelPushConfigType - - -class NotificationChannelPushConfig(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notification_channel_push_config_type import NotificationChannelPushConfigType - - return { - "application_name": (str,), - "device_name": (str,), - "type": (NotificationChannelPushConfigType,), - } - - attribute_map = { - "application_name": "application_name", - "device_name": "device_name", - "type": "type", - } - - def __init__(self_, application_name: str, device_name: str, type: NotificationChannelPushConfigType, **kwargs): - """ - Push notification channel configuration - - :param application_name: The name of the application used to receive push notifications - :type application_name: str - - :param device_name: The name of the mobile device being used - :type device_name: str - - :param type: Indicates that the notification channel is a mobile device for push notifications - :type type: NotificationChannelPushConfigType - """ - super().__init__(kwargs) - - self_.application_name = application_name - self_.device_name = device_name - self_.type = type diff --git a/src/datadog_api_client/v2/model/notification_channel_push_config_type.py b/src/datadog_api_client/v2/model/notification_channel_push_config_type.py deleted file mode 100644 index 7aef2b18a2..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_push_config_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class NotificationChannelPushConfigType(ModelSimple): - """ - Indicates that the notification channel is a mobile device for push notifications - - :param value: If omitted defaults to "push". Must be one of ["push"]. - :type value: str - """ - - allowed_values = { - "push", - } - PUSH: ClassVar["NotificationChannelPushConfigType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -NotificationChannelPushConfigType.PUSH = NotificationChannelPushConfigType("push") diff --git a/src/datadog_api_client/v2/model/notification_channel_type.py b/src/datadog_api_client/v2/model/notification_channel_type.py deleted file mode 100644 index 4e3f72148c..0000000000 --- a/src/datadog_api_client/v2/model/notification_channel_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class NotificationChannelType(ModelSimple): - """ - Indicates that the resource is of type 'notification_channels'. - - :param value: If omitted defaults to "notification_channels". Must be one of ["notification_channels"]. - :type value: str - """ - - allowed_values = { - "notification_channels", - } - NOTIFICATION_CHANNELS: ClassVar["NotificationChannelType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -NotificationChannelType.NOTIFICATION_CHANNELS = NotificationChannelType("notification_channels") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 26fa6d24bf..945b37f3aa 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1001,7 +1001,6 @@ from datadog_api_client.v2.model.create_deployment_rule_params_data_attributes import ( CreateDeploymentRuleParamsDataAttributes, ) -from datadog_api_client.v2.model.create_email_notification_channel_config import CreateEmailNotificationChannelConfig from datadog_api_client.v2.model.create_incident_notification_rule_request import CreateIncidentNotificationRuleRequest from datadog_api_client.v2.model.create_incident_notification_template_request import ( CreateIncidentNotificationTemplateRequest, @@ -1012,9 +1011,6 @@ from datadog_api_client.v2.model.create_jira_issue_request_data_relationships import ( CreateJiraIssueRequestDataRelationships, ) -from datadog_api_client.v2.model.create_notification_channel_attributes import CreateNotificationChannelAttributes -from datadog_api_client.v2.model.create_notification_channel_config import CreateNotificationChannelConfig -from datadog_api_client.v2.model.create_notification_channel_data import CreateNotificationChannelData from datadog_api_client.v2.model.create_notification_rule_parameters import CreateNotificationRuleParameters from datadog_api_client.v2.model.create_notification_rule_parameters_data import CreateNotificationRuleParametersData from datadog_api_client.v2.model.create_notification_rule_parameters_data_attributes import ( @@ -1031,7 +1027,6 @@ from datadog_api_client.v2.model.create_page_response import CreatePageResponse from datadog_api_client.v2.model.create_page_response_data import CreatePageResponseData from datadog_api_client.v2.model.create_page_response_data_type import CreatePageResponseDataType -from datadog_api_client.v2.model.create_phone_notification_channel_config import CreatePhoneNotificationChannelConfig from datadog_api_client.v2.model.create_rule_request import CreateRuleRequest from datadog_api_client.v2.model.create_rule_request_data import CreateRuleRequestData from datadog_api_client.v2.model.create_rule_response import CreateRuleResponse @@ -1097,7 +1092,6 @@ from datadog_api_client.v2.model.create_upload_response_data import CreateUploadResponseData from datadog_api_client.v2.model.create_upload_response_data_attributes import CreateUploadResponseDataAttributes from datadog_api_client.v2.model.create_upload_response_data_type import CreateUploadResponseDataType -from datadog_api_client.v2.model.create_user_notification_channel_request import CreateUserNotificationChannelRequest from datadog_api_client.v2.model.create_workflow_request import CreateWorkflowRequest from datadog_api_client.v2.model.create_workflow_response import CreateWorkflowResponse from datadog_api_client.v2.model.creator import Creator @@ -2452,7 +2446,6 @@ from datadog_api_client.v2.model.list_findings_page import ListFindingsPage from datadog_api_client.v2.model.list_findings_response import ListFindingsResponse from datadog_api_client.v2.model.list_kind_catalog_response import ListKindCatalogResponse -from datadog_api_client.v2.model.list_notification_channels_response import ListNotificationChannelsResponse from datadog_api_client.v2.model.list_pipelines_response import ListPipelinesResponse from datadog_api_client.v2.model.list_pipelines_response_meta import ListPipelinesResponseMeta from datadog_api_client.v2.model.list_powerpacks_response import ListPowerpacksResponse @@ -2837,18 +2830,6 @@ from datadog_api_client.v2.model.monthly_cost_attribution_pagination import MonthlyCostAttributionPagination from datadog_api_client.v2.model.monthly_cost_attribution_response import MonthlyCostAttributionResponse from datadog_api_client.v2.model.notebook_trigger_wrapper import NotebookTriggerWrapper -from datadog_api_client.v2.model.notification_channel import NotificationChannel -from datadog_api_client.v2.model.notification_channel_attributes import NotificationChannelAttributes -from datadog_api_client.v2.model.notification_channel_config import NotificationChannelConfig -from datadog_api_client.v2.model.notification_channel_data import NotificationChannelData -from datadog_api_client.v2.model.notification_channel_email_config import NotificationChannelEmailConfig -from datadog_api_client.v2.model.notification_channel_email_config_type import NotificationChannelEmailConfigType -from datadog_api_client.v2.model.notification_channel_email_format_type import NotificationChannelEmailFormatType -from datadog_api_client.v2.model.notification_channel_phone_config import NotificationChannelPhoneConfig -from datadog_api_client.v2.model.notification_channel_phone_config_type import NotificationChannelPhoneConfigType -from datadog_api_client.v2.model.notification_channel_push_config import NotificationChannelPushConfig -from datadog_api_client.v2.model.notification_channel_push_config_type import NotificationChannelPushConfigType -from datadog_api_client.v2.model.notification_channel_type import NotificationChannelType from datadog_api_client.v2.model.notification_rule import NotificationRule from datadog_api_client.v2.model.notification_rule_attributes import NotificationRuleAttributes from datadog_api_client.v2.model.notification_rule_response import NotificationRuleResponse @@ -5851,16 +5832,12 @@ "CreateDeploymentRuleParams", "CreateDeploymentRuleParamsData", "CreateDeploymentRuleParamsDataAttributes", - "CreateEmailNotificationChannelConfig", "CreateIncidentNotificationRuleRequest", "CreateIncidentNotificationTemplateRequest", "CreateJiraIssueRequestArray", "CreateJiraIssueRequestData", "CreateJiraIssueRequestDataAttributes", "CreateJiraIssueRequestDataRelationships", - "CreateNotificationChannelAttributes", - "CreateNotificationChannelConfig", - "CreateNotificationChannelData", "CreateNotificationRuleParameters", "CreateNotificationRuleParametersData", "CreateNotificationRuleParametersDataAttributes", @@ -5875,7 +5852,6 @@ "CreatePageResponse", "CreatePageResponseData", "CreatePageResponseDataType", - "CreatePhoneNotificationChannelConfig", "CreateRuleRequest", "CreateRuleRequestData", "CreateRuleResponse", @@ -5911,7 +5887,6 @@ "CreateUploadResponseData", "CreateUploadResponseDataAttributes", "CreateUploadResponseDataType", - "CreateUserNotificationChannelRequest", "CreateWorkflowRequest", "CreateWorkflowResponse", "Creator", @@ -6968,7 +6943,6 @@ "ListFindingsPage", "ListFindingsResponse", "ListKindCatalogResponse", - "ListNotificationChannelsResponse", "ListPipelinesResponse", "ListPipelinesResponseMeta", "ListPowerpacksResponse", @@ -7259,18 +7233,6 @@ "MonthlyCostAttributionPagination", "MonthlyCostAttributionResponse", "NotebookTriggerWrapper", - "NotificationChannel", - "NotificationChannelAttributes", - "NotificationChannelConfig", - "NotificationChannelData", - "NotificationChannelEmailConfig", - "NotificationChannelEmailConfigType", - "NotificationChannelEmailFormatType", - "NotificationChannelPhoneConfig", - "NotificationChannelPhoneConfigType", - "NotificationChannelPushConfig", - "NotificationChannelPushConfigType", - "NotificationChannelType", "NotificationRule", "NotificationRuleAttributes", "NotificationRuleResponse", diff --git a/tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.frozen deleted file mode 100644 index d364f431df..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-12-12T14:05:32.425Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.yaml deleted file mode 100644 index 1177c91838..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_an_oncall_notification_channel_for_a_user_returns_created_response.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"email":"Test-Create_an_On_Call_notification_channel_for_a_user_returns_Created_response-1765548332@datadoghq.com","title":"user - title"},"type":"users"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/users - response: - body: - string: '{"data":{"type":"users","id":"5ba8ee87-4d71-458c-883d-a6016738f7ce","attributes":{"name":null,"handle":"test-create_an_on_call_notification_channel_for_a_user_returns_created_response-1765548332@datadoghq.com","created_at":"2025-12-12T14:05:32.704821+00:00","modified_at":"2025-12-12T14:05:32.704821+00:00","email":"test-create_an_on_call_notification_channel_for_a_user_returns_created_response-1765548332@datadoghq.com","icon":"https://secure.gravatar.com/avatar/01791216e0fc8e5e005271e285ad9760?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: '{"data":{"attributes":{"config":{"address":"foo@bar.com","formats":["html"],"type":"email"}},"type":"notification_channels"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/on-call/users/5ba8ee87-4d71-458c-883d-a6016738f7ce/notification-channels - response: - body: - string: '{"data":{"id":"f944f63a-2606-43c0-9c0b-10a34b9b214a","type":"notification_channels","attributes":{"active":true,"config":{"type":"email","address":"foo@bar.com","formats":["html"]}}}}' - headers: - content-type: - - application/vnd.api+json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/users/5ba8ee87-4d71-458c-883d-a6016738f7ce - response: - body: - string: '' - headers: {} - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.frozen deleted file mode 100644 index 065691eedf..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-12-11T18:27:50.679Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.yaml deleted file mode 100644 index 2956d6aa1e..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_an_oncall_notification_channel_for_a_user_returns_no_content_response.yaml +++ /dev/null @@ -1,70 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"email":"Test-Delete_an_On_Call_notification_channel_for_a_user_returns_No_Content_response-1765477670@datadoghq.com","title":"user - title"},"type":"users"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/users - response: - body: - string: '{"data":{"type":"users","id":"1df33be3-5397-4aaf-95c0-00dd63819c80","attributes":{"name":null,"handle":"test-delete_an_on_call_notification_channel_for_a_user_returns_no_content_response-1765477670@datadoghq.com","created_at":"2025-12-11T18:27:50.837055+00:00","modified_at":"2025-12-11T18:27:50.837055+00:00","email":"test-delete_an_on_call_notification_channel_for_a_user_returns_no_content_response-1765477670@datadoghq.com","icon":"https://secure.gravatar.com/avatar/f0ef01f65aae0d49a442ade4a44a5a53?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: '{"data":{"attributes":{"config":{"address":"test-delete_an_on_call_notification_channel_for_a_user_returns_no_content_response-1765477670@datadoghq.com","formats":["html"],"type":"email"}},"type":"notification_channels"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/on-call/users/1df33be3-5397-4aaf-95c0-00dd63819c80/notification-channels - response: - body: - string: '{"data":{"id":"dd22cf57-a576-4c7e-92f8-36c2171f5f99","type":"notification_channels","attributes":{"active":true,"config":{"type":"email","address":"test-delete_an_on_call_notification_channel_for_a_user_returns_no_content_response-1765477670@datadoghq.com","formats":["html"]}}}}' - headers: - content-type: - - application/vnd.api+json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/users/1df33be3-5397-4aaf-95c0-00dd63819c80/notification-channels/dd22cf57-a576-4c7e-92f8-36c2171f5f99 - response: - body: - string: '' - headers: {} - status: - code: 204 - message: No Content -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/users/1df33be3-5397-4aaf-95c0-00dd63819c80 - response: - body: - string: '' - headers: {} - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.frozen deleted file mode 100644 index e6a81ebe05..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-12-12T14:04:17.257Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.yaml deleted file mode 100644 index e272df6d7b..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_get_an_oncall_notification_channel_for_a_user_returns_ok_response.yaml +++ /dev/null @@ -1,72 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"email":"Test-Get_an_On_Call_notification_channel_for_a_user_returns_OK_response-1765548257@datadoghq.com","title":"user - title"},"type":"users"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/users - response: - body: - string: '{"data":{"type":"users","id":"0131b53c-5aec-4c8a-a14f-9ef487448833","attributes":{"name":null,"handle":"test-get_an_on_call_notification_channel_for_a_user_returns_ok_response-1765548257@datadoghq.com","created_at":"2025-12-12T14:04:17.531988+00:00","modified_at":"2025-12-12T14:04:17.531988+00:00","email":"test-get_an_on_call_notification_channel_for_a_user_returns_ok_response-1765548257@datadoghq.com","icon":"https://secure.gravatar.com/avatar/cedb283c90667a7da02c585159b4eda3?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: '{"data":{"attributes":{"config":{"address":"test-get_an_on_call_notification_channel_for_a_user_returns_ok_response-1765548257@datadoghq.com","formats":["html"],"type":"email"}},"type":"notification_channels"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/on-call/users/0131b53c-5aec-4c8a-a14f-9ef487448833/notification-channels - response: - body: - string: '{"data":{"id":"d5fc3f5a-a4b9-4972-80bb-cb4db7ec958b","type":"notification_channels","attributes":{"active":true,"config":{"type":"email","address":"test-get_an_on_call_notification_channel_for_a_user_returns_ok_response-1765548257@datadoghq.com","formats":["html"]}}}}' - headers: - content-type: - - application/vnd.api+json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/on-call/users/0131b53c-5aec-4c8a-a14f-9ef487448833/notification-channels/d5fc3f5a-a4b9-4972-80bb-cb4db7ec958b - response: - body: - string: '{"data":{"id":"d5fc3f5a-a4b9-4972-80bb-cb4db7ec958b","type":"notification_channels","attributes":{"active":true,"config":{"type":"email","address":"test-get_an_on_call_notification_channel_for_a_user_returns_ok_response-1765548257@datadoghq.com","formats":["html"]}}}}' - headers: - content-type: - - application/vnd.api+json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/users/0131b53c-5aec-4c8a-a14f-9ef487448833 - response: - body: - string: '' - headers: {} - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.frozen deleted file mode 100644 index d77fcd86e2..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-12-12T14:40:40.219Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.yaml deleted file mode 100644 index c0b806c3fc..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_list_oncall_notification_channels_for_a_user_returns_ok_response.yaml +++ /dev/null @@ -1,72 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"email":"Test-List_On_Call_notification_channels_for_a_user_returns_OK_response-1765550440@datadoghq.com","title":"user - title"},"type":"users"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/users - response: - body: - string: '{"data":{"type":"users","id":"c7fe3658-67dd-4a91-bf86-3709728fd8a5","attributes":{"name":null,"handle":"test-list_on_call_notification_channels_for_a_user_returns_ok_response-1765550440@datadoghq.com","created_at":"2025-12-12T14:40:40.467657+00:00","modified_at":"2025-12-12T14:40:40.467657+00:00","email":"test-list_on_call_notification_channels_for_a_user_returns_ok_response-1765550440@datadoghq.com","icon":"https://secure.gravatar.com/avatar/c74061cf101e1fea18813bda82103b47?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 201 - message: Created -- request: - body: '{"data":{"attributes":{"config":{"address":"test-list_on_call_notification_channels_for_a_user_returns_ok_response-1765550440@datadoghq.com","formats":["html"],"type":"email"}},"type":"notification_channels"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/on-call/users/c7fe3658-67dd-4a91-bf86-3709728fd8a5/notification-channels - response: - body: - string: '{"data":{"id":"8e9a9ded-ff10-4661-8d56-b4b789f54bf1","type":"notification_channels","attributes":{"active":true,"config":{"type":"email","address":"test-list_on_call_notification_channels_for_a_user_returns_ok_response-1765550440@datadoghq.com","formats":["html"]}}}}' - headers: - content-type: - - application/vnd.api+json - status: - code: 201 - message: Created -- request: - body: null - headers: - accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/on-call/users/c7fe3658-67dd-4a91-bf86-3709728fd8a5/notification-channels - response: - body: - string: '{"data":[{"id":"8e9a9ded-ff10-4661-8d56-b4b789f54bf1","type":"notification_channels","attributes":{"active":true,"config":{"type":"email","address":"test-list_on_call_notification_channels_for_a_user_returns_ok_response-1765550440@datadoghq.com","formats":["html"]}}}]}' - headers: - content-type: - - application/vnd.api+json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/users/c7fe3658-67dd-4a91-bf86-3709728fd8a5 - response: - body: - string: '' - headers: {} - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 8cf1925f45..7725798de4 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -783,22 +783,6 @@ "tag": "On-Call", "operationId": "SetOnCallTeamRoutingRules" }, - { - "parameters": [ - { - "name": "user_id", - "source": "user.data.id" - }, - { - "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"config\": {\n \"type\": \"email\",\n \"address\": \"{{ user.data.attributes.email }}\",\n \"formats\": [\n \"html\"\n ]\n }\n },\n \"type\": \"notification_channels\"\n }\n}" - } - ], - "step": "there is a valid \"oncall_email_notification_channel\" in the system", - "key": "oncall_email_notification_channel", - "tag": "On-Call", - "operationId": "CreateUserNotificationChannel" - }, { "parameters": [ { diff --git a/tests/v2/features/incidents.feature b/tests/v2/features/incidents.feature index 74ae965968..12ab3e2f5b 100644 --- a/tests/v2/features/incidents.feature +++ b/tests/v2/features/incidents.feature @@ -806,16 +806,14 @@ Feature: Incidents @generated @skip @team:DataDog/incident-app Scenario: List an incident's impacts returns "Bad Request" response - Given operation "ListIncidentImpacts" enabled - And new "ListIncidentImpacts" request + Given new "ListIncidentImpacts" request And request contains "incident_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/incident-app Scenario: List an incident's impacts returns "Not Found" response - Given operation "ListIncidentImpacts" enabled - And new "ListIncidentImpacts" request + Given new "ListIncidentImpacts" request And request contains "incident_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found diff --git a/tests/v2/features/on-call.feature b/tests/v2/features/on-call.feature index 9f4750eef7..c52e4291fc 100644 --- a/tests/v2/features/on-call.feature +++ b/tests/v2/features/on-call.feature @@ -43,33 +43,6 @@ Feature: On-Call When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/on-call - Scenario: Create an On-Call notification channel for a user returns "Bad Request" response - Given new "CreateUserNotificationChannel" request - And request contains "user_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"config": {"address": "foo@bar.com", "formats": ["html"], "type": "email"}}, "type": "notification_channels"}} - When the request is sent - Then the response status is 400 Bad Request - - @replay-only @team:DataDog/on-call - Scenario: Create an On-Call notification channel for a user returns "Created" response - Given new "CreateUserNotificationChannel" request - And there is a valid "user" in the system - And request contains "user_id" parameter from "user.data.id" - And body with value {"data": {"attributes": {"config": {"address": "foo@bar.com", "formats": ["html"], "type": "email"}}, "type": "notification_channels"}} - When the request is sent - Then the response status is 201 Created - And the response "data.attributes.config.type" is equal to "email" - And the response "data.attributes.config.address" is equal to "foo@bar.com" - - @generated @skip @team:DataDog/on-call - Scenario: Create an On-Call notification channel for a user returns "Not Found" response - Given new "CreateUserNotificationChannel" request - And request contains "user_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"config": {"address": "foo@bar.com", "formats": ["html"], "type": "email"}}, "type": "notification_channels"}} - When the request is sent - Then the response status is 404 Not Found - @team:DataDog/on-call Scenario: Delete On-Call escalation policy returns "No Content" response Given new "DeleteOnCallEscalationPolicy" request @@ -104,32 +77,6 @@ Feature: On-Call When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/on-call - Scenario: Delete an On-Call notification channel for a user returns "Bad Request" response - Given new "DeleteUserNotificationChannel" request - And request contains "user_id" parameter from "REPLACE.ME" - And request contains "channel_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @replay-only @team:DataDog/on-call - Scenario: Delete an On-Call notification channel for a user returns "No Content" response - Given new "DeleteUserNotificationChannel" request - And there is a valid "user" in the system - And there is a valid "oncall_email_notification_channel" in the system - And request contains "user_id" parameter from "user.data.id" - And request contains "channel_id" parameter from "oncall_email_notification_channel.data.id" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/on-call - Scenario: Delete an On-Call notification channel for a user returns "Not Found" response - Given new "DeleteUserNotificationChannel" request - And request contains "user_id" parameter from "REPLACE.ME" - And request contains "channel_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:DataDog/on-call Scenario: Get On-Call escalation policy returns "Bad Request" response Given new "GetOnCallEscalationPolicy" request @@ -179,34 +126,6 @@ Feature: On-Call When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/on-call - Scenario: Get an On-Call notification channel for a user returns "Bad Request" response - Given new "GetUserNotificationChannel" request - And request contains "user_id" parameter from "REPLACE.ME" - And request contains "channel_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/on-call - Scenario: Get an On-Call notification channel for a user returns "Not Found" response - Given new "GetUserNotificationChannel" request - And request contains "user_id" parameter from "REPLACE.ME" - And request contains "channel_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @replay-only @team:DataDog/on-call - Scenario: Get an On-Call notification channel for a user returns "OK" response - Given new "GetUserNotificationChannel" request - And there is a valid "user" in the system - And there is a valid "oncall_email_notification_channel" in the system - And request contains "user_id" parameter from "user.data.id" - And request contains "channel_id" parameter from "oncall_email_notification_channel.data.id" - When the request is sent - Then the response status is 200 OK - And the response "data.attributes.config.type" is equal to "email" - And the response "data.attributes.config.address" is equal to "{{ user.data.attributes.email }}" - @generated @skip @team:DataDog/on-call Scenario: Get scheduled on-call user returns "Bad Request" response Given new "GetScheduleOnCallUser" request @@ -257,32 +176,6 @@ Feature: On-Call When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/on-call - Scenario: List On-Call notification channels for a user returns "Bad Request" response - Given new "ListUserNotificationChannels" request - And request contains "user_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/on-call - Scenario: List On-Call notification channels for a user returns "Not Found" response - Given new "ListUserNotificationChannels" request - And request contains "user_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @replay-only @team:DataDog/on-call - Scenario: List On-Call notification channels for a user returns "OK" response - Given new "ListUserNotificationChannels" request - And there is a valid "user" in the system - And there is a valid "oncall_email_notification_channel" in the system - And request contains "user_id" parameter from "user.data.id" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].attributes.config.type" is equal to "email" - And the response "data[0].attributes.config.address" is equal to "{{ user.data.attributes.email }}" - @skip-python @team:DataDog/on-call Scenario: Set On-Call team routing rules returns "OK" response Given new "SetOnCallTeamRoutingRules" request diff --git a/tests/v2/features/reference_tables.feature b/tests/v2/features/reference_tables.feature index 45a2861c15..a233a6330f 100644 --- a/tests/v2/features/reference_tables.feature +++ b/tests/v2/features/reference_tables.feature @@ -148,7 +148,7 @@ Feature: Reference Tables Scenario: Upsert rows returns "Bad Request" response Given new "UpsertRows" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} + And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} When the request is sent Then the response status is 400 Bad Request @@ -156,7 +156,7 @@ Feature: Reference Tables Scenario: Upsert rows returns "Not Found" response Given new "UpsertRows" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} + And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} When the request is sent Then the response status is 404 Not Found @@ -164,6 +164,6 @@ Feature: Reference Tables Scenario: Upsert rows returns "Rows created or updated successfully" response Given new "UpsertRows" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} + And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} When the request is sent Then the response status is 200 Rows created or updated successfully diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 8aec373cdd..56977a4c30 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -2934,30 +2934,6 @@ "type": "unsafe" } }, - "ListUserNotificationChannels": { - "tag": "On-Call", - "undo": { - "type": "safe" - } - }, - "CreateUserNotificationChannel": { - "tag": "On-Call", - "undo": { - "type": "safe" - } - }, - "DeleteUserNotificationChannel": { - "tag": "On-Call", - "undo": { - "type": "idempotent" - } - }, - "GetUserNotificationChannel": { - "tag": "On-Call", - "undo": { - "type": "safe" - } - }, "ListOrgConfigs": { "tag": "Organizations", "undo": {