From 7a0e88502009aacab4cd31e1cc7a719ae8382dd4 Mon Sep 17 00:00:00 2001 From: Jongmin Kim Date: Sun, 29 Dec 2024 14:10:53 +0900 Subject: [PATCH] feat: add scope field to event rule Signed-off-by: Jongmin Kim --- .../api/alert_manager/v1/event_rule.proto | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/proto/spaceone/api/alert_manager/v1/event_rule.proto b/proto/spaceone/api/alert_manager/v1/event_rule.proto index ac40bacc0..ed67d2c17 100644 --- a/proto/spaceone/api/alert_manager/v1/event_rule.proto +++ b/proto/spaceone/api/alert_manager/v1/event_rule.proto @@ -80,15 +80,22 @@ message Condition { // bool no_notification = 6; //} +enum EventRuleScope { + EVENT_RULE_SCOPE_NONE = 0; + GLOBAL = 1; + WEBHOOK = 2; +} + message EventRuleCreateRequest { // +optional string name = 1; + EventRuleScope scope = 2; // +optional - repeated Condition conditions = 2; - ConditionsPolicy conditions_policy = 3; - google.protobuf.Struct actions = 4; + repeated Condition conditions = 3; + ConditionsPolicy conditions_policy = 4; + google.protobuf.Struct actions = 5; // +optional - EventRuleOptions options = 5; + EventRuleOptions options = 6; // +optional google.protobuf.Struct tags = 11; @@ -129,6 +136,8 @@ message EventRuleSearchQuery { string event_rule_id = 2; // +optional string name = 3; + // +optional + EventRuleScope scope = 4; // +optional string workspace_id = 21; @@ -143,11 +152,12 @@ message EventRuleStatQuery { message EventRuleInfo { string event_rule_id = 1; string name = 2; - int32 order = 3; - repeated Condition conditions = 4; - ConditionsPolicy conditions_policy = 5; - google.protobuf.Struct actions = 6; - EventRuleOptions options = 7; + EventRuleScope scope = 3; + int32 order = 4; + repeated Condition conditions = 5; + ConditionsPolicy conditions_policy = 6; + google.protobuf.Struct actions = 7; + EventRuleOptions options = 8; google.protobuf.Struct tags = 11;