group.proto 3.8 KB

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