dashboards_service.proto 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.monitoring.dashboard.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/monitoring/dashboard/v1/dashboard.proto";
  21. import "google/protobuf/empty.proto";
  22. option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
  23. option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "DashboardsServiceProto";
  26. option java_package = "com.google.monitoring.dashboard.v1";
  27. option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
  28. option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
  29. // Manages Stackdriver dashboards. A dashboard is an arrangement of data display
  30. // widgets in a specific layout.
  31. service DashboardsService {
  32. option (google.api.default_host) = "monitoring.googleapis.com";
  33. option (google.api.oauth_scopes) =
  34. "https://www.googleapis.com/auth/cloud-platform,"
  35. "https://www.googleapis.com/auth/monitoring,"
  36. "https://www.googleapis.com/auth/monitoring.read,"
  37. "https://www.googleapis.com/auth/monitoring.write";
  38. // 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).
  39. // 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).
  40. rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) {
  41. option (google.api.http) = {
  42. post: "/v1/{parent=projects/*}/dashboards"
  43. body: "dashboard"
  44. };
  45. }
  46. // Lists the existing dashboards.
  47. //
  48. // This method requires the `monitoring.dashboards.list` permission
  49. // on the specified project. For more information, see
  50. // [Cloud Identity and Access Management](https://cloud.google.com/iam).
  51. rpc ListDashboards(ListDashboardsRequest) returns (ListDashboardsResponse) {
  52. option (google.api.http) = {
  53. get: "/v1/{parent=projects/*}/dashboards"
  54. };
  55. }
  56. // Fetches a specific dashboard.
  57. //
  58. // This method requires the `monitoring.dashboards.get` permission
  59. // on the specified dashboard. For more information, see
  60. // [Cloud Identity and Access Management](https://cloud.google.com/iam).
  61. rpc GetDashboard(GetDashboardRequest) returns (Dashboard) {
  62. option (google.api.http) = {
  63. get: "/v1/{name=projects/*/dashboards/*}"
  64. };
  65. }
  66. // Deletes an existing custom dashboard.
  67. //
  68. // This method requires the `monitoring.dashboards.delete` permission
  69. // on the specified dashboard. For more information, see
  70. // [Cloud Identity and Access Management](https://cloud.google.com/iam).
  71. rpc DeleteDashboard(DeleteDashboardRequest) returns (google.protobuf.Empty) {
  72. option (google.api.http) = {
  73. delete: "/v1/{name=projects/*/dashboards/*}"
  74. };
  75. }
  76. // Replaces an existing custom dashboard with a new definition.
  77. //
  78. // This method requires the `monitoring.dashboards.update` permission
  79. // on the specified dashboard. For more information, see
  80. // [Cloud Identity and Access Management](https://cloud.google.com/iam).
  81. rpc UpdateDashboard(UpdateDashboardRequest) returns (Dashboard) {
  82. option (google.api.http) = {
  83. patch: "/v1/{dashboard.name=projects/*/dashboards/*}"
  84. body: "dashboard"
  85. };
  86. }
  87. }
  88. // The `CreateDashboard` request.
  89. message CreateDashboardRequest {
  90. // Required. The project on which to execute the request. The format is:
  91. //
  92. // projects/[PROJECT_ID_OR_NUMBER]
  93. //
  94. // The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name.
  95. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  96. // Required. The initial dashboard specification.
  97. Dashboard dashboard = 2 [(google.api.field_behavior) = REQUIRED];
  98. // If set, validate the request and preview the review, but do not actually
  99. // save it.
  100. bool validate_only = 3;
  101. }
  102. // The `ListDashboards` request.
  103. message ListDashboardsRequest {
  104. // Required. The scope of the dashboards to list. The format is:
  105. //
  106. // projects/[PROJECT_ID_OR_NUMBER]
  107. string parent = 1 [
  108. (google.api.field_behavior) = REQUIRED,
  109. (google.api.resource_reference) = {
  110. type: "cloudresourcemanager.googleapis.com/Project"
  111. }
  112. ];
  113. // A positive number that is the maximum number of results to return.
  114. // If unspecified, a default of 1000 is used.
  115. int32 page_size = 2;
  116. // If this field is not empty then it must contain the `nextPageToken` value
  117. // returned by a previous call to this method. Using this field causes the
  118. // method to return additional results from the previous method call.
  119. string page_token = 3;
  120. }
  121. // The `ListDashboards` request.
  122. message ListDashboardsResponse {
  123. // The list of requested dashboards.
  124. repeated Dashboard dashboards = 1;
  125. // If there are more results than have been returned, then this field is set
  126. // to a non-empty value. To see the additional results,
  127. // use that value as `page_token` in the next call to this method.
  128. string next_page_token = 2;
  129. }
  130. // The `GetDashboard` request.
  131. message GetDashboardRequest {
  132. // Required. The resource name of the Dashboard. The format is one of:
  133. //
  134. // - `dashboards/[DASHBOARD_ID]` (for system dashboards)
  135. // - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]`
  136. // (for custom dashboards).
  137. string name = 1 [
  138. (google.api.field_behavior) = REQUIRED,
  139. (google.api.resource_reference) = {
  140. type: "monitoring.googleapis.com/Dashboard"
  141. }
  142. ];
  143. }
  144. // The `DeleteDashboard` request.
  145. message DeleteDashboardRequest {
  146. // Required. The resource name of the Dashboard. The format is:
  147. //
  148. // projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]
  149. string name = 1 [
  150. (google.api.field_behavior) = REQUIRED,
  151. (google.api.resource_reference) = {
  152. type: "monitoring.googleapis.com/Dashboard"
  153. }
  154. ];
  155. }
  156. // The `UpdateDashboard` request.
  157. message UpdateDashboardRequest {
  158. // Required. The dashboard that will replace the existing dashboard.
  159. Dashboard dashboard = 1 [(google.api.field_behavior) = REQUIRED];
  160. // If set, validate the request and preview the review, but do not actually
  161. // save it.
  162. bool validate_only = 3;
  163. }