cloudflare.NotificationPolicyWebhooks
Explore with Pulumi AI
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")
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
})
}
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 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
Create NotificationPolicyWebhooks Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationPolicyWebhooks(name: string, args: NotificationPolicyWebhooksArgs, opts?: CustomResourceOptions);
@overload
def NotificationPolicyWebhooks(resource_name: str,
args: NotificationPolicyWebhooksArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationPolicyWebhooks(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
name: Optional[str] = None,
url: Optional[str] = None,
secret: Optional[str] = None)
func NewNotificationPolicyWebhooks(ctx *Context, name string, args NotificationPolicyWebhooksArgs, opts ...ResourceOption) (*NotificationPolicyWebhooks, error)
public NotificationPolicyWebhooks(string name, NotificationPolicyWebhooksArgs args, CustomResourceOptions? opts = null)
public NotificationPolicyWebhooks(String name, NotificationPolicyWebhooksArgs args)
public NotificationPolicyWebhooks(String name, NotificationPolicyWebhooksArgs args, CustomResourceOptions options)
type: cloudflare:NotificationPolicyWebhooks
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NotificationPolicyWebhooksArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NotificationPolicyWebhooksArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotificationPolicyWebhooksArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationPolicyWebhooksArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationPolicyWebhooksArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var notificationPolicyWebhooksResource = new Cloudflare.NotificationPolicyWebhooks("notificationPolicyWebhooksResource", new()
{
AccountId = "string",
Name = "string",
Url = "string",
Secret = "string",
});
example, err := cloudflare.NewNotificationPolicyWebhooks(ctx, "notificationPolicyWebhooksResource", &cloudflare.NotificationPolicyWebhooksArgs{
AccountId: pulumi.String("string"),
Name: pulumi.String("string"),
Url: pulumi.String("string"),
Secret: pulumi.String("string"),
})
var notificationPolicyWebhooksResource = new NotificationPolicyWebhooks("notificationPolicyWebhooksResource", NotificationPolicyWebhooksArgs.builder()
.accountId("string")
.name("string")
.url("string")
.secret("string")
.build());
notification_policy_webhooks_resource = cloudflare.NotificationPolicyWebhooks("notificationPolicyWebhooksResource",
account_id="string",
name="string",
url="string",
secret="string")
const notificationPolicyWebhooksResource = new cloudflare.NotificationPolicyWebhooks("notificationPolicyWebhooksResource", {
accountId: "string",
name: "string",
url: "string",
secret: "string",
});
type: cloudflare:NotificationPolicyWebhooks
properties:
accountId: string
name: string
secret: string
url: string
NotificationPolicyWebhooks Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NotificationPolicyWebhooks resource accepts the following input properties:
- Account
Id string - The account id
- Name string
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- Url string
- The POST endpoint to call when dispatching a notification.
- Secret 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.
- Account
Id string - The account id
- Name string
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- Url string
- The POST endpoint to call when dispatching a notification.
- Secret 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.
- account
Id String - The account id
- name String
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- url String
- The POST endpoint to call when dispatching a notification.
- secret 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.
- account
Id string - The account id
- name string
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- url string
- The POST endpoint to call when dispatching a notification.
- secret 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.
- account_
id str - The account id
- name str
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- url str
- The POST endpoint to call when dispatching a notification.
- secret str
- 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.
- account
Id String - The account id
- name String
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- url String
- The POST endpoint to call when dispatching a notification.
- secret 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationPolicyWebhooks resource produces the following output properties:
- Created
At string - Timestamp of when the webhook destination was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Failure string - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- Last
Success string - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- Type string
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- Created
At string - Timestamp of when the webhook destination was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Failure string - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- Last
Success string - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- Type string
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- created
At String - Timestamp of when the webhook destination was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Failure String - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last
Success String - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- type String
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- created
At string - Timestamp of when the webhook destination was created.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Failure string - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last
Success string - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- type string
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- created_
at str - Timestamp of when the webhook destination was created.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
failure str - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last_
success str - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- type str
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- created
At String - Timestamp of when the webhook destination was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Failure String - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last
Success String - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- type String
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
Look up Existing NotificationPolicyWebhooks Resource
Get an existing NotificationPolicyWebhooks resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NotificationPolicyWebhooksState, opts?: CustomResourceOptions): NotificationPolicyWebhooks
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
created_at: Optional[str] = None,
last_failure: Optional[str] = None,
last_success: Optional[str] = None,
name: Optional[str] = None,
secret: Optional[str] = None,
type: Optional[str] = None,
url: Optional[str] = None) -> NotificationPolicyWebhooks
func GetNotificationPolicyWebhooks(ctx *Context, name string, id IDInput, state *NotificationPolicyWebhooksState, opts ...ResourceOption) (*NotificationPolicyWebhooks, error)
public static NotificationPolicyWebhooks Get(string name, Input<string> id, NotificationPolicyWebhooksState? state, CustomResourceOptions? opts = null)
public static NotificationPolicyWebhooks get(String name, Output<String> id, NotificationPolicyWebhooksState state, CustomResourceOptions options)
resources: _: type: cloudflare:NotificationPolicyWebhooks get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - The account id
- Created
At string - Timestamp of when the webhook destination was created.
- Last
Failure string - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- Last
Success string - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- Name string
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- Secret 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. - Type string
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- Url string
- The POST endpoint to call when dispatching a notification.
- Account
Id string - The account id
- Created
At string - Timestamp of when the webhook destination was created.
- Last
Failure string - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- Last
Success string - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- Name string
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- Secret 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. - Type string
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- Url string
- The POST endpoint to call when dispatching a notification.
- account
Id String - The account id
- created
At String - Timestamp of when the webhook destination was created.
- last
Failure String - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last
Success String - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- name String
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- secret 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. - type String
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- url String
- The POST endpoint to call when dispatching a notification.
- account
Id string - The account id
- created
At string - Timestamp of when the webhook destination was created.
- last
Failure string - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last
Success string - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- name string
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- secret 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. - type string
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- url string
- The POST endpoint to call when dispatching a notification.
- account_
id str - The account id
- created_
at str - Timestamp of when the webhook destination was created.
- last_
failure str - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last_
success str - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- name str
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- secret str
- 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. - type str
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- url str
- The POST endpoint to call when dispatching a notification.
- account
Id String - The account id
- created
At String - Timestamp of when the webhook destination was created.
- last
Failure String - Timestamp of the last time an attempt to dispatch a notification to this webhook failed.
- last
Success String - Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.
- name String
- The name of the webhook destination. This will be included in the request body when you receive a webhook notification.
- secret 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. - type String
- Type of webhook endpoint. Available values: "slack", "generic", "gchat".
- url String
- The POST endpoint to call when dispatching a notification.
Import
$ pulumi import cloudflare:index/notificationPolicyWebhooks:NotificationPolicyWebhooks example '<account_id>/<webhook_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.