@@ -10,171 +10,177 @@ import "google/api/annotations.proto";
1010import "spaceone/api/core/v2/query.proto" ;
1111
1212service Service {
13- rpc create (ServiceCreateRequest ) returns (ServiceInfo ) {
14- option (google.api.http ) = {
15- post : "/alert-manager/v1/service/create"
16- body : "*"
17- };
18- }
19- rpc update (ServiceUpdateRequest ) returns (ServiceInfo ) {
20- option (google.api.http ) = {
21- post : "/alert-manager/v1/service/update"
22- body : "*"
23- };
24- }
25- rpc change_members (ServiceChangeMembersRequest ) returns (ServiceInfo ) {
26- option (google.api.http ) = {
27- post : "/alert-manager/v1/service/change-members"
28- body : "*"
29- };
30- }
31- rpc delete (ServiceDeleteRequest ) returns (google .protobuf .Empty ) {
32- option (google.api.http ) = {
33- post : "/alert-manager/v1/service/delete"
34- body : "*"
35- };
36- }
37- rpc get (ServiceGetRequest ) returns (ServiceInfo ) {
38- option (google.api.http ) = {
39- post : "/alert-manager/v1/service/get"
40- body : "*"
41- };
42- }
43- rpc list (ServiceSearchQuery ) returns (ServicesInfo ) {
44- option (google.api.http ) = {
45- post : "/alert-manager/v1/service/list"
46- body : "*"
47- };
48- }
49- rpc stat (ServiceStatQuery ) returns (google .protobuf .Struct ) {
50- option (google.api.http ) = {
51- post : "/alert-manager/v1/service/stat"
52- body : "*"
53- };
54- }
13+ rpc create (ServiceCreateRequest ) returns (ServiceInfo ) {
14+ option (google.api.http ) = {
15+ post : "/alert-manager/v1/service/create"
16+ body : "*"
17+ };
18+ }
19+ rpc update (ServiceUpdateRequest ) returns (ServiceInfo ) {
20+ option (google.api.http ) = {
21+ post : "/alert-manager/v1/service/update"
22+ body : "*"
23+ };
24+ }
25+ rpc change_members (ServiceChangeMembersRequest ) returns (ServiceInfo ) {
26+ option (google.api.http ) = {
27+ post : "/alert-manager/v1/service/change-members"
28+ body : "*"
29+ };
30+ }
31+ rpc delete (ServiceDeleteRequest ) returns (google .protobuf .Empty ) {
32+ option (google.api.http ) = {
33+ post : "/alert-manager/v1/service/delete"
34+ body : "*"
35+ };
36+ }
37+ rpc get (ServiceGetRequest ) returns (ServiceInfo ) {
38+ option (google.api.http ) = {
39+ post : "/alert-manager/v1/service/get"
40+ body : "*"
41+ };
42+ }
43+ rpc list (ServiceSearchQuery ) returns (ServicesInfo ) {
44+ option (google.api.http ) = {
45+ post : "/alert-manager/v1/service/list"
46+ body : "*"
47+ };
48+ }
49+ rpc stat (ServiceStatQuery ) returns (google .protobuf .Struct ) {
50+ option (google.api.http ) = {
51+ post : "/alert-manager/v1/service/stat"
52+ body : "*"
53+ };
54+ }
5555}
5656
5757message ServiceMembers {
58- repeated string USER = 1 ;
59- repeated string USER_GROUP = 2 ;
58+ repeated string USER = 1 ;
59+ repeated string USER_GROUP = 2 ;
6060}
6161
6262message ServiceOptions {
63- enum NotificationUrgency {
64- URGENCY_NONE = 0 ;
65- ALL = 1 ;
66- HIGH_ONLY = 2 ;
67- }
68- enum RecoveryMode {
69- RECOVERY_MODE_NONE = 0 ;
70- MANUAL = 1 ;
71- AUTO = 2 ;
72- }
73-
74- NotificationUrgency notification_urgency = 1 ;
75- RecoveryMode recovery_mode = 2 ;
63+ enum NotificationUrgency {
64+ URGENCY_NONE = 0 ;
65+ ALL = 1 ;
66+ HIGH_ONLY = 2 ;
67+ }
68+ enum RecoveryMode {
69+ RECOVERY_MODE_NONE = 0 ;
70+ MANUAL = 1 ;
71+ AUTO = 2 ;
72+ }
73+
74+ NotificationUrgency notification_urgency = 1 ;
75+ RecoveryMode recovery_mode = 2 ;
7676}
7777
7878message AlertStats {
79- int32 HIGH = 1 ;
80- int32 LOW = 2 ;
79+ int32 HIGH = 1 ;
80+ int32 LOW = 2 ;
8181}
8282
8383message Alerts {
84- AlertStats TOTAL = 1 ;
85- AlertStats TRIGGERED = 2 ;
86- AlertStats ACKNOWLEDGED = 3 ;
87- AlertStats RESOLVED = 4 ;
84+ AlertStats TOTAL = 1 ;
85+ AlertStats TRIGGERED = 2 ;
86+ AlertStats ACKNOWLEDGED = 3 ;
87+ AlertStats RESOLVED = 4 ;
8888}
8989
9090message ServiceCreateRequest {
91- string name = 1 ;
92- string service_key = 2 ;
93- // +optional
94- string description = 3 ;
95-
96- // +optional
97- ServiceMembers members = 4 ;
98- // +optional
99- ServiceOptions options = 5 ;
100-
101- // +optional
102- google.protobuf.Struct tags = 11 ;
91+ string name = 1 ;
92+ string service_key = 2 ;
93+ // +optional
94+ string description = 3 ;
95+
96+ // +optional
97+ ServiceMembers members = 4 ;
98+ // +optional
99+ ServiceOptions options = 5 ;
100+
101+ // +optional
102+ google.protobuf.Struct tags = 11 ;
103103}
104104
105105message ServiceUpdateRequest {
106- string service_id = 1 ;
107- // +optional
108- string name = 2 ;
109- // +optional
110- string description = 3 ;
111- // +optional
112- ServiceOptions options = 4 ;
113-
114- // +optional
115- google.protobuf.Struct tags = 11 ;
116-
117- // +optional
118- string escalation_policy_id = 21 ;
106+ string service_id = 1 ;
107+ // +optional
108+ string name = 2 ;
109+ // +optional
110+ string description = 3 ;
111+ // +optional
112+ ServiceOptions options = 4 ;
113+
114+ // +optional
115+ google.protobuf.Struct tags = 11 ;
116+
117+ // +optional
118+ string escalation_policy_id = 21 ;
119119}
120120
121121message ServiceChangeMembersRequest {
122- string service_id = 1 ;
123- ServiceMembers members = 2 ;
122+ string service_id = 1 ;
123+ ServiceMembers members = 2 ;
124124}
125125
126126message ServiceDeleteRequest {
127- string service_id = 1 ;
128- // +optional
129- bool force = 2 ;
127+ string service_id = 1 ;
128+ // +optional
129+ bool force = 2 ;
130130}
131131
132132message ServiceGetRequest {
133- string service_id = 1 ;
134- // +optional
135- bool details = 2 ;
133+ string service_id = 1 ;
134+ // +optional
135+ bool details = 2 ;
136136}
137137
138138message ServiceSearchQuery {
139- // +optional
140- spaceone.api.core.v2.Query query = 1 ;
141- // +optional
142- string service_id = 2 ;
143- // +optional
144- string name = 3 ;
145- // +optional
146- bool details = 4 ;
147-
148- // +optional
149- string escalation_policy_id = 21 ;
139+ // +optional
140+ spaceone.api.core.v2.Query query = 1 ;
141+ // +optional
142+ string service_id = 2 ;
143+ // +optional
144+ string name = 3 ;
145+ // +optional
146+ bool details = 4 ;
147+
148+ // +optional
149+ string escalation_policy_id = 21 ;
150150}
151151
152152message ServiceStatQuery {
153- spaceone.api.core.v2.StatisticsQuery query = 1 ;
153+ spaceone.api.core.v2.StatisticsQuery query = 1 ;
154154}
155155
156156message ServiceInfo {
157- string service_id = 1 ;
158- string name = 2 ;
159- string service_key = 3 ;
160- string description = 4 ;
161- ServiceMembers members = 5 ;
162- ServiceOptions options = 6 ;
163- repeated string channels = 7 ;
164- repeated string webhooks = 8 ;
165- Alerts alerts = 9 ;
166-
167- google.protobuf.Struct tags = 11 ;
168-
169- string domain_id = 21 ;
170- string workspace_id = 22 ;
171- string escalation_policy_id = 23 ;
172-
173- string created_at = 31 ;
174- string updated_at = 32 ;
157+ enum ServiceHealthy {
158+ NONE = 0 ;
159+ HEALTHY = 1 ;
160+ UNHEALTHY = 2 ;
161+ }
162+ string service_id = 1 ;
163+ string name = 2 ;
164+ string service_key = 3 ;
165+ string description = 4 ;
166+ ServiceMembers members = 5 ;
167+ ServiceOptions options = 6 ;
168+ repeated string channels = 7 ;
169+ repeated string webhooks = 8 ;
170+ Alerts alerts = 9 ;
171+ ServiceHealthy service_healthy = 10 ;
172+
173+ google.protobuf.Struct tags = 11 ;
174+
175+ string domain_id = 21 ;
176+ string workspace_id = 22 ;
177+ string escalation_policy_id = 23 ;
178+
179+ string created_at = 31 ;
180+ string updated_at = 32 ;
175181}
176182
177183message ServicesInfo {
178- repeated ServiceInfo results = 1 ;
179- int32 total_count = 2 ;
184+ repeated ServiceInfo results = 1 ;
185+ int32 total_count = 2 ;
180186}
0 commit comments