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
23 changes: 23 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59622,6 +59622,7 @@ components:
oneOf:
- $ref: "#/components/schemas/SendSlackMessageAction"
- $ref: "#/components/schemas/SendTeamsMessageAction"
- $ref: "#/components/schemas/TriggerWorkflowAutomationAction"
RoutingRuleAttributes:
description: Defines the configurable attributes of a routing rule, such as actions, query, time restriction, and urgency.
properties:
Expand Down Expand Up @@ -79418,6 +79419,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
14 changes: 14 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35116,6 +35116,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
5 changes: 5 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,12 @@ 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

return {
"oneOf": [
SendSlackMessageAction,
SendTeamsMessageAction,
TriggerWorkflowAutomationAction,
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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


class RoutingRuleAttributes(ModelNormal):
Expand All @@ -45,7 +46,12 @@ def openapi_types(_):
def __init__(
self_,
actions: Union[
List[Union[RoutingRuleAction, SendSlackMessageAction, SendTeamsMessageAction]], UnsetType
List[
Union[
RoutingRuleAction, SendSlackMessageAction, SendTeamsMessageAction, TriggerWorkflowAutomationAction
]
],
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,7 @@
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


class TeamRoutingRulesRequestRule(ModelNormal):
Expand Down Expand Up @@ -47,7 +48,12 @@ def openapi_types(_):
def __init__(
self_,
actions: Union[
List[Union[RoutingRuleAction, SendSlackMessageAction, SendTeamsMessageAction]], UnsetType
List[
Union[
RoutingRuleAction, SendSlackMessageAction, SendTeamsMessageAction, TriggerWorkflowAutomationAction
]
],
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")
4 changes: 4 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7175,6 +7175,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 @@ -12522,6 +12524,8 @@
"TriggerRateLimit",
"TriggerSource",
"TriggerType",
"TriggerWorkflowAutomationAction",
"TriggerWorkflowAutomationActionType",
"UCConfigPair",
"UCConfigPairData",
"UCConfigPairDataAttributes",
Expand Down
Loading