diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5b151db2a8..af90ad1cb9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -23771,6 +23771,299 @@ components: the default subdomain. type: string type: object + EventEmailAddressAlertType: + description: The alert type of events generated from the email address. + enum: + - info + - warn + - error + - success + example: info + type: string + x-enum-varnames: + - INFO + - WARN + - ERROR + - SUCCESS + EventEmailAddressCreateAttributes: + description: Attributes for creating an event email address. + properties: + alert_type: + $ref: '#/components/schemas/EventEmailAddressAlertType' + description: + description: A description of the event email address. + example: Email address for production alerts. + maxLength: 1024 + type: string + format: + $ref: '#/components/schemas/EventEmailAddressFormat' + notify_handles: + $ref: '#/components/schemas/EventEmailAddressNotifyHandles' + tags: + $ref: '#/components/schemas/EventEmailAddressTags' + required: + - format + type: object + EventEmailAddressCreateData: + description: Data for creating an event email address. + properties: + attributes: + $ref: '#/components/schemas/EventEmailAddressCreateAttributes' + type: + $ref: '#/components/schemas/EventEmailAddressResourceType' + required: + - type + - attributes + type: object + EventEmailAddressCreateRequest: + description: Request body for creating an event email address. + properties: + data: + $ref: '#/components/schemas/EventEmailAddressCreateData' + required: + - data + type: object + EventEmailAddressCreatedByRelationship: + description: Relationship to the user who created the email address. + properties: + data: + $ref: '#/components/schemas/EventEmailAddressUserData' + required: + - data + type: object + EventEmailAddressData: + description: A single event email address resource. + properties: + attributes: + $ref: '#/components/schemas/EventEmailAddressResponseAttributes' + id: + description: The UUID of the event email address. + example: 00000000-0000-0000-0000-000000000001 + type: string + relationships: + $ref: '#/components/schemas/EventEmailAddressRelationships' + type: + $ref: '#/components/schemas/EventEmailAddressResourceType' + required: + - type + - id + - attributes + - relationships + type: object + EventEmailAddressFormat: + description: The format of events ingested through the email address. + enum: + - json + - plain-text + example: json + type: string + x-enum-varnames: + - JSON + - PLAIN_TEXT + EventEmailAddressIncludedUser: + description: An included user resource in an event email address response. + properties: + attributes: + $ref: '#/components/schemas/EventEmailAddressIncludedUserAttributes' + id: + description: The UUID of the user. + example: 00000000-0000-0000-0000-000000000001 + type: string + type: + description: The type of the resource. + example: users + type: string + required: + - type + - id + - attributes + type: object + EventEmailAddressIncludedUserAttributes: + description: Attributes of an included user resource. + properties: + name: + description: The name of the user. + example: John Doe + type: string + required: + - name + type: object + EventEmailAddressNotifyHandles: + description: A list of handles to notify when an email is received. + example: + - '@slack-my-channel' + items: + description: A notification handle. + maxLength: 256 + minLength: 1 + type: string + maxItems: 10 + type: array + EventEmailAddressRelationships: + description: Relationships associated with an event email address resource. + properties: + created_by: + $ref: '#/components/schemas/EventEmailAddressCreatedByRelationship' + revoked_by: + $ref: '#/components/schemas/EventEmailAddressRevokedByRelationship' + required: + - created_by + type: object + EventEmailAddressResourceType: + description: The type of the resource. Must be `event_emails`. + enum: + - event_emails + example: event_emails + type: string + x-enum-varnames: + - EVENT_EMAILS + EventEmailAddressResponseAttributes: + description: Attributes of an event email address resource. + properties: + alert_type: + $ref: '#/components/schemas/EventEmailAddressAlertType' + created_at: + description: The timestamp of when the event email address was created. + example: '2025-04-11T13:58:07Z' + format: date-time + type: string + description: + description: A description of the event email address. + example: Email address for production alerts. + maxLength: 1024 + nullable: true + type: string + email: + description: The generated email address for ingesting events. + example: api-abc12345@event-intake.datadoghq.com + type: string + format: + $ref: '#/components/schemas/EventEmailAddressFormat' + last_used_at: + description: The timestamp of when the event email address was last used. + example: null + format: date-time + nullable: true + type: string + notify_handles: + $ref: '#/components/schemas/EventEmailAddressNotifyHandles' + revoked_at: + description: The timestamp of when the event email address was revoked. + example: null + format: date-time + nullable: true + type: string + tags: + $ref: '#/components/schemas/EventEmailAddressTags' + required: + - email + - format + - created_at + type: object + EventEmailAddressRevokedByRelationship: + description: Relationship to the user who revoked the email address. + example: null + nullable: true + properties: + data: + $ref: '#/components/schemas/EventEmailAddressUserData' + type: object + EventEmailAddressSingleResponse: + description: Response containing a single event email address. + properties: + data: + $ref: '#/components/schemas/EventEmailAddressData' + included: + description: Related resources included in the response. + items: + $ref: '#/components/schemas/EventEmailAddressIncludedUser' + type: array + required: + - data + type: object + EventEmailAddressTags: + description: A list of tags to apply to events generated from the email address. + example: + - env:production + - team:my-team + items: + description: A tag. + maxLength: 200 + minLength: 1 + type: string + maxItems: 20 + type: array + EventEmailAddressUpdateAttributes: + description: Attributes for updating an event email address. + properties: + alert_type: + $ref: '#/components/schemas/EventEmailAddressAlertType' + description: + description: A description of the event email address. + example: Updated description for the email address. + maxLength: 1024 + nullable: true + type: string + notify_handles: + $ref: '#/components/schemas/EventEmailAddressNotifyHandles' + tags: + $ref: '#/components/schemas/EventEmailAddressTags' + required: + - description + - alert_type + - tags + - notify_handles + type: object + EventEmailAddressUpdateData: + description: Data for updating an event email address. + properties: + attributes: + $ref: '#/components/schemas/EventEmailAddressUpdateAttributes' + type: + $ref: '#/components/schemas/EventEmailAddressResourceType' + required: + - type + - attributes + type: object + EventEmailAddressUpdateRequest: + description: Request body for updating an event email address. + properties: + data: + $ref: '#/components/schemas/EventEmailAddressUpdateData' + required: + - data + type: object + EventEmailAddressUserData: + description: A user data reference in a relationship. + properties: + id: + description: The UUID of the user. + example: 00000000-0000-0000-0000-000000000001 + type: string + type: + description: The type of the resource. + example: users + type: string + required: + - type + - id + type: object + EventEmailAddressesResponse: + description: Response containing a list of event email addresses. + properties: + data: + description: A list of event email address resources. + items: + $ref: '#/components/schemas/EventEmailAddressData' + type: array + included: + description: Related resources included in the response. + items: + $ref: '#/components/schemas/EventEmailAddressIncludedUser' + type: array + required: + - data + type: object EventPayload: additionalProperties: false description: Event attributes. @@ -45607,6 +45900,50 @@ components: required: - type type: object + OnCallEventEmailAddressCreateAttributes: + description: Attributes for creating an on-call event email address. + properties: + alert_type: + $ref: '#/components/schemas/EventEmailAddressAlertType' + description: + description: A description of the on-call event email address. + example: On-call email address for my team. + maxLength: 1024 + type: string + format: + $ref: '#/components/schemas/EventEmailAddressFormat' + tags: + $ref: '#/components/schemas/EventEmailAddressTags' + team_handle: + description: 'The team handle associated with the on-call email address. + + Must contain only alphanumeric characters, hyphens, and underscores.' + example: my-team + maxLength: 195 + type: string + required: + - format + - team_handle + type: object + OnCallEventEmailAddressCreateData: + description: Data for creating an on-call event email address. + properties: + attributes: + $ref: '#/components/schemas/OnCallEventEmailAddressCreateAttributes' + type: + $ref: '#/components/schemas/EventEmailAddressResourceType' + required: + - type + - attributes + type: object + OnCallEventEmailAddressCreateRequest: + description: Request body for creating an on-call event email address. + properties: + data: + $ref: '#/components/schemas/OnCallEventEmailAddressCreateData' + required: + - data + type: object OnCallNotificationRule: description: A top-level wrapper for a notification rule example: @@ -82017,6 +82354,371 @@ paths: tags: - Events x-codegen-request-body-name: body + /api/v2/events/mail: + get: + description: List all API email addresses for your organization. + operationId: ListEventEmailAddresses + parameters: + - description: When set to `true`, returns only active (non-revoked) email addresses. + in: query + name: active + required: false + schema: + type: boolean + - description: 'Comma-separated list of related resources to include in the + response. + + Supported values are `created_by` and `revoked_by`.' + in: query + name: include + required: false + schema: + example: created_by,revoked_by + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressesResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List event email addresses + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create a new API email address to use in an event email integration + rule. + operationId: CreateEventEmailAddress + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressSingleResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '405': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Method Not Allowed + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create an event email address + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/events/mail/on-call: + get: + description: List all on-call event email addresses for a given team handle. + operationId: ListOnCallEventEmailAddresses + parameters: + - description: The team handle to filter on-call event email addresses. + in: query + name: filter[team_handle] + required: true + schema: + example: my-team + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List on-call event email addresses + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create a new on-call event email address associated with a team + handle. + operationId: CreateOnCallEventEmailAddress + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OnCallEventEmailAddressCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressSingleResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create an on-call event email address + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/events/mail/on-call/{id}: + delete: + description: Revoke an existing on-call event email address in your organization. + operationId: DeleteOnCallEventEmailAddress + parameters: + - description: The UUID of the on-call event email address. + in: path + name: id + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Revoke an on-call event email address + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/events/mail/{email_uuid}: + delete: + description: Revoke an existing API email address in your organization. + operationId: DeleteEventEmailAddress + parameters: + - description: The UUID of the event email address. + in: path + name: email_uuid + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Revoke an event email address + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get a single API email address for your organization. + operationId: GetEventEmailAddress + parameters: + - description: The UUID of the event email address. + in: path + name: email_uuid + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressSingleResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get an event email address + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Update an existing API email address in your organization. + operationId: UpdateEventEmailAddress + parameters: + - description: The UUID of the event email address. + in: path + name: email_uuid + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressSingleResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update an event email address + tags: + - Events + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/events/search: post: description: 'List endpoint returns events that match an events search query. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index deb71c283a..1f7cc8b25e 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -9923,6 +9923,139 @@ datadog\_api\_client.v2.model.event\_create\_response\_payload\_links module :members: :show-inheritance: +datadog\_api\_client.v2.model.event\_email\_address\_alert\_type module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_alert_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_create\_attributes module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.event_email_address_create_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_create\_data module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.event_email_address_create_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_create\_request module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_create_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_created\_by\_relationship module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_created_by_relationship + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_data module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_format module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.event_email_address_format + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_included\_user module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_included_user + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_included\_user\_attributes module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_included_user_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_relationships module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_resource\_type module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_resource_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_response\_attributes module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_revoked\_by\_relationship module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_revoked_by_relationship + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_single\_response module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_single_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_update\_attributes module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.event_email_address_update_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_update\_data module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.event_email_address_update_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_update\_request module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_update_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_user\_data module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_user_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_addresses\_response module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_addresses_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.event\_payload module --------------------------------------------------- @@ -19534,6 +19667,27 @@ datadog\_api\_client.v2.model.okta\_integration\_update module :members: :show-inheritance: +datadog\_api\_client.v2.model.on\_call\_event\_email\_address\_create\_attributes module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.on_call_event_email_address_create_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.on\_call\_event\_email\_address\_create\_data module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.on_call_event_email_address_create_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.on\_call\_event\_email\_address\_create\_request module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.on_call_event_email_address_create_request + :members: + :show-inheritance: + datadog\_api\_client.v2.model.on\_call\_notification\_rule module ----------------------------------------------------------------- diff --git a/examples/v2/events/CreateEventEmailAddress.py b/examples/v2/events/CreateEventEmailAddress.py new file mode 100644 index 0000000000..b42c17e3c1 --- /dev/null +++ b/examples/v2/events/CreateEventEmailAddress.py @@ -0,0 +1,38 @@ +""" +Create an event email address returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType +from datadog_api_client.v2.model.event_email_address_create_attributes import EventEmailAddressCreateAttributes +from datadog_api_client.v2.model.event_email_address_create_data import EventEmailAddressCreateData +from datadog_api_client.v2.model.event_email_address_create_request import EventEmailAddressCreateRequest +from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat +from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + +body = EventEmailAddressCreateRequest( + data=EventEmailAddressCreateData( + attributes=EventEmailAddressCreateAttributes( + alert_type=EventEmailAddressAlertType.INFO, + description="Email address for production alerts.", + format=EventEmailAddressFormat.JSON, + notify_handles=[ + "@slack-my-channel", + ], + tags=[ + "env:production", + "team:my-team", + ], + ), + type=EventEmailAddressResourceType.EVENT_EMAILS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["create_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.create_event_email_address(body=body) + + print(response) diff --git a/examples/v2/events/CreateOnCallEventEmailAddress.py b/examples/v2/events/CreateOnCallEventEmailAddress.py new file mode 100644 index 0000000000..4826f46ed6 --- /dev/null +++ b/examples/v2/events/CreateOnCallEventEmailAddress.py @@ -0,0 +1,38 @@ +""" +Create an on-call event email address returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType +from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat +from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType +from datadog_api_client.v2.model.on_call_event_email_address_create_attributes import ( + OnCallEventEmailAddressCreateAttributes, +) +from datadog_api_client.v2.model.on_call_event_email_address_create_data import OnCallEventEmailAddressCreateData +from datadog_api_client.v2.model.on_call_event_email_address_create_request import OnCallEventEmailAddressCreateRequest + +body = OnCallEventEmailAddressCreateRequest( + data=OnCallEventEmailAddressCreateData( + attributes=OnCallEventEmailAddressCreateAttributes( + alert_type=EventEmailAddressAlertType.INFO, + description="On-call email address for my team.", + format=EventEmailAddressFormat.JSON, + tags=[ + "env:production", + "team:my-team", + ], + team_handle="my-team", + ), + type=EventEmailAddressResourceType.EVENT_EMAILS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["create_on_call_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.create_on_call_event_email_address(body=body) + + print(response) diff --git a/examples/v2/events/DeleteEventEmailAddress.py b/examples/v2/events/DeleteEventEmailAddress.py new file mode 100644 index 0000000000..62ff6f4d0a --- /dev/null +++ b/examples/v2/events/DeleteEventEmailAddress.py @@ -0,0 +1,15 @@ +""" +Revoke an event email address returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from uuid import UUID + +configuration = Configuration() +configuration.unstable_operations["delete_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + api_instance.delete_event_email_address( + email_uuid=UUID("00000000-0000-0000-0000-000000000001"), + ) diff --git a/examples/v2/events/DeleteOnCallEventEmailAddress.py b/examples/v2/events/DeleteOnCallEventEmailAddress.py new file mode 100644 index 0000000000..bc802c51d3 --- /dev/null +++ b/examples/v2/events/DeleteOnCallEventEmailAddress.py @@ -0,0 +1,15 @@ +""" +Revoke an on-call event email address returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from uuid import UUID + +configuration = Configuration() +configuration.unstable_operations["delete_on_call_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + api_instance.delete_on_call_event_email_address( + id=UUID("00000000-0000-0000-0000-000000000001"), + ) diff --git a/examples/v2/events/GetEventEmailAddress.py b/examples/v2/events/GetEventEmailAddress.py new file mode 100644 index 0000000000..d8310d3e43 --- /dev/null +++ b/examples/v2/events/GetEventEmailAddress.py @@ -0,0 +1,17 @@ +""" +Get an event email address returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from uuid import UUID + +configuration = Configuration() +configuration.unstable_operations["get_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.get_event_email_address( + email_uuid=UUID("00000000-0000-0000-0000-000000000001"), + ) + + print(response) diff --git a/examples/v2/events/ListEventEmailAddresses.py b/examples/v2/events/ListEventEmailAddresses.py new file mode 100644 index 0000000000..09260299ef --- /dev/null +++ b/examples/v2/events/ListEventEmailAddresses.py @@ -0,0 +1,14 @@ +""" +List event email addresses returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi + +configuration = Configuration() +configuration.unstable_operations["list_event_email_addresses"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.list_event_email_addresses() + + print(response) diff --git a/examples/v2/events/ListOnCallEventEmailAddresses.py b/examples/v2/events/ListOnCallEventEmailAddresses.py new file mode 100644 index 0000000000..78d42f824c --- /dev/null +++ b/examples/v2/events/ListOnCallEventEmailAddresses.py @@ -0,0 +1,16 @@ +""" +List on-call event email addresses returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi + +configuration = Configuration() +configuration.unstable_operations["list_on_call_event_email_addresses"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.list_on_call_event_email_addresses( + filter_team_handle="my-team", + ) + + print(response) diff --git a/examples/v2/events/UpdateEventEmailAddress.py b/examples/v2/events/UpdateEventEmailAddress.py new file mode 100644 index 0000000000..caefedd9ca --- /dev/null +++ b/examples/v2/events/UpdateEventEmailAddress.py @@ -0,0 +1,39 @@ +""" +Update an event email address returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType +from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType +from datadog_api_client.v2.model.event_email_address_update_attributes import EventEmailAddressUpdateAttributes +from datadog_api_client.v2.model.event_email_address_update_data import EventEmailAddressUpdateData +from datadog_api_client.v2.model.event_email_address_update_request import EventEmailAddressUpdateRequest +from uuid import UUID + +body = EventEmailAddressUpdateRequest( + data=EventEmailAddressUpdateData( + attributes=EventEmailAddressUpdateAttributes( + alert_type=EventEmailAddressAlertType.INFO, + description="Updated description for the email address.", + notify_handles=[ + "@slack-my-channel", + ], + tags=[ + "env:production", + "team:my-team", + ], + ), + type=EventEmailAddressResourceType.EVENT_EMAILS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["update_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.update_event_email_address( + email_uuid=UUID("00000000-0000-0000-0000-000000000001"), body=body + ) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 8aa9287f21..25f4edf36b 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -324,6 +324,14 @@ def __init__( "v2.get_deployment_rule": False, "v2.update_deployment_gate": False, "v2.update_deployment_rule": False, + "v2.create_event_email_address": False, + "v2.create_on_call_event_email_address": False, + "v2.delete_event_email_address": False, + "v2.delete_on_call_event_email_address": False, + "v2.get_event_email_address": False, + "v2.list_event_email_addresses": False, + "v2.list_on_call_event_email_addresses": False, + "v2.update_event_email_address": False, "v2.create_hamr_org_connection": False, "v2.get_hamr_org_connection": False, "v2.create_global_incident_handle": False, diff --git a/src/datadog_api_client/v2/api/events_api.py b/src/datadog_api_client/v2/api/events_api.py index 18736a12ca..cebb39eea6 100644 --- a/src/datadog_api_client/v2/api/events_api.py +++ b/src/datadog_api_client/v2/api/events_api.py @@ -13,12 +13,18 @@ get_attribute_from_path, UnsetType, unset, + UUID, ) from datadog_api_client.v2.model.events_list_response import EventsListResponse from datadog_api_client.v2.model.events_sort import EventsSort from datadog_api_client.v2.model.event_response import EventResponse from datadog_api_client.v2.model.event_create_response_payload import EventCreateResponsePayload from datadog_api_client.v2.model.event_create_request_payload import EventCreateRequestPayload +from datadog_api_client.v2.model.event_email_addresses_response import EventEmailAddressesResponse +from datadog_api_client.v2.model.event_email_address_single_response import EventEmailAddressSingleResponse +from datadog_api_client.v2.model.event_email_address_create_request import EventEmailAddressCreateRequest +from datadog_api_client.v2.model.on_call_event_email_address_create_request import OnCallEventEmailAddressCreateRequest +from datadog_api_client.v2.model.event_email_address_update_request import EventEmailAddressUpdateRequest from datadog_api_client.v2.model.events_list_request import EventsListRequest from datadog_api_client.v2.model.v2_event_response import V2EventResponse @@ -105,6 +111,92 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressSingleResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail", + "operation_id": "create_event_email_address", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (EventEmailAddressCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_on_call_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressSingleResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/on-call", + "operation_id": "create_on_call_event_email_address", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (OnCallEventEmailAddressCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._delete_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/{email_uuid}", + "operation_id": "delete_event_email_address", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "email_uuid": { + "required": True, + "openapi_types": (UUID,), + "attribute": "email_uuid", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._delete_on_call_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/on-call/{id}", + "operation_id": "delete_on_call_event_email_address", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._get_event_endpoint = _Endpoint( settings={ "response_type": (V2EventResponse,), @@ -128,6 +220,56 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressSingleResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/{email_uuid}", + "operation_id": "get_event_email_address", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "email_uuid": { + "required": True, + "openapi_types": (UUID,), + "attribute": "email_uuid", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_event_email_addresses_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail", + "operation_id": "list_event_email_addresses", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "active": { + "openapi_types": (bool,), + "attribute": "active", + "location": "query", + }, + "include": { + "openapi_types": (str,), + "attribute": "include", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_events_endpoint = _Endpoint( settings={ "response_type": (EventsListResponse,), @@ -178,6 +320,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_on_call_event_email_addresses_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/on-call", + "operation_id": "list_on_call_event_email_addresses", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_team_handle": { + "required": True, + "openapi_types": (str,), + "attribute": "filter[team_handle]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._search_events_endpoint = _Endpoint( settings={ "response_type": (EventsListResponse,), @@ -197,6 +362,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressSingleResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/{email_uuid}", + "operation_id": "update_event_email_address", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "email_uuid": { + "required": True, + "openapi_types": (UUID,), + "attribute": "email_uuid", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (EventEmailAddressUpdateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + def create_event( self, body: EventCreateRequestPayload, @@ -222,6 +413,72 @@ def create_event( return self._create_event_endpoint.call_with_http_info(**kwargs) + def create_event_email_address( + self, + body: EventEmailAddressCreateRequest, + ) -> EventEmailAddressSingleResponse: + """Create an event email address. + + Create a new API email address to use in an event email integration rule. + + :type body: EventEmailAddressCreateRequest + :rtype: EventEmailAddressSingleResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_event_email_address_endpoint.call_with_http_info(**kwargs) + + def create_on_call_event_email_address( + self, + body: OnCallEventEmailAddressCreateRequest, + ) -> EventEmailAddressSingleResponse: + """Create an on-call event email address. + + Create a new on-call event email address associated with a team handle. + + :type body: OnCallEventEmailAddressCreateRequest + :rtype: EventEmailAddressSingleResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_on_call_event_email_address_endpoint.call_with_http_info(**kwargs) + + def delete_event_email_address( + self, + email_uuid: UUID, + ) -> None: + """Revoke an event email address. + + Revoke an existing API email address in your organization. + + :param email_uuid: The UUID of the event email address. + :type email_uuid: UUID + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["email_uuid"] = email_uuid + + return self._delete_event_email_address_endpoint.call_with_http_info(**kwargs) + + def delete_on_call_event_email_address( + self, + id: UUID, + ) -> None: + """Revoke an on-call event email address. + + Revoke an existing on-call event email address in your organization. + + :param id: The UUID of the on-call event email address. + :type id: UUID + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["id"] = id + + return self._delete_on_call_event_email_address_endpoint.call_with_http_info(**kwargs) + def get_event( self, event_id: str, @@ -239,6 +496,49 @@ def get_event( return self._get_event_endpoint.call_with_http_info(**kwargs) + def get_event_email_address( + self, + email_uuid: UUID, + ) -> EventEmailAddressSingleResponse: + """Get an event email address. + + Get a single API email address for your organization. + + :param email_uuid: The UUID of the event email address. + :type email_uuid: UUID + :rtype: EventEmailAddressSingleResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["email_uuid"] = email_uuid + + return self._get_event_email_address_endpoint.call_with_http_info(**kwargs) + + def list_event_email_addresses( + self, + *, + active: Union[bool, UnsetType] = unset, + include: Union[str, UnsetType] = unset, + ) -> EventEmailAddressesResponse: + """List event email addresses. + + List all API email addresses for your organization. + + :param active: When set to ``true`` , returns only active (non-revoked) email addresses. + :type active: bool, optional + :param include: Comma-separated list of related resources to include in the response. + Supported values are ``created_by`` and ``revoked_by``. + :type include: str, optional + :rtype: EventEmailAddressesResponse + """ + kwargs: Dict[str, Any] = {} + if active is not unset: + kwargs["active"] = active + + if include is not unset: + kwargs["include"] = include + + return self._list_event_email_addresses_endpoint.call_with_http_info(**kwargs) + def list_events( self, *, @@ -353,6 +653,23 @@ def list_events_with_pagination( } return endpoint.call_with_http_info_paginated(pagination) + def list_on_call_event_email_addresses( + self, + filter_team_handle: str, + ) -> EventEmailAddressesResponse: + """List on-call event email addresses. + + List all on-call event email addresses for a given team handle. + + :param filter_team_handle: The team handle to filter on-call event email addresses. + :type filter_team_handle: str + :rtype: EventEmailAddressesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["filter_team_handle"] = filter_team_handle + + return self._list_on_call_event_email_addresses_endpoint.call_with_http_info(**kwargs) + def search_events( self, *, @@ -404,3 +721,24 @@ def search_events_with_pagination( "kwargs": kwargs, } return endpoint.call_with_http_info_paginated(pagination) + + def update_event_email_address( + self, + email_uuid: UUID, + body: EventEmailAddressUpdateRequest, + ) -> EventEmailAddressSingleResponse: + """Update an event email address. + + Update an existing API email address in your organization. + + :param email_uuid: The UUID of the event email address. + :type email_uuid: UUID + :type body: EventEmailAddressUpdateRequest + :rtype: EventEmailAddressSingleResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["email_uuid"] = email_uuid + + kwargs["body"] = body + + return self._update_event_email_address_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/model/event_email_address_alert_type.py b/src/datadog_api_client/v2/model/event_email_address_alert_type.py new file mode 100644 index 0000000000..e43c3108bc --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_alert_type.py @@ -0,0 +1,44 @@ +# 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 EventEmailAddressAlertType(ModelSimple): + """ + The alert type of events generated from the email address. + + :param value: Must be one of ["info", "warn", "error", "success"]. + :type value: str + """ + + allowed_values = { + "info", + "warn", + "error", + "success", + } + INFO: ClassVar["EventEmailAddressAlertType"] + WARN: ClassVar["EventEmailAddressAlertType"] + ERROR: ClassVar["EventEmailAddressAlertType"] + SUCCESS: ClassVar["EventEmailAddressAlertType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +EventEmailAddressAlertType.INFO = EventEmailAddressAlertType("info") +EventEmailAddressAlertType.WARN = EventEmailAddressAlertType("warn") +EventEmailAddressAlertType.ERROR = EventEmailAddressAlertType("error") +EventEmailAddressAlertType.SUCCESS = EventEmailAddressAlertType("success") diff --git a/src/datadog_api_client/v2/model/event_email_address_create_attributes.py b/src/datadog_api_client/v2/model/event_email_address_create_attributes.py new file mode 100644 index 0000000000..ce2e92ff8e --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_create_attributes.py @@ -0,0 +1,92 @@ +# 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.event_email_address_alert_type import EventEmailAddressAlertType + from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat + + +class EventEmailAddressCreateAttributes(ModelNormal): + validations = { + "description": { + "max_length": 1024, + }, + "notify_handles": { + "max_items": 10, + }, + "tags": { + "max_items": 20, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType + from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat + + return { + "alert_type": (EventEmailAddressAlertType,), + "description": (str,), + "format": (EventEmailAddressFormat,), + "notify_handles": ([str],), + "tags": ([str],), + } + + attribute_map = { + "alert_type": "alert_type", + "description": "description", + "format": "format", + "notify_handles": "notify_handles", + "tags": "tags", + } + + def __init__( + self_, + format: EventEmailAddressFormat, + alert_type: Union[EventEmailAddressAlertType, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + notify_handles: Union[List[str], UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Attributes for creating an event email address. + + :param alert_type: The alert type of events generated from the email address. + :type alert_type: EventEmailAddressAlertType, optional + + :param description: A description of the event email address. + :type description: str, optional + + :param format: The format of events ingested through the email address. + :type format: EventEmailAddressFormat + + :param notify_handles: A list of handles to notify when an email is received. + :type notify_handles: [str], optional + + :param tags: A list of tags to apply to events generated from the email address. + :type tags: [str], optional + """ + if alert_type is not unset: + kwargs["alert_type"] = alert_type + if description is not unset: + kwargs["description"] = description + if notify_handles is not unset: + kwargs["notify_handles"] = notify_handles + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.format = format diff --git a/src/datadog_api_client/v2/model/event_email_address_create_data.py b/src/datadog_api_client/v2/model/event_email_address_create_data.py new file mode 100644 index 0000000000..f804b71b56 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_create_data.py @@ -0,0 +1,48 @@ +# 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.event_email_address_create_attributes import EventEmailAddressCreateAttributes + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + +class EventEmailAddressCreateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_create_attributes import EventEmailAddressCreateAttributes + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + return { + "attributes": (EventEmailAddressCreateAttributes,), + "type": (EventEmailAddressResourceType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: EventEmailAddressCreateAttributes, type: EventEmailAddressResourceType, **kwargs): + """ + Data for creating an event email address. + + :param attributes: Attributes for creating an event email address. + :type attributes: EventEmailAddressCreateAttributes + + :param type: The type of the resource. Must be ``event_emails``. + :type type: EventEmailAddressResourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/event_email_address_create_request.py b/src/datadog_api_client/v2/model/event_email_address_create_request.py new file mode 100644 index 0000000000..b03e42b2d3 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_create_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_create_data import EventEmailAddressCreateData + + +class EventEmailAddressCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_create_data import EventEmailAddressCreateData + + return { + "data": (EventEmailAddressCreateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: EventEmailAddressCreateData, **kwargs): + """ + Request body for creating an event email address. + + :param data: Data for creating an event email address. + :type data: EventEmailAddressCreateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/event_email_address_created_by_relationship.py b/src/datadog_api_client/v2/model/event_email_address_created_by_relationship.py new file mode 100644 index 0000000000..d530f85f3b --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_created_by_relationship.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_user_data import EventEmailAddressUserData + + +class EventEmailAddressCreatedByRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_user_data import EventEmailAddressUserData + + return { + "data": (EventEmailAddressUserData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: EventEmailAddressUserData, **kwargs): + """ + Relationship to the user who created the email address. + + :param data: A user data reference in a relationship. + :type data: EventEmailAddressUserData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/event_email_address_data.py b/src/datadog_api_client/v2/model/event_email_address_data.py new file mode 100644 index 0000000000..77cf4a630d --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_data.py @@ -0,0 +1,71 @@ +# 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.event_email_address_response_attributes import EventEmailAddressResponseAttributes + from datadog_api_client.v2.model.event_email_address_relationships import EventEmailAddressRelationships + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + +class EventEmailAddressData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_response_attributes import ( + EventEmailAddressResponseAttributes, + ) + from datadog_api_client.v2.model.event_email_address_relationships import EventEmailAddressRelationships + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + return { + "attributes": (EventEmailAddressResponseAttributes,), + "id": (str,), + "relationships": (EventEmailAddressRelationships,), + "type": (EventEmailAddressResourceType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: EventEmailAddressResponseAttributes, + id: str, + relationships: EventEmailAddressRelationships, + type: EventEmailAddressResourceType, + **kwargs, + ): + """ + A single event email address resource. + + :param attributes: Attributes of an event email address resource. + :type attributes: EventEmailAddressResponseAttributes + + :param id: The UUID of the event email address. + :type id: str + + :param relationships: Relationships associated with an event email address resource. + :type relationships: EventEmailAddressRelationships + + :param type: The type of the resource. Must be ``event_emails``. + :type type: EventEmailAddressResourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.relationships = relationships + self_.type = type diff --git a/src/datadog_api_client/v2/model/event_email_address_format.py b/src/datadog_api_client/v2/model/event_email_address_format.py new file mode 100644 index 0000000000..377be1878b --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_format.py @@ -0,0 +1,38 @@ +# 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 EventEmailAddressFormat(ModelSimple): + """ + The format of events ingested through the email address. + + :param value: Must be one of ["json", "plain-text"]. + :type value: str + """ + + allowed_values = { + "json", + "plain-text", + } + JSON: ClassVar["EventEmailAddressFormat"] + PLAIN_TEXT: ClassVar["EventEmailAddressFormat"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +EventEmailAddressFormat.JSON = EventEmailAddressFormat("json") +EventEmailAddressFormat.PLAIN_TEXT = EventEmailAddressFormat("plain-text") diff --git a/src/datadog_api_client/v2/model/event_email_address_included_user.py b/src/datadog_api_client/v2/model/event_email_address_included_user.py new file mode 100644 index 0000000000..a8c156e3b5 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_included_user.py @@ -0,0 +1,56 @@ +# 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.event_email_address_included_user_attributes import ( + EventEmailAddressIncludedUserAttributes, + ) + + +class EventEmailAddressIncludedUser(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_included_user_attributes import ( + EventEmailAddressIncludedUserAttributes, + ) + + return { + "attributes": (EventEmailAddressIncludedUserAttributes,), + "id": (str,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: EventEmailAddressIncludedUserAttributes, id: str, type: str, **kwargs): + """ + An included user resource in an event email address response. + + :param attributes: Attributes of an included user resource. + :type attributes: EventEmailAddressIncludedUserAttributes + + :param id: The UUID of the user. + :type id: str + + :param type: The type of the resource. + :type type: str + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/event_email_address_included_user_attributes.py b/src/datadog_api_client/v2/model/event_email_address_included_user_attributes.py new file mode 100644 index 0000000000..d170d2c182 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_included_user_attributes.py @@ -0,0 +1,33 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class EventEmailAddressIncludedUserAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + } + + attribute_map = { + "name": "name", + } + + def __init__(self_, name: str, **kwargs): + """ + Attributes of an included user resource. + + :param name: The name of the user. + :type name: str + """ + super().__init__(kwargs) + + self_.name = name diff --git a/src/datadog_api_client/v2/model/event_email_address_relationships.py b/src/datadog_api_client/v2/model/event_email_address_relationships.py new file mode 100644 index 0000000000..83f87309bb --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_relationships.py @@ -0,0 +1,65 @@ +# 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, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_created_by_relationship import ( + EventEmailAddressCreatedByRelationship, + ) + from datadog_api_client.v2.model.event_email_address_revoked_by_relationship import ( + EventEmailAddressRevokedByRelationship, + ) + + +class EventEmailAddressRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_created_by_relationship import ( + EventEmailAddressCreatedByRelationship, + ) + from datadog_api_client.v2.model.event_email_address_revoked_by_relationship import ( + EventEmailAddressRevokedByRelationship, + ) + + return { + "created_by": (EventEmailAddressCreatedByRelationship,), + "revoked_by": (EventEmailAddressRevokedByRelationship,), + } + + attribute_map = { + "created_by": "created_by", + "revoked_by": "revoked_by", + } + + def __init__( + self_, + created_by: EventEmailAddressCreatedByRelationship, + revoked_by: Union[EventEmailAddressRevokedByRelationship, none_type, UnsetType] = unset, + **kwargs, + ): + """ + Relationships associated with an event email address resource. + + :param created_by: Relationship to the user who created the email address. + :type created_by: EventEmailAddressCreatedByRelationship + + :param revoked_by: Relationship to the user who revoked the email address. + :type revoked_by: EventEmailAddressRevokedByRelationship, none_type, optional + """ + if revoked_by is not unset: + kwargs["revoked_by"] = revoked_by + super().__init__(kwargs) + + self_.created_by = created_by diff --git a/src/datadog_api_client/v2/model/event_email_address_resource_type.py b/src/datadog_api_client/v2/model/event_email_address_resource_type.py new file mode 100644 index 0000000000..af1734473c --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_resource_type.py @@ -0,0 +1,35 @@ +# 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 EventEmailAddressResourceType(ModelSimple): + """ + The type of the resource. Must be `event_emails`. + + :param value: If omitted defaults to "event_emails". Must be one of ["event_emails"]. + :type value: str + """ + + allowed_values = { + "event_emails", + } + EVENT_EMAILS: ClassVar["EventEmailAddressResourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +EventEmailAddressResourceType.EVENT_EMAILS = EventEmailAddressResourceType("event_emails") diff --git a/src/datadog_api_client/v2/model/event_email_address_response_attributes.py b/src/datadog_api_client/v2/model/event_email_address_response_attributes.py new file mode 100644 index 0000000000..67bfc74a63 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response_attributes.py @@ -0,0 +1,124 @@ +# 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, + datetime, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType + from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat + + +class EventEmailAddressResponseAttributes(ModelNormal): + validations = { + "description": { + "max_length": 1024, + }, + "notify_handles": { + "max_items": 10, + }, + "tags": { + "max_items": 20, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType + from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat + + return { + "alert_type": (EventEmailAddressAlertType,), + "created_at": (datetime,), + "description": (str, none_type), + "email": (str,), + "format": (EventEmailAddressFormat,), + "last_used_at": (datetime, none_type), + "notify_handles": ([str],), + "revoked_at": (datetime, none_type), + "tags": ([str],), + } + + attribute_map = { + "alert_type": "alert_type", + "created_at": "created_at", + "description": "description", + "email": "email", + "format": "format", + "last_used_at": "last_used_at", + "notify_handles": "notify_handles", + "revoked_at": "revoked_at", + "tags": "tags", + } + + def __init__( + self_, + created_at: datetime, + email: str, + format: EventEmailAddressFormat, + alert_type: Union[EventEmailAddressAlertType, UnsetType] = unset, + description: Union[str, none_type, UnsetType] = unset, + last_used_at: Union[datetime, none_type, UnsetType] = unset, + notify_handles: Union[List[str], UnsetType] = unset, + revoked_at: Union[datetime, none_type, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an event email address resource. + + :param alert_type: The alert type of events generated from the email address. + :type alert_type: EventEmailAddressAlertType, optional + + :param created_at: The timestamp of when the event email address was created. + :type created_at: datetime + + :param description: A description of the event email address. + :type description: str, none_type, optional + + :param email: The generated email address for ingesting events. + :type email: str + + :param format: The format of events ingested through the email address. + :type format: EventEmailAddressFormat + + :param last_used_at: The timestamp of when the event email address was last used. + :type last_used_at: datetime, none_type, optional + + :param notify_handles: A list of handles to notify when an email is received. + :type notify_handles: [str], optional + + :param revoked_at: The timestamp of when the event email address was revoked. + :type revoked_at: datetime, none_type, optional + + :param tags: A list of tags to apply to events generated from the email address. + :type tags: [str], optional + """ + if alert_type is not unset: + kwargs["alert_type"] = alert_type + if description is not unset: + kwargs["description"] = description + if last_used_at is not unset: + kwargs["last_used_at"] = last_used_at + if notify_handles is not unset: + kwargs["notify_handles"] = notify_handles + if revoked_at is not unset: + kwargs["revoked_at"] = revoked_at + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.created_at = created_at + self_.email = email + self_.format = format diff --git a/src/datadog_api_client/v2/model/event_email_address_revoked_by_relationship.py b/src/datadog_api_client/v2/model/event_email_address_revoked_by_relationship.py new file mode 100644 index 0000000000..a9edea0b6f --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_revoked_by_relationship.py @@ -0,0 +1,44 @@ +# 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.event_email_address_user_data import EventEmailAddressUserData + + +class EventEmailAddressRevokedByRelationship(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_user_data import EventEmailAddressUserData + + return { + "data": (EventEmailAddressUserData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[EventEmailAddressUserData, UnsetType] = unset, **kwargs): + """ + Relationship to the user who revoked the email address. + + :param data: A user data reference in a relationship. + :type data: EventEmailAddressUserData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/event_email_address_single_response.py b/src/datadog_api_client/v2/model/event_email_address_single_response.py new file mode 100644 index 0000000000..ee27630b7c --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_single_response.py @@ -0,0 +1,56 @@ +# 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.event_email_address_data import EventEmailAddressData + from datadog_api_client.v2.model.event_email_address_included_user import EventEmailAddressIncludedUser + + +class EventEmailAddressSingleResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_data import EventEmailAddressData + from datadog_api_client.v2.model.event_email_address_included_user import EventEmailAddressIncludedUser + + return { + "data": (EventEmailAddressData,), + "included": ([EventEmailAddressIncludedUser],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: EventEmailAddressData, + included: Union[List[EventEmailAddressIncludedUser], UnsetType] = unset, + **kwargs, + ): + """ + Response containing a single event email address. + + :param data: A single event email address resource. + :type data: EventEmailAddressData + + :param included: Related resources included in the response. + :type included: [EventEmailAddressIncludedUser], optional + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/event_email_address_update_attributes.py b/src/datadog_api_client/v2/model/event_email_address_update_attributes.py new file mode 100644 index 0000000000..a4b688c112 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_update_attributes.py @@ -0,0 +1,78 @@ +# 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, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType + + +class EventEmailAddressUpdateAttributes(ModelNormal): + validations = { + "description": { + "max_length": 1024, + }, + "notify_handles": { + "max_items": 10, + }, + "tags": { + "max_items": 20, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType + + return { + "alert_type": (EventEmailAddressAlertType,), + "description": (str, none_type), + "notify_handles": ([str],), + "tags": ([str],), + } + + attribute_map = { + "alert_type": "alert_type", + "description": "description", + "notify_handles": "notify_handles", + "tags": "tags", + } + + def __init__( + self_, + alert_type: EventEmailAddressAlertType, + description: Union[str, none_type], + notify_handles: List[str], + tags: List[str], + **kwargs, + ): + """ + Attributes for updating an event email address. + + :param alert_type: The alert type of events generated from the email address. + :type alert_type: EventEmailAddressAlertType + + :param description: A description of the event email address. + :type description: str, none_type + + :param notify_handles: A list of handles to notify when an email is received. + :type notify_handles: [str] + + :param tags: A list of tags to apply to events generated from the email address. + :type tags: [str] + """ + super().__init__(kwargs) + + self_.alert_type = alert_type + self_.description = description + self_.notify_handles = notify_handles + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/event_email_address_update_data.py b/src/datadog_api_client/v2/model/event_email_address_update_data.py new file mode 100644 index 0000000000..d97b79f1fc --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_update_data.py @@ -0,0 +1,48 @@ +# 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.event_email_address_update_attributes import EventEmailAddressUpdateAttributes + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + +class EventEmailAddressUpdateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_update_attributes import EventEmailAddressUpdateAttributes + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + return { + "attributes": (EventEmailAddressUpdateAttributes,), + "type": (EventEmailAddressResourceType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: EventEmailAddressUpdateAttributes, type: EventEmailAddressResourceType, **kwargs): + """ + Data for updating an event email address. + + :param attributes: Attributes for updating an event email address. + :type attributes: EventEmailAddressUpdateAttributes + + :param type: The type of the resource. Must be ``event_emails``. + :type type: EventEmailAddressResourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/event_email_address_update_request.py b/src/datadog_api_client/v2/model/event_email_address_update_request.py new file mode 100644 index 0000000000..95c082c9f8 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_update_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_update_data import EventEmailAddressUpdateData + + +class EventEmailAddressUpdateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_update_data import EventEmailAddressUpdateData + + return { + "data": (EventEmailAddressUpdateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: EventEmailAddressUpdateData, **kwargs): + """ + Request body for updating an event email address. + + :param data: Data for updating an event email address. + :type data: EventEmailAddressUpdateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/event_email_address_user_data.py b/src/datadog_api_client/v2/model/event_email_address_user_data.py new file mode 100644 index 0000000000..609666402e --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_user_data.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class EventEmailAddressUserData(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "type": (str,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: str, **kwargs): + """ + A user data reference in a relationship. + + :param id: The UUID of the user. + :type id: str + + :param type: The type of the resource. + :type type: str + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/event_email_addresses_response.py b/src/datadog_api_client/v2/model/event_email_addresses_response.py new file mode 100644 index 0000000000..61438b0ca0 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_addresses_response.py @@ -0,0 +1,56 @@ +# 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.event_email_address_data import EventEmailAddressData + from datadog_api_client.v2.model.event_email_address_included_user import EventEmailAddressIncludedUser + + +class EventEmailAddressesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_data import EventEmailAddressData + from datadog_api_client.v2.model.event_email_address_included_user import EventEmailAddressIncludedUser + + return { + "data": ([EventEmailAddressData],), + "included": ([EventEmailAddressIncludedUser],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: List[EventEmailAddressData], + included: Union[List[EventEmailAddressIncludedUser], UnsetType] = unset, + **kwargs, + ): + """ + Response containing a list of event email addresses. + + :param data: A list of event email address resources. + :type data: [EventEmailAddressData] + + :param included: Related resources included in the response. + :type included: [EventEmailAddressIncludedUser], optional + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/on_call_event_email_address_create_attributes.py b/src/datadog_api_client/v2/model/on_call_event_email_address_create_attributes.py new file mode 100644 index 0000000000..8b26949534 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_event_email_address_create_attributes.py @@ -0,0 +1,92 @@ +# 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.event_email_address_alert_type import EventEmailAddressAlertType + from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat + + +class OnCallEventEmailAddressCreateAttributes(ModelNormal): + validations = { + "description": { + "max_length": 1024, + }, + "tags": { + "max_items": 20, + }, + "team_handle": { + "max_length": 195, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType + from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat + + return { + "alert_type": (EventEmailAddressAlertType,), + "description": (str,), + "format": (EventEmailAddressFormat,), + "tags": ([str],), + "team_handle": (str,), + } + + attribute_map = { + "alert_type": "alert_type", + "description": "description", + "format": "format", + "tags": "tags", + "team_handle": "team_handle", + } + + def __init__( + self_, + format: EventEmailAddressFormat, + team_handle: str, + alert_type: Union[EventEmailAddressAlertType, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Attributes for creating an on-call event email address. + + :param alert_type: The alert type of events generated from the email address. + :type alert_type: EventEmailAddressAlertType, optional + + :param description: A description of the on-call event email address. + :type description: str, optional + + :param format: The format of events ingested through the email address. + :type format: EventEmailAddressFormat + + :param tags: A list of tags to apply to events generated from the email address. + :type tags: [str], optional + + :param team_handle: The team handle associated with the on-call email address. + Must contain only alphanumeric characters, hyphens, and underscores. + :type team_handle: str + """ + if alert_type is not unset: + kwargs["alert_type"] = alert_type + if description is not unset: + kwargs["description"] = description + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.format = format + self_.team_handle = team_handle diff --git a/src/datadog_api_client/v2/model/on_call_event_email_address_create_data.py b/src/datadog_api_client/v2/model/on_call_event_email_address_create_data.py new file mode 100644 index 0000000000..33cff72e88 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_event_email_address_create_data.py @@ -0,0 +1,54 @@ +# 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.on_call_event_email_address_create_attributes import ( + OnCallEventEmailAddressCreateAttributes, + ) + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + +class OnCallEventEmailAddressCreateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_event_email_address_create_attributes import ( + OnCallEventEmailAddressCreateAttributes, + ) + from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType + + return { + "attributes": (OnCallEventEmailAddressCreateAttributes,), + "type": (EventEmailAddressResourceType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, attributes: OnCallEventEmailAddressCreateAttributes, type: EventEmailAddressResourceType, **kwargs + ): + """ + Data for creating an on-call event email address. + + :param attributes: Attributes for creating an on-call event email address. + :type attributes: OnCallEventEmailAddressCreateAttributes + + :param type: The type of the resource. Must be ``event_emails``. + :type type: EventEmailAddressResourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_event_email_address_create_request.py b/src/datadog_api_client/v2/model/on_call_event_email_address_create_request.py new file mode 100644 index 0000000000..b2ebf51037 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_event_email_address_create_request.py @@ -0,0 +1,42 @@ +# 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.on_call_event_email_address_create_data import OnCallEventEmailAddressCreateData + + +class OnCallEventEmailAddressCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_event_email_address_create_data import ( + OnCallEventEmailAddressCreateData, + ) + + return { + "data": (OnCallEventEmailAddressCreateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: OnCallEventEmailAddressCreateData, **kwargs): + """ + Request body for creating an on-call event email address. + + :param data: Data for creating an on-call event email address. + :type data: OnCallEventEmailAddressCreateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f96bb1ec98..3186547569 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1965,6 +1965,31 @@ ) from datadog_api_client.v2.model.event_create_response_payload import EventCreateResponsePayload from datadog_api_client.v2.model.event_create_response_payload_links import EventCreateResponsePayloadLinks +from datadog_api_client.v2.model.event_email_address_alert_type import EventEmailAddressAlertType +from datadog_api_client.v2.model.event_email_address_create_attributes import EventEmailAddressCreateAttributes +from datadog_api_client.v2.model.event_email_address_create_data import EventEmailAddressCreateData +from datadog_api_client.v2.model.event_email_address_create_request import EventEmailAddressCreateRequest +from datadog_api_client.v2.model.event_email_address_created_by_relationship import ( + EventEmailAddressCreatedByRelationship, +) +from datadog_api_client.v2.model.event_email_address_data import EventEmailAddressData +from datadog_api_client.v2.model.event_email_address_format import EventEmailAddressFormat +from datadog_api_client.v2.model.event_email_address_included_user import EventEmailAddressIncludedUser +from datadog_api_client.v2.model.event_email_address_included_user_attributes import ( + EventEmailAddressIncludedUserAttributes, +) +from datadog_api_client.v2.model.event_email_address_relationships import EventEmailAddressRelationships +from datadog_api_client.v2.model.event_email_address_resource_type import EventEmailAddressResourceType +from datadog_api_client.v2.model.event_email_address_response_attributes import EventEmailAddressResponseAttributes +from datadog_api_client.v2.model.event_email_address_revoked_by_relationship import ( + EventEmailAddressRevokedByRelationship, +) +from datadog_api_client.v2.model.event_email_address_single_response import EventEmailAddressSingleResponse +from datadog_api_client.v2.model.event_email_address_update_attributes import EventEmailAddressUpdateAttributes +from datadog_api_client.v2.model.event_email_address_update_data import EventEmailAddressUpdateData +from datadog_api_client.v2.model.event_email_address_update_request import EventEmailAddressUpdateRequest +from datadog_api_client.v2.model.event_email_address_user_data import EventEmailAddressUserData +from datadog_api_client.v2.model.event_email_addresses_response import EventEmailAddressesResponse from datadog_api_client.v2.model.event_payload import EventPayload from datadog_api_client.v2.model.event_payload_attributes import EventPayloadAttributes from datadog_api_client.v2.model.event_payload_integration_id import EventPayloadIntegrationId @@ -4036,6 +4061,11 @@ from datadog_api_client.v2.model.okta_integration import OktaIntegration from datadog_api_client.v2.model.okta_integration_type import OktaIntegrationType from datadog_api_client.v2.model.okta_integration_update import OktaIntegrationUpdate +from datadog_api_client.v2.model.on_call_event_email_address_create_attributes import ( + OnCallEventEmailAddressCreateAttributes, +) +from datadog_api_client.v2.model.on_call_event_email_address_create_data import OnCallEventEmailAddressCreateData +from datadog_api_client.v2.model.on_call_event_email_address_create_request import OnCallEventEmailAddressCreateRequest from datadog_api_client.v2.model.on_call_notification_rule import OnCallNotificationRule from datadog_api_client.v2.model.on_call_notification_rule_attributes import OnCallNotificationRuleAttributes from datadog_api_client.v2.model.on_call_notification_rule_category import OnCallNotificationRuleCategory @@ -7705,6 +7735,25 @@ "EventCreateResponseAttributesAttributesEvt", "EventCreateResponsePayload", "EventCreateResponsePayloadLinks", + "EventEmailAddressAlertType", + "EventEmailAddressCreateAttributes", + "EventEmailAddressCreateData", + "EventEmailAddressCreateRequest", + "EventEmailAddressCreatedByRelationship", + "EventEmailAddressData", + "EventEmailAddressFormat", + "EventEmailAddressIncludedUser", + "EventEmailAddressIncludedUserAttributes", + "EventEmailAddressRelationships", + "EventEmailAddressResourceType", + "EventEmailAddressResponseAttributes", + "EventEmailAddressRevokedByRelationship", + "EventEmailAddressSingleResponse", + "EventEmailAddressUpdateAttributes", + "EventEmailAddressUpdateData", + "EventEmailAddressUpdateRequest", + "EventEmailAddressUserData", + "EventEmailAddressesResponse", "EventPayload", "EventPayloadAttributes", "EventPayloadIntegrationId", @@ -9080,6 +9129,9 @@ "OktaIntegration", "OktaIntegrationType", "OktaIntegrationUpdate", + "OnCallEventEmailAddressCreateAttributes", + "OnCallEventEmailAddressCreateData", + "OnCallEventEmailAddressCreateRequest", "OnCallNotificationRule", "OnCallNotificationRuleAttributes", "OnCallNotificationRuleCategory", diff --git a/tests/v2/features/events.feature b/tests/v2/features/events.feature index 5beda13d5e..9ff0d0a1e2 100644 --- a/tests/v2/features/events.feature +++ b/tests/v2/features/events.feature @@ -17,6 +17,46 @@ Feature: Events And a valid "appKeyAuth" key in the system And an instance of "Events" API + @generated @skip @team:DataDog/event-management + Scenario: Create an event email address returns "Bad Request" response + Given operation "CreateEventEmailAddress" enabled + And new "CreateEventEmailAddress" request + And body with value {"data": {"attributes": {"alert_type": "info", "description": "Email address for production alerts.", "format": "json", "notify_handles": ["@slack-my-channel"], "tags": ["env:production", "team:my-team"]}, "type": "event_emails"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-management + Scenario: Create an event email address returns "Created" response + Given operation "CreateEventEmailAddress" enabled + And new "CreateEventEmailAddress" request + And body with value {"data": {"attributes": {"alert_type": "info", "description": "Email address for production alerts.", "format": "json", "notify_handles": ["@slack-my-channel"], "tags": ["env:production", "team:my-team"]}, "type": "event_emails"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/event-management + Scenario: Create an event email address returns "Method Not Allowed" response + Given operation "CreateEventEmailAddress" enabled + And new "CreateEventEmailAddress" request + And body with value {"data": {"attributes": {"alert_type": "info", "description": "Email address for production alerts.", "format": "json", "notify_handles": ["@slack-my-channel"], "tags": ["env:production", "team:my-team"]}, "type": "event_emails"}} + When the request is sent + Then the response status is 405 Method Not Allowed + + @generated @skip @team:DataDog/event-management + Scenario: Create an on-call event email address returns "Bad Request" response + Given operation "CreateOnCallEventEmailAddress" enabled + And new "CreateOnCallEventEmailAddress" request + And body with value {"data": {"attributes": {"alert_type": "info", "description": "On-call email address for my team.", "format": "json", "tags": ["env:production", "team:my-team"], "team_handle": "my-team"}, "type": "event_emails"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-management + Scenario: Create an on-call event email address returns "Created" response + Given operation "CreateOnCallEventEmailAddress" enabled + And new "CreateOnCallEventEmailAddress" request + And body with value {"data": {"attributes": {"alert_type": "info", "description": "On-call email address for my team.", "format": "json", "tags": ["env:production", "team:my-team"], "team_handle": "my-team"}, "type": "event_emails"}} + When the request is sent + Then the response status is 201 Created + @generated @skip @team:DataDog/event-management Scenario: Get a list of events returns "Bad Request" response Given new "ListEvents" request @@ -50,6 +90,30 @@ Feature: Events Then the response status is 200 OK And the response "data" has length 0 + @generated @skip @team:DataDog/event-management + Scenario: Get an event email address returns "Bad Request" response + Given operation "GetEventEmailAddress" enabled + And new "GetEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-management + Scenario: Get an event email address returns "Not Found" response + Given operation "GetEventEmailAddress" enabled + And new "GetEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/event-management + Scenario: Get an event email address returns "OK" response + Given operation "GetEventEmailAddress" enabled + And new "GetEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/event-management Scenario: Get an event returns "Bad Request" response Given new "GetEvent" request @@ -71,6 +135,29 @@ Feature: Events When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/event-management + Scenario: List event email addresses returns "OK" response + Given operation "ListEventEmailAddresses" enabled + And new "ListEventEmailAddresses" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-management + Scenario: List on-call event email addresses returns "Bad Request" response + Given operation "ListOnCallEventEmailAddresses" enabled + And new "ListOnCallEventEmailAddresses" request + And request contains "filter[team_handle]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-management + Scenario: List on-call event email addresses returns "OK" response + Given operation "ListOnCallEventEmailAddresses" enabled + And new "ListOnCallEventEmailAddresses" request + And request contains "filter[team_handle]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @team:DataDog/event-management Scenario: Post an event returns "Bad request" response Given new "CreateEvent" request @@ -87,6 +174,54 @@ Feature: Events And the response "data.type" is equal to "event" And the response "data.attributes.attributes.evt" has field "uid" + @generated @skip @team:DataDog/event-management + Scenario: Revoke an event email address returns "Bad Request" response + Given operation "DeleteEventEmailAddress" enabled + And new "DeleteEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-management + Scenario: Revoke an event email address returns "No Content" response + Given operation "DeleteEventEmailAddress" enabled + And new "DeleteEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/event-management + Scenario: Revoke an event email address returns "Not Found" response + Given operation "DeleteEventEmailAddress" enabled + And new "DeleteEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/event-management + Scenario: Revoke an on-call event email address returns "Bad Request" response + Given operation "DeleteOnCallEventEmailAddress" enabled + And new "DeleteOnCallEventEmailAddress" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-management + Scenario: Revoke an on-call event email address returns "No Content" response + Given operation "DeleteOnCallEventEmailAddress" enabled + And new "DeleteOnCallEventEmailAddress" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/event-management + Scenario: Revoke an on-call event email address returns "Not Found" response + Given operation "DeleteOnCallEventEmailAddress" enabled + And new "DeleteOnCallEventEmailAddress" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @team:DataDog/event-management Scenario: Search events returns "Bad Request" response Given new "SearchEvents" request @@ -109,3 +244,30 @@ Feature: Events When the request with pagination is sent Then the response status is 200 OK And the response has 3 items + + @generated @skip @team:DataDog/event-management + Scenario: Update an event email address returns "Bad Request" response + Given operation "UpdateEventEmailAddress" enabled + And new "UpdateEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"alert_type": "info", "description": "Updated description for the email address.", "notify_handles": ["@slack-my-channel"], "tags": ["env:production", "team:my-team"]}, "type": "event_emails"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-management + Scenario: Update an event email address returns "Not Found" response + Given operation "UpdateEventEmailAddress" enabled + And new "UpdateEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"alert_type": "info", "description": "Updated description for the email address.", "notify_handles": ["@slack-my-channel"], "tags": ["env:production", "team:my-team"]}, "type": "event_emails"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/event-management + Scenario: Update an event email address returns "OK" response + Given operation "UpdateEventEmailAddress" enabled + And new "UpdateEventEmailAddress" request + And request contains "email_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"alert_type": "info", "description": "Updated description for the email address.", "notify_handles": ["@slack-my-channel"], "tags": ["env:production", "team:my-team"]}, "type": "event_emails"}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 09186eef67..4c52d6ba47 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1737,6 +1737,68 @@ "type": "safe" } }, + "ListEventEmailAddresses": { + "tag": "Events", + "undo": { + "type": "safe" + } + }, + "CreateEventEmailAddress": { + "tag": "Events", + "undo": { + "operationId": "DeleteEventEmailAddress", + "parameters": [ + { + "name": "email_uuid", + "source": "" + } + ], + "type": "unsafe" + } + }, + "ListOnCallEventEmailAddresses": { + "tag": "Events", + "undo": { + "type": "safe" + } + }, + "CreateOnCallEventEmailAddress": { + "tag": "Events", + "undo": { + "operationId": "DeleteOnCallEventEmailAddress", + "parameters": [ + { + "name": "id", + "source": "" + } + ], + "type": "unsafe" + } + }, + "DeleteOnCallEventEmailAddress": { + "tag": "Events", + "undo": { + "type": "idempotent" + } + }, + "DeleteEventEmailAddress": { + "tag": "Events", + "undo": { + "type": "idempotent" + } + }, + "GetEventEmailAddress": { + "tag": "Events", + "undo": { + "type": "safe" + } + }, + "UpdateEventEmailAddress": { + "tag": "Events", + "undo": { + "type": "idempotent" + } + }, "SearchEvents": { "tag": "Events", "undo": {