diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c441901f41..6c0be9be5c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -37460,12 +37460,17 @@ components: type: integer type: object Event: + additionalProperties: {} description: The metadata associated with a request. properties: id: description: Event ID. example: "6509751066204996294" type: string + integration_id: + description: The integration ID of the event. + example: "custom-events" + type: string name: description: The event name. type: string @@ -37478,8 +37483,13 @@ components: description: Event type. example: "error_tracking_alert" type: string + uid: + description: A unique identifier for the event. You can use this identifier to query or reference the event. + example: "AaBJ4QimAABPmEWRwc_8yAAA" + type: string type: object EventAttributes: + additionalProperties: {} description: Object description of attributes from your event. properties: aggregation_key: @@ -37729,16 +37739,27 @@ components: - CUSTOM_EVENTS EventPriority: description: |- - The priority of the event's monitor. For example, `normal` or `low`. + The priority of the event alert. Legacy events use `normal` or `low`. + Alert events use `1` (highest priority) through `5` (lowest priority). enum: - normal - low + - "1" + - "2" + - "3" + - "4" + - "5" example: "normal" nullable: true type: string x-enum-varnames: - NORMAL - LOW + - PRIORITY_ONE + - PRIORITY_TWO + - PRIORITY_THREE + - PRIORITY_FOUR + - PRIORITY_FIVE EventResponse: description: The object description of an event after being processed and stored by Datadog. properties: @@ -37774,13 +37795,15 @@ components: type: object EventStatusType: description: |- - If an alert event is enabled, its status is one of the following: - `failure`, `error`, `warning`, `info`, `success`, `user_update`, - `recommendation`, or `snapshot`. + The event status. Legacy events can use `failure`, `error`, `warning`, + `info`, `success`, `user_update`, `recommendation`, or `snapshot`. + Alert events can use `error`, `warn`, or `ok`. enum: - failure - error + - warn - warning + - ok - info - success - user_update @@ -37791,7 +37814,9 @@ components: x-enum-varnames: - FAILURE - ERROR + - WARN - WARNING + - OK - INFO - SUCCESS - USER_UPDATE @@ -38046,7 +38071,7 @@ components: type: string limit: default: 10 - description: The maximum number of logs in the response. + description: The maximum number of events in the response. example: 25 format: int32 maximum: 1000 diff --git a/src/datadog_api_client/v2/model/event.py b/src/datadog_api_client/v2/model/event.py index dd71d3ccdf..c95eef9f5f 100644 --- a/src/datadog_api_client/v2/model/event.py +++ b/src/datadog_api_client/v2/model/event.py @@ -18,24 +18,30 @@ class Event(ModelNormal): def openapi_types(_): return { "id": (str,), + "integration_id": (str,), "name": (str,), "source_id": (int,), "type": (str,), + "uid": (str,), } attribute_map = { "id": "id", + "integration_id": "integration_id", "name": "name", "source_id": "source_id", "type": "type", + "uid": "uid", } def __init__( self_, id: Union[str, UnsetType] = unset, + integration_id: Union[str, UnsetType] = unset, name: Union[str, UnsetType] = unset, source_id: Union[int, UnsetType] = unset, type: Union[str, UnsetType] = unset, + uid: Union[str, UnsetType] = unset, **kwargs, ): """ @@ -44,6 +50,9 @@ def __init__( :param id: Event ID. :type id: str, optional + :param integration_id: The integration ID of the event. + :type integration_id: str, optional + :param name: The event name. :type name: str, optional @@ -52,13 +61,20 @@ def __init__( :param type: Event type. :type type: str, optional + + :param uid: A unique identifier for the event. You can use this identifier to query or reference the event. + :type uid: str, optional """ if id is not unset: kwargs["id"] = id + if integration_id is not unset: + kwargs["integration_id"] = integration_id if name is not unset: kwargs["name"] = name if source_id is not unset: kwargs["source_id"] = source_id if type is not unset: kwargs["type"] = type + if uid is not unset: + kwargs["uid"] = uid super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/event_attributes.py b/src/datadog_api_client/v2/model/event_attributes.py index dc320a3a9d..a33d8e43f7 100644 --- a/src/datadog_api_client/v2/model/event_attributes.py +++ b/src/datadog_api_client/v2/model/event_attributes.py @@ -131,7 +131,8 @@ def __init__( :param monitor_id: ID of the monitor that triggered the event. When an event isn't related to a monitor, this field is empty. :type monitor_id: int, none_type, optional - :param priority: The priority of the event's monitor. For example, ``normal`` or ``low``. + :param priority: The priority of the event alert. Legacy events use ``normal`` or ``low``. + Alert events use ``1`` (highest priority) through ``5`` (lowest priority). :type priority: EventPriority, none_type, optional :param related_event_id: Related event ID. @@ -148,9 +149,9 @@ def __init__( :param sourcecategory: Identifier for the source of the event, such as a monitor alert, an externally-submitted event, or an integration. :type sourcecategory: str, optional - :param status: If an alert event is enabled, its status is one of the following: - ``failure`` , ``error`` , ``warning`` , ``info`` , ``success`` , ``user_update`` , - ``recommendation`` , or ``snapshot``. + :param status: The event status. Legacy events can use ``failure`` , ``error`` , ``warning`` , + ``info`` , ``success`` , ``user_update`` , ``recommendation`` , or ``snapshot``. + Alert events can use ``error`` , ``warn`` , or ``ok``. :type status: EventStatusType, optional :param tags: A list of tags to apply to the event. diff --git a/src/datadog_api_client/v2/model/event_priority.py b/src/datadog_api_client/v2/model/event_priority.py index bcd82f55d2..43ce2a25a9 100644 --- a/src/datadog_api_client/v2/model/event_priority.py +++ b/src/datadog_api_client/v2/model/event_priority.py @@ -14,18 +14,29 @@ class EventPriority(ModelSimple): """ - The priority of the event's monitor. For example, `normal` or `low`. + The priority of the event alert. Legacy events use `normal` or `low`. + Alert events use `1` (highest priority) through `5` (lowest priority). - :param value: Must be one of ["normal", "low"]. + :param value: Must be one of ["normal", "low", "1", "2", "3", "4", "5"]. :type value: str """ allowed_values = { "normal", "low", + "1", + "2", + "3", + "4", + "5", } NORMAL: ClassVar["EventPriority"] LOW: ClassVar["EventPriority"] + PRIORITY_ONE: ClassVar["EventPriority"] + PRIORITY_TWO: ClassVar["EventPriority"] + PRIORITY_THREE: ClassVar["EventPriority"] + PRIORITY_FOUR: ClassVar["EventPriority"] + PRIORITY_FIVE: ClassVar["EventPriority"] _nullable = True @@ -38,3 +49,8 @@ def openapi_types(_): EventPriority.NORMAL = EventPriority("normal") EventPriority.LOW = EventPriority("low") +EventPriority.PRIORITY_ONE = EventPriority("1") +EventPriority.PRIORITY_TWO = EventPriority("2") +EventPriority.PRIORITY_THREE = EventPriority("3") +EventPriority.PRIORITY_FOUR = EventPriority("4") +EventPriority.PRIORITY_FIVE = EventPriority("5") diff --git a/src/datadog_api_client/v2/model/event_status_type.py b/src/datadog_api_client/v2/model/event_status_type.py index e4ae34941b..73a39ff5e6 100644 --- a/src/datadog_api_client/v2/model/event_status_type.py +++ b/src/datadog_api_client/v2/model/event_status_type.py @@ -14,18 +14,20 @@ class EventStatusType(ModelSimple): """ - If an alert event is enabled, its status is one of the following: - `failure`, `error`, `warning`, `info`, `success`, `user_update`, - `recommendation`, or `snapshot`. + The event status. Legacy events can use `failure`, `error`, `warning`, + `info`, `success`, `user_update`, `recommendation`, or `snapshot`. + Alert events can use `error`, `warn`, or `ok`. - :param value: Must be one of ["failure", "error", "warning", "info", "success", "user_update", "recommendation", "snapshot"]. + :param value: Must be one of ["failure", "error", "warn", "warning", "ok", "info", "success", "user_update", "recommendation", "snapshot"]. :type value: str """ allowed_values = { "failure", "error", + "warn", "warning", + "ok", "info", "success", "user_update", @@ -34,7 +36,9 @@ class EventStatusType(ModelSimple): } FAILURE: ClassVar["EventStatusType"] ERROR: ClassVar["EventStatusType"] + WARN: ClassVar["EventStatusType"] WARNING: ClassVar["EventStatusType"] + OK: ClassVar["EventStatusType"] INFO: ClassVar["EventStatusType"] SUCCESS: ClassVar["EventStatusType"] USER_UPDATE: ClassVar["EventStatusType"] @@ -50,7 +54,9 @@ def openapi_types(_): EventStatusType.FAILURE = EventStatusType("failure") EventStatusType.ERROR = EventStatusType("error") +EventStatusType.WARN = EventStatusType("warn") EventStatusType.WARNING = EventStatusType("warning") +EventStatusType.OK = EventStatusType("ok") EventStatusType.INFO = EventStatusType("info") EventStatusType.SUCCESS = EventStatusType("success") EventStatusType.USER_UPDATE = EventStatusType("user_update") diff --git a/src/datadog_api_client/v2/model/events_request_page.py b/src/datadog_api_client/v2/model/events_request_page.py index 26c9ff40c0..7723834660 100644 --- a/src/datadog_api_client/v2/model/events_request_page.py +++ b/src/datadog_api_client/v2/model/events_request_page.py @@ -39,7 +39,7 @@ def __init__(self_, cursor: Union[str, UnsetType] = unset, limit: Union[int, Uns :param cursor: The returned paging point to use to get the next results. :type cursor: str, optional - :param limit: The maximum number of logs in the response. + :param limit: The maximum number of events in the response. :type limit: int, optional """ if cursor is not unset: