Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.NotificationPolicyArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyEmailIntegrationArgs
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyEmailIntegrationArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyFiltersArgs
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyFiltersArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyPagerdutyIntegrationArgs
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyPagerdutyIntegrationArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyWebhooksIntegrationArgs
import com.pulumi.cloudflare.kotlin.inputs.NotificationPolicyWebhooksIntegrationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a resource, that manages a notification policy for
* Cloudflare's products. The delivery mechanisms supported are email,
* webhooks, and PagerDuty.
* ## Import
* ```sh
* $ pulumi import cloudflare:index/notificationPolicy:NotificationPolicy example /
* ```
* @property accountId The account identifier to target for the resource.
* @property alertType The event type that will trigger the dispatch of a notification. See the developer documentation for descriptions of [available alert types](https://developers.cloudflare.com/fundamentals/notifications/notification-available/). Available values: `advanced_http_alert_error`, `access_custom_certificate_expiration_type`, `advanced_ddos_attack_l4_alert`, `advanced_ddos_attack_l7_alert`, `bgp_hijack_notification`, `billing_usage_alert`, `block_notification_block_removed`, `block_notification_new_block`, `block_notification_review_rejected`, `brand_protection_alert`, `brand_protection_digest`, `clickhouse_alert_fw_anomaly`, `clickhouse_alert_fw_ent_anomaly`, `custom_ssl_certificate_event_type`, `dedicated_ssl_certificate_event_type`, `dos_attack_l4`, `dos_attack_l7`, `expiring_service_token_alert`, `failing_logpush_job_disabled_alert`, `fbm_auto_advertisement`, `fbm_dosd_attack`, `fbm_volumetric_attack`, `health_check_status_notification`, `hostname_aop_custom_certificate_expiration_type`, `http_alert_edge_error`, `http_alert_origin_error`, `incident_alert`, `load_balancing_health_alert`, `load_balancing_pool_enablement_alert`, `logo_match_alert`, `magic_tunnel_health_check_event`, `maintenance_event_notification`, `mtls_certificate_store_certificate_expiration_type`, `pages_event_alert`, `radar_notification`, `real_origin_monitoring`, `scriptmonitor_alert_new_code_change_detections`, `scriptmonitor_alert_new_hosts`, `scriptmonitor_alert_new_malicious_hosts`, `scriptmonitor_alert_new_malicious_scripts`, `scriptmonitor_alert_new_malicious_url`, `scriptmonitor_alert_new_max_length_resource_url`, `scriptmonitor_alert_new_resources`, `secondary_dns_all_primaries_failing`, `secondary_dns_primaries_failing`, `secondary_dns_zone_successfully_updated`, `secondary_dns_zone_validation_warning`, `sentinel_alert`, `stream_live_notifications`, `traffic_anomalies_alert`, `tunnel_health_event`, `tunnel_update_event`, `universal_ssl_event_type`, `web_analytics_metrics_update`, `weekly_account_overview`, `workers_alert`, `zone_aop_custom_certificate_expiration_type`.
* @property description Description of the notification policy.
* @property emailIntegrations The email ID to which the notification should be dispatched.
* @property enabled The status of the notification policy.
* @property filters An optional nested block of filters that applies to the selected `alert_type`. A key-value map that specifies the type of filter and the values to match against (refer to the alert type block for available fields).
* @property name The name of the notification policy.
* @property pagerdutyIntegrations The unique ID of a configured pagerduty endpoint to which the notification should be dispatched.
* @property webhooksIntegrations The unique ID of a configured webhooks endpoint to which the notification should be dispatched.
*/
public data class NotificationPolicyArgs(
public val accountId: Output? = null,
public val alertType: Output? = null,
public val description: Output? = null,
public val emailIntegrations: Output>? = null,
public val enabled: Output? = null,
public val filters: Output? = null,
public val name: Output? = null,
public val pagerdutyIntegrations: Output>? =
null,
public val webhooksIntegrations: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.NotificationPolicyArgs =
com.pulumi.cloudflare.NotificationPolicyArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.alertType(alertType?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.emailIntegrations(
emailIntegrations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.enabled(enabled?.applyValue({ args0 -> args0 }))
.filters(filters?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.pagerdutyIntegrations(
pagerdutyIntegrations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.webhooksIntegrations(
webhooksIntegrations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [NotificationPolicyArgs].
*/
@PulumiTagMarker
public class NotificationPolicyArgsBuilder internal constructor() {
private var accountId: Output? = null
private var alertType: Output? = null
private var description: Output? = null
private var emailIntegrations: Output>? = null
private var enabled: Output? = null
private var filters: Output? = null
private var name: Output? = null
private var pagerdutyIntegrations: Output>? =
null
private var webhooksIntegrations: Output>? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("gfunnxhtoulegptc")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The event type that will trigger the dispatch of a notification. See the developer documentation for descriptions of [available alert types](https://developers.cloudflare.com/fundamentals/notifications/notification-available/). Available values: `advanced_http_alert_error`, `access_custom_certificate_expiration_type`, `advanced_ddos_attack_l4_alert`, `advanced_ddos_attack_l7_alert`, `bgp_hijack_notification`, `billing_usage_alert`, `block_notification_block_removed`, `block_notification_new_block`, `block_notification_review_rejected`, `brand_protection_alert`, `brand_protection_digest`, `clickhouse_alert_fw_anomaly`, `clickhouse_alert_fw_ent_anomaly`, `custom_ssl_certificate_event_type`, `dedicated_ssl_certificate_event_type`, `dos_attack_l4`, `dos_attack_l7`, `expiring_service_token_alert`, `failing_logpush_job_disabled_alert`, `fbm_auto_advertisement`, `fbm_dosd_attack`, `fbm_volumetric_attack`, `health_check_status_notification`, `hostname_aop_custom_certificate_expiration_type`, `http_alert_edge_error`, `http_alert_origin_error`, `incident_alert`, `load_balancing_health_alert`, `load_balancing_pool_enablement_alert`, `logo_match_alert`, `magic_tunnel_health_check_event`, `maintenance_event_notification`, `mtls_certificate_store_certificate_expiration_type`, `pages_event_alert`, `radar_notification`, `real_origin_monitoring`, `scriptmonitor_alert_new_code_change_detections`, `scriptmonitor_alert_new_hosts`, `scriptmonitor_alert_new_malicious_hosts`, `scriptmonitor_alert_new_malicious_scripts`, `scriptmonitor_alert_new_malicious_url`, `scriptmonitor_alert_new_max_length_resource_url`, `scriptmonitor_alert_new_resources`, `secondary_dns_all_primaries_failing`, `secondary_dns_primaries_failing`, `secondary_dns_zone_successfully_updated`, `secondary_dns_zone_validation_warning`, `sentinel_alert`, `stream_live_notifications`, `traffic_anomalies_alert`, `tunnel_health_event`, `tunnel_update_event`, `universal_ssl_event_type`, `web_analytics_metrics_update`, `weekly_account_overview`, `workers_alert`, `zone_aop_custom_certificate_expiration_type`.
*/
@JvmName("gxjifruknxbesink")
public suspend fun alertType(`value`: Output) {
this.alertType = value
}
/**
* @param value Description of the notification policy.
*/
@JvmName("fawbuftjgghghcjl")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The email ID to which the notification should be dispatched.
*/
@JvmName("oqslgufthgpdqnjk")
public suspend fun emailIntegrations(`value`: Output>) {
this.emailIntegrations = value
}
@JvmName("hnammmqkpbuiecqa")
public suspend fun emailIntegrations(vararg values: Output) {
this.emailIntegrations = Output.all(values.asList())
}
/**
* @param values The email ID to which the notification should be dispatched.
*/
@JvmName("oekgvwvnwwkgkkkv")
public suspend fun emailIntegrations(values: List