Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -37791,7 +37814,9 @@ components:
x-enum-varnames:
- FAILURE
- ERROR
- WARN
- WARNING
- OK
- INFO
- SUCCESS
- USER_UPDATE
Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions src/datadog_api_client/v2/model/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
"""
Expand All @@ -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

Expand All @@ -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)
9 changes: 5 additions & 4 deletions src/datadog_api_client/v2/model/event_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
20 changes: 18 additions & 2 deletions src/datadog_api_client/v2/model/event_priority.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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")
14 changes: 10 additions & 4 deletions src/datadog_api_client/v2/model/event_status_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"]
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/datadog_api_client/v2/model/events_request_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading