github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/proto/v4/notification_channel.proto (about) 1 syntax = "proto3"; 2 3 package ntt.monitoring.v4; 4 5 import "google/api/resource.proto"; 6 import "google/protobuf/field_mask.proto"; 7 import "google/protobuf/timestamp.proto"; 8 import "goten-sdk/types/meta.proto"; 9 10 option go_package = "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/notification_channel;notification_channel"; 11 option java_multiple_files = true; 12 option java_outer_classname = "NotificationChannelProto"; 13 option java_package = "com.ntt.monitoring.pb.v4"; 14 15 // NotificationChannel Resource 16 message NotificationChannel { 17 option (google.api.resource) = { 18 type : "monitoring.edgelq.com/NotificationChannel" 19 pattern : "projects/{project}/notificationChannels/{notification_channel}" 20 }; 21 22 // Name of NotificationChannel 23 // When creating a new instance, this field is optional and if not provided, 24 // it will be generated automatically. Last ID segment must conform to the 25 // following regex: [a-z][a-z0-9\\-]{0,28}[a-z0-9] 26 string name = 1; 27 28 // Metadata is an object with information like create, update and delete time 29 // (for async deleted resources), has user labels/annotations, sharding 30 // information, multi-region syncing information and may have non-schema 31 // owners (useful for taking ownership of resources belonging to lower level 32 // services by higher ones). 33 goten.types.Meta metadata = 2; 34 35 // Display Name 36 string display_name = 3; 37 38 // Specification 39 Spec spec = 4; 40 41 // State 42 State state = 5; 43 44 // description 45 string description = 6; 46 47 // Spec of NotificationChannel 48 message Spec { 49 // Enabled flag. Whether the NotificationChannel is enabled or not. Disabled 50 // channels will not be used for alerting. 51 bool enabled = 1; 52 53 // Type. Corresponding spec should a oneof field. 54 Type type = 2; 55 56 // Email 57 Email email = 3; 58 59 // Slack 60 Slack slack = 4; 61 62 Webhook webhook = 5; 63 64 // Default language for invitation is english (eng) 65 // Configuring unsupported language will fallback to english 66 // Currently only sendgrid uses this. 67 string notification_language_code = 6; 68 69 // Email Spec 70 message Email { 71 // Email Addresses 72 repeated string addresses = 1; 73 } 74 75 // Slack Spec 76 message Slack { 77 // Slack Incoming Webhook URL 78 string incoming_webhook = 1; 79 } 80 81 // PagerDuty Spec 82 message PagerDuty { 83 // PagerDuty Service Key 84 string service_key = 1; 85 } 86 87 // Webhook Spec 88 message Webhook { 89 // Webhook URL 90 string url = 1; 91 92 // Headers 93 repeated Header headers = 2; 94 95 // Notification mask contains list of fields to include in the message. 96 // Notification consists of following fields: 97 // * "project" -> See monitoring.edgelq.com/Project protobuf spec for 98 // subfields 99 // * "organization" -> See iam.edgelq.com/Project protobuf spec for 100 // subfields 101 // * "alertingPolicy" -> See monitoring.edgelq.com/AlertingPolicy protobuf 102 // spec for subfields 103 // * "notification" -> See monitoring.edgelq.com/Notification protobuf 104 // spec for subfields 105 // * "events" -> Array of events, each item has subfields: 106 // * "alertingCondition" -> See monitoring.edgelq.com/AlertingCondition 107 // protobuf spec for subfields 108 // * "metricDescriptor" -> See monitoring.edgelq.com/MetricDescriptor 109 // protobuf spec for subfields 110 // * "monitoredResourceDescriptor" -> See 111 // monitoring.edgelq.com/MonitoredResourceDescriptor 112 // protobuf spec for subfields 113 // * "alerts" -> Array of monitoring.edgelq.com/Alert instances, see 114 // protobuf spec for subfields. 115 // 116 // If notification_mask is not specified, following default is applied: 117 // * "project.name" 118 // * "project.title" 119 // * "organization.name" 120 // * "organization.title" 121 // * "events.alertingCondition.name" 122 // * "events.alertingCondition.displayName" 123 // * "events.alertingCondition.spec" 124 // * "events.metricDescriptor.name" 125 // * "events.metricDescriptor.displayName" 126 // * "events.metricDescriptor.type" 127 // * "events.metricDescriptor.labels" 128 // * "events.metricDescriptor.metricKind" 129 // * "events.metricDescriptor.valueType" 130 // * "events.metricDescriptor.unit" 131 // * "events.alerts.name" 132 // * "events.alerts.displayName" 133 // * "events.alerts.info.timeSerie.key" 134 // * "events.alerts.info.timeSerie.metric" 135 // * "events.alerts.info.timeSerie.monitoredResource" 136 // * "events.alerts.info.observedValues" 137 // * "events.alerts.state" 138 google.protobuf.FieldMask notification_mask = 3; 139 140 // default is 0 means all the alerts in a notification are sent in single 141 // request. Breaking into multiple messages may be significantly slower 142 // than sending a single message. 143 // For example, to use 250KB chunks, set 0.25 MB 144 double max_message_size_mb = 5; 145 146 // Header 147 message Header { 148 string key = 1; 149 150 string value = 2; 151 } 152 } 153 154 // Type of NotificationChannel 155 enum Type { 156 // Type is unknown 157 TYPE_UNSPECIFIED = 0; 158 159 // Email NotificationChannel 160 EMAIL = 1; 161 162 // Slack NotificationChannel 163 SLACK = 2; 164 165 // Webhook NotificationChannel 166 WEBHOOK = 3; 167 // PagerDuty NotificationChannel 168 // PAGERDUTY = 4; 169 } 170 } 171 172 // State of NotificationChannel 173 message State { 174 // Status 175 Status status = 1; 176 177 // Error 178 Error error = 4; 179 180 // Error of NotificationChannel 181 message Error { 182 google.protobuf.Timestamp time = 1; 183 184 string message = 2; 185 } 186 187 // State of NotificationChannel 188 enum Status { 189 // State is unknown 190 STATE_UNSPECIFIED = 0; 191 192 // NotificationChannel is active 193 ACTIVE = 1; 194 195 // NotificationChannel is disabled 196 DISABLED = 2; 197 198 // Error of NotificationChannel 199 ERROR = 3; 200 } 201 } 202 }