group.proto 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright 2016 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.monitoring.v3;
  16. option java_multiple_files = true;
  17. option java_outer_classname = "GroupProto";
  18. option java_package = "com.google.monitoring.v3";
  19. // The description of a dynamic collection of monitored resources. Each group
  20. // has a filter that is matched against monitored resources and their associated
  21. // metadata. If a group's filter matches an available monitored resource, then
  22. // that resource is a member of that group. Groups can contain any number of
  23. // monitored resources, and each monitored resource can be a member of any
  24. // number of groups.
  25. //
  26. // Groups can be nested in parent-child hierarchies. The `parentName` field
  27. // identifies an optional parent for each group. If a group has a parent, then
  28. // the only monitored resources available to be matched by the group's filter
  29. // are the resources contained in the parent group. In other words, a group
  30. // contains the monitored resources that match its filter and the filters of all
  31. // the group's ancestors. A group without a parent can contain any monitored
  32. // resource.
  33. //
  34. // For example, consider an infrastructure running a set of instances with two
  35. // user-defined tags: `"environment"` and `"role"`. A parent group has a filter,
  36. // `environment="production"`. A child of that parent group has a filter,
  37. // `role="transcoder"`. The parent group contains all instances in the
  38. // production environment, regardless of their roles. The child group contains
  39. // instances that have the transcoder role *and* are in the production
  40. // environment.
  41. //
  42. // The monitored resources contained in a group can change at any moment,
  43. // depending on what resources exist and what filters are associated with the
  44. // group and its ancestors.
  45. message Group {
  46. // The name of this group.
  47. // The format is
  48. // `"projects/{project_id_or_number}/groups/{group_id}"`.
  49. // When creating a group, this field is ignored and a new name is created
  50. // consisting of the project specified in the call to `CreateGroup`
  51. // and a unique `{group_id}` that is generated automatically.
  52. // @OutputOnly
  53. string name = 1;
  54. // A user-assigned name for this group, used only for display purposes.
  55. string display_name = 2;
  56. // The name of the group's parent, if it has one.
  57. // The format is `"projects/{project_id_or_number}/groups/{group_id}"`.
  58. // For groups with no parent, `parentName` is the empty string, `""`.
  59. string parent_name = 3;
  60. // The filter used to determine which monitored resources belong to this group.
  61. string filter = 5;
  62. // If true, the members of this group are considered to be a cluster.
  63. // The system can perform additional analysis on groups that are clusters.
  64. bool is_cluster = 6;
  65. }