NotificationPolicyWebhooks

class NotificationPolicyWebhooks : KotlinCustomResource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleNotificationPolicyWebhooks = new cloudflare.NotificationPolicyWebhooks("example_notification_policy_webhooks", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
name: "Slack Webhook",
url: "https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
secret: "secret",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_notification_policy_webhooks = cloudflare.NotificationPolicyWebhooks("example_notification_policy_webhooks",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
secret="secret")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleNotificationPolicyWebhooks = new Cloudflare.NotificationPolicyWebhooks("example_notification_policy_webhooks", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
Name = "Slack Webhook",
Url = "https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
Secret = "secret",
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewNotificationPolicyWebhooks(ctx, "example_notification_policy_webhooks", &cloudflare.NotificationPolicyWebhooksArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Name: pulumi.String("Slack Webhook"),
Url: pulumi.String("https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd"),
Secret: pulumi.String("secret"),
})
if err != nil {
return err
}
return nil
})
}
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 exampleNotificationPolicyWebhooks = new NotificationPolicyWebhooks("exampleNotificationPolicyWebhooks", NotificationPolicyWebhooksArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.name("Slack Webhook")
.url("https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd")
.secret("secret")
.build());
}
}
resources:
exampleNotificationPolicyWebhooks:
type: cloudflare:NotificationPolicyWebhooks
name: example_notification_policy_webhooks
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
name: Slack Webhook
url: https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd
secret: secret

Import

$ pulumi import cloudflare:index/notificationPolicyWebhooks:NotificationPolicyWebhooks example '<account_id>/<webhook_id>'

Properties

Link copied to clipboard
val accountId: Output<String>

The account id

Link copied to clipboard
val createdAt: Output<String>

Timestamp of when the webhook destination was created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val lastFailure: Output<String>

Timestamp of the last time an attempt to dispatch a notification to this webhook failed.

Link copied to clipboard
val lastSuccess: Output<String>

Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.

Link copied to clipboard
val name: Output<String>

The name of the webhook destination. This will be included in the request body when you receive a webhook notification.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val secret: Output<String>?

Optional secret that will be passed in the cf-webhook-auth header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body.

Link copied to clipboard
val type: Output<String>

Type of webhook endpoint. Available values: "slack", "generic", "gchat".

Link copied to clipboard
val url: Output<String>

The POST endpoint to call when dispatching a notification.

Link copied to clipboard
val urn: Output<String>