com.pulumi.cloudflare.kotlin.NotificationPolicyWebhooksArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.NotificationPolicyWebhooksArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Provides a resource, that manages a webhook destination. These destinations can be tied to the notification policies created for Cloudflare's products.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.NotificationPolicyWebhooks("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "Webhooks destination",
* url: "https://example.com",
* secret: "my-secret",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.NotificationPolicyWebhooks("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="Webhooks destination",
* url="https://example.com",
* secret="my-secret")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.NotificationPolicyWebhooks("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "Webhooks destination",
* Url = "https://example.com",
* Secret = "my-secret",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.NewNotificationPolicyWebhooks(ctx, "example", &cloudflare.NotificationPolicyWebhooksArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("Webhooks destination"),
* Url: pulumi.String("https://example.com"),
* Secret: pulumi.String("my-secret"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.NotificationPolicyWebhooks;
* import com.pulumi.cloudflare.NotificationPolicyWebhooksArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new NotificationPolicyWebhooks("example", NotificationPolicyWebhooksArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("Webhooks destination")
* .url("https://example.com")
* .secret("my-secret")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:NotificationPolicyWebhooks
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: Webhooks destination
* url: https://example.com
* secret: my-secret
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/notificationPolicyWebhooks:NotificationPolicyWebhooks example /
* ```
* @property accountId The account identifier to target for the resource.
* @property name The name of the webhook destination.
* @property secret An optional secret can be provided that will be passed in the `cf-webhook-auth` header when dispatching a webhook notification. Secrets are not returned in any API response body. Refer to the [documentation](https://api.cloudflare.com/#notification-webhooks-create-webhook) for more details.
* @property url The URL of the webhook destinations. **Modifying this attribute will force creation of a new resource.**
*/
public data class NotificationPolicyWebhooksArgs(
public val accountId: Output? = null,
public val name: Output? = null,
public val secret: Output? = null,
public val url: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.NotificationPolicyWebhooksArgs =
com.pulumi.cloudflare.NotificationPolicyWebhooksArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.secret(secret?.applyValue({ args0 -> args0 }))
.url(url?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [NotificationPolicyWebhooksArgs].
*/
@PulumiTagMarker
public class NotificationPolicyWebhooksArgsBuilder internal constructor() {
private var accountId: Output? = null
private var name: Output? = null
private var secret: Output? = null
private var url: Output? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("feynudidtkcyghna")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The name of the webhook destination.
*/
@JvmName("vkfbhmbgstnxtrpc")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value An optional secret can be provided that will be passed in the `cf-webhook-auth` header when dispatching a webhook notification. Secrets are not returned in any API response body. Refer to the [documentation](https://api.cloudflare.com/#notification-webhooks-create-webhook) for more details.
*/
@JvmName("afyhkdxsilonpmng")
public suspend fun secret(`value`: Output) {
this.secret = value
}
/**
* @param value The URL of the webhook destinations. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("dbaidnftadwisuys")
public suspend fun url(`value`: Output) {
this.url = value
}
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("rfcwrhfqhbmamqtt")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value The name of the webhook destination.
*/
@JvmName("thlwpwjedtxxloxo")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value An optional secret can be provided that will be passed in the `cf-webhook-auth` header when dispatching a webhook notification. Secrets are not returned in any API response body. Refer to the [documentation](https://api.cloudflare.com/#notification-webhooks-create-webhook) for more details.
*/
@JvmName("bdfxpwnnkijsybny")
public suspend fun secret(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.secret = mapped
}
/**
* @param value The URL of the webhook destinations. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("kgjafunjqkxudntl")
public suspend fun url(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.url = mapped
}
internal fun build(): NotificationPolicyWebhooksArgs = NotificationPolicyWebhooksArgs(
accountId = accountId,
name = name,
secret = secret,
url = url,
)
}