1 // Copyright 2018 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.monitoring.v3;
20 import "google/api/annotations.proto";
21 import "google/api/label.proto";
22 import "google/monitoring/v3/common.proto";
23 import "google/protobuf/wrappers.proto";
25 option csharp_namespace = "Google.Cloud.Monitoring.V3";
26 option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
27 option java_multiple_files = true;
28 option java_outer_classname = "NotificationProto";
29 option java_package = "com.google.monitoring.v3";
30 option php_namespace = "Google\\Cloud\\Monitoring\\V3";
32 // A description of a notification channel. The descriptor includes
33 // the properties of the channel and the set of labels or fields that
34 // must be specified to configure channels of a given type.
35 message NotificationChannelDescriptor {
36 // The full REST resource name for this descriptor. The syntax is:
38 // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE]
40 // In the above, `[TYPE]` is the value of the `type` field.
43 // The type of notification channel, such as "email", "sms", etc.
44 // Notification channel types are globally unique.
47 // A human-readable name for the notification channel type. This
48 // form of the name is suitable for a user interface.
49 string display_name = 2;
51 // A human-readable description of the notification channel
52 // type. The description may include a description of the properties
53 // of the channel and pointers to external documentation.
54 string description = 3;
56 // The set of labels that must be defined to identify a particular
57 // channel of the corresponding type. Each label includes a
58 // description for how that field should be populated.
59 repeated google.api.LabelDescriptor labels = 4;
61 // The tiers that support this notification channel; the project service tier
62 // must be one of the supported_tiers.
63 repeated ServiceTier supported_tiers = 5 [deprecated = true];
66 // A `NotificationChannel` is a medium through which an alert is
67 // delivered when a policy violation is detected. Examples of channels
68 // include email, SMS, and third-party messaging applications. Fields
69 // containing sensitive information like authentication tokens or
70 // contact info are only partially populated on retrieval.
71 message NotificationChannel {
72 // Indicates whether the channel has been verified or not. It is illegal
73 // to specify this field in a
74 // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel]
76 // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
78 enum VerificationStatus {
79 // Sentinel value used to indicate that the state is unknown, omitted, or
80 // is not applicable (as in the case of channels that neither support
81 // nor require verification in order to function).
82 VERIFICATION_STATUS_UNSPECIFIED = 0;
84 // The channel has yet to be verified and requires verification to function.
85 // Note that this state also applies to the case where the verification
86 // process has been initiated by sending a verification code but where
87 // the verification code has not been submitted to complete the process.
90 // It has been proven that notifications can be received on this
91 // notification channel and that someone on the project has access
92 // to messages that are delivered to that channel.
96 // The type of the notification channel. This field matches the
98 // [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type]
102 // The full REST resource name for this channel. The syntax is:
104 // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
106 // The `[CHANNEL_ID]` is automatically assigned by the server on creation.
109 // An optional human-readable name for this notification channel. It is
110 // recommended that you specify a non-empty and unique name in order to
111 // make it easier to identify the channels in your project, though this is
112 // not enforced. The display name is limited to 512 Unicode characters.
113 string display_name = 3;
115 // An optional human-readable description of this notification channel. This
116 // description may provide additional details, beyond the display
117 // name, for the channel. This may not exceeed 1024 Unicode characters.
118 string description = 4;
120 // Configuration fields that define the channel and its behavior. The
121 // permissible and required labels are specified in the
122 // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels]
123 // of the `NotificationChannelDescriptor` corresponding to the `type` field.
124 map<string, string> labels = 5;
126 // User-supplied key/value data that does not need to conform to
127 // the corresponding `NotificationChannelDescriptor`'s schema, unlike
128 // the `labels` field. This field is intended to be used for organizing
129 // and identifying the `NotificationChannel` objects.
131 // The field can contain up to 64 entries. Each key and value is limited to
132 // 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
133 // values can contain only lowercase letters, numerals, underscores, and
134 // dashes. Keys must begin with a letter.
135 map<string, string> user_labels = 8;
137 // Indicates whether this channel has been verified or not. On a
138 // [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
140 // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
141 // operation, this field is expected to be populated.
143 // If the value is `UNVERIFIED`, then it indicates that the channel is
144 // non-functioning (it both requires verification and lacks verification);
145 // otherwise, it is assumed that the channel works.
147 // If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
148 // the channel is of a type that does not require verification or that
149 // this specific channel has been exempted from verification because it was
150 // created prior to verification being required for channels of this type.
152 // This field cannot be modified using a standard
153 // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
154 // operation. To change the value of this field, you must call
155 // [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
156 VerificationStatus verification_status = 9;
158 // Whether notifications are forwarded to the described channel. This makes
159 // it possible to disable delivery of notifications to a particular channel
160 // without removing the channel from all alerting policies that reference
161 // the channel. This is a more convenient approach when the change is
162 // temporary and you want to receive notifications from the same set
163 // of alerting policies on the channel at some point in the future.
164 google.protobuf.BoolValue enabled = 11;