monitored_resource.proto 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Copyright (c) 2015, Google Inc.
  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.api;
  16. import "google/api/label.proto";
  17. option java_multiple_files = true;
  18. option java_outer_classname = "MonitoredResourceProto";
  19. option java_package = "com.google.api";
  20. // A descriptor that describes the schema of [MonitoredResource][google.api.MonitoredResource].
  21. message MonitoredResourceDescriptor {
  22. // The monitored resource type. For example, the type `"cloudsql_database"`
  23. // represents databases in Google Cloud SQL.
  24. string type = 1;
  25. // A concise name for the monitored resource type that can be displayed in
  26. // user interfaces. For example, `"Google Cloud SQL Database"`.
  27. string display_name = 2;
  28. // A detailed description of the monitored resource type that can be used in
  29. // documentation.
  30. string description = 3;
  31. // A set of labels that can be used to describe instances of this monitored
  32. // resource type. For example, Google Cloud SQL databases can be labeled with
  33. // their `"database_id"` and their `"zone"`.
  34. repeated LabelDescriptor labels = 4;
  35. }
  36. // A monitored resource describes a resource that can be used for monitoring
  37. // purpose. It can also be used for logging, billing, and other purposes. Each
  38. // resource has a `type` and a set of `labels`. The labels contain information
  39. // that identifies the resource and describes attributes of it. For example,
  40. // you can use monitored resource to describe a normal file, where the resource
  41. // has `type` as `"file"`, the label `path` identifies the file, and the label
  42. // `size` describes the file size. The monitoring system can use a set of
  43. // monitored resources of files to generate file size distribution.
  44. message MonitoredResource {
  45. // The monitored resource type. This field must match the corresponding
  46. // [MonitoredResourceDescriptor.type][google.api.MonitoredResourceDescriptor.type] to this resource.. For example,
  47. // `"cloudsql_database"` represents Cloud SQL databases.
  48. string type = 1;
  49. // Values for some or all of the labels listed in the associated monitored
  50. // resource descriptor. For example, you specify a specific Cloud SQL database
  51. // by supplying values for both the `"database_id"` and `"zone"` labels.
  52. map<string, string> labels = 2;
  53. }