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
46 changes: 46 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59489,6 +59489,8 @@ components:
oneOf:
- $ref: "#/components/schemas/SendSlackMessageAction"
- $ref: "#/components/schemas/SendTeamsMessageAction"
- $ref: "#/components/schemas/TriggerWorkflowAutomationAction"
- $ref: "#/components/schemas/WebhookAction"
RoutingRuleAttributes:
description: Defines the configurable attributes of a routing rule, such as actions, query, time restriction, and urgency.
properties:
Expand Down Expand Up @@ -79228,6 +79230,28 @@ components:
type: string
x-enum-varnames:
- MONITOR_ALERT_TRIGGER
TriggerWorkflowAutomationAction:
description: "Triggers a Workflow Automation."
properties:
handle:
description: "The handle of the Workflow Automation to trigger."
example: my-workflow-handle
type: string
type:
$ref: "#/components/schemas/TriggerWorkflowAutomationActionType"
required:
- type
- handle
type: object
TriggerWorkflowAutomationActionType:
default: workflow
description: "Indicates that the action triggers a Workflow Automation."
enum:
- workflow
example: workflow
type: string
x-enum-varnames:
- TRIGGER_WORKFLOW_AUTOMATION
UCConfigPair:
description: The definition of `UCConfigPair` object.
example:
Expand Down Expand Up @@ -82522,6 +82546,28 @@ components:
type: string
x-enum-varnames:
- RUM_REPLAY_WATCHER
WebhookAction:
description: "Sends a request to a webhook."
properties:
handle:
description: "The handle of the webhook to send the request to."
example: my-webhook-handle
type: string
type:
$ref: "#/components/schemas/WebhookActionType"
required:
- type
- handle
type: object
WebhookActionType:
default: webhook
description: "Indicates that the action sends a request to a webhook."
enum:
- webhook
example: webhook
type: string
x-enum-varnames:
- WEBHOOK
Weekday:
description: A day of the week.
enum:
Expand Down
28 changes: 28 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35046,6 +35046,20 @@ datadog\_api\_client.v2.model.trigger\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.trigger\_workflow\_automation\_action module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.trigger_workflow_automation_action
:members:
:show-inheritance:

datadog\_api\_client.v2.model.trigger\_workflow\_automation\_action\_type module
--------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.trigger_workflow_automation_action_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.uc\_config\_pair module
-----------------------------------------------------

Expand Down Expand Up @@ -36551,6 +36565,20 @@ datadog\_api\_client.v2.model.watcher\_data\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.webhook\_action module
----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.webhook_action
:members:
:show-inheritance:

datadog\_api\_client.v2.model.webhook\_action\_type module
----------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.webhook_action_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.weekday module
--------------------------------------------

Expand Down
7 changes: 7 additions & 0 deletions src/datadog_api_client/v2/model/routing_rule_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def __init__(self, **kwargs):

:param tenant: The tenant ID.
:type tenant: str

:param handle: The handle of the Workflow Automation to trigger.
:type handle: str
"""
super().__init__(kwargs)

Expand All @@ -43,10 +46,14 @@ def _composed_schemas(_):
# loading
from datadog_api_client.v2.model.send_slack_message_action import SendSlackMessageAction
from datadog_api_client.v2.model.send_teams_message_action import SendTeamsMessageAction
from datadog_api_client.v2.model.trigger_workflow_automation_action import TriggerWorkflowAutomationAction
from datadog_api_client.v2.model.webhook_action import WebhookAction

return {
"oneOf": [
SendSlackMessageAction,
SendTeamsMessageAction,
TriggerWorkflowAutomationAction,
WebhookAction,
],
}
13 changes: 12 additions & 1 deletion src/datadog_api_client/v2/model/routing_rule_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from datadog_api_client.v2.model.urgency import Urgency
from datadog_api_client.v2.model.send_slack_message_action import SendSlackMessageAction
from datadog_api_client.v2.model.send_teams_message_action import SendTeamsMessageAction
from datadog_api_client.v2.model.trigger_workflow_automation_action import TriggerWorkflowAutomationAction
from datadog_api_client.v2.model.webhook_action import WebhookAction


class RoutingRuleAttributes(ModelNormal):
Expand All @@ -45,7 +47,16 @@ def openapi_types(_):
def __init__(
self_,
actions: Union[
List[Union[RoutingRuleAction, SendSlackMessageAction, SendTeamsMessageAction]], UnsetType
List[
Union[
RoutingRuleAction,
SendSlackMessageAction,
SendTeamsMessageAction,
TriggerWorkflowAutomationAction,
WebhookAction,
]
],
UnsetType,
] = unset,
query: Union[str, UnsetType] = unset,
time_restriction: Union[TimeRestrictions, UnsetType] = unset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from datadog_api_client.v2.model.urgency import Urgency
from datadog_api_client.v2.model.send_slack_message_action import SendSlackMessageAction
from datadog_api_client.v2.model.send_teams_message_action import SendTeamsMessageAction
from datadog_api_client.v2.model.trigger_workflow_automation_action import TriggerWorkflowAutomationAction
from datadog_api_client.v2.model.webhook_action import WebhookAction


class TeamRoutingRulesRequestRule(ModelNormal):
Expand Down Expand Up @@ -47,7 +49,16 @@ def openapi_types(_):
def __init__(
self_,
actions: Union[
List[Union[RoutingRuleAction, SendSlackMessageAction, SendTeamsMessageAction]], UnsetType
List[
Union[
RoutingRuleAction,
SendSlackMessageAction,
SendTeamsMessageAction,
TriggerWorkflowAutomationAction,
WebhookAction,
]
],
UnsetType,
] = unset,
policy_id: Union[str, UnsetType] = unset,
query: Union[str, UnsetType] = unset,
Expand Down
Original file line number Diff line number Diff line change
@@ -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.trigger_workflow_automation_action_type import TriggerWorkflowAutomationActionType


class TriggerWorkflowAutomationAction(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.trigger_workflow_automation_action_type import (
TriggerWorkflowAutomationActionType,
)

return {
"handle": (str,),
"type": (TriggerWorkflowAutomationActionType,),
}

attribute_map = {
"handle": "handle",
"type": "type",
}

def __init__(self_, handle: str, type: TriggerWorkflowAutomationActionType, **kwargs):
"""
Triggers a Workflow Automation.

:param handle: The handle of the Workflow Automation to trigger.
:type handle: str

:param type: Indicates that the action triggers a Workflow Automation.
:type type: TriggerWorkflowAutomationActionType
"""
super().__init__(kwargs)

self_.handle = handle
self_.type = type
Original file line number Diff line number Diff line change
@@ -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 TriggerWorkflowAutomationActionType(ModelSimple):
"""
Indicates that the action triggers a Workflow Automation.

:param value: If omitted defaults to "workflow". Must be one of ["workflow"].
:type value: str
"""

allowed_values = {
"workflow",
}
TRIGGER_WORKFLOW_AUTOMATION: ClassVar["TriggerWorkflowAutomationActionType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


TriggerWorkflowAutomationActionType.TRIGGER_WORKFLOW_AUTOMATION = TriggerWorkflowAutomationActionType("workflow")
46 changes: 46 additions & 0 deletions src/datadog_api_client/v2/model/webhook_action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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.webhook_action_type import WebhookActionType


class WebhookAction(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.webhook_action_type import WebhookActionType

return {
"handle": (str,),
"type": (WebhookActionType,),
}

attribute_map = {
"handle": "handle",
"type": "type",
}

def __init__(self_, handle: str, type: WebhookActionType, **kwargs):
"""
Sends a request to a webhook.

:param handle: The handle of the webhook to send the request to.
:type handle: str

:param type: Indicates that the action sends a request to a webhook.
:type type: WebhookActionType
"""
super().__init__(kwargs)

self_.handle = handle
self_.type = type
35 changes: 35 additions & 0 deletions src/datadog_api_client/v2/model/webhook_action_type.py
Original file line number Diff line number Diff line change
@@ -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 WebhookActionType(ModelSimple):
"""
Indicates that the action sends a request to a webhook.

:param value: If omitted defaults to "webhook". Must be one of ["webhook"].
:type value: str
"""

allowed_values = {
"webhook",
}
WEBHOOK: ClassVar["WebhookActionType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


WebhookActionType.WEBHOOK = WebhookActionType("webhook")
8 changes: 8 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7157,6 +7157,8 @@
from datadog_api_client.v2.model.trigger_rate_limit import TriggerRateLimit
from datadog_api_client.v2.model.trigger_source import TriggerSource
from datadog_api_client.v2.model.trigger_type import TriggerType
from datadog_api_client.v2.model.trigger_workflow_automation_action import TriggerWorkflowAutomationAction
from datadog_api_client.v2.model.trigger_workflow_automation_action_type import TriggerWorkflowAutomationActionType
from datadog_api_client.v2.model.uc_config_pair import UCConfigPair
from datadog_api_client.v2.model.uc_config_pair_data import UCConfigPairData
from datadog_api_client.v2.model.uc_config_pair_data_attributes import UCConfigPairDataAttributes
Expand Down Expand Up @@ -7430,6 +7432,8 @@
from datadog_api_client.v2.model.watcher_data import WatcherData
from datadog_api_client.v2.model.watcher_data_attributes import WatcherDataAttributes
from datadog_api_client.v2.model.watcher_data_type import WatcherDataType
from datadog_api_client.v2.model.webhook_action import WebhookAction
from datadog_api_client.v2.model.webhook_action_type import WebhookActionType
from datadog_api_client.v2.model.weekday import Weekday
from datadog_api_client.v2.model.widget_attributes import WidgetAttributes
from datadog_api_client.v2.model.widget_data import WidgetData
Expand Down Expand Up @@ -12494,6 +12498,8 @@
"TriggerRateLimit",
"TriggerSource",
"TriggerType",
"TriggerWorkflowAutomationAction",
"TriggerWorkflowAutomationActionType",
"UCConfigPair",
"UCConfigPairData",
"UCConfigPairDataAttributes",
Expand Down Expand Up @@ -12709,6 +12715,8 @@
"WatcherData",
"WatcherDataAttributes",
"WatcherDataType",
"WebhookAction",
"WebhookActionType",
"Weekday",
"WidgetAttributes",
"WidgetData",
Expand Down
Loading