ibm.EnWebhookTemplate
Explore with Pulumi AI
Create, update, or delete Webhook Template by using IBM Cloud™ Event Notifications.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const webhookTemplate = new ibm.EnWebhookTemplate("webhookTemplate", {
instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
type: "webhook.notification",
description: "Webhook Template for Notifications",
params: {
body: "ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0=",
},
});
import pulumi
import pulumi_ibm as ibm
webhook_template = ibm.EnWebhookTemplate("webhookTemplate",
instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
type="webhook.notification",
description="Webhook Template for Notifications",
params={
"body": "ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0=",
})
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.NewEnWebhookTemplate(ctx, "webhookTemplate", &ibm.EnWebhookTemplateArgs{
InstanceGuid: pulumi.Any(ibm_resource_instance.En_terraform_test_resource.Guid),
Type: pulumi.String("webhook.notification"),
Description: pulumi.String("Webhook Template for Notifications"),
Params: &ibm.EnWebhookTemplateParamsArgs{
Body: pulumi.String("ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0="),
},
})
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 webhookTemplate = new Ibm.EnWebhookTemplate("webhookTemplate", new()
{
InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
Type = "webhook.notification",
Description = "Webhook Template for Notifications",
Params = new Ibm.Inputs.EnWebhookTemplateParamsArgs
{
Body = "ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0=",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.EnWebhookTemplate;
import com.pulumi.ibm.EnWebhookTemplateArgs;
import com.pulumi.ibm.inputs.EnWebhookTemplateParamsArgs;
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 webhookTemplate = new EnWebhookTemplate("webhookTemplate", EnWebhookTemplateArgs.builder()
.instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
.type("webhook.notification")
.description("Webhook Template for Notifications")
.params(EnWebhookTemplateParamsArgs.builder()
.body("ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0=")
.build())
.build());
}
}
resources:
webhookTemplate:
type: ibm:EnWebhookTemplate
properties:
instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
type: webhook.notification
description: Webhook Template for Notifications
params:
body: ewoJImJsb2NrcyI6IFsKCQl7CgkJCSJ0eXBlIjogInNlY3Rpb24iLAoJCQkidGV4dCI6IHsKCQkJCSJ0eXBlIjogIm1ya2R3biIsCgkJCQkidGV4dCI6ICJOZXcgUGFpZCBUaW1lIE9mZiByZXF1ZXN0IGZyb20gPGV4YW1wbGUuY29tfEZyZWQgRW5yaXF1ZXo+XG5cbjxodHRwczovL2V4YW1wbGUuY29tfFZpZXcgcmVxdWVzdD4iCgkJCX0KCQl9CgldCn0=
Create EnWebhookTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EnWebhookTemplate(name: string, args: EnWebhookTemplateArgs, opts?: CustomResourceOptions);
@overload
def EnWebhookTemplate(resource_name: str,
args: EnWebhookTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EnWebhookTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_guid: Optional[str] = None,
params: Optional[EnWebhookTemplateParamsArgs] = None,
type: Optional[str] = None,
description: Optional[str] = None,
en_webhook_template_id: Optional[str] = None,
name: Optional[str] = None)
func NewEnWebhookTemplate(ctx *Context, name string, args EnWebhookTemplateArgs, opts ...ResourceOption) (*EnWebhookTemplate, error)
public EnWebhookTemplate(string name, EnWebhookTemplateArgs args, CustomResourceOptions? opts = null)
public EnWebhookTemplate(String name, EnWebhookTemplateArgs args)
public EnWebhookTemplate(String name, EnWebhookTemplateArgs args, CustomResourceOptions options)
type: ibm:EnWebhookTemplate
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 EnWebhookTemplateArgs
- 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 EnWebhookTemplateArgs
- 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 EnWebhookTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnWebhookTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnWebhookTemplateArgs
- 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 enWebhookTemplateResource = new Ibm.EnWebhookTemplate("enWebhookTemplateResource", new()
{
InstanceGuid = "string",
Params = new Ibm.Inputs.EnWebhookTemplateParamsArgs
{
Body = "string",
},
Type = "string",
Description = "string",
EnWebhookTemplateId = "string",
Name = "string",
});
example, err := ibm.NewEnWebhookTemplate(ctx, "enWebhookTemplateResource", &ibm.EnWebhookTemplateArgs{
InstanceGuid: pulumi.String("string"),
Params: &ibm.EnWebhookTemplateParamsArgs{
Body: pulumi.String("string"),
},
Type: pulumi.String("string"),
Description: pulumi.String("string"),
EnWebhookTemplateId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var enWebhookTemplateResource = new EnWebhookTemplate("enWebhookTemplateResource", EnWebhookTemplateArgs.builder()
.instanceGuid("string")
.params(EnWebhookTemplateParamsArgs.builder()
.body("string")
.build())
.type("string")
.description("string")
.enWebhookTemplateId("string")
.name("string")
.build());
en_webhook_template_resource = ibm.EnWebhookTemplate("enWebhookTemplateResource",
instance_guid="string",
params={
"body": "string",
},
type="string",
description="string",
en_webhook_template_id="string",
name="string")
const enWebhookTemplateResource = new ibm.EnWebhookTemplate("enWebhookTemplateResource", {
instanceGuid: "string",
params: {
body: "string",
},
type: "string",
description: "string",
enWebhookTemplateId: "string",
name: "string",
});
type: ibm:EnWebhookTemplate
properties:
description: string
enWebhookTemplateId: string
instanceGuid: string
name: string
params:
body: string
type: string
EnWebhookTemplate 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 EnWebhookTemplate resource accepts the following input properties:
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Params
En
Webhook Template Params Payload describing a template configuration
Nested scheme for params:
- Type string
- webhook.notification
- Description string
- The Template description.
- En
Webhook stringTemplate Id - (String) The unique identifier of the
webhook_template
. - Name string
- The Message Template.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Params
En
Webhook Template Params Args Payload describing a template configuration
Nested scheme for params:
- Type string
- webhook.notification
- Description string
- The Template description.
- En
Webhook stringTemplate Id - (String) The unique identifier of the
webhook_template
. - Name string
- The Message Template.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- params
En
Webhook Template Params Payload describing a template configuration
Nested scheme for params:
- type String
- webhook.notification
- description String
- The Template description.
- en
Webhook StringTemplate Id - (String) The unique identifier of the
webhook_template
. - name String
- The Message Template.
- instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- params
En
Webhook Template Params Payload describing a template configuration
Nested scheme for params:
- type string
- webhook.notification
- description string
- The Template description.
- en
Webhook stringTemplate Id - (String) The unique identifier of the
webhook_template
. - name string
- The Message Template.
- instance_
guid str - Unique identifier for IBM Cloud Event Notifications instance.
- params
En
Webhook Template Params Args Payload describing a template configuration
Nested scheme for params:
- type str
- webhook.notification
- description str
- The Template description.
- en_
webhook_ strtemplate_ id - (String) The unique identifier of the
webhook_template
. - name str
- The Message Template.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- params Property Map
Payload describing a template configuration
Nested scheme for params:
- type String
- webhook.notification
- description String
- The Template description.
- en
Webhook StringTemplate Id - (String) The unique identifier of the
webhook_template
. - name String
- The Message Template.
Outputs
All input properties are implicitly available as output properties. Additionally, the EnWebhookTemplate resource produces the following output properties:
- 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.
- Template
Id string - (String) The unique identifier of the created Template.
- Updated
At string - (String) Last updated time.
- 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.
- Template
Id string - (String) The unique identifier of the created Template.
- Updated
At string - (String) Last updated time.
- 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.
- template
Id String - (String) The unique identifier of the created Template.
- updated
At String - (String) Last updated time.
- 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.
- template
Id string - (String) The unique identifier of the created Template.
- updated
At string - (String) Last updated time.
- 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.
- template_
id str - (String) The unique identifier of the created Template.
- updated_
at str - (String) Last updated time.
- 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.
- template
Id String - (String) The unique identifier of the created Template.
- updated
At String - (String) Last updated time.
Look up Existing EnWebhookTemplate Resource
Get an existing EnWebhookTemplate 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?: EnWebhookTemplateState, opts?: CustomResourceOptions): EnWebhookTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
en_webhook_template_id: Optional[str] = None,
instance_guid: Optional[str] = None,
name: Optional[str] = None,
params: Optional[EnWebhookTemplateParamsArgs] = None,
subscription_count: Optional[float] = None,
subscription_names: Optional[Sequence[str]] = None,
template_id: Optional[str] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None) -> EnWebhookTemplate
func GetEnWebhookTemplate(ctx *Context, name string, id IDInput, state *EnWebhookTemplateState, opts ...ResourceOption) (*EnWebhookTemplate, error)
public static EnWebhookTemplate Get(string name, Input<string> id, EnWebhookTemplateState? state, CustomResourceOptions? opts = null)
public static EnWebhookTemplate get(String name, Output<String> id, EnWebhookTemplateState state, CustomResourceOptions options)
resources: _: type: ibm:EnWebhookTemplate 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.
- Description string
- The Template description.
- En
Webhook stringTemplate Id - (String) The unique identifier of the
webhook_template
. - Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- The Message Template.
- Params
En
Webhook Template Params Payload describing a template configuration
Nested scheme for params:
- 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.
- Template
Id string - (String) The unique identifier of the created Template.
- Type string
- webhook.notification
- Updated
At string - (String) Last updated time.
- Description string
- The Template description.
- En
Webhook stringTemplate Id - (String) The unique identifier of the
webhook_template
. - Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- The Message Template.
- Params
En
Webhook Template Params Args Payload describing a template configuration
Nested scheme for params:
- 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.
- Template
Id string - (String) The unique identifier of the created Template.
- Type string
- webhook.notification
- Updated
At string - (String) Last updated time.
- description String
- The Template description.
- en
Webhook StringTemplate Id - (String) The unique identifier of the
webhook_template
. - instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- The Message Template.
- params
En
Webhook Template Params Payload describing a template configuration
Nested scheme for params:
- 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.
- template
Id String - (String) The unique identifier of the created Template.
- type String
- webhook.notification
- updated
At String - (String) Last updated time.
- description string
- The Template description.
- en
Webhook stringTemplate Id - (String) The unique identifier of the
webhook_template
. - instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- name string
- The Message Template.
- params
En
Webhook Template Params Payload describing a template configuration
Nested scheme for params:
- 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.
- template
Id string - (String) The unique identifier of the created Template.
- type string
- webhook.notification
- updated
At string - (String) Last updated time.
- description str
- The Template description.
- en_
webhook_ strtemplate_ id - (String) The unique identifier of the
webhook_template
. - instance_
guid str - Unique identifier for IBM Cloud Event Notifications instance.
- name str
- The Message Template.
- params
En
Webhook Template Params Args Payload describing a template configuration
Nested scheme for params:
- 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.
- template_
id str - (String) The unique identifier of the created Template.
- type str
- webhook.notification
- updated_
at str - (String) Last updated time.
- description String
- The Template description.
- en
Webhook StringTemplate Id - (String) The unique identifier of the
webhook_template
. - instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- The Message Template.
- params Property Map
Payload describing a template configuration
Nested scheme for params:
- 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.
- template
Id String - (String) The unique identifier of the created Template.
- type String
- webhook.notification
- updated
At String - (String) Last updated time.
Supporting Types
EnWebhookTemplateParams, EnWebhookTemplateParamsArgs
- Body string
- The Body for Webhook Template in base64 encoded format.
- Body string
- The Body for Webhook Template in base64 encoded format.
- body String
- The Body for Webhook Template in base64 encoded format.
- body string
- The Body for Webhook Template in base64 encoded format.
- body str
- The Body for Webhook Template in base64 encoded format.
- body String
- The Body for Webhook Template in base64 encoded format.
Import
You can import the ibm_en_webhook_template
resource by using id
.
The id
property can be formed from instance_guid
, and template_id
in the following format:
<instance_guid>/<template_id>
instance_guid
: A string. Unique identifier for IBM Cloud Event Notifications instance.template_id
: A string. Unique identifier for Template.
Example
$ pulumi import ibm:index/enWebhookTemplate:EnWebhookTemplate webhook_template <instance_guid>/<template_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.