notification.proto 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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/label.proto";
  17. import "google/api/launch_stage.proto";
  18. import "google/api/resource.proto";
  19. import "google/monitoring/v3/common.proto";
  20. import "google/monitoring/v3/mutation_record.proto";
  21. import "google/protobuf/wrappers.proto";
  22. option csharp_namespace = "Google.Cloud.Monitoring.V3";
  23. option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "NotificationProto";
  26. option java_package = "com.google.monitoring.v3";
  27. option php_namespace = "Google\\Cloud\\Monitoring\\V3";
  28. option ruby_package = "Google::Cloud::Monitoring::V3";
  29. // A description of a notification channel. The descriptor includes
  30. // the properties of the channel and the set of labels or fields that
  31. // must be specified to configure channels of a given type.
  32. message NotificationChannelDescriptor {
  33. option (google.api.resource) = {
  34. type: "monitoring.googleapis.com/NotificationChannelDescriptor"
  35. pattern: "projects/{project}/notificationChannelDescriptors/{channel_descriptor}"
  36. pattern: "organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}"
  37. pattern: "folders/{folder}/notificationChannelDescriptors/{channel_descriptor}"
  38. pattern: "*"
  39. };
  40. // The full REST resource name for this descriptor. The format is:
  41. //
  42. // projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE]
  43. //
  44. // In the above, `[TYPE]` is the value of the `type` field.
  45. string name = 6;
  46. // The type of notification channel, such as "email" and "sms". To view the
  47. // full list of channels, see
  48. // [Channel
  49. // descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd).
  50. // Notification channel types are globally unique.
  51. string type = 1;
  52. // A human-readable name for the notification channel type. This
  53. // form of the name is suitable for a user interface.
  54. string display_name = 2;
  55. // A human-readable description of the notification channel
  56. // type. The description may include a description of the properties
  57. // of the channel and pointers to external documentation.
  58. string description = 3;
  59. // The set of labels that must be defined to identify a particular
  60. // channel of the corresponding type. Each label includes a
  61. // description for how that field should be populated.
  62. repeated google.api.LabelDescriptor labels = 4;
  63. // The tiers that support this notification channel; the project service tier
  64. // must be one of the supported_tiers.
  65. repeated ServiceTier supported_tiers = 5 [deprecated = true];
  66. // The product launch stage for channels of this type.
  67. google.api.LaunchStage launch_stage = 7;
  68. }
  69. // A `NotificationChannel` is a medium through which an alert is
  70. // delivered when a policy violation is detected. Examples of channels
  71. // include email, SMS, and third-party messaging applications. Fields
  72. // containing sensitive information like authentication tokens or
  73. // contact info are only partially populated on retrieval.
  74. message NotificationChannel {
  75. option (google.api.resource) = {
  76. type: "monitoring.googleapis.com/NotificationChannel"
  77. pattern: "projects/{project}/notificationChannels/{notification_channel}"
  78. pattern: "organizations/{organization}/notificationChannels/{notification_channel}"
  79. pattern: "folders/{folder}/notificationChannels/{notification_channel}"
  80. pattern: "*"
  81. };
  82. // Indicates whether the channel has been verified or not. It is illegal
  83. // to specify this field in a
  84. // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel]
  85. // or an
  86. // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
  87. // operation.
  88. enum VerificationStatus {
  89. // Sentinel value used to indicate that the state is unknown, omitted, or
  90. // is not applicable (as in the case of channels that neither support
  91. // nor require verification in order to function).
  92. VERIFICATION_STATUS_UNSPECIFIED = 0;
  93. // The channel has yet to be verified and requires verification to function.
  94. // Note that this state also applies to the case where the verification
  95. // process has been initiated by sending a verification code but where
  96. // the verification code has not been submitted to complete the process.
  97. UNVERIFIED = 1;
  98. // It has been proven that notifications can be received on this
  99. // notification channel and that someone on the project has access
  100. // to messages that are delivered to that channel.
  101. VERIFIED = 2;
  102. }
  103. // The type of the notification channel. This field matches the
  104. // value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
  105. string type = 1;
  106. // The full REST resource name for this channel. The format is:
  107. //
  108. // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
  109. //
  110. // The `[CHANNEL_ID]` is automatically assigned by the server on creation.
  111. string name = 6;
  112. // An optional human-readable name for this notification channel. It is
  113. // recommended that you specify a non-empty and unique name in order to
  114. // make it easier to identify the channels in your project, though this is
  115. // not enforced. The display name is limited to 512 Unicode characters.
  116. string display_name = 3;
  117. // An optional human-readable description of this notification channel. This
  118. // description may provide additional details, beyond the display
  119. // name, for the channel. This may not exceed 1024 Unicode characters.
  120. string description = 4;
  121. // Configuration fields that define the channel and its behavior. The
  122. // permissible and required labels are specified in the
  123. // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
  124. // `NotificationChannelDescriptor` corresponding to the `type` field.
  125. 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.
  130. //
  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;
  136. // Indicates whether this channel has been verified or not. On a
  137. // [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
  138. // or
  139. // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
  140. // operation, this field is expected to be populated.
  141. //
  142. // If the value is `UNVERIFIED`, then it indicates that the channel is
  143. // non-functioning (it both requires verification and lacks verification);
  144. // otherwise, it is assumed that the channel works.
  145. //
  146. // If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
  147. // the channel is of a type that does not require verification or that
  148. // this specific channel has been exempted from verification because it was
  149. // created prior to verification being required for channels of this type.
  150. //
  151. // This field cannot be modified using a standard
  152. // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
  153. // operation. To change the value of this field, you must call
  154. // [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
  155. VerificationStatus verification_status = 9;
  156. // Whether notifications are forwarded to the described channel. This makes
  157. // it possible to disable delivery of notifications to a particular channel
  158. // without removing the channel from all alerting policies that reference
  159. // the channel. This is a more convenient approach when the change is
  160. // temporary and you want to receive notifications from the same set
  161. // of alerting policies on the channel at some point in the future.
  162. google.protobuf.BoolValue enabled = 11;
  163. // Record of the creation of this channel.
  164. MutationRecord creation_record = 12;
  165. // Records of the modification of this channel.
  166. repeated MutationRecord mutation_records = 13;
  167. }