@@ -20,6 +20,13 @@ export type MetricUnitType =
2020 | 'KB'
2121 | 'MB'
2222 | 'GB' ;
23+ export type NotificationStatus = 'Enabled' | 'Disabled' ;
24+ export type ChannelType = 'email' | 'slack' | 'pagerduty' | 'webhook' ;
25+ export type AlertNotificationType = 'default' | 'custom' ;
26+ type AlertNotificationEmail = 'email' ;
27+ type AlertNotificationSlack = 'slack' ;
28+ type AlertNotificationPagerDuty = 'pagerduty' ;
29+ type AlertNotificationWebHook = 'webhook' ;
2330export interface Dashboard {
2431 id : number ;
2532 label : string ;
@@ -55,7 +62,7 @@ export interface Widgets {
5562 filters : Filters [ ] ;
5663 serviceType : string ;
5764 service_type : string ;
58- resource_id : string [ ] ;
65+ entity_ids : string [ ] ;
5966 time_granularity : TimeGranularity ;
6067 time_duration : TimeDuration ;
6168 unit : string ;
@@ -106,7 +113,7 @@ export interface Dimension {
106113}
107114
108115export interface JWETokenPayLoad {
109- resource_ids : number [ ] ;
116+ entity_ids : number [ ] ;
110117}
111118
112119export interface JWEToken {
@@ -120,7 +127,7 @@ export interface CloudPulseMetricsRequest {
120127 group_by : string ;
121128 relative_time_duration : TimeDuration ;
122129 time_granularity : TimeGranularity | undefined ;
123- resource_ids : number [ ] ;
130+ entity_ids : number [ ] ;
124131}
125132
126133export interface CloudPulseMetricsResponse {
@@ -218,3 +225,72 @@ export interface Alert {
218225 created : string ;
219226 updated : string ;
220227}
228+
229+ interface NotificationChannelAlerts {
230+ id : number ;
231+ label : string ;
232+ url : string ;
233+ type : 'alerts-definitions' ;
234+ }
235+ interface NotificationChannelBase {
236+ id : number ;
237+ label : string ;
238+ channel_type : ChannelType ;
239+ type : AlertNotificationType ;
240+ status : NotificationStatus ;
241+ alerts : NotificationChannelAlerts [ ] ;
242+ created_by : string ;
243+ updated_by : string ;
244+ created_at : string ;
245+ updated_at : string ;
246+ }
247+
248+ interface NotificationChannelEmail extends NotificationChannelBase {
249+ channel_type : AlertNotificationEmail ;
250+ content : {
251+ email : {
252+ email_addresses : string [ ] ;
253+ subject : string ;
254+ message : string ;
255+ } ;
256+ } ;
257+ }
258+
259+ interface NotificationChannelSlack extends NotificationChannelBase {
260+ channel_type : AlertNotificationSlack ;
261+ content : {
262+ slack : {
263+ slack_webhook_url : string ;
264+ slack_channel : string ;
265+ message : string ;
266+ } ;
267+ } ;
268+ }
269+
270+ interface NotificationChannelPagerDuty extends NotificationChannelBase {
271+ channel_type : AlertNotificationPagerDuty ;
272+ content : {
273+ pagerduty : {
274+ service_api_key : string ;
275+ attributes : string [ ] ;
276+ description : string ;
277+ } ;
278+ } ;
279+ }
280+ interface NotificationChannelWebHook extends NotificationChannelBase {
281+ channel_type : AlertNotificationWebHook ;
282+ content : {
283+ webhook : {
284+ webhook_url : string ;
285+ http_headers : {
286+ header_key : string ;
287+ header_value : string ;
288+ } [ ] ;
289+ } ;
290+ } ;
291+ }
292+ export type NotificationChannel =
293+ | NotificationChannelEmail
294+ | NotificationChannelSlack
295+ | NotificationChannelWebHook
296+ | NotificationChannelPagerDuty ;
0 commit comments