ibm.EnDestinationWebhook
Explore with Pulumi AI
Create, update, or delete a Webhook destination by using IBM Cloud™ Event Notifications.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const webhookEnDestination = new ibm.EnDestinationWebhook("webhookEnDestination", {
instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
type: "webhook",
collectFailedEvents: false,
description: "Destination webhook for event notification",
config: {
params: {
verb: "POST",
url: "https://testwebhook.com",
customHeaders: {
authorization: "authorization",
},
sensitiveHeaders: ["authorization"],
},
},
});
import pulumi
import pulumi_ibm as ibm
webhook_en_destination = ibm.EnDestinationWebhook("webhookEnDestination",
instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
type="webhook",
collect_failed_events=False,
description="Destination webhook for event notification",
config={
"params": {
"verb": "POST",
"url": "https://testwebhook.com",
"custom_headers": {
"authorization": "authorization",
},
"sensitive_headers": ["authorization"],
},
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewEnDestinationWebhook(ctx, "webhookEnDestination", &ibm.EnDestinationWebhookArgs{
InstanceGuid: pulumi.Any(ibm_resource_instance.En_terraform_test_resource.Guid),
Type: pulumi.String("webhook"),
CollectFailedEvents: pulumi.Bool(false),
Description: pulumi.String("Destination webhook for event notification"),
Config: &ibm.EnDestinationWebhookConfigArgs{
Params: &ibm.EnDestinationWebhookConfigParamsArgs{
Verb: pulumi.String("POST"),
Url: pulumi.String("https://testwebhook.com"),
CustomHeaders: pulumi.StringMap{
"authorization": pulumi.String("authorization"),
},
SensitiveHeaders: pulumi.StringArray{
pulumi.String("authorization"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var webhookEnDestination = new Ibm.EnDestinationWebhook("webhookEnDestination", new()
{
InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
Type = "webhook",
CollectFailedEvents = false,
Description = "Destination webhook for event notification",
Config = new Ibm.Inputs.EnDestinationWebhookConfigArgs
{
Params = new Ibm.Inputs.EnDestinationWebhookConfigParamsArgs
{
Verb = "POST",
Url = "https://testwebhook.com",
CustomHeaders =
{
{ "authorization", "authorization" },
},
SensitiveHeaders = new[]
{
"authorization",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.EnDestinationWebhook;
import com.pulumi.ibm.EnDestinationWebhookArgs;
import com.pulumi.ibm.inputs.EnDestinationWebhookConfigArgs;
import com.pulumi.ibm.inputs.EnDestinationWebhookConfigParamsArgs;
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 webhookEnDestination = new EnDestinationWebhook("webhookEnDestination", EnDestinationWebhookArgs.builder()
.instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
.type("webhook")
.collectFailedEvents(false)
.description("Destination webhook for event notification")
.config(EnDestinationWebhookConfigArgs.builder()
.params(EnDestinationWebhookConfigParamsArgs.builder()
.verb("POST")
.url("https://testwebhook.com")
.customHeaders(Map.of("authorization", "authorization"))
.sensitiveHeaders("authorization")
.build())
.build())
.build());
}
}
resources:
webhookEnDestination:
type: ibm:EnDestinationWebhook
properties:
instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
type: webhook
collectFailedEvents: false
description: Destination webhook for event notification
config:
params:
verb: POST
url: https://testwebhook.com
customHeaders:
authorization: authorization
sensitiveHeaders:
- authorization
Create EnDestinationWebhook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EnDestinationWebhook(name: string, args: EnDestinationWebhookArgs, opts?: CustomResourceOptions);
@overload
def EnDestinationWebhook(resource_name: str,
args: EnDestinationWebhookArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EnDestinationWebhook(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_guid: Optional[str] = None,
type: Optional[str] = None,
collect_failed_events: Optional[bool] = None,
config: Optional[EnDestinationWebhookConfigArgs] = None,
description: Optional[str] = None,
en_destination_webhook_id: Optional[str] = None,
name: Optional[str] = None)
func NewEnDestinationWebhook(ctx *Context, name string, args EnDestinationWebhookArgs, opts ...ResourceOption) (*EnDestinationWebhook, error)
public EnDestinationWebhook(string name, EnDestinationWebhookArgs args, CustomResourceOptions? opts = null)
public EnDestinationWebhook(String name, EnDestinationWebhookArgs args)
public EnDestinationWebhook(String name, EnDestinationWebhookArgs args, CustomResourceOptions options)
type: ibm:EnDestinationWebhook
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 EnDestinationWebhookArgs
- 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 EnDestinationWebhookArgs
- 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 EnDestinationWebhookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnDestinationWebhookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnDestinationWebhookArgs
- 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 enDestinationWebhookResource = new Ibm.EnDestinationWebhook("enDestinationWebhookResource", new()
{
InstanceGuid = "string",
Type = "string",
CollectFailedEvents = false,
Config = new Ibm.Inputs.EnDestinationWebhookConfigArgs
{
Params = new Ibm.Inputs.EnDestinationWebhookConfigParamsArgs
{
Url = "string",
Verb = "string",
CustomHeaders =
{
{ "string", "string" },
},
SensitiveHeaders = new[]
{
"string",
},
},
},
Description = "string",
EnDestinationWebhookId = "string",
Name = "string",
});
example, err := ibm.NewEnDestinationWebhook(ctx, "enDestinationWebhookResource", &ibm.EnDestinationWebhookArgs{
InstanceGuid: pulumi.String("string"),
Type: pulumi.String("string"),
CollectFailedEvents: pulumi.Bool(false),
Config: &ibm.EnDestinationWebhookConfigArgs{
Params: &ibm.EnDestinationWebhookConfigParamsArgs{
Url: pulumi.String("string"),
Verb: pulumi.String("string"),
CustomHeaders: pulumi.StringMap{
"string": pulumi.String("string"),
},
SensitiveHeaders: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Description: pulumi.String("string"),
EnDestinationWebhookId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var enDestinationWebhookResource = new EnDestinationWebhook("enDestinationWebhookResource", EnDestinationWebhookArgs.builder()
.instanceGuid("string")
.type("string")
.collectFailedEvents(false)
.config(EnDestinationWebhookConfigArgs.builder()
.params(EnDestinationWebhookConfigParamsArgs.builder()
.url("string")
.verb("string")
.customHeaders(Map.of("string", "string"))
.sensitiveHeaders("string")
.build())
.build())
.description("string")
.enDestinationWebhookId("string")
.name("string")
.build());
en_destination_webhook_resource = ibm.EnDestinationWebhook("enDestinationWebhookResource",
instance_guid="string",
type="string",
collect_failed_events=False,
config={
"params": {
"url": "string",
"verb": "string",
"custom_headers": {
"string": "string",
},
"sensitive_headers": ["string"],
},
},
description="string",
en_destination_webhook_id="string",
name="string")
const enDestinationWebhookResource = new ibm.EnDestinationWebhook("enDestinationWebhookResource", {
instanceGuid: "string",
type: "string",
collectFailedEvents: false,
config: {
params: {
url: "string",
verb: "string",
customHeaders: {
string: "string",
},
sensitiveHeaders: ["string"],
},
},
description: "string",
enDestinationWebhookId: "string",
name: "string",
});
type: ibm:EnDestinationWebhook
properties:
collectFailedEvents: false
config:
params:
customHeaders:
string: string
sensitiveHeaders:
- string
url: string
verb: string
description: string
enDestinationWebhookId: string
instanceGuid: string
name: string
type: string
EnDestinationWebhook 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 EnDestinationWebhook resource accepts the following input properties:
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Type string
- Webhook.
- Collect
Failed boolEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- Config
En
Destination Webhook Config Payload describing a destination configuration.
Nested scheme for config:
- Description string
- The Destination description.
- En
Destination stringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - Name string
- The Destintion name.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Type string
- Webhook.
- Collect
Failed boolEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- Config
En
Destination Webhook Config Args Payload describing a destination configuration.
Nested scheme for config:
- Description string
- The Destination description.
- En
Destination stringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - Name string
- The Destintion name.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- type String
- Webhook.
- collect
Failed BooleanEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config
En
Destination Webhook Config Payload describing a destination configuration.
Nested scheme for config:
- description String
- The Destination description.
- en
Destination StringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - name String
- The Destintion name.
- instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- type string
- Webhook.
- collect
Failed booleanEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config
En
Destination Webhook Config Payload describing a destination configuration.
Nested scheme for config:
- description string
- The Destination description.
- en
Destination stringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - name string
- The Destintion name.
- instance_
guid str - Unique identifier for IBM Cloud Event Notifications instance.
- type str
- Webhook.
- collect_
failed_ boolevents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config
En
Destination Webhook Config Args Payload describing a destination configuration.
Nested scheme for config:
- description str
- The Destination description.
- en_
destination_ strwebhook_ id - (String) The unique identifier of the
webhook_en_destination
. - name str
- The Destintion name.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- type String
- Webhook.
- collect
Failed BooleanEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config Property Map
Payload describing a destination configuration.
Nested scheme for config:
- description String
- The Destination description.
- en
Destination StringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - name String
- The Destintion name.
Outputs
All input properties are implicitly available as output properties. Additionally, the EnDestinationWebhook resource produces the following output properties:
- Destination
Id string - (String) The unique identifier of the created destination.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subscription
Count double - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- Subscription
Names List<string> - (List) List of subscriptions.
- Updated
At string - (String) Last updated time.
- Destination
Id string - (String) The unique identifier of the created destination.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subscription
Count float64 - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- Subscription
Names []string - (List) List of subscriptions.
- Updated
At string - (String) Last updated time.
- destination
Id String - (String) The unique identifier of the created destination.
- id String
- The provider-assigned unique ID for this managed resource.
- subscription
Count Double - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription
Names List<String> - (List) List of subscriptions.
- updated
At String - (String) Last updated time.
- destination
Id string - (String) The unique identifier of the created destination.
- id string
- The provider-assigned unique ID for this managed resource.
- subscription
Count number - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription
Names string[] - (List) List of subscriptions.
- updated
At string - (String) Last updated time.
- destination_
id str - (String) The unique identifier of the created destination.
- id str
- The provider-assigned unique ID for this managed resource.
- subscription_
count float - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription_
names Sequence[str] - (List) List of subscriptions.
- updated_
at str - (String) Last updated time.
- destination
Id String - (String) The unique identifier of the created destination.
- id String
- The provider-assigned unique ID for this managed resource.
- subscription
Count Number - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription
Names List<String> - (List) List of subscriptions.
- updated
At String - (String) Last updated time.
Look up Existing EnDestinationWebhook Resource
Get an existing EnDestinationWebhook 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?: EnDestinationWebhookState, opts?: CustomResourceOptions): EnDestinationWebhook
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
collect_failed_events: Optional[bool] = None,
config: Optional[EnDestinationWebhookConfigArgs] = None,
description: Optional[str] = None,
destination_id: Optional[str] = None,
en_destination_webhook_id: Optional[str] = None,
instance_guid: Optional[str] = None,
name: Optional[str] = None,
subscription_count: Optional[float] = None,
subscription_names: Optional[Sequence[str]] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None) -> EnDestinationWebhook
func GetEnDestinationWebhook(ctx *Context, name string, id IDInput, state *EnDestinationWebhookState, opts ...ResourceOption) (*EnDestinationWebhook, error)
public static EnDestinationWebhook Get(string name, Input<string> id, EnDestinationWebhookState? state, CustomResourceOptions? opts = null)
public static EnDestinationWebhook get(String name, Output<String> id, EnDestinationWebhookState state, CustomResourceOptions options)
resources: _: type: ibm:EnDestinationWebhook 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.
- Collect
Failed boolEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- Config
En
Destination Webhook Config Payload describing a destination configuration.
Nested scheme for config:
- Description string
- The Destination description.
- Destination
Id string - (String) The unique identifier of the created destination.
- En
Destination stringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- The Destintion name.
- Subscription
Count double - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- Subscription
Names List<string> - (List) List of subscriptions.
- Type string
- Webhook.
- Updated
At string - (String) Last updated time.
- Collect
Failed boolEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- Config
En
Destination Webhook Config Args Payload describing a destination configuration.
Nested scheme for config:
- Description string
- The Destination description.
- Destination
Id string - (String) The unique identifier of the created destination.
- En
Destination stringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- The Destintion name.
- Subscription
Count float64 - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- Subscription
Names []string - (List) List of subscriptions.
- Type string
- Webhook.
- Updated
At string - (String) Last updated time.
- collect
Failed BooleanEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config
En
Destination Webhook Config Payload describing a destination configuration.
Nested scheme for config:
- description String
- The Destination description.
- destination
Id String - (String) The unique identifier of the created destination.
- en
Destination StringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- The Destintion name.
- subscription
Count Double - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription
Names List<String> - (List) List of subscriptions.
- type String
- Webhook.
- updated
At String - (String) Last updated time.
- collect
Failed booleanEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config
En
Destination Webhook Config Payload describing a destination configuration.
Nested scheme for config:
- description string
- The Destination description.
- destination
Id string - (String) The unique identifier of the created destination.
- en
Destination stringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- name string
- The Destintion name.
- subscription
Count number - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription
Names string[] - (List) List of subscriptions.
- type string
- Webhook.
- updated
At string - (String) Last updated time.
- collect_
failed_ boolevents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config
En
Destination Webhook Config Args Payload describing a destination configuration.
Nested scheme for config:
- description str
- The Destination description.
- destination_
id str - (String) The unique identifier of the created destination.
- en_
destination_ strwebhook_ id - (String) The unique identifier of the
webhook_en_destination
. - instance_
guid str - Unique identifier for IBM Cloud Event Notifications instance.
- name str
- The Destintion name.
- subscription_
count float - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription_
names Sequence[str] - (List) List of subscriptions.
- type str
- Webhook.
- updated_
at str - (String) Last updated time.
- collect
Failed BooleanEvents - Toggle switch to enable collect failed event in Cloud Object Storage bucket.
- config Property Map
Payload describing a destination configuration.
Nested scheme for config:
- description String
- The Destination description.
- destination
Id String - (String) The unique identifier of the created destination.
- en
Destination StringWebhook Id - (String) The unique identifier of the
webhook_en_destination
. - instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- The Destintion name.
- subscription
Count Number - (Integer) Number of subscriptions.
- Constraints: The minimum value is
0
.
- Constraints: The minimum value is
- subscription
Names List<String> - (List) List of subscriptions.
- type String
- Webhook.
- updated
At String - (String) Last updated time.
Supporting Types
EnDestinationWebhookConfig, EnDestinationWebhookConfigArgs
- Params
En
Destination Webhook Config Params - Nested scheme for params:
- Params
En
Destination Webhook Config Params - Nested scheme for params:
- params
En
Destination Webhook Config Params - Nested scheme for params:
- params
En
Destination Webhook Config Params - Nested scheme for params:
- params
En
Destination Webhook Config Params - Nested scheme for params:
- params Property Map
- Nested scheme for params:
EnDestinationWebhookConfigParams, EnDestinationWebhookConfigParamsArgs
- Url string
- URL of webhook.
- Verb string
- HTTP method of webhook.
- Custom
Headers Dictionary<string, string> - Custom headers (Key-Value pair) for webhook call.
- Sensitive
Headers List<string> - List of sensitive headers from custom headers.
- Url string
- URL of webhook.
- Verb string
- HTTP method of webhook.
- Custom
Headers map[string]string - Custom headers (Key-Value pair) for webhook call.
- Sensitive
Headers []string - List of sensitive headers from custom headers.
- url String
- URL of webhook.
- verb String
- HTTP method of webhook.
- custom
Headers Map<String,String> - Custom headers (Key-Value pair) for webhook call.
- sensitive
Headers List<String> - List of sensitive headers from custom headers.
- url string
- URL of webhook.
- verb string
- HTTP method of webhook.
- custom
Headers {[key: string]: string} - Custom headers (Key-Value pair) for webhook call.
- sensitive
Headers string[] - List of sensitive headers from custom headers.
- url str
- URL of webhook.
- verb str
- HTTP method of webhook.
- custom_
headers Mapping[str, str] - Custom headers (Key-Value pair) for webhook call.
- sensitive_
headers Sequence[str] - List of sensitive headers from custom headers.
- url String
- URL of webhook.
- verb String
- HTTP method of webhook.
- custom
Headers Map<String> - Custom headers (Key-Value pair) for webhook call.
- sensitive
Headers List<String> - List of sensitive headers from custom headers.
Import
You can import the ibm_en_destination_webhook
resource by using id
.
The id
property can be formed from instance_guid
, and destination_id
in the following format:
<instance_guid>/<destination_id>
instance_guid
: A string. Unique identifier for IBM Cloud Event Notifications instance.destination_id
: A string. Unique identifier for Destination.
Example
$ pulumi import ibm:index/enDestinationWebhook:EnDestinationWebhook webhook_en_destination <instance_guid>/<destination_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.