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",
}],
});
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",
}])
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
})
}
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",
},
},
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args WebhookIntegrationArgs
- 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 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 string
- The unique name of the resource.
- args WebhookIntegrationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebhookIntegrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
const webhookIntegrationResource = new signalfx.WebhookIntegration("webhookIntegrationResource", {
enabled: false,
headers: [{
headerKey: "string",
headerValue: "string",
}],
method: "string",
name: "string",
payloadTemplate: "string",
sharedSecret: "string",
url: "string",
});
type: signalfx:WebhookIntegration
properties:
enabled: false
headers:
- headerKey: string
headerValue: string
method: string
name: string
payloadTemplate: string
sharedSecret: string
url: string
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 bool
- Whether the integration is enabled.
- Headers
List<Pulumi.
Signal Fx. Inputs. Webhook Integration Header> - 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.
- Payload
Template string - Template for the payload to be sent with the webhook request in JSON format
- string
- Url string
- The URL to request
- Enabled bool
- Whether the integration is enabled.
- Headers
[]Webhook
Integration Header Args - 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.
- Payload
Template string - Template for the payload to be sent with the webhook request in JSON format
- string
- Url string
- The URL to request
- enabled Boolean
- Whether the integration is enabled.
- headers
List<Webhook
Integration Header> - 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.
- payload
Template String - Template for the payload to be sent with the webhook request in JSON format
- String
- url String
- The URL to request
- enabled boolean
- Whether the integration is enabled.
- headers
Webhook
Integration Header[] - 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.
- payload
Template string - Template for the payload to be sent with the webhook request in JSON format
- string
- url string
- The URL to request
- enabled bool
- Whether the integration is enabled.
- headers
Sequence[Webhook
Integration Header Args] - 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
- 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.
- payload
Template String - Template for the payload to be sent with the webhook request in JSON format
- 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)
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.
- Enabled bool
- Whether the integration is enabled.
- Headers
List<Pulumi.
Signal Fx. Inputs. Webhook Integration Header> - 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.
- Payload
Template string - Template for the payload to be sent with the webhook request in JSON format
- string
- Url string
- The URL to request
- Enabled bool
- Whether the integration is enabled.
- Headers
[]Webhook
Integration Header Args - 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.
- Payload
Template string - Template for the payload to be sent with the webhook request in JSON format
- string
- Url string
- The URL to request
- enabled Boolean
- Whether the integration is enabled.
- headers
List<Webhook
Integration Header> - 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.
- payload
Template String - Template for the payload to be sent with the webhook request in JSON format
- String
- url String
- The URL to request
- enabled boolean
- Whether the integration is enabled.
- headers
Webhook
Integration Header[] - 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.
- payload
Template string - Template for the payload to be sent with the webhook request in JSON format
- string
- url string
- The URL to request
- enabled bool
- Whether the integration is enabled.
- headers
Sequence[Webhook
Integration Header Args] - 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
- 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.
- payload
Template String - Template for the payload to be sent with the webhook request in JSON format
- String
- url String
- The URL to request
Supporting Types
WebhookIntegrationHeader, WebhookIntegrationHeaderArgs
- Header
Key string - The key of the header to send
- Header
Value string - The value of the header to send
- Header
Key string - The key of the header to send
- Header
Value string - The value of the header to send
- header
Key String - The key of the header to send
- header
Value String - The value of the header to send
- header
Key string - The key of the header to send
- header
Value string - The value of the header to send
- header_
key str - The key of the header to send
- header_
value str - The value of the header to send
- header
Key String - The key of the header to send
- header
Value 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.