xref: /aosp_15_r20/external/googleapis/google/monitoring/v3/group.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.monitoring.v3;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto";
20*d5c09012SAndroid Build Coastguard Worker
21*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.Monitoring.V3";
22*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpb";
23*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
24*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "GroupProto";
25*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.monitoring.v3";
26*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\Monitoring\\V3";
27*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::Monitoring::V3";
28*d5c09012SAndroid Build Coastguard Worker
29*d5c09012SAndroid Build Coastguard Worker// The description of a dynamic collection of monitored resources. Each group
30*d5c09012SAndroid Build Coastguard Worker// has a filter that is matched against monitored resources and their associated
31*d5c09012SAndroid Build Coastguard Worker// metadata. If a group's filter matches an available monitored resource, then
32*d5c09012SAndroid Build Coastguard Worker// that resource is a member of that group.  Groups can contain any number of
33*d5c09012SAndroid Build Coastguard Worker// monitored resources, and each monitored resource can be a member of any
34*d5c09012SAndroid Build Coastguard Worker// number of groups.
35*d5c09012SAndroid Build Coastguard Worker//
36*d5c09012SAndroid Build Coastguard Worker// Groups can be nested in parent-child hierarchies. The `parentName` field
37*d5c09012SAndroid Build Coastguard Worker// identifies an optional parent for each group.  If a group has a parent, then
38*d5c09012SAndroid Build Coastguard Worker// the only monitored resources available to be matched by the group's filter
39*d5c09012SAndroid Build Coastguard Worker// are the resources contained in the parent group.  In other words, a group
40*d5c09012SAndroid Build Coastguard Worker// contains the monitored resources that match its filter and the filters of all
41*d5c09012SAndroid Build Coastguard Worker// the group's ancestors.  A group without a parent can contain any monitored
42*d5c09012SAndroid Build Coastguard Worker// resource.
43*d5c09012SAndroid Build Coastguard Worker//
44*d5c09012SAndroid Build Coastguard Worker// For example, consider an infrastructure running a set of instances with two
45*d5c09012SAndroid Build Coastguard Worker// user-defined tags: `"environment"` and `"role"`. A parent group has a filter,
46*d5c09012SAndroid Build Coastguard Worker// `environment="production"`.  A child of that parent group has a filter,
47*d5c09012SAndroid Build Coastguard Worker// `role="transcoder"`.  The parent group contains all instances in the
48*d5c09012SAndroid Build Coastguard Worker// production environment, regardless of their roles.  The child group contains
49*d5c09012SAndroid Build Coastguard Worker// instances that have the transcoder role *and* are in the production
50*d5c09012SAndroid Build Coastguard Worker// environment.
51*d5c09012SAndroid Build Coastguard Worker//
52*d5c09012SAndroid Build Coastguard Worker// The monitored resources contained in a group can change at any moment,
53*d5c09012SAndroid Build Coastguard Worker// depending on what resources exist and what filters are associated with the
54*d5c09012SAndroid Build Coastguard Worker// group and its ancestors.
55*d5c09012SAndroid Build Coastguard Workermessage Group {
56*d5c09012SAndroid Build Coastguard Worker  option (google.api.resource) = {
57*d5c09012SAndroid Build Coastguard Worker    type: "monitoring.googleapis.com/Group"
58*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/groups/{group}"
59*d5c09012SAndroid Build Coastguard Worker    pattern: "organizations/{organization}/groups/{group}"
60*d5c09012SAndroid Build Coastguard Worker    pattern: "folders/{folder}/groups/{group}"
61*d5c09012SAndroid Build Coastguard Worker    pattern: "*"
62*d5c09012SAndroid Build Coastguard Worker  };
63*d5c09012SAndroid Build Coastguard Worker
64*d5c09012SAndroid Build Coastguard Worker  // Output only. The name of this group. The format is:
65*d5c09012SAndroid Build Coastguard Worker  //
66*d5c09012SAndroid Build Coastguard Worker  //     projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
67*d5c09012SAndroid Build Coastguard Worker  //
68*d5c09012SAndroid Build Coastguard Worker  // When creating a group, this field is ignored and a new name is created
69*d5c09012SAndroid Build Coastguard Worker  // consisting of the project specified in the call to `CreateGroup`
70*d5c09012SAndroid Build Coastguard Worker  // and a unique `[GROUP_ID]` that is generated automatically.
71*d5c09012SAndroid Build Coastguard Worker  string name = 1;
72*d5c09012SAndroid Build Coastguard Worker
73*d5c09012SAndroid Build Coastguard Worker  // A user-assigned name for this group, used only for display purposes.
74*d5c09012SAndroid Build Coastguard Worker  string display_name = 2;
75*d5c09012SAndroid Build Coastguard Worker
76*d5c09012SAndroid Build Coastguard Worker  // The name of the group's parent, if it has one. The format is:
77*d5c09012SAndroid Build Coastguard Worker  //
78*d5c09012SAndroid Build Coastguard Worker  //     projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
79*d5c09012SAndroid Build Coastguard Worker  //
80*d5c09012SAndroid Build Coastguard Worker  // For groups with no parent, `parent_name` is the empty string, `""`.
81*d5c09012SAndroid Build Coastguard Worker  string parent_name = 3;
82*d5c09012SAndroid Build Coastguard Worker
83*d5c09012SAndroid Build Coastguard Worker  // The filter used to determine which monitored resources belong to this
84*d5c09012SAndroid Build Coastguard Worker  // group.
85*d5c09012SAndroid Build Coastguard Worker  string filter = 5;
86*d5c09012SAndroid Build Coastguard Worker
87*d5c09012SAndroid Build Coastguard Worker  // If true, the members of this group are considered to be a cluster.
88*d5c09012SAndroid Build Coastguard Worker  // The system can perform additional analysis on groups that are clusters.
89*d5c09012SAndroid Build Coastguard Worker  bool is_cluster = 6;
90*d5c09012SAndroid Build Coastguard Worker}
91