diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9a80dea5bbb..0fb2ea89432 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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' @@ -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:`, 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 @@ -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 @@ -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 diff --git a/api/datadogV2/model_monitor_notification_rule_attributes.go b/api/datadogV2/model_monitor_notification_rule_attributes.go index f6c5e9e9bec..b591576a939 100644 --- a/api/datadogV2/model_monitor_notification_rule_attributes.go +++ b/api/datadogV2/model_monitor_notification_rule_attributes.go @@ -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"` diff --git a/api/datadogV2/model_monitor_notification_rule_condition.go b/api/datadogV2/model_monitor_notification_rule_condition.go index 78d3266db57..f78afc7f44e 100644 --- a/api/datadogV2/model_monitor_notification_rule_condition.go +++ b/api/datadogV2/model_monitor_notification_rule_condition.go @@ -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:`, 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:"-"` diff --git a/api/datadogV2/model_monitor_notification_rule_filter.go b/api/datadogV2/model_monitor_notification_rule_filter.go index 8c4cf0d3536..b769dbcec98 100644 --- a/api/datadogV2/model_monitor_notification_rule_filter.go +++ b/api/datadogV2/model_monitor_notification_rule_filter.go @@ -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 diff --git a/api/datadogV2/model_monitor_notification_rule_filter_scope.go b/api/datadogV2/model_monitor_notification_rule_filter_scope.go index 0a620bc4eb3..2a595b84fa1 100644 --- a/api/datadogV2/model_monitor_notification_rule_filter_scope.go +++ b/api/datadogV2/model_monitor_notification_rule_filter_scope.go @@ -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:"-"` diff --git a/api/datadogV2/model_monitor_notification_rule_filter_tags.go b/api/datadogV2/model_monitor_notification_rule_filter_tags.go index 2c5b13ffeb4..23b7ce8bcbd 100644 --- a/api/datadogV2/model_monitor_notification_rule_filter_tags.go +++ b/api/datadogV2/model_monitor_notification_rule_filter_tags.go @@ -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:"-"` diff --git a/api/datadogV2/model_monitor_notification_rule_response_attributes.go b/api/datadogV2/model_monitor_notification_rule_response_attributes.go index cb1beab11ce..e59bfd69fa2 100644 --- a/api/datadogV2/model_monitor_notification_rule_response_attributes.go +++ b/api/datadogV2/model_monitor_notification_rule_response_attributes.go @@ -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"`