Skip to content

Commit 32c7c84

Browse files
committed
feat: add request and response classes to implement toggle monitor state api in alerting
Signed-off-by: vikhy-aws <[email protected]>
1 parent 5307c44 commit 32c7c84

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/main/kotlin/org/opensearch/commons/alerting/action/AlertingActions.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object AlertingActions {
2424
const val INDEX_COMMENT_ACTION_NAME = "cluster:admin/opensearch/alerting/comments/write"
2525
const val SEARCH_COMMENTS_ACTION_NAME = "cluster:admin/opensearch/alerting/comments/search"
2626
const val DELETE_COMMENT_ACTION_NAME = "cluster:admin/opensearch/alerting/comments/delete"
27-
const val UPDATE_MONITOR_STATE_ACTION_NAME = "cluster:admin/opensearch/alerting/monitor/toggle"
27+
const val TOGGLE_MONITOR_ACTION_NAME = "cluster:admin/opensearch/alerting/monitor/toggle"
2828

2929
@JvmField
3030
val INDEX_MONITOR_ACTION_TYPE =
@@ -91,6 +91,6 @@ object AlertingActions {
9191
ActionType(DELETE_COMMENT_ACTION_NAME, ::DeleteCommentResponse)
9292

9393
@JvmField
94-
val UPDATE_MONITOR_STATE_ACTION_TYPE =
95-
ActionType(UPDATE_MONITOR_STATE_ACTION_NAME, ::UpdateMonitorStateResponse)
94+
val TOGGLE_MONITOR_ACTION_TYPE =
95+
ActionType(TOGGLE_MONITOR_ACTION_NAME, ::ToggleMonitorResponse)
9696
}

src/main/kotlin/org/opensearch/commons/alerting/action/UpdateMonitorStateRequest.kt src/main/kotlin/org/opensearch/commons/alerting/action/ToggleMonitorRequest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.opensearch.core.common.io.stream.StreamOutput
77
import org.opensearch.rest.RestRequest
88
import java.io.IOException
99

10-
class UpdateMonitorStateRequest : ActionRequest {
10+
class ToggleMonitorRequest : ActionRequest {
1111
val monitorId: String
1212
val enabled: Boolean
1313
val seqNo: Long

src/main/kotlin/org/opensearch/commons/alerting/action/UpdateMonitorStateResponse.kt src/main/kotlin/org/opensearch/commons/alerting/action/ToggleMonitorResponse.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.opensearch.core.xcontent.ToXContent.Params
1212
import org.opensearch.core.xcontent.XContentBuilder
1313
import java.io.IOException
1414

15-
class UpdateMonitorStateResponse : BaseResponse {
15+
class ToggleMonitorResponse : BaseResponse {
1616
var id: String
1717
var version: Long
1818
var seqNo: Long

0 commit comments

Comments
 (0)