1. Packages
  2. Signalfx Provider
  3. API Docs
  4. WebhookIntegration
SignalFx v7.9.0 published on Wednesday, Mar 26, 2025 by Pulumi

signalfx.WebhookIntegration

Explore with Pulumi AI

Splunk Observability Cloud webhook integration.

NOTE When managing integrations, use a session token of an administrator to authenticate the Splunk Observability Cloud provider. See Operations that require a session token for an administrator. Otherwise you’ll receive a 4xx error.

Example

import * as pulumi from "@pulumi/pulumi";
import * as signalfx from "@pulumi/signalfx";

const webhookMyteam = new signalfx.WebhookIntegration("webhook_myteam", {
    name: "Webhook - My Team",
    enabled: true,
    url: "https://www.example.com",
    sharedSecret: "abc1234",
    method: "POST",
    payloadTemplate: `{
  "incidentId": "{{{incidentId}}}"
}
`,
    headers: [{
        headerKey: "some_header",
        headerValue: "value_for_that_header",
    }],
});
Copy
import pulumi
import pulumi_signalfx as signalfx

webhook_myteam = signalfx.WebhookIntegration("webhook_myteam",
    name="Webhook - My Team",
    enabled=True,
    url="https://www.example.com",
    shared_secret="abc1234",
    method="POST",
    payload_template="""{
  "incidentId": "{{{incidentId}}}"
}
""",
    headers=[{
        "header_key": "some_header",
        "header_value": "value_for_that_header",
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-signalfx/sdk/v7/go/signalfx"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := signalfx.NewWebhookIntegration(ctx, "webhook_myteam", &signalfx.WebhookIntegrationArgs{
			Name:            pulumi.String("Webhook - My Team"),
			Enabled:         pulumi.Bool(true),
			Url:             pulumi.String("https://www.example.com"),
			SharedSecret:    pulumi.String("abc1234"),
			Method:          pulumi.String("POST"),
			PayloadTemplate: pulumi.String("{\n  \"incidentId\": \"{{{incidentId}}}\"\n}\n"),
			Headers: signalfx.WebhookIntegrationHeaderArray{
				&signalfx.WebhookIntegrationHeaderArgs{
					HeaderKey:   pulumi.String("some_header"),
					HeaderValue: pulumi.String("value_for_that_header"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SignalFx = Pulumi.SignalFx;

return await Deployment.RunAsync(() => 
{
    var webhookMyteam = new SignalFx.WebhookIntegration("webhook_myteam", new()
    {
        Name = "Webhook - My Team",
        Enabled = true,
        Url = "https://www.example.com",
        SharedSecret = "abc1234",
        Method = "POST",
        PayloadTemplate = @"{
  ""incidentId"": ""{{{incidentId}}}""
}
",
        Headers = new[]
        {
            new SignalFx.Inputs.WebhookIntegrationHeaderArgs
            {
                HeaderKey = "some_header",
                HeaderValue = "value_for_that_header",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.signalfx.WebhookIntegration;
import com.pulumi.signalfx.WebhookIntegrationArgs;
import com.pulumi.signalfx.inputs.WebhookIntegrationHeaderArgs;
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 webhookMyteam = new WebhookIntegration("webhookMyteam", WebhookIntegrationArgs.builder()
            .name("Webhook - My Team")
            .enabled(true)
            .url("https://www.example.com")
            .sharedSecret("abc1234")
            .method("POST")
            .payloadTemplate("""
{
  "incidentId": "{{{incidentId}}}"
}
            """)
            .headers(WebhookIntegrationHeaderArgs.builder()
                .headerKey("some_header")
                .headerValue("value_for_that_header")
                .build())
            .build());

    }
}
Copy
resources:
  webhookMyteam:
    type: signalfx:WebhookIntegration
    name: webhook_myteam
    properties:
      name: Webhook - My Team
      enabled: true
      url: https://www.example.com
      sharedSecret: abc1234
      method: POST
      payloadTemplate: |
        {
          "incidentId": "{{{incidentId}}}"
        }        
      headers:
        - headerKey: some_header
          headerValue: value_for_that_header
Copy

Create WebhookIntegration Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new WebhookIntegration(name: string, args: WebhookIntegrationArgs, opts?: CustomResourceOptions);
@overload
def WebhookIntegration(resource_name: str,
                       args: WebhookIntegrationArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def WebhookIntegration(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       enabled: Optional[bool] = None,
                       headers: Optional[Sequence[WebhookIntegrationHeaderArgs]] = None,
                       method: Optional[str] = None,
                       name: Optional[str] = None,
                       payload_template: Optional[str] = None,
                       shared_secret: Optional[str] = None,
                       url: Optional[str] = None)
func NewWebhookIntegration(ctx *Context, name string, args WebhookIntegrationArgs, opts ...ResourceOption) (*WebhookIntegration, error)
public WebhookIntegration(string name, WebhookIntegrationArgs args, CustomResourceOptions? opts = null)
public WebhookIntegration(String name, WebhookIntegrationArgs args)
public WebhookIntegration(String name, WebhookIntegrationArgs args, CustomResourceOptions options)
type: signalfx:WebhookIntegration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WebhookIntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WebhookIntegrationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WebhookIntegrationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WebhookIntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WebhookIntegrationArgs
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 webhookIntegrationResource = new SignalFx.WebhookIntegration("webhookIntegrationResource", new()
{
    Enabled = false,
    Headers = new[]
    {
        new SignalFx.Inputs.WebhookIntegrationHeaderArgs
        {
            HeaderKey = "string",
            HeaderValue = "string",
        },
    },
    Method = "string",
    Name = "string",
    PayloadTemplate = "string",
    SharedSecret = "string",
    Url = "string",
});
Copy
example, err := signalfx.NewWebhookIntegration(ctx, "webhookIntegrationResource", &signalfx.WebhookIntegrationArgs{
	Enabled: pulumi.Bool(false),
	Headers: signalfx.WebhookIntegrationHeaderArray{
		&signalfx.WebhookIntegrationHeaderArgs{
			HeaderKey:   pulumi.String("string"),
			HeaderValue: pulumi.String("string"),
		},
	},
	Method:          pulumi.String("string"),
	Name:            pulumi.String("string"),
	PayloadTemplate: pulumi.String("string"),
	SharedSecret:    pulumi.String("string"),
	Url:             pulumi.String("string"),
})
Copy
var webhookIntegrationResource = new WebhookIntegration("webhookIntegrationResource", WebhookIntegrationArgs.builder()
    .enabled(false)
    .headers(WebhookIntegrationHeaderArgs.builder()
        .headerKey("string")
        .headerValue("string")
        .build())
    .method("string")
    .name("string")
    .payloadTemplate("string")
    .sharedSecret("string")
    .url("string")
    .build());
Copy
webhook_integration_resource = signalfx.WebhookIntegration("webhookIntegrationResource",
    enabled=False,
    headers=[{
        "header_key": "string",
        "header_value": "string",
    }],
    method="string",
    name="string",
    payload_template="string",
    shared_secret="string",
    url="string")
Copy
const webhookIntegrationResource = new signalfx.WebhookIntegration("webhookIntegrationResource", {
    enabled: false,
    headers: [{
        headerKey: "string",
        headerValue: "string",
    }],
    method: "string",
    name: "string",
    payloadTemplate: "string",
    sharedSecret: "string",
    url: "string",
});
Copy
type: signalfx:WebhookIntegration
properties:
    enabled: false
    headers:
        - headerKey: string
          headerValue: string
    method: string
    name: string
    payloadTemplate: string
    sharedSecret: string
    url: string
Copy

WebhookIntegration 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 WebhookIntegration resource accepts the following input properties:

Enabled This property is required. bool
Whether the integration is enabled.
Headers List<Pulumi.SignalFx.Inputs.WebhookIntegrationHeader>
A header to send with the request
Method string
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
Name string
Name of the integration.
PayloadTemplate string
Template for the payload to be sent with the webhook request in JSON format
SharedSecret string
Url string
The URL to request
Enabled This property is required. bool
Whether the integration is enabled.
Headers []WebhookIntegrationHeaderArgs
A header to send with the request
Method string
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
Name string
Name of the integration.
PayloadTemplate string
Template for the payload to be sent with the webhook request in JSON format
SharedSecret string
Url string
The URL to request
enabled This property is required. Boolean
Whether the integration is enabled.
headers List<WebhookIntegrationHeader>
A header to send with the request
method String
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name String
Name of the integration.
payloadTemplate String
Template for the payload to be sent with the webhook request in JSON format
sharedSecret String
url String
The URL to request
enabled This property is required. boolean
Whether the integration is enabled.
headers WebhookIntegrationHeader[]
A header to send with the request
method string
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name string
Name of the integration.
payloadTemplate string
Template for the payload to be sent with the webhook request in JSON format
sharedSecret string
url string
The URL to request
enabled This property is required. bool
Whether the integration is enabled.
headers Sequence[WebhookIntegrationHeaderArgs]
A header to send with the request
method str
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name str
Name of the integration.
payload_template str
Template for the payload to be sent with the webhook request in JSON format
shared_secret str
url str
The URL to request
enabled This property is required. Boolean
Whether the integration is enabled.
headers List<Property Map>
A header to send with the request
method String
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name String
Name of the integration.
payloadTemplate String
Template for the payload to be sent with the webhook request in JSON format
sharedSecret String
url String
The URL to request

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing WebhookIntegration Resource

Get an existing WebhookIntegration 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?: WebhookIntegrationState, opts?: CustomResourceOptions): WebhookIntegration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        headers: Optional[Sequence[WebhookIntegrationHeaderArgs]] = None,
        method: Optional[str] = None,
        name: Optional[str] = None,
        payload_template: Optional[str] = None,
        shared_secret: Optional[str] = None,
        url: Optional[str] = None) -> WebhookIntegration
func GetWebhookIntegration(ctx *Context, name string, id IDInput, state *WebhookIntegrationState, opts ...ResourceOption) (*WebhookIntegration, error)
public static WebhookIntegration Get(string name, Input<string> id, WebhookIntegrationState? state, CustomResourceOptions? opts = null)
public static WebhookIntegration get(String name, Output<String> id, WebhookIntegrationState state, CustomResourceOptions options)
resources:  _:    type: signalfx:WebhookIntegration    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Enabled bool
Whether the integration is enabled.
Headers List<Pulumi.SignalFx.Inputs.WebhookIntegrationHeader>
A header to send with the request
Method string
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
Name string
Name of the integration.
PayloadTemplate string
Template for the payload to be sent with the webhook request in JSON format
SharedSecret string
Url string
The URL to request
Enabled bool
Whether the integration is enabled.
Headers []WebhookIntegrationHeaderArgs
A header to send with the request
Method string
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
Name string
Name of the integration.
PayloadTemplate string
Template for the payload to be sent with the webhook request in JSON format
SharedSecret string
Url string
The URL to request
enabled Boolean
Whether the integration is enabled.
headers List<WebhookIntegrationHeader>
A header to send with the request
method String
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name String
Name of the integration.
payloadTemplate String
Template for the payload to be sent with the webhook request in JSON format
sharedSecret String
url String
The URL to request
enabled boolean
Whether the integration is enabled.
headers WebhookIntegrationHeader[]
A header to send with the request
method string
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name string
Name of the integration.
payloadTemplate string
Template for the payload to be sent with the webhook request in JSON format
sharedSecret string
url string
The URL to request
enabled bool
Whether the integration is enabled.
headers Sequence[WebhookIntegrationHeaderArgs]
A header to send with the request
method str
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name str
Name of the integration.
payload_template str
Template for the payload to be sent with the webhook request in JSON format
shared_secret str
url str
The URL to request
enabled Boolean
Whether the integration is enabled.
headers List<Property Map>
A header to send with the request
method String
HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
name String
Name of the integration.
payloadTemplate String
Template for the payload to be sent with the webhook request in JSON format
sharedSecret String
url String
The URL to request

Supporting Types

WebhookIntegrationHeader
, WebhookIntegrationHeaderArgs

HeaderKey This property is required. string
The key of the header to send
HeaderValue This property is required. string
The value of the header to send
HeaderKey This property is required. string
The key of the header to send
HeaderValue This property is required. string
The value of the header to send
headerKey This property is required. String
The key of the header to send
headerValue This property is required. String
The value of the header to send
headerKey This property is required. string
The key of the header to send
headerValue This property is required. string
The value of the header to send
header_key This property is required. str
The key of the header to send
header_value This property is required. str
The value of the header to send
headerKey This property is required. String
The key of the header to send
headerValue This property is required. String
The value of the header to send

Package Details

Repository
SignalFx pulumi/pulumi-signalfx
License
Apache-2.0
Notes
This Pulumi package is based on the signalfx Terraform Provider.