Skip to content

Commit dfd8a87

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Post an event v2 API - add a new enum value to links.category field and add pattern validation on changed_resource.name field (#3185)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 2703897 commit dfd8a87

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,12 +3109,14 @@ components:
31093109
- runbook
31103110
- documentation
31113111
- dashboard
3112+
- resource
31123113
example: runbook
31133114
type: string
31143115
x-enum-varnames:
31153116
- RUNBOOK
31163117
- DOCUMENTATION
31173118
- DASHBOARD
3119+
- RESOURCE
31183120
AlertEventCustomAttributesPriority:
31193121
default: '5'
31203122
description: The priority of the alert.
@@ -10383,9 +10385,11 @@ components:
1038310385
properties:
1038410386
name:
1038510387
description: The name of the resource that was changed. Limited to 128 characters.
10388+
Must contain at least one non-whitespace character.
1038610389
example: fallback_payments_test
1038710390
maxLength: 128
1038810391
minLength: 1
10392+
pattern: .*\S.*
1038910393
type: string
1039010394
type:
1039110395
$ref: '#/components/schemas/ChangeEventCustomAttributesChangedResourceType'

src/datadog_api_client/v2/model/alert_event_custom_attributes_links_items_category.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ class AlertEventCustomAttributesLinksItemsCategory(ModelSimple):
1616
"""
1717
The category of the link.
1818
19-
:param value: Must be one of ["runbook", "documentation", "dashboard"].
19+
:param value: Must be one of ["runbook", "documentation", "dashboard", "resource"].
2020
:type value: str
2121
"""
2222

2323
allowed_values = {
2424
"runbook",
2525
"documentation",
2626
"dashboard",
27+
"resource",
2728
}
2829
RUNBOOK: ClassVar["AlertEventCustomAttributesLinksItemsCategory"]
2930
DOCUMENTATION: ClassVar["AlertEventCustomAttributesLinksItemsCategory"]
3031
DASHBOARD: ClassVar["AlertEventCustomAttributesLinksItemsCategory"]
32+
RESOURCE: ClassVar["AlertEventCustomAttributesLinksItemsCategory"]
3133

3234
@cached_property
3335
def openapi_types(_):
@@ -41,3 +43,4 @@ def openapi_types(_):
4143
"documentation"
4244
)
4345
AlertEventCustomAttributesLinksItemsCategory.DASHBOARD = AlertEventCustomAttributesLinksItemsCategory("dashboard")
46+
AlertEventCustomAttributesLinksItemsCategory.RESOURCE = AlertEventCustomAttributesLinksItemsCategory("resource")

src/datadog_api_client/v2/model/change_event_custom_attributes_changed_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self_, name: str, type: ChangeEventCustomAttributesChangedResourceT
4949
"""
5050
A uniquely identified resource.
5151
52-
:param name: The name of the resource that was changed. Limited to 128 characters.
52+
:param name: The name of the resource that was changed. Limited to 128 characters. Must contain at least one non-whitespace character.
5353
:type name: str
5454
5555
:param type: The type of the resource that was changed.

0 commit comments

Comments
 (0)