service_service.proto
12.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.monitoring.v3;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/monitoring/v3/service.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
option csharp_namespace = "Google.Cloud.Monitoring.V3";
option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
option java_multiple_files = true;
option java_outer_classname = "ServiceMonitoringServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";
// The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
// managing and querying aspects of a workspace's services. These include the
// `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy
// of categorized Health Metrics.
service ServiceMonitoringService {
option (google.api.default_host) = "monitoring.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/monitoring,"
"https://www.googleapis.com/auth/monitoring.read";
// Create a `Service`.
rpc CreateService(CreateServiceRequest) returns (Service) {
option (google.api.http) = {
post: "/v3/{parent=*/*}/services"
body: "service"
};
option (google.api.method_signature) = "parent,service";
}
// Get the named `Service`.
rpc GetService(GetServiceRequest) returns (Service) {
option (google.api.http) = {
get: "/v3/{name=*/*/services/*}"
};
option (google.api.method_signature) = "name";
}
// List `Service`s for this workspace.
rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
option (google.api.http) = {
get: "/v3/{parent=*/*}/services"
};
option (google.api.method_signature) = "parent";
}
// Update this `Service`.
rpc UpdateService(UpdateServiceRequest) returns (Service) {
option (google.api.http) = {
patch: "/v3/{service.name=*/*/services/*}"
body: "service"
};
option (google.api.method_signature) = "service";
}
// Soft delete this `Service`.
rpc DeleteService(DeleteServiceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3/{name=*/*/services/*}"
};
option (google.api.method_signature) = "name";
}
// Create a `ServiceLevelObjective` for the given `Service`.
rpc CreateServiceLevelObjective(CreateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) {
option (google.api.http) = {
post: "/v3/{parent=*/*/services/*}/serviceLevelObjectives"
body: "service_level_objective"
};
option (google.api.method_signature) = "parent,service_level_objective";
}
// Get a `ServiceLevelObjective` by name.
rpc GetServiceLevelObjective(GetServiceLevelObjectiveRequest) returns (ServiceLevelObjective) {
option (google.api.http) = {
get: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}"
};
option (google.api.method_signature) = "name";
}
// List the `ServiceLevelObjective`s for the given `Service`.
rpc ListServiceLevelObjectives(ListServiceLevelObjectivesRequest) returns (ListServiceLevelObjectivesResponse) {
option (google.api.http) = {
get: "/v3/{parent=*/*/services/*}/serviceLevelObjectives"
};
option (google.api.method_signature) = "parent";
}
// Update the given `ServiceLevelObjective`.
rpc UpdateServiceLevelObjective(UpdateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) {
option (google.api.http) = {
patch: "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}"
body: "service_level_objective"
};
option (google.api.method_signature) = "service_level_objective";
}
// Delete the given `ServiceLevelObjective`.
rpc DeleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}"
};
option (google.api.method_signature) = "name";
}
}
// The `CreateService` request.
message CreateServiceRequest {
// Required. Resource name of the parent workspace. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "monitoring.googleapis.com/Service"
}
];
// Optional. The Service id to use for this Service. If omitted, an id will be
// generated instead. Must match the pattern `[a-z0-9\-]+`
string service_id = 3;
// Required. The `Service` to create.
Service service = 2 [(google.api.field_behavior) = REQUIRED];
}
// The `GetService` request.
message GetServiceRequest {
// Required. Resource name of the `Service`. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/Service"
}
];
}
// The `ListServices` request.
message ListServicesRequest {
// Required. Resource name of the parent containing the listed services, either a
// project or a Monitoring Workspace. The formats are:
//
// projects/[PROJECT_ID_OR_NUMBER]
// workspaces/[HOST_PROJECT_ID_OR_NUMBER]
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "monitoring.googleapis.com/Service"
}
];
// A filter specifying what `Service`s to return. The filter currently
// supports the following fields:
//
// - `identifier_case`
// - `app_engine.module_id`
// - `cloud_endpoints.service`
// - `cluster_istio.location`
// - `cluster_istio.cluster_name`
// - `cluster_istio.service_namespace`
// - `cluster_istio.service_name`
//
// `identifier_case` refers to which option in the identifier oneof is
// populated. For example, the filter `identifier_case = "CUSTOM"` would match
// all services with a value for the `custom` field. Valid options are
// "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO".
string filter = 2;
// A non-negative number that is the maximum number of results to return.
// When 0, use default page size.
int32 page_size = 3;
// If this field is not empty then it must contain the `nextPageToken` value
// returned by a previous call to this method. Using this field causes the
// method to return additional results from the previous method call.
string page_token = 4;
}
// The `ListServices` response.
message ListServicesResponse {
// The `Service`s matching the specified filter.
repeated Service services = 1;
// If there are more results than have been returned, then this field is set
// to a non-empty value. To see the additional results,
// use that value as `page_token` in the next call to this method.
string next_page_token = 2;
}
// The `UpdateService` request.
message UpdateServiceRequest {
// Required. The `Service` to draw updates from.
// The given `name` specifies the resource to update.
Service service = 1 [(google.api.field_behavior) = REQUIRED];
// A set of field paths defining which fields to use for the update.
google.protobuf.FieldMask update_mask = 2;
}
// The `DeleteService` request.
message DeleteServiceRequest {
// Required. Resource name of the `Service` to delete. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/Service"
}
];
}
// The `CreateServiceLevelObjective` request.
message CreateServiceLevelObjectiveRequest {
// Required. Resource name of the parent `Service`. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/Service"
}
];
// Optional. The ServiceLevelObjective id to use for this
// ServiceLevelObjective. If omitted, an id will be generated instead. Must
// match the pattern `[a-z0-9\-]+`
string service_level_objective_id = 3;
// Required. The `ServiceLevelObjective` to create.
// The provided `name` will be respected if no `ServiceLevelObjective` exists
// with this name.
ServiceLevelObjective service_level_objective = 2 [(google.api.field_behavior) = REQUIRED];
}
// The `GetServiceLevelObjective` request.
message GetServiceLevelObjectiveRequest {
// Required. Resource name of the `ServiceLevelObjective` to get. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/ServiceLevelObjective"
}
];
// View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the
// `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
// `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
// `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
ServiceLevelObjective.View view = 2;
}
// The `ListServiceLevelObjectives` request.
message ListServiceLevelObjectivesRequest {
// Required. Resource name of the parent containing the listed SLOs, either a
// project or a Monitoring Workspace. The formats are:
//
// projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
// workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/-
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/Service"
}
];
// A filter specifying what `ServiceLevelObjective`s to return.
string filter = 2;
// A non-negative number that is the maximum number of results to return.
// When 0, use default page size.
int32 page_size = 3;
// If this field is not empty then it must contain the `nextPageToken` value
// returned by a previous call to this method. Using this field causes the
// method to return additional results from the previous method call.
string page_token = 4;
// View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each
// `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
// `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
// `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
ServiceLevelObjective.View view = 5;
}
// The `ListServiceLevelObjectives` response.
message ListServiceLevelObjectivesResponse {
// The `ServiceLevelObjective`s matching the specified filter.
repeated ServiceLevelObjective service_level_objectives = 1;
// If there are more results than have been returned, then this field is set
// to a non-empty value. To see the additional results,
// use that value as `page_token` in the next call to this method.
string next_page_token = 2;
}
// The `UpdateServiceLevelObjective` request.
message UpdateServiceLevelObjectiveRequest {
// Required. The `ServiceLevelObjective` to draw updates from.
// The given `name` specifies the resource to update.
ServiceLevelObjective service_level_objective = 1 [(google.api.field_behavior) = REQUIRED];
// A set of field paths defining which fields to use for the update.
google.protobuf.FieldMask update_mask = 2;
}
// The `DeleteServiceLevelObjective` request.
message DeleteServiceLevelObjectiveRequest {
// Required. Resource name of the `ServiceLevelObjective` to delete. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/ServiceLevelObjective"
}
];
}