1. Packages
  2. Cloudflare
  3. API Docs
  4. NotificationPolicyWebhooks
Cloudflare v5.23.0 published on Monday, Mar 25, 2024 by Pulumi

cloudflare.NotificationPolicyWebhooks

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.23.0 published on Monday, Mar 25, 2024 by Pulumi

    Provides a resource, that manages a webhook destination. These destinations can be tied to the notification policies created for Cloudflare’s products.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.NotificationPolicyWebhooks("example", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "Webhooks destination",
        secret: "my-secret",
        url: "https://example.com",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.NotificationPolicyWebhooks("example",
        account_id="f037e56e89293a057740de681ac9abbe",
        name="Webhooks destination",
        secret="my-secret",
        url="https://example.com")
    
    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"),
    			Secret:    pulumi.String("my-secret"),
    			Url:       pulumi.String("https://example.com"),
    		})
    		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 example = new Cloudflare.NotificationPolicyWebhooks("example", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "Webhooks destination",
            Secret = "my-secret",
            Url = "https://example.com",
        });
    
    });
    
    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")
                .secret("my-secret")
                .url("https://example.com")
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:NotificationPolicyWebhooks
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: Webhooks destination
          secret: my-secret
          url: https://example.com
    

    Create NotificationPolicyWebhooks Resource

    new NotificationPolicyWebhooks(name: string, args: NotificationPolicyWebhooksArgs, opts?: CustomResourceOptions);
    @overload
    def NotificationPolicyWebhooks(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   account_id: Optional[str] = None,
                                   name: Optional[str] = None,
                                   secret: Optional[str] = None,
                                   url: Optional[str] = None)
    @overload
    def NotificationPolicyWebhooks(resource_name: str,
                                   args: NotificationPolicyWebhooksArgs,
                                   opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The NotificationPolicyWebhooks resource accepts the following input properties:

    AccountId string
    The account identifier to target for the resource.
    Name string
    The name of the webhook destination.
    Secret string
    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 for more details.
    Url string
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    AccountId string
    The account identifier to target for the resource.
    Name string
    The name of the webhook destination.
    Secret string
    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 for more details.
    Url string
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    accountId String
    The account identifier to target for the resource.
    name String
    The name of the webhook destination.
    secret String
    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 for more details.
    url String
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    accountId string
    The account identifier to target for the resource.
    name string
    The name of the webhook destination.
    secret string
    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 for more details.
    url string
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    account_id str
    The account identifier to target for the resource.
    name str
    The name of the webhook destination.
    secret str
    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 for more details.
    url str
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    accountId String
    The account identifier to target for the resource.
    name String
    The name of the webhook destination.
    secret String
    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 for more details.
    url String
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NotificationPolicyWebhooks resource produces the following output properties:

    CreatedAt string
    Timestamp of when the notification webhook was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastFailure string
    Timestamp of when the notification webhook last faiuled.
    LastSuccess string
    Timestamp of when the notification webhook was last successful.
    Type string
    CreatedAt string
    Timestamp of when the notification webhook was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastFailure string
    Timestamp of when the notification webhook last faiuled.
    LastSuccess string
    Timestamp of when the notification webhook was last successful.
    Type string
    createdAt String
    Timestamp of when the notification webhook was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastFailure String
    Timestamp of when the notification webhook last faiuled.
    lastSuccess String
    Timestamp of when the notification webhook was last successful.
    type String
    createdAt string
    Timestamp of when the notification webhook was created.
    id string
    The provider-assigned unique ID for this managed resource.
    lastFailure string
    Timestamp of when the notification webhook last faiuled.
    lastSuccess string
    Timestamp of when the notification webhook was last successful.
    type string
    created_at str
    Timestamp of when the notification webhook was created.
    id str
    The provider-assigned unique ID for this managed resource.
    last_failure str
    Timestamp of when the notification webhook last faiuled.
    last_success str
    Timestamp of when the notification webhook was last successful.
    type str
    createdAt String
    Timestamp of when the notification webhook was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastFailure String
    Timestamp of when the notification webhook last faiuled.
    lastSuccess String
    Timestamp of when the notification webhook was last successful.
    type String

    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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AccountId string
    The account identifier to target for the resource.
    CreatedAt string
    Timestamp of when the notification webhook was created.
    LastFailure string
    Timestamp of when the notification webhook last faiuled.
    LastSuccess string
    Timestamp of when the notification webhook was last successful.
    Name string
    The name of the webhook destination.
    Secret string
    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 for more details.
    Type string
    Url string
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    AccountId string
    The account identifier to target for the resource.
    CreatedAt string
    Timestamp of when the notification webhook was created.
    LastFailure string
    Timestamp of when the notification webhook last faiuled.
    LastSuccess string
    Timestamp of when the notification webhook was last successful.
    Name string
    The name of the webhook destination.
    Secret string
    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 for more details.
    Type string
    Url string
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    accountId String
    The account identifier to target for the resource.
    createdAt String
    Timestamp of when the notification webhook was created.
    lastFailure String
    Timestamp of when the notification webhook last faiuled.
    lastSuccess String
    Timestamp of when the notification webhook was last successful.
    name String
    The name of the webhook destination.
    secret String
    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 for more details.
    type String
    url String
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    accountId string
    The account identifier to target for the resource.
    createdAt string
    Timestamp of when the notification webhook was created.
    lastFailure string
    Timestamp of when the notification webhook last faiuled.
    lastSuccess string
    Timestamp of when the notification webhook was last successful.
    name string
    The name of the webhook destination.
    secret string
    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 for more details.
    type string
    url string
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    account_id str
    The account identifier to target for the resource.
    created_at str
    Timestamp of when the notification webhook was created.
    last_failure str
    Timestamp of when the notification webhook last faiuled.
    last_success str
    Timestamp of when the notification webhook was last successful.
    name str
    The name of the webhook destination.
    secret str
    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 for more details.
    type str
    url str
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.
    accountId String
    The account identifier to target for the resource.
    createdAt String
    Timestamp of when the notification webhook was created.
    lastFailure String
    Timestamp of when the notification webhook last faiuled.
    lastSuccess String
    Timestamp of when the notification webhook was last successful.
    name String
    The name of the webhook destination.
    secret String
    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 for more details.
    type String
    url String
    The URL of the webhook destinations. Modifying this attribute will force creation of a new resource.

    Import

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

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.23.0 published on Monday, Mar 25, 2024 by Pulumi