Skip to content
Merged
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
31 changes: 19 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36811,7 +36811,10 @@ components:
- name
type: object
MonitorNotificationRuleCondition:
description: Conditions for `conditional_recipients`.
description: 'A conditional recipient rule composed of a `scope` (the matching
condition) and

`recipients` (who to notify when it matches).'
properties:
recipients:
$ref: '#/components/schemas/MonitorNotificationRuleRecipients'
Expand All @@ -36824,8 +36827,13 @@ components:
- recipients
type: object
MonitorNotificationRuleConditionScope:
description: The scope to which the monitor applied.
example: transition_type:alert
description: 'Defines the condition under which the recipients are notified.
Supported formats:

- Monitor status condition using `transition_type:<status>`, for example `transition_type:is_alert`.

- A single tag key:value pair, for example `env:prod`.'
example: transition_type:is_alert
maxLength: 3000
minLength: 1
type: string
Expand Down Expand Up @@ -36878,18 +36886,18 @@ components:
$ref: '#/components/schemas/MonitorNotificationRuleResourceType'
type: object
MonitorNotificationRuleFilter:
description: Filter used to associate the notification rule with monitors.
description: Specifies the matching criteria for monitor notifications.
oneOf:
- $ref: '#/components/schemas/MonitorNotificationRuleFilterTags'
- $ref: '#/components/schemas/MonitorNotificationRuleFilterScope'
MonitorNotificationRuleFilterScope:
additionalProperties: false
description: Filter monitor notifications. A monitor notification must match
the scope.
description: Filters monitor notifications using a scope expression over key:value
pairs with boolean logic (AND, OR, NOT).
properties:
scope:
description: A scope composed of one or several key:value pairs, which can
be used to filter monitor notifications on monitor and group tags.
description: A scope expression composed by key:value pairs (e.g. `service:foo`)
with boolean operators (AND, OR, NOT) and parentheses for grouping.
example: service:(foo OR bar) AND team:test NOT environment:staging
maxLength: 3000
minLength: 1
Expand All @@ -36899,12 +36907,11 @@ components:
type: object
MonitorNotificationRuleFilterTags:
additionalProperties: false
description: Filter monitor notifications by tags. A monitor notification must
match all tags.
description: Filters monitor notifications by a list of tag key:value pairs.
properties:
tags:
description: A list of tags (key:value pairs), which can be used to filter
monitor notifications on monitor and group tags.
description: A list of tag key:value pairs (e.g. `team:product`). All tags
must match (AND semantics).
example:
- team:product
- host:abc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
type MonitorNotificationRuleAttributes struct {
// Use conditional recipients to define different recipients for different situations. Cannot be used with `recipients`.
ConditionalRecipients *MonitorNotificationRuleConditionalRecipients `json:"conditional_recipients,omitempty"`
// Filter used to associate the notification rule with monitors.
// Specifies the matching criteria for monitor notifications.
Filter *MonitorNotificationRuleFilter `json:"filter,omitempty"`
// The name of the monitor notification rule.
Name string `json:"name"`
Expand Down
7 changes: 5 additions & 2 deletions api/datadogV2/model_monitor_notification_rule_condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// MonitorNotificationRuleCondition Conditions for `conditional_recipients`.
// MonitorNotificationRuleCondition A conditional recipient rule composed of a `scope` (the matching condition) and
// `recipients` (who to notify when it matches).
type MonitorNotificationRuleCondition struct {
// A list of recipients to notify. Uses the same format as the monitor `message` field. Must not start with an '@'. Cannot be used with `conditional_recipients`.
Recipients []string `json:"recipients"`
// The scope to which the monitor applied.
// Defines the condition under which the recipients are notified. Supported formats:
// - Monitor status condition using `transition_type:<status>`, for example `transition_type:is_alert`.
// - A single tag key:value pair, for example `env:prod`.
Scope string `json:"scope"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_monitor_notification_rule_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// MonitorNotificationRuleFilter - Filter used to associate the notification rule with monitors.
// MonitorNotificationRuleFilter - Specifies the matching criteria for monitor notifications.
type MonitorNotificationRuleFilter struct {
MonitorNotificationRuleFilterTags *MonitorNotificationRuleFilterTags
MonitorNotificationRuleFilterScope *MonitorNotificationRuleFilterScope
Expand Down
4 changes: 2 additions & 2 deletions api/datadogV2/model_monitor_notification_rule_filter_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// MonitorNotificationRuleFilterScope Filter monitor notifications. A monitor notification must match the scope.
// MonitorNotificationRuleFilterScope Filters monitor notifications using a scope expression over key:value pairs with boolean logic (AND, OR, NOT).
type MonitorNotificationRuleFilterScope struct {
// A scope composed of one or several key:value pairs, which can be used to filter monitor notifications on monitor and group tags.
// A scope expression composed by key:value pairs (e.g. `service:foo`) with boolean operators (AND, OR, NOT) and parentheses for grouping.
Scope string `json:"scope"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
Expand Down
4 changes: 2 additions & 2 deletions api/datadogV2/model_monitor_notification_rule_filter_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// MonitorNotificationRuleFilterTags Filter monitor notifications by tags. A monitor notification must match all tags.
// MonitorNotificationRuleFilterTags Filters monitor notifications by a list of tag key:value pairs.
type MonitorNotificationRuleFilterTags struct {
// A list of tags (key:value pairs), which can be used to filter monitor notifications on monitor and group tags.
// A list of tag key:value pairs (e.g. `team:product`). All tags must match (AND semantics).
Tags []string `json:"tags"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type MonitorNotificationRuleResponseAttributes struct {
ConditionalRecipients *MonitorNotificationRuleConditionalRecipients `json:"conditional_recipients,omitempty"`
// Creation time of the monitor notification rule.
Created *time.Time `json:"created,omitempty"`
// Filter used to associate the notification rule with monitors.
// Specifies the matching criteria for monitor notifications.
Filter *MonitorNotificationRuleFilter `json:"filter,omitempty"`
// Time the monitor notification rule was last modified.
Modified *time.Time `json:"modified,omitempty"`
Expand Down
Loading