Skip to content

Commit 3dc8d9f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit c27beef of spec repo (#4033)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 6c76885 commit 3dc8d9f

8 files changed

Lines changed: 344 additions & 13 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 120 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46574,6 +46574,81 @@ components:
4657446574
required:
4657546575
- type
4657646576
type: object
46577+
GeneralInvestigationAttributes:
46578+
description: Attributes for a general investigation, not tied to a specific monitor alert.
46579+
oneOf:
46580+
- $ref: "#/components/schemas/GeneralInvestigationAttributesWithoutTimeBounds"
46581+
- $ref: "#/components/schemas/GeneralInvestigationAttributesWithTimeBounds"
46582+
GeneralInvestigationAttributesWithTimeBounds:
46583+
additionalProperties: false
46584+
description: Attributes for a general investigation with an explicit time window.
46585+
properties:
46586+
description:
46587+
description: A free-form description of what to investigate, up to 4,096 characters.
46588+
example: "Checkout latency has been elevated for the past hour."
46589+
maxLength: 4096
46590+
type: string
46591+
end_time:
46592+
description: The end of the investigation window, in Unix milliseconds.
46593+
example: 1700003600000
46594+
format: int64
46595+
type: integer
46596+
start_time:
46597+
description: The start of the investigation window, in Unix milliseconds.
46598+
example: 1700000000000
46599+
format: int64
46600+
type: integer
46601+
tags:
46602+
description: Tags that scope the investigation.
46603+
example:
46604+
- "service:checkout"
46605+
items:
46606+
type: string
46607+
type: array
46608+
required:
46609+
- description
46610+
- start_time
46611+
- end_time
46612+
type: object
46613+
GeneralInvestigationAttributesWithoutTimeBounds:
46614+
additionalProperties: false
46615+
description: Attributes for a general investigation without an explicit time window.
46616+
properties:
46617+
description:
46618+
description: A free-form description of what to investigate, up to 4,096 characters.
46619+
example: "Checkout latency has been elevated for the past hour."
46620+
maxLength: 4096
46621+
type: string
46622+
tags:
46623+
description: Tags that scope the investigation.
46624+
example:
46625+
- "service:checkout"
46626+
items:
46627+
type: string
46628+
type: array
46629+
required:
46630+
- description
46631+
type: object
46632+
GeneralInvestigationTrigger:
46633+
additionalProperties: false
46634+
description: A trigger created from a general investigation request.
46635+
properties:
46636+
general_investigation:
46637+
$ref: "#/components/schemas/GeneralInvestigationAttributes"
46638+
type:
46639+
$ref: "#/components/schemas/GeneralInvestigationTriggerType"
46640+
required:
46641+
- type
46642+
- general_investigation
46643+
type: object
46644+
GeneralInvestigationTriggerType:
46645+
description: The type of general investigation trigger.
46646+
enum:
46647+
- general_investigation
46648+
example: general_investigation
46649+
type: string
46650+
x-enum-varnames:
46651+
- GENERAL_INVESTIGATION
4657746652
GenerateCostTagDescriptionResponse:
4657846653
description: Response wrapping an AI-generated Cloud Cost Management tag key description.
4657946654
example:
@@ -72350,6 +72425,18 @@ components:
7235072425
- key
7235172426
- value
7235272427
type: object
72428+
MonitorAlertTrigger:
72429+
additionalProperties: false
72430+
description: A trigger created from a monitor alert.
72431+
properties:
72432+
monitor_alert_trigger:
72433+
$ref: "#/components/schemas/MonitorAlertTriggerAttributes"
72434+
type:
72435+
$ref: "#/components/schemas/MonitorAlertTriggerType"
72436+
required:
72437+
- type
72438+
- monitor_alert_trigger
72439+
type: object
7235372440
MonitorAlertTriggerAttributes:
7235472441
description: Attributes for a monitor alert trigger.
7235572442
properties:
@@ -72372,6 +72459,14 @@ components:
7237272459
- event_id
7237372460
- event_ts
7237472461
type: object
72462+
MonitorAlertTriggerType:
72463+
description: The type of monitor alert trigger.
72464+
enum:
72465+
- monitor_alert_trigger
72466+
example: monitor_alert_trigger
72467+
type: string
72468+
x-enum-varnames:
72469+
- MONITOR_ALERT_TRIGGER
7237572470
MonitorConfigPolicyAttributeCreateRequest:
7237672471
description: Policy and policy type for a monitor configuration policy.
7237772472
properties:
@@ -124722,15 +124817,23 @@ components:
124722124817
- $ref: "#/components/schemas/SoftwareCatalogTriggerWrapper"
124723124818
- $ref: "#/components/schemas/WorkflowTriggerWrapper"
124724124819
TriggerAttributes:
124820+
anyOf:
124821+
- $ref: "#/components/schemas/MonitorAlertTrigger"
124822+
- $ref: "#/components/schemas/GeneralInvestigationTrigger"
124725124823
description: The trigger definition for starting an investigation.
124824+
example:
124825+
monitor_alert_trigger:
124826+
event_id: "1234567890123456789"
124827+
event_ts: 1700000000000
124828+
monitor_id: 12345678
124829+
type: monitor_alert_trigger
124726124830
properties:
124831+
general_investigation:
124832+
$ref: "#/components/schemas/GeneralInvestigationAttributes"
124727124833
monitor_alert_trigger:
124728124834
$ref: "#/components/schemas/MonitorAlertTriggerAttributes"
124729124835
type:
124730124836
$ref: "#/components/schemas/TriggerType"
124731-
required:
124732-
- type
124733-
- monitor_alert_trigger
124734124837
type: object
124735124838
TriggerInvestigationRequest:
124736124839
description: Request to trigger a new investigation.
@@ -124836,10 +124939,12 @@ components:
124836124939
description: The type of trigger for the investigation.
124837124940
enum:
124838124941
- monitor_alert_trigger
124942+
- general_investigation
124839124943
example: monitor_alert_trigger
124840124944
type: string
124841124945
x-enum-varnames:
124842124946
- MONITOR_ALERT_TRIGGER
124947+
- GENERAL_INVESTIGATION
124843124948
TriggerWorkflowAutomationAction:
124844124949
description: "Triggers a Workflow Automation."
124845124950
properties:
@@ -137627,7 +137732,7 @@ paths:
137627137732
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
137628137733
post:
137629137734
description: |-
137630-
Trigger a new Bits AI investigation based on a monitor alert.
137735+
Trigger a Bits AI investigation from a monitor alert or a general investigation.
137631137736
The `monitors_read` permission is required when the trigger type is `monitor_alert_trigger`.
137632137737
operationId: TriggerInvestigation
137633137738
requestBody:
@@ -137645,6 +137750,17 @@ paths:
137645137750
monitor_id: 12345678
137646137751
type: monitor_alert_trigger
137647137752
type: trigger_investigation_request
137753+
general_investigation:
137754+
value:
137755+
data:
137756+
attributes:
137757+
trigger:
137758+
general_investigation:
137759+
description: "Checkout latency has been elevated for the past hour."
137760+
tags:
137761+
- "service:checkout"
137762+
type: general_investigation
137763+
type: trigger_investigation_request
137648137764
schema:
137649137765
$ref: "#/components/schemas/TriggerInvestigationRequest"
137650137766
description: Trigger investigation request body.

‎src/datadog_api_client/v2/api/bits_ai_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def trigger_investigation(
206206
) -> TriggerInvestigationResponse:
207207
"""Trigger a Bits AI investigation.
208208
209-
Trigger a new Bits AI investigation based on a monitor alert.
209+
Trigger a Bits AI investigation from a monitor alert or a general investigation.
210210
The ``monitors_read`` permission is required when the trigger type is ``monitor_alert_trigger``.
211211
212212
:param body: Trigger investigation request body.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelComposed,
9+
cached_property,
10+
)
11+
12+
13+
class GeneralInvestigationAttributes(ModelComposed):
14+
def __init__(self, **kwargs):
15+
"""
16+
Attributes for a general investigation, not tied to a specific monitor alert.
17+
18+
:param description: A free-form description of what to investigate, up to 4,096 characters.
19+
:type description: str
20+
21+
:param tags: Tags that scope the investigation.
22+
:type tags: [str], optional
23+
24+
:param end_time: The end of the investigation window, in Unix milliseconds.
25+
:type end_time: int
26+
27+
:param start_time: The start of the investigation window, in Unix milliseconds.
28+
:type start_time: int
29+
"""
30+
super().__init__(kwargs)
31+
32+
@cached_property
33+
def _composed_schemas(_):
34+
# we need this here to make our import statements work
35+
# we must store _composed_schemas in here so the code is only run
36+
# when we invoke this method. If we kept this at the class
37+
# level we would get an error because the class level
38+
# code would be run when this module is imported, and these composed
39+
# classes don't exist yet because their module has not finished
40+
# loading
41+
from datadog_api_client.v2.model.general_investigation_attributes_without_time_bounds import (
42+
GeneralInvestigationAttributesWithoutTimeBounds,
43+
)
44+
from datadog_api_client.v2.model.general_investigation_attributes_with_time_bounds import (
45+
GeneralInvestigationAttributesWithTimeBounds,
46+
)
47+
48+
return {
49+
"oneOf": [
50+
GeneralInvestigationAttributesWithoutTimeBounds,
51+
GeneralInvestigationAttributesWithTimeBounds,
52+
],
53+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class GeneralInvestigationAttributesWithTimeBounds(ModelNormal):
17+
validations = {
18+
"description": {
19+
"max_length": 4096,
20+
},
21+
}
22+
23+
@cached_property
24+
def additional_properties_type(_):
25+
return None
26+
27+
@cached_property
28+
def openapi_types(_):
29+
return {
30+
"description": (str,),
31+
"end_time": (int,),
32+
"start_time": (int,),
33+
"tags": ([str],),
34+
}
35+
36+
attribute_map = {
37+
"description": "description",
38+
"end_time": "end_time",
39+
"start_time": "start_time",
40+
"tags": "tags",
41+
}
42+
43+
def __init__(
44+
self_, description: str, end_time: int, start_time: int, tags: Union[List[str], UnsetType] = unset, **kwargs
45+
):
46+
"""
47+
Attributes for a general investigation with an explicit time window.
48+
49+
:param description: A free-form description of what to investigate, up to 4,096 characters.
50+
:type description: str
51+
52+
:param end_time: The end of the investigation window, in Unix milliseconds.
53+
:type end_time: int
54+
55+
:param start_time: The start of the investigation window, in Unix milliseconds.
56+
:type start_time: int
57+
58+
:param tags: Tags that scope the investigation.
59+
:type tags: [str], optional
60+
"""
61+
if tags is not unset:
62+
kwargs["tags"] = tags
63+
super().__init__(kwargs)
64+
65+
self_.description = description
66+
self_.end_time = end_time
67+
self_.start_time = start_time
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class GeneralInvestigationAttributesWithoutTimeBounds(ModelNormal):
17+
validations = {
18+
"description": {
19+
"max_length": 4096,
20+
},
21+
}
22+
23+
@cached_property
24+
def additional_properties_type(_):
25+
return None
26+
27+
@cached_property
28+
def openapi_types(_):
29+
return {
30+
"description": (str,),
31+
"tags": ([str],),
32+
}
33+
34+
attribute_map = {
35+
"description": "description",
36+
"tags": "tags",
37+
}
38+
39+
def __init__(self_, description: str, tags: Union[List[str], UnsetType] = unset, **kwargs):
40+
"""
41+
Attributes for a general investigation without an explicit time window.
42+
43+
:param description: A free-form description of what to investigate, up to 4,096 characters.
44+
:type description: str
45+
46+
:param tags: Tags that scope the investigation.
47+
:type tags: [str], optional
48+
"""
49+
if tags is not unset:
50+
kwargs["tags"] = tags
51+
super().__init__(kwargs)
52+
53+
self_.description = description

0 commit comments

Comments
 (0)