Alerting: MuteTiming service return errutil + GetTiming by name (#79772)
* add get mute timing by name to MuteTimingService * update get mute timing request handler to use the service method * replace validation, uniqueness and used errors with errutils * update mute timing methods return errutil responses * use the term "time interval" in errors bevause mute timings are deprecated in Alertmanager and will be replaced by time intervals in the future. * update create and update methods to return struct instead of pointer
This commit is contained in:
@@ -2785,6 +2785,12 @@
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": " The mute timing was deleted successfully."
|
||||
},
|
||||
"409": {
|
||||
"description": "GenericPublicError",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GenericPublicError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4688,6 +4694,14 @@
|
||||
"$ref": "#/definitions/Frame"
|
||||
}
|
||||
},
|
||||
"GenericPublicError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"body": {
|
||||
"$ref": "#/definitions/PublicError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GettableAlertmanagers": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -8001,6 +8015,7 @@
|
||||
"$ref": "#/definitions/gettableAlert"
|
||||
},
|
||||
"gettableAlerts": {
|
||||
"description": "GettableAlerts gettable alerts",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gettableAlert"
|
||||
@@ -8008,7 +8023,6 @@
|
||||
"$ref": "#/definitions/gettableAlerts"
|
||||
},
|
||||
"gettableSilence": {
|
||||
"description": "GettableSilence gettable silence",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"comment",
|
||||
|
||||
Reference in New Issue
Block a user