cloudflare/cloudflare-typescript

Public

mirrored from https://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v4.2.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/resources/alerting/policies.ts

1012lines · modecode

1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3import { APIResource } from '../../resource';
4import * as Core from '../../core';
5import * as Shared from '../shared';
6import { SinglePage } from '../../pagination';
7
8export class Policies extends APIResource {
9 /**
10 * Creates a new Notification policy.
11 */
12 create(params: PolicyCreateParams, options?: Core.RequestOptions): Core.APIPromise<PolicyCreateResponse> {
13 const { account_id, ...body } = params;
14 return (
15 this._client.post(`/accounts/${account_id}/alerting/v3/policies`, {
16 body,
17 ...options,
18 }) as Core.APIPromise<{ result: PolicyCreateResponse }>
19 )._thenUnwrap((obj) => obj.result);
20 }
21
22 /**
23 * Update a Notification policy.
24 */
25 update(
26 policyId: string,
27 params: PolicyUpdateParams,
28 options?: Core.RequestOptions,
29 ): Core.APIPromise<PolicyUpdateResponse> {
30 const { account_id, ...body } = params;
31 return (
32 this._client.put(`/accounts/${account_id}/alerting/v3/policies/${policyId}`, {
33 body,
34 ...options,
35 }) as Core.APIPromise<{ result: PolicyUpdateResponse }>
36 )._thenUnwrap((obj) => obj.result);
37 }
38
39 /**
40 * Get a list of all Notification policies.
41 */
42 list(
43 params: PolicyListParams,
44 options?: Core.RequestOptions,
45 ): Core.PagePromise<PoliciesSinglePage, Policy> {
46 const { account_id } = params;
47 return this._client.getAPIList(
48 `/accounts/${account_id}/alerting/v3/policies`,
49 PoliciesSinglePage,
50 options,
51 );
52 }
53
54 /**
55 * Delete a Notification policy.
56 */
57 delete(
58 policyId: string,
59 params: PolicyDeleteParams,
60 options?: Core.RequestOptions,
61 ): Core.APIPromise<PolicyDeleteResponse> {
62 const { account_id } = params;
63 return this._client.delete(`/accounts/${account_id}/alerting/v3/policies/${policyId}`, options);
64 }
65
66 /**
67 * Get details for a single policy.
68 */
69 get(policyId: string, params: PolicyGetParams, options?: Core.RequestOptions): Core.APIPromise<Policy> {
70 const { account_id } = params;
71 return (
72 this._client.get(
73 `/accounts/${account_id}/alerting/v3/policies/${policyId}`,
74 options,
75 ) as Core.APIPromise<{ result: Policy }>
76 )._thenUnwrap((obj) => obj.result);
77 }
78}
79
80export class PoliciesSinglePage extends SinglePage<Policy> {}
81
82/**
83 * List of IDs that will be used when dispatching a notification. IDs for email
84 * type will be the email address.
85 */
86export interface Mechanism {
87 email?: Array<Mechanism.Email>;
88
89 pagerduty?: Array<Mechanism.Pagerduty>;
90
91 webhooks?: Array<Mechanism.Webhook>;
92}
93
94export namespace Mechanism {
95 export interface Email {
96 /**
97 * The email address
98 */
99 id?: string;
100 }
101
102 export interface Pagerduty {
103 /**
104 * UUID
105 */
106 id?: string;
107 }
108
109 export interface Webhook {
110 /**
111 * UUID
112 */
113 id?: string;
114 }
115}
116
117/**
118 * List of IDs that will be used when dispatching a notification. IDs for email
119 * type will be the email address.
120 */
121export interface MechanismParam {
122 email?: Array<MechanismParam.Email>;
123
124 pagerduty?: Array<MechanismParam.Pagerduty>;
125
126 webhooks?: Array<MechanismParam.Webhook>;
127}
128
129export namespace MechanismParam {
130 export interface Email {
131 /**
132 * The email address
133 */
134 id?: string;
135 }
136
137 export interface Pagerduty {}
138
139 export interface Webhook {}
140}
141
142export interface Policy {
143 /**
144 * The unique identifier of a notification policy
145 */
146 id?: string;
147
148 /**
149 * Optional specification of how often to re-alert from the same incident, not
150 * support on all alert types.
151 */
152 alert_interval?: string;
153
154 /**
155 * Refers to which event will trigger a Notification dispatch. You can use the
156 * endpoint to get available alert types which then will give you a list of
157 * possible values.
158 */
159 alert_type?:
160 | 'access_custom_certificate_expiration_type'
161 | 'advanced_ddos_attack_l4_alert'
162 | 'advanced_ddos_attack_l7_alert'
163 | 'advanced_http_alert_error'
164 | 'bgp_hijack_notification'
165 | 'billing_usage_alert'
166 | 'block_notification_block_removed'
167 | 'block_notification_new_block'
168 | 'block_notification_review_rejected'
169 | 'brand_protection_alert'
170 | 'brand_protection_digest'
171 | 'clickhouse_alert_fw_anomaly'
172 | 'clickhouse_alert_fw_ent_anomaly'
173 | 'cloudforce_one_request_notification'
174 | 'custom_analytics'
175 | 'custom_ssl_certificate_event_type'
176 | 'dedicated_ssl_certificate_event_type'
177 | 'device_connectivity_anomaly_alert'
178 | 'dos_attack_l4'
179 | 'dos_attack_l7'
180 | 'expiring_service_token_alert'
181 | 'failing_logpush_job_disabled_alert'
182 | 'fbm_auto_advertisement'
183 | 'fbm_dosd_attack'
184 | 'fbm_volumetric_attack'
185 | 'health_check_status_notification'
186 | 'hostname_aop_custom_certificate_expiration_type'
187 | 'http_alert_edge_error'
188 | 'http_alert_origin_error'
189 | 'image_notification'
190 | 'image_resizing_notification'
191 | 'incident_alert'
192 | 'load_balancing_health_alert'
193 | 'load_balancing_pool_enablement_alert'
194 | 'logo_match_alert'
195 | 'magic_tunnel_health_check_event'
196 | 'magic_wan_tunnel_health'
197 | 'maintenance_event_notification'
198 | 'mtls_certificate_store_certificate_expiration_type'
199 | 'pages_event_alert'
200 | 'radar_notification'
201 | 'real_origin_monitoring'
202 | 'scriptmonitor_alert_new_code_change_detections'
203 | 'scriptmonitor_alert_new_hosts'
204 | 'scriptmonitor_alert_new_malicious_hosts'
205 | 'scriptmonitor_alert_new_malicious_scripts'
206 | 'scriptmonitor_alert_new_malicious_url'
207 | 'scriptmonitor_alert_new_max_length_resource_url'
208 | 'scriptmonitor_alert_new_resources'
209 | 'secondary_dns_all_primaries_failing'
210 | 'secondary_dns_primaries_failing'
211 | 'secondary_dns_warning'
212 | 'secondary_dns_zone_successfully_updated'
213 | 'secondary_dns_zone_validation_warning'
214 | 'security_insights_alert'
215 | 'sentinel_alert'
216 | 'stream_live_notifications'
217 | 'synthetic_test_latency_alert'
218 | 'synthetic_test_low_availability_alert'
219 | 'traffic_anomalies_alert'
220 | 'tunnel_health_event'
221 | 'tunnel_update_event'
222 | 'universal_ssl_event_type'
223 | 'web_analytics_metrics_update'
224 | 'zone_aop_custom_certificate_expiration_type';
225
226 created?: string;
227
228 /**
229 * Optional description for the Notification policy.
230 */
231 description?: string;
232
233 /**
234 * Whether or not the Notification policy is enabled.
235 */
236 enabled?: boolean;
237
238 /**
239 * Optional filters that allow you to be alerted only on a subset of events for
240 * that alert type based on some criteria. This is only available for select alert
241 * types. See alert type documentation for more details.
242 */
243 filters?: PolicyFilter;
244
245 /**
246 * List of IDs that will be used when dispatching a notification. IDs for email
247 * type will be the email address.
248 */
249 mechanisms?: Mechanism;
250
251 modified?: string;
252
253 /**
254 * Name of the policy.
255 */
256 name?: string;
257}
258
259/**
260 * Optional filters that allow you to be alerted only on a subset of events for
261 * that alert type based on some criteria. This is only available for select alert
262 * types. See alert type documentation for more details.
263 */
264export interface PolicyFilter {
265 /**
266 * Usage depends on specific alert type
267 */
268 actions?: Array<string>;
269
270 /**
271 * Used for configuring radar_notification
272 */
273 affected_asns?: Array<string>;
274
275 /**
276 * Used for configuring incident_alert
277 */
278 affected_components?: Array<string>;
279
280 /**
281 * Used for configuring radar_notification
282 */
283 affected_locations?: Array<string>;
284
285 /**
286 * Used for configuring maintenance_event_notification
287 */
288 airport_code?: Array<string>;
289
290 /**
291 * Usage depends on specific alert type
292 */
293 alert_trigger_preferences?: Array<string>;
294
295 /**
296 * Usage depends on specific alert type
297 */
298 alert_trigger_preferences_value?: Array<string>;
299
300 /**
301 * Used for configuring load_balancing_pool_enablement_alert
302 */
303 enabled?: Array<string>;
304
305 /**
306 * Used for configuring pages_event_alert
307 */
308 environment?: Array<string>;
309
310 /**
311 * Used for configuring pages_event_alert
312 */
313 event?: Array<string>;
314
315 /**
316 * Used for configuring load_balancing_health_alert
317 */
318 event_source?: Array<string>;
319
320 /**
321 * Usage depends on specific alert type
322 */
323 event_type?: Array<string>;
324
325 /**
326 * Usage depends on specific alert type
327 */
328 group_by?: Array<string>;
329
330 /**
331 * Used for configuring health_check_status_notification
332 */
333 health_check_id?: Array<string>;
334
335 /**
336 * Used for configuring incident_alert
337 */
338 incident_impact?: Array<
339 'INCIDENT_IMPACT_NONE' | 'INCIDENT_IMPACT_MINOR' | 'INCIDENT_IMPACT_MAJOR' | 'INCIDENT_IMPACT_CRITICAL'
340 >;
341
342 /**
343 * Used for configuring stream_live_notifications
344 */
345 input_id?: Array<string>;
346
347 /**
348 * Used for configuring security_insights_alert
349 */
350 insight_class?: Array<string>;
351
352 /**
353 * Used for configuring billing_usage_alert
354 */
355 limit?: Array<string>;
356
357 /**
358 * Used for configuring logo_match_alert
359 */
360 logo_tag?: Array<string>;
361
362 /**
363 * Used for configuring advanced_ddos_attack_l4_alert
364 */
365 megabits_per_second?: Array<string>;
366
367 /**
368 * Used for configuring load_balancing_health_alert
369 */
370 new_health?: Array<string>;
371
372 /**
373 * Used for configuring tunnel_health_event
374 */
375 new_status?: Array<string>;
376
377 /**
378 * Used for configuring advanced_ddos_attack_l4_alert
379 */
380 packets_per_second?: Array<string>;
381
382 /**
383 * Usage depends on specific alert type
384 */
385 pool_id?: Array<string>;
386
387 /**
388 * Usage depends on specific alert type
389 */
390 pop_names?: Array<string>;
391
392 /**
393 * Used for configuring billing_usage_alert
394 */
395 product?: Array<string>;
396
397 /**
398 * Used for configuring pages_event_alert
399 */
400 project_id?: Array<string>;
401
402 /**
403 * Used for configuring advanced_ddos_attack_l4_alert
404 */
405 protocol?: Array<string>;
406
407 /**
408 * Usage depends on specific alert type
409 */
410 query_tag?: Array<string>;
411
412 /**
413 * Used for configuring advanced_ddos_attack_l7_alert
414 */
415 requests_per_second?: Array<string>;
416
417 /**
418 * Usage depends on specific alert type
419 */
420 selectors?: Array<string>;
421
422 /**
423 * Used for configuring clickhouse_alert_fw_ent_anomaly
424 */
425 services?: Array<string>;
426
427 /**
428 * Usage depends on specific alert type
429 */
430 slo?: Array<string>;
431
432 /**
433 * Used for configuring health_check_status_notification
434 */
435 status?: Array<string>;
436
437 /**
438 * Used for configuring advanced_ddos_attack_l7_alert
439 */
440 target_hostname?: Array<string>;
441
442 /**
443 * Used for configuring advanced_ddos_attack_l4_alert
444 */
445 target_ip?: Array<string>;
446
447 /**
448 * Used for configuring advanced_ddos_attack_l7_alert
449 */
450 target_zone_name?: Array<string>;
451
452 /**
453 * Used for configuring traffic_anomalies_alert
454 */
455 traffic_exclusions?: Array<'security_events'>;
456
457 /**
458 * Used for configuring tunnel_health_event
459 */
460 tunnel_id?: Array<string>;
461
462 /**
463 * Usage depends on specific alert type
464 */
465 tunnel_name?: Array<string>;
466
467 /**
468 * Usage depends on specific alert type
469 */
470 where?: Array<string>;
471
472 /**
473 * Usage depends on specific alert type
474 */
475 zones?: Array<string>;
476}
477
478/**
479 * Optional filters that allow you to be alerted only on a subset of events for
480 * that alert type based on some criteria. This is only available for select alert
481 * types. See alert type documentation for more details.
482 */
483export interface PolicyFilterParam {
484 /**
485 * Usage depends on specific alert type
486 */
487 actions?: Array<string>;
488
489 /**
490 * Used for configuring radar_notification
491 */
492 affected_asns?: Array<string>;
493
494 /**
495 * Used for configuring incident_alert
496 */
497 affected_components?: Array<string>;
498
499 /**
500 * Used for configuring radar_notification
501 */
502 affected_locations?: Array<string>;
503
504 /**
505 * Used for configuring maintenance_event_notification
506 */
507 airport_code?: Array<string>;
508
509 /**
510 * Usage depends on specific alert type
511 */
512 alert_trigger_preferences?: Array<string>;
513
514 /**
515 * Usage depends on specific alert type
516 */
517 alert_trigger_preferences_value?: Array<string>;
518
519 /**
520 * Used for configuring load_balancing_pool_enablement_alert
521 */
522 enabled?: Array<string>;
523
524 /**
525 * Used for configuring pages_event_alert
526 */
527 environment?: Array<string>;
528
529 /**
530 * Used for configuring pages_event_alert
531 */
532 event?: Array<string>;
533
534 /**
535 * Used for configuring load_balancing_health_alert
536 */
537 event_source?: Array<string>;
538
539 /**
540 * Usage depends on specific alert type
541 */
542 event_type?: Array<string>;
543
544 /**
545 * Usage depends on specific alert type
546 */
547 group_by?: Array<string>;
548
549 /**
550 * Used for configuring health_check_status_notification
551 */
552 health_check_id?: Array<string>;
553
554 /**
555 * Used for configuring incident_alert
556 */
557 incident_impact?: Array<
558 'INCIDENT_IMPACT_NONE' | 'INCIDENT_IMPACT_MINOR' | 'INCIDENT_IMPACT_MAJOR' | 'INCIDENT_IMPACT_CRITICAL'
559 >;
560
561 /**
562 * Used for configuring stream_live_notifications
563 */
564 input_id?: Array<string>;
565
566 /**
567 * Used for configuring security_insights_alert
568 */
569 insight_class?: Array<string>;
570
571 /**
572 * Used for configuring billing_usage_alert
573 */
574 limit?: Array<string>;
575
576 /**
577 * Used for configuring logo_match_alert
578 */
579 logo_tag?: Array<string>;
580
581 /**
582 * Used for configuring advanced_ddos_attack_l4_alert
583 */
584 megabits_per_second?: Array<string>;
585
586 /**
587 * Used for configuring load_balancing_health_alert
588 */
589 new_health?: Array<string>;
590
591 /**
592 * Used for configuring tunnel_health_event
593 */
594 new_status?: Array<string>;
595
596 /**
597 * Used for configuring advanced_ddos_attack_l4_alert
598 */
599 packets_per_second?: Array<string>;
600
601 /**
602 * Usage depends on specific alert type
603 */
604 pool_id?: Array<string>;
605
606 /**
607 * Usage depends on specific alert type
608 */
609 pop_names?: Array<string>;
610
611 /**
612 * Used for configuring billing_usage_alert
613 */
614 product?: Array<string>;
615
616 /**
617 * Used for configuring pages_event_alert
618 */
619 project_id?: Array<string>;
620
621 /**
622 * Used for configuring advanced_ddos_attack_l4_alert
623 */
624 protocol?: Array<string>;
625
626 /**
627 * Usage depends on specific alert type
628 */
629 query_tag?: Array<string>;
630
631 /**
632 * Used for configuring advanced_ddos_attack_l7_alert
633 */
634 requests_per_second?: Array<string>;
635
636 /**
637 * Usage depends on specific alert type
638 */
639 selectors?: Array<string>;
640
641 /**
642 * Used for configuring clickhouse_alert_fw_ent_anomaly
643 */
644 services?: Array<string>;
645
646 /**
647 * Usage depends on specific alert type
648 */
649 slo?: Array<string>;
650
651 /**
652 * Used for configuring health_check_status_notification
653 */
654 status?: Array<string>;
655
656 /**
657 * Used for configuring advanced_ddos_attack_l7_alert
658 */
659 target_hostname?: Array<string>;
660
661 /**
662 * Used for configuring advanced_ddos_attack_l4_alert
663 */
664 target_ip?: Array<string>;
665
666 /**
667 * Used for configuring advanced_ddos_attack_l7_alert
668 */
669 target_zone_name?: Array<string>;
670
671 /**
672 * Used for configuring traffic_anomalies_alert
673 */
674 traffic_exclusions?: Array<'security_events'>;
675
676 /**
677 * Used for configuring tunnel_health_event
678 */
679 tunnel_id?: Array<string>;
680
681 /**
682 * Usage depends on specific alert type
683 */
684 tunnel_name?: Array<string>;
685
686 /**
687 * Usage depends on specific alert type
688 */
689 where?: Array<string>;
690
691 /**
692 * Usage depends on specific alert type
693 */
694 zones?: Array<string>;
695}
696
697export interface PolicyCreateResponse {
698 /**
699 * UUID
700 */
701 id?: string;
702}
703
704export interface PolicyUpdateResponse {
705 /**
706 * UUID
707 */
708 id?: string;
709}
710
711export interface PolicyDeleteResponse {
712 errors: Array<Shared.ResponseInfo>;
713
714 messages: Array<Shared.ResponseInfo>;
715
716 /**
717 * Whether the API call was successful
718 */
719 success: true;
720
721 result_info?: PolicyDeleteResponse.ResultInfo;
722}
723
724export namespace PolicyDeleteResponse {
725 export interface ResultInfo {
726 /**
727 * Total number of results for the requested service
728 */
729 count?: number;
730
731 /**
732 * Current page within paginated list of results
733 */
734 page?: number;
735
736 /**
737 * Number of results per page of results
738 */
739 per_page?: number;
740
741 /**
742 * Total results available without any search parameters
743 */
744 total_count?: number;
745 }
746}
747
748export interface PolicyCreateParams {
749 /**
750 * Path param: The account id
751 */
752 account_id: string;
753
754 /**
755 * Body param: Refers to which event will trigger a Notification dispatch. You can
756 * use the endpoint to get available alert types which then will give you a list of
757 * possible values.
758 */
759 alert_type:
760 | 'access_custom_certificate_expiration_type'
761 | 'advanced_ddos_attack_l4_alert'
762 | 'advanced_ddos_attack_l7_alert'
763 | 'advanced_http_alert_error'
764 | 'bgp_hijack_notification'
765 | 'billing_usage_alert'
766 | 'block_notification_block_removed'
767 | 'block_notification_new_block'
768 | 'block_notification_review_rejected'
769 | 'brand_protection_alert'
770 | 'brand_protection_digest'
771 | 'clickhouse_alert_fw_anomaly'
772 | 'clickhouse_alert_fw_ent_anomaly'
773 | 'cloudforce_one_request_notification'
774 | 'custom_analytics'
775 | 'custom_ssl_certificate_event_type'
776 | 'dedicated_ssl_certificate_event_type'
777 | 'device_connectivity_anomaly_alert'
778 | 'dos_attack_l4'
779 | 'dos_attack_l7'
780 | 'expiring_service_token_alert'
781 | 'failing_logpush_job_disabled_alert'
782 | 'fbm_auto_advertisement'
783 | 'fbm_dosd_attack'
784 | 'fbm_volumetric_attack'
785 | 'health_check_status_notification'
786 | 'hostname_aop_custom_certificate_expiration_type'
787 | 'http_alert_edge_error'
788 | 'http_alert_origin_error'
789 | 'image_notification'
790 | 'image_resizing_notification'
791 | 'incident_alert'
792 | 'load_balancing_health_alert'
793 | 'load_balancing_pool_enablement_alert'
794 | 'logo_match_alert'
795 | 'magic_tunnel_health_check_event'
796 | 'magic_wan_tunnel_health'
797 | 'maintenance_event_notification'
798 | 'mtls_certificate_store_certificate_expiration_type'
799 | 'pages_event_alert'
800 | 'radar_notification'
801 | 'real_origin_monitoring'
802 | 'scriptmonitor_alert_new_code_change_detections'
803 | 'scriptmonitor_alert_new_hosts'
804 | 'scriptmonitor_alert_new_malicious_hosts'
805 | 'scriptmonitor_alert_new_malicious_scripts'
806 | 'scriptmonitor_alert_new_malicious_url'
807 | 'scriptmonitor_alert_new_max_length_resource_url'
808 | 'scriptmonitor_alert_new_resources'
809 | 'secondary_dns_all_primaries_failing'
810 | 'secondary_dns_primaries_failing'
811 | 'secondary_dns_warning'
812 | 'secondary_dns_zone_successfully_updated'
813 | 'secondary_dns_zone_validation_warning'
814 | 'security_insights_alert'
815 | 'sentinel_alert'
816 | 'stream_live_notifications'
817 | 'synthetic_test_latency_alert'
818 | 'synthetic_test_low_availability_alert'
819 | 'traffic_anomalies_alert'
820 | 'tunnel_health_event'
821 | 'tunnel_update_event'
822 | 'universal_ssl_event_type'
823 | 'web_analytics_metrics_update'
824 | 'zone_aop_custom_certificate_expiration_type';
825
826 /**
827 * Body param: Whether or not the Notification policy is enabled.
828 */
829 enabled: boolean;
830
831 /**
832 * Body param: List of IDs that will be used when dispatching a notification. IDs
833 * for email type will be the email address.
834 */
835 mechanisms: MechanismParam;
836
837 /**
838 * Body param: Name of the policy.
839 */
840 name: string;
841
842 /**
843 * Body param: Optional specification of how often to re-alert from the same
844 * incident, not support on all alert types.
845 */
846 alert_interval?: string;
847
848 /**
849 * Body param: Optional description for the Notification policy.
850 */
851 description?: string;
852
853 /**
854 * Body param: Optional filters that allow you to be alerted only on a subset of
855 * events for that alert type based on some criteria. This is only available for
856 * select alert types. See alert type documentation for more details.
857 */
858 filters?: PolicyFilterParam;
859}
860
861export interface PolicyUpdateParams {
862 /**
863 * Path param: The account id
864 */
865 account_id: string;
866
867 /**
868 * Body param: Optional specification of how often to re-alert from the same
869 * incident, not support on all alert types.
870 */
871 alert_interval?: string;
872
873 /**
874 * Body param: Refers to which event will trigger a Notification dispatch. You can
875 * use the endpoint to get available alert types which then will give you a list of
876 * possible values.
877 */
878 alert_type?:
879 | 'access_custom_certificate_expiration_type'
880 | 'advanced_ddos_attack_l4_alert'
881 | 'advanced_ddos_attack_l7_alert'
882 | 'advanced_http_alert_error'
883 | 'bgp_hijack_notification'
884 | 'billing_usage_alert'
885 | 'block_notification_block_removed'
886 | 'block_notification_new_block'
887 | 'block_notification_review_rejected'
888 | 'brand_protection_alert'
889 | 'brand_protection_digest'
890 | 'clickhouse_alert_fw_anomaly'
891 | 'clickhouse_alert_fw_ent_anomaly'
892 | 'cloudforce_one_request_notification'
893 | 'custom_analytics'
894 | 'custom_ssl_certificate_event_type'
895 | 'dedicated_ssl_certificate_event_type'
896 | 'device_connectivity_anomaly_alert'
897 | 'dos_attack_l4'
898 | 'dos_attack_l7'
899 | 'expiring_service_token_alert'
900 | 'failing_logpush_job_disabled_alert'
901 | 'fbm_auto_advertisement'
902 | 'fbm_dosd_attack'
903 | 'fbm_volumetric_attack'
904 | 'health_check_status_notification'
905 | 'hostname_aop_custom_certificate_expiration_type'
906 | 'http_alert_edge_error'
907 | 'http_alert_origin_error'
908 | 'image_notification'
909 | 'image_resizing_notification'
910 | 'incident_alert'
911 | 'load_balancing_health_alert'
912 | 'load_balancing_pool_enablement_alert'
913 | 'logo_match_alert'
914 | 'magic_tunnel_health_check_event'
915 | 'magic_wan_tunnel_health'
916 | 'maintenance_event_notification'
917 | 'mtls_certificate_store_certificate_expiration_type'
918 | 'pages_event_alert'
919 | 'radar_notification'
920 | 'real_origin_monitoring'
921 | 'scriptmonitor_alert_new_code_change_detections'
922 | 'scriptmonitor_alert_new_hosts'
923 | 'scriptmonitor_alert_new_malicious_hosts'
924 | 'scriptmonitor_alert_new_malicious_scripts'
925 | 'scriptmonitor_alert_new_malicious_url'
926 | 'scriptmonitor_alert_new_max_length_resource_url'
927 | 'scriptmonitor_alert_new_resources'
928 | 'secondary_dns_all_primaries_failing'
929 | 'secondary_dns_primaries_failing'
930 | 'secondary_dns_warning'
931 | 'secondary_dns_zone_successfully_updated'
932 | 'secondary_dns_zone_validation_warning'
933 | 'security_insights_alert'
934 | 'sentinel_alert'
935 | 'stream_live_notifications'
936 | 'synthetic_test_latency_alert'
937 | 'synthetic_test_low_availability_alert'
938 | 'traffic_anomalies_alert'
939 | 'tunnel_health_event'
940 | 'tunnel_update_event'
941 | 'universal_ssl_event_type'
942 | 'web_analytics_metrics_update'
943 | 'zone_aop_custom_certificate_expiration_type';
944
945 /**
946 * Body param: Optional description for the Notification policy.
947 */
948 description?: string;
949
950 /**
951 * Body param: Whether or not the Notification policy is enabled.
952 */
953 enabled?: boolean;
954
955 /**
956 * Body param: Optional filters that allow you to be alerted only on a subset of
957 * events for that alert type based on some criteria. This is only available for
958 * select alert types. See alert type documentation for more details.
959 */
960 filters?: PolicyFilterParam;
961
962 /**
963 * Body param: List of IDs that will be used when dispatching a notification. IDs
964 * for email type will be the email address.
965 */
966 mechanisms?: MechanismParam;
967
968 /**
969 * Body param: Name of the policy.
970 */
971 name?: string;
972}
973
974export interface PolicyListParams {
975 /**
976 * The account id
977 */
978 account_id: string;
979}
980
981export interface PolicyDeleteParams {
982 /**
983 * The account id
984 */
985 account_id: string;
986}
987
988export interface PolicyGetParams {
989 /**
990 * The account id
991 */
992 account_id: string;
993}
994
995Policies.PoliciesSinglePage = PoliciesSinglePage;
996
997export declare namespace Policies {
998 export {
999 type Mechanism as Mechanism,
1000 type Policy as Policy,
1001 type PolicyFilter as PolicyFilter,
1002 type PolicyCreateResponse as PolicyCreateResponse,
1003 type PolicyUpdateResponse as PolicyUpdateResponse,
1004 type PolicyDeleteResponse as PolicyDeleteResponse,
1005 PoliciesSinglePage as PoliciesSinglePage,
1006 type PolicyCreateParams as PolicyCreateParams,
1007 type PolicyUpdateParams as PolicyUpdateParams,
1008 type PolicyListParams as PolicyListParams,
1009 type PolicyDeleteParams as PolicyDeleteParams,
1010 type PolicyGetParams as PolicyGetParams,
1011 };
1012}
1013