# Resource:<span pulumi-lang-nodejs=" honeycombio.WebhookRecipient
" pulumi-lang-dotnet=" honeycombio.WebhookRecipient
" pulumi-lang-go=" WebhookRecipient
" pulumi-lang-python=" WebhookRecipient
" pulumi-lang-yaml=" honeycombio.WebhookRecipient
" pulumi-lang-java=" honeycombio.WebhookRecipient
“> honeycombio.WebhookRecipient
honeycombio.WebhookRecipient allows you to define and manage a Webhook recipient that can be used by Triggers or BurnAlerts notifications.
Example Usage
Standard Webhook
import * as pulumi from "@pulumi/pulumi";
import * as honeycombio from "@pulumi/honeycombio";
const prod = new honeycombio.WebhookRecipient("prod", {
name: "Production Alerts",
secret: "a63dab148496ecbe04a1a802ca9b95b8",
url: "https://my.url.corp.net",
});
import pulumi
import pulumi_honeycombio as honeycombio
prod = honeycombio.WebhookRecipient("prod",
name="Production Alerts",
secret="a63dab148496ecbe04a1a802ca9b95b8",
url="https://my.url.corp.net")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/honeycombio/honeycombio"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := honeycombio.NewWebhookRecipient(ctx, "prod", &honeycombio.WebhookRecipientArgs{
Name: pulumi.String("Production Alerts"),
Secret: pulumi.String("a63dab148496ecbe04a1a802ca9b95b8"),
Url: pulumi.String("https://my.url.corp.net"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Honeycombio = Pulumi.Honeycombio;
return await Deployment.RunAsync(() =>
{
var prod = new Honeycombio.WebhookRecipient("prod", new()
{
Name = "Production Alerts",
Secret = "a63dab148496ecbe04a1a802ca9b95b8",
Url = "https://my.url.corp.net",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.honeycombio.WebhookRecipient;
import com.pulumi.honeycombio.WebhookRecipientArgs;
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 prod = new WebhookRecipient("prod", WebhookRecipientArgs.builder()
.name("Production Alerts")
.secret("a63dab148496ecbe04a1a802ca9b95b8")
.url("https://my.url.corp.net")
.build());
}
}
resources:
prod:
type: honeycombio:WebhookRecipient
properties:
name: Production Alerts
secret: a63dab148496ecbe04a1a802ca9b95b8
url: https://my.url.corp.net
Custom Webhook
import * as pulumi from "@pulumi/pulumi";
import * as honeycombio from "@pulumi/honeycombio";
const prod = new honeycombio.WebhookRecipient("prod", {
name: "Production Alerts",
secret: "a63dab148496ecbe04a1a802ca9b95b8",
url: "https://my.url.corp.net",
headers: [{
name: "Authorization",
value: "Bearer 123",
}],
templates: [{
type: "trigger",
body: `\\t\\t{
\\t\\t\\t\\"name\\": \\" {{ .Name }}\\",
\\t\\t\\t\\"id\\": \\" {{ .ID }}\\",
\\t\\t\\t\\"description\\": \\" {{ .Description }}\\",
\\"threshold\\": {
\\"op\\": \\"{{ .Operator }}\\",
\\"value\\": \\"{{ .Threshold }}\\"
},
\\t\\t}
`,
}],
variables: [{
name: "severity",
defaultValue: "critical",
}],
});
import pulumi
import pulumi_honeycombio as honeycombio
prod = honeycombio.WebhookRecipient("prod",
name="Production Alerts",
secret="a63dab148496ecbe04a1a802ca9b95b8",
url="https://my.url.corp.net",
headers=[{
"name": "Authorization",
"value": "Bearer 123",
}],
templates=[{
"type": "trigger",
"body": """\t\t{
\t\t\t\"name\": \" {{ .Name }}\",
\t\t\t\"id\": \" {{ .ID }}\",
\t\t\t\"description\": \" {{ .Description }}\",
\"threshold\": {
\"op\": \"{{ .Operator }}\",
\"value\": \"{{ .Threshold }}\"
},
\t\t}
""",
}],
variables=[{
"name": "severity",
"default_value": "critical",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/honeycombio/honeycombio"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := honeycombio.NewWebhookRecipient(ctx, "prod", &honeycombio.WebhookRecipientArgs{
Name: pulumi.String("Production Alerts"),
Secret: pulumi.String("a63dab148496ecbe04a1a802ca9b95b8"),
Url: pulumi.String("https://my.url.corp.net"),
Headers: honeycombio.WebhookRecipientHeaderArray{
&honeycombio.WebhookRecipientHeaderArgs{
Name: pulumi.String("Authorization"),
Value: pulumi.String("Bearer 123"),
},
},
Templates: honeycombio.WebhookRecipientTemplateArray{
&honeycombio.WebhookRecipientTemplateArgs{
Type: pulumi.String("trigger"),
Body: pulumi.String(`\t\t{
\t\t\t\"name\": \" {{ .Name }}\",
\t\t\t\"id\": \" {{ .ID }}\",
\t\t\t\"description\": \" {{ .Description }}\",
\"threshold\": {
\"op\": \"{{ .Operator }}\",
\"value\": \"{{ .Threshold }}\"
},
\t\t}
`),
},
},
Variables: honeycombio.WebhookRecipientVariableArray{
&honeycombio.WebhookRecipientVariableArgs{
Name: pulumi.String("severity"),
DefaultValue: pulumi.String("critical"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Honeycombio = Pulumi.Honeycombio;
return await Deployment.RunAsync(() =>
{
var prod = new Honeycombio.WebhookRecipient("prod", new()
{
Name = "Production Alerts",
Secret = "a63dab148496ecbe04a1a802ca9b95b8",
Url = "https://my.url.corp.net",
Headers = new[]
{
new Honeycombio.Inputs.WebhookRecipientHeaderArgs
{
Name = "Authorization",
Value = "Bearer 123",
},
},
Templates = new[]
{
new Honeycombio.Inputs.WebhookRecipientTemplateArgs
{
Type = "trigger",
Body = @"\t\t{
\t\t\t\""name\"": \"" {{ .Name }}\"",
\t\t\t\""id\"": \"" {{ .ID }}\"",
\t\t\t\""description\"": \"" {{ .Description }}\"",
\""threshold\"": {
\""op\"": \""{{ .Operator }}\"",
\""value\"": \""{{ .Threshold }}\""
},
\t\t}
",
},
},
Variables = new[]
{
new Honeycombio.Inputs.WebhookRecipientVariableArgs
{
Name = "severity",
DefaultValue = "critical",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.honeycombio.WebhookRecipient;
import com.pulumi.honeycombio.WebhookRecipientArgs;
import com.pulumi.honeycombio.inputs.WebhookRecipientHeaderArgs;
import com.pulumi.honeycombio.inputs.WebhookRecipientTemplateArgs;
import com.pulumi.honeycombio.inputs.WebhookRecipientVariableArgs;
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 prod = new WebhookRecipient("prod", WebhookRecipientArgs.builder()
.name("Production Alerts")
.secret("a63dab148496ecbe04a1a802ca9b95b8")
.url("https://my.url.corp.net")
.headers(WebhookRecipientHeaderArgs.builder()
.name("Authorization")
.value("Bearer 123")
.build())
.templates(WebhookRecipientTemplateArgs.builder()
.type("trigger")
.body("""
\t\t{
\t\t\t\"name\": \" {{ .Name }}\",
\t\t\t\"id\": \" {{ .ID }}\",
\t\t\t\"description\": \" {{ .Description }}\",
\"threshold\": {
\"op\": \"{{ .Operator }}\",
\"value\": \"{{ .Threshold }}\"
},
\t\t}
""")
.build())
.variables(WebhookRecipientVariableArgs.builder()
.name("severity")
.defaultValue("critical")
.build())
.build());
}
}
resources:
prod:
type: honeycombio:WebhookRecipient
properties:
name: Production Alerts
secret: a63dab148496ecbe04a1a802ca9b95b8
url: https://my.url.corp.net
headers:
- name: Authorization
value: Bearer 123
templates:
- type: trigger
body: |
\t\t{
\t\t\t\"name\": \" {{ .Name }}\",
\t\t\t\"id\": \" {{ .ID }}\",
\t\t\t\"description\": \" {{ .Description }}\",
\"threshold\": {
\"op\": \"{{ .Operator }}\",
\"value\": \"{{ .Threshold }}\"
},
\t\t}
variables:
- name: severity
defaultValue: critical
Create WebhookRecipient Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WebhookRecipient(name: string, args: WebhookRecipientArgs, opts?: CustomResourceOptions);@overload
def WebhookRecipient(resource_name: str,
args: WebhookRecipientArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WebhookRecipient(resource_name: str,
opts: Optional[ResourceOptions] = None,
url: Optional[str] = None,
headers: Optional[Sequence[WebhookRecipientHeaderArgs]] = None,
name: Optional[str] = None,
secret: Optional[str] = None,
templates: Optional[Sequence[WebhookRecipientTemplateArgs]] = None,
variables: Optional[Sequence[WebhookRecipientVariableArgs]] = None)func NewWebhookRecipient(ctx *Context, name string, args WebhookRecipientArgs, opts ...ResourceOption) (*WebhookRecipient, error)public WebhookRecipient(string name, WebhookRecipientArgs args, CustomResourceOptions? opts = null)
public WebhookRecipient(String name, WebhookRecipientArgs args)
public WebhookRecipient(String name, WebhookRecipientArgs args, CustomResourceOptions options)
type: honeycombio:WebhookRecipient
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 WebhookRecipientArgs
- 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 WebhookRecipientArgs
- 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 WebhookRecipientArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebhookRecipientArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebhookRecipientArgs
- 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 webhookRecipientResource = new Honeycombio.WebhookRecipient("webhookRecipientResource", new()
{
Url = "string",
Headers = new[]
{
new Honeycombio.Inputs.WebhookRecipientHeaderArgs
{
Name = "string",
Value = "string",
},
},
Name = "string",
Secret = "string",
Templates = new[]
{
new Honeycombio.Inputs.WebhookRecipientTemplateArgs
{
Body = "string",
Type = "string",
},
},
Variables = new[]
{
new Honeycombio.Inputs.WebhookRecipientVariableArgs
{
Name = "string",
DefaultValue = "string",
},
},
});
example, err := honeycombio.NewWebhookRecipient(ctx, "webhookRecipientResource", &honeycombio.WebhookRecipientArgs{
Url: pulumi.String("string"),
Headers: honeycombio.WebhookRecipientHeaderArray{
&honeycombio.WebhookRecipientHeaderArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Secret: pulumi.String("string"),
Templates: honeycombio.WebhookRecipientTemplateArray{
&honeycombio.WebhookRecipientTemplateArgs{
Body: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
Variables: honeycombio.WebhookRecipientVariableArray{
&honeycombio.WebhookRecipientVariableArgs{
Name: pulumi.String("string"),
DefaultValue: pulumi.String("string"),
},
},
})
var webhookRecipientResource = new WebhookRecipient("webhookRecipientResource", WebhookRecipientArgs.builder()
.url("string")
.headers(WebhookRecipientHeaderArgs.builder()
.name("string")
.value("string")
.build())
.name("string")
.secret("string")
.templates(WebhookRecipientTemplateArgs.builder()
.body("string")
.type("string")
.build())
.variables(WebhookRecipientVariableArgs.builder()
.name("string")
.defaultValue("string")
.build())
.build());
webhook_recipient_resource = honeycombio.WebhookRecipient("webhookRecipientResource",
url="string",
headers=[{
"name": "string",
"value": "string",
}],
name="string",
secret="string",
templates=[{
"body": "string",
"type": "string",
}],
variables=[{
"name": "string",
"default_value": "string",
}])
const webhookRecipientResource = new honeycombio.WebhookRecipient("webhookRecipientResource", {
url: "string",
headers: [{
name: "string",
value: "string",
}],
name: "string",
secret: "string",
templates: [{
body: "string",
type: "string",
}],
variables: [{
name: "string",
defaultValue: "string",
}],
});
type: honeycombio:WebhookRecipient
properties:
headers:
- name: string
value: string
name: string
secret: string
templates:
- body: string
type: string
url: string
variables:
- defaultValue: string
name: string
WebhookRecipient 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 WebhookRecipient resource accepts the following input properties:
- Url string
- The URL of the endpoint the notification will be sent to.
- Headers
List<Webhook
Recipient Header> - Custom headers for webhooks
- Name string
- The name of this Webhook recipient.
- Secret string
- The secret to include when sending the notification to the webhook.
- Templates
List<Webhook
Recipient Template> - Template for custom webhook payloads
- Variables
List<Webhook
Recipient Variable> - Variables for webhook templates
- Url string
- The URL of the endpoint the notification will be sent to.
- Headers
[]Webhook
Recipient Header Args - Custom headers for webhooks
- Name string
- The name of this Webhook recipient.
- Secret string
- The secret to include when sending the notification to the webhook.
- Templates
[]Webhook
Recipient Template Args - Template for custom webhook payloads
- Variables
[]Webhook
Recipient Variable Args - Variables for webhook templates
- url String
- The URL of the endpoint the notification will be sent to.
- headers
List<Webhook
Recipient Header> - Custom headers for webhooks
- name String
- The name of this Webhook recipient.
- secret String
- The secret to include when sending the notification to the webhook.
- templates
List<Webhook
Recipient Template> - Template for custom webhook payloads
- variables
List<Webhook
Recipient Variable> - Variables for webhook templates
- url string
- The URL of the endpoint the notification will be sent to.
- headers
Webhook
Recipient Header[] - Custom headers for webhooks
- name string
- The name of this Webhook recipient.
- secret string
- The secret to include when sending the notification to the webhook.
- templates
Webhook
Recipient Template[] - Template for custom webhook payloads
- variables
Webhook
Recipient Variable[] - Variables for webhook templates
- url str
- The URL of the endpoint the notification will be sent to.
- headers
Sequence[Webhook
Recipient Header Args] - Custom headers for webhooks
- name str
- The name of this Webhook recipient.
- secret str
- The secret to include when sending the notification to the webhook.
- templates
Sequence[Webhook
Recipient Template Args] - Template for custom webhook payloads
- variables
Sequence[Webhook
Recipient Variable Args] - Variables for webhook templates
- url String
- The URL of the endpoint the notification will be sent to.
- headers List<Property Map>
- Custom headers for webhooks
- name String
- The name of this Webhook recipient.
- secret String
- The secret to include when sending the notification to the webhook.
- templates List<Property Map>
- Template for custom webhook payloads
- variables List<Property Map>
- Variables for webhook templates
Outputs
All input properties are implicitly available as output properties. Additionally, the WebhookRecipient 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 WebhookRecipient Resource
Get an existing WebhookRecipient 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?: WebhookRecipientState, opts?: CustomResourceOptions): WebhookRecipient@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
headers: Optional[Sequence[WebhookRecipientHeaderArgs]] = None,
name: Optional[str] = None,
secret: Optional[str] = None,
templates: Optional[Sequence[WebhookRecipientTemplateArgs]] = None,
url: Optional[str] = None,
variables: Optional[Sequence[WebhookRecipientVariableArgs]] = None) -> WebhookRecipientfunc GetWebhookRecipient(ctx *Context, name string, id IDInput, state *WebhookRecipientState, opts ...ResourceOption) (*WebhookRecipient, error)public static WebhookRecipient Get(string name, Input<string> id, WebhookRecipientState? state, CustomResourceOptions? opts = null)public static WebhookRecipient get(String name, Output<String> id, WebhookRecipientState state, CustomResourceOptions options)resources: _: type: honeycombio:WebhookRecipient 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.
- Headers
List<Webhook
Recipient Header> - Custom headers for webhooks
- Name string
- The name of this Webhook recipient.
- Secret string
- The secret to include when sending the notification to the webhook.
- Templates
List<Webhook
Recipient Template> - Template for custom webhook payloads
- Url string
- The URL of the endpoint the notification will be sent to.
- Variables
List<Webhook
Recipient Variable> - Variables for webhook templates
- Headers
[]Webhook
Recipient Header Args - Custom headers for webhooks
- Name string
- The name of this Webhook recipient.
- Secret string
- The secret to include when sending the notification to the webhook.
- Templates
[]Webhook
Recipient Template Args - Template for custom webhook payloads
- Url string
- The URL of the endpoint the notification will be sent to.
- Variables
[]Webhook
Recipient Variable Args - Variables for webhook templates
- headers
List<Webhook
Recipient Header> - Custom headers for webhooks
- name String
- The name of this Webhook recipient.
- secret String
- The secret to include when sending the notification to the webhook.
- templates
List<Webhook
Recipient Template> - Template for custom webhook payloads
- url String
- The URL of the endpoint the notification will be sent to.
- variables
List<Webhook
Recipient Variable> - Variables for webhook templates
- headers
Webhook
Recipient Header[] - Custom headers for webhooks
- name string
- The name of this Webhook recipient.
- secret string
- The secret to include when sending the notification to the webhook.
- templates
Webhook
Recipient Template[] - Template for custom webhook payloads
- url string
- The URL of the endpoint the notification will be sent to.
- variables
Webhook
Recipient Variable[] - Variables for webhook templates
- headers
Sequence[Webhook
Recipient Header Args] - Custom headers for webhooks
- name str
- The name of this Webhook recipient.
- secret str
- The secret to include when sending the notification to the webhook.
- templates
Sequence[Webhook
Recipient Template Args] - Template for custom webhook payloads
- url str
- The URL of the endpoint the notification will be sent to.
- variables
Sequence[Webhook
Recipient Variable Args] - Variables for webhook templates
- headers List<Property Map>
- Custom headers for webhooks
- name String
- The name of this Webhook recipient.
- secret String
- The secret to include when sending the notification to the webhook.
- templates List<Property Map>
- Template for custom webhook payloads
- url String
- The URL of the endpoint the notification will be sent to.
- variables List<Property Map>
- Variables for webhook templates
Supporting Types
WebhookRecipientHeader, WebhookRecipientHeaderArgs
WebhookRecipientTemplate, WebhookRecipientTemplateArgs
WebhookRecipientVariable, WebhookRecipientVariableArgs
- Name string
- The name of the variable
- Default
Value string - An optional default value for the variable
- Name string
- The name of the variable
- Default
Value string - An optional default value for the variable
- name String
- The name of the variable
- default
Value String - An optional default value for the variable
- name string
- The name of the variable
- default
Value string - An optional default value for the variable
- name str
- The name of the variable
- default_
value str - An optional default value for the variable
- name String
- The name of the variable
- default
Value String - An optional default value for the variable
Import
Webhook Recipients can be imported by their ID, e.g.
$ pulumi import honeycombio:index/webhookRecipient:WebhookRecipient my_recipient nx2zsegA0dZ
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- honeycombio honeycombio/terraform-provider-honeycombio
- License
- Notes
- This Pulumi package is based on the
honeycombioTerraform Provider.
