This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
/
dashboards_service.proto
181 lines (161 loc) · 6.61 KB
/
dashboards_service.proto
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
// Copyright 2021 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.dashboard.v1;
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/monitoring/dashboard/v1/dashboard.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/api/client.proto";
option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
option java_multiple_files = true;
option java_outer_classname = "DashboardsServiceProto";
option java_package = "com.google.monitoring.dashboard.v1";
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
// Manages Stackdriver dashboards. A dashboard is an arrangement of data display
// widgets in a specific layout.
service DashboardsService {
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,"
"https://www.googleapis.com/auth/monitoring.write";
// Creates a new custom dashboard. For examples on how you can use this API to
// create dashboards, see [Managing dashboards by
// API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the
// `monitoring.dashboards.create` permission on the specified project. For
// more information about permissions, see [Cloud Identity and Access
// Management](https://cloud.google.com/iam).
rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) {
option (google.api.http) = {
post: "/v1/{parent=projects/*}/dashboards"
body: "dashboard"
};
}
// Lists the existing dashboards.
//
// This method requires the `monitoring.dashboards.list` permission
// on the specified project. For more information, see
// [Cloud Identity and Access Management](https://cloud.google.com/iam).
rpc ListDashboards(ListDashboardsRequest) returns (ListDashboardsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*}/dashboards"
};
}
// Fetches a specific dashboard.
//
// This method requires the `monitoring.dashboards.get` permission
// on the specified dashboard. For more information, see
// [Cloud Identity and Access Management](https://cloud.google.com/iam).
rpc GetDashboard(GetDashboardRequest) returns (Dashboard) {
option (google.api.http) = {
get: "/v1/{name=projects/*/dashboards/*}"
};
}
// Deletes an existing custom dashboard.
//
// This method requires the `monitoring.dashboards.delete` permission
// on the specified dashboard. For more information, see
// [Cloud Identity and Access Management](https://cloud.google.com/iam).
rpc DeleteDashboard(DeleteDashboardRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/dashboards/*}"
};
}
// Replaces an existing custom dashboard with a new definition.
//
// This method requires the `monitoring.dashboards.update` permission
// on the specified dashboard. For more information, see
// [Cloud Identity and Access Management](https://cloud.google.com/iam).
rpc UpdateDashboard(UpdateDashboardRequest) returns (Dashboard) {
option (google.api.http) = {
patch: "/v1/{dashboard.name=projects/*/dashboards/*}"
body: "dashboard"
};
}
}
// The `CreateDashboard` request.
message CreateDashboardRequest {
// Required. The project on which to execute the request. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]
//
// The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name.
string parent = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The initial dashboard specification.
Dashboard dashboard = 2 [(google.api.field_behavior) = REQUIRED];
}
// The `ListDashboards` request.
message ListDashboardsRequest {
// Required. The scope of the dashboards to list. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];
// A positive number that is the maximum number of results to return.
// If unspecified, a default of 1000 is used.
int32 page_size = 2;
// 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 = 3;
}
// The `ListDashboards` request.
message ListDashboardsResponse {
// The list of requested dashboards.
repeated Dashboard dashboards = 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 `GetDashboard` request.
message GetDashboardRequest {
// Required. The resource name of the Dashboard. The format is one of:
//
// - `dashboards/[DASHBOARD_ID]` (for system dashboards)
// - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]`
// (for custom dashboards).
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/Dashboard"
}
];
}
// The `DeleteDashboard` request.
message DeleteDashboardRequest {
// Required. The resource name of the Dashboard. The format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "monitoring.googleapis.com/Dashboard"
}
];
}
// The `UpdateDashboard` request.
message UpdateDashboardRequest {
// Required. The dashboard that will replace the existing dashboard.
Dashboard dashboard = 1 [(google.api.field_behavior) = REQUIRED];
}