1. Packages
  2. Ibm Provider
  3. API Docs
  4. EnSubscriptionWebhook
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.EnSubscriptionWebhook

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, or delete a Webhook subscription by using IBM Cloud™ Event Notifications.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const webhookSubscription = new ibm.EnSubscriptionWebhook("webhookSubscription", {
        instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
        description: "The  webhook subscription",
        destinationId: ibm_en_destination_webhook.destination1.destination_id,
        topicId: ibm_en_topic.topic1.topic_id,
        attributes: {
            signingEnabled: true,
            templateIdNotification: ibm_en_webhook_template.webhook_template.template_id,
        },
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    webhook_subscription = ibm.EnSubscriptionWebhook("webhookSubscription",
        instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
        description="The  webhook subscription",
        destination_id=ibm_en_destination_webhook["destination1"]["destination_id"],
        topic_id=ibm_en_topic["topic1"]["topic_id"],
        attributes={
            "signing_enabled": True,
            "template_id_notification": ibm_en_webhook_template["webhook_template"]["template_id"],
        })
    
    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.NewEnSubscriptionWebhook(ctx, "webhookSubscription", &ibm.EnSubscriptionWebhookArgs{
    			InstanceGuid:  pulumi.Any(ibm_resource_instance.En_terraform_test_resource.Guid),
    			Description:   pulumi.String("The  webhook subscription"),
    			DestinationId: pulumi.Any(ibm_en_destination_webhook.Destination1.Destination_id),
    			TopicId:       pulumi.Any(ibm_en_topic.Topic1.Topic_id),
    			Attributes: &ibm.EnSubscriptionWebhookAttributesArgs{
    				SigningEnabled:         pulumi.Bool(true),
    				TemplateIdNotification: pulumi.Any(ibm_en_webhook_template.Webhook_template.Template_id),
    			},
    		})
    		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 webhookSubscription = new Ibm.EnSubscriptionWebhook("webhookSubscription", new()
        {
            InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
            Description = "The  webhook subscription",
            DestinationId = ibm_en_destination_webhook.Destination1.Destination_id,
            TopicId = ibm_en_topic.Topic1.Topic_id,
            Attributes = new Ibm.Inputs.EnSubscriptionWebhookAttributesArgs
            {
                SigningEnabled = true,
                TemplateIdNotification = ibm_en_webhook_template.Webhook_template.Template_id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.EnSubscriptionWebhook;
    import com.pulumi.ibm.EnSubscriptionWebhookArgs;
    import com.pulumi.ibm.inputs.EnSubscriptionWebhookAttributesArgs;
    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 webhookSubscription = new EnSubscriptionWebhook("webhookSubscription", EnSubscriptionWebhookArgs.builder()
                .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
                .description("The  webhook subscription")
                .destinationId(ibm_en_destination_webhook.destination1().destination_id())
                .topicId(ibm_en_topic.topic1().topic_id())
                .attributes(EnSubscriptionWebhookAttributesArgs.builder()
                    .signingEnabled(true)
                    .templateIdNotification(ibm_en_webhook_template.webhook_template().template_id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      webhookSubscription:
        type: ibm:EnSubscriptionWebhook
        properties:
          instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
          description: The  webhook subscription
          destinationId: ${ibm_en_destination_webhook.destination1.destination_id}
          topicId: ${ibm_en_topic.topic1.topic_id}
          attributes:
            signingEnabled: true
            templateIdNotification: ${ibm_en_webhook_template.webhook_template.template_id}
    

    Create EnSubscriptionWebhook Resource

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

    Constructor syntax

    new EnSubscriptionWebhook(name: string, args: EnSubscriptionWebhookArgs, opts?: CustomResourceOptions);
    @overload
    def EnSubscriptionWebhook(resource_name: str,
                              args: EnSubscriptionWebhookArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnSubscriptionWebhook(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              destination_id: Optional[str] = None,
                              instance_guid: Optional[str] = None,
                              topic_id: Optional[str] = None,
                              attributes: Optional[EnSubscriptionWebhookAttributesArgs] = None,
                              description: Optional[str] = None,
                              en_subscription_webhook_id: Optional[str] = None,
                              name: Optional[str] = None)
    func NewEnSubscriptionWebhook(ctx *Context, name string, args EnSubscriptionWebhookArgs, opts ...ResourceOption) (*EnSubscriptionWebhook, error)
    public EnSubscriptionWebhook(string name, EnSubscriptionWebhookArgs args, CustomResourceOptions? opts = null)
    public EnSubscriptionWebhook(String name, EnSubscriptionWebhookArgs args)
    public EnSubscriptionWebhook(String name, EnSubscriptionWebhookArgs args, CustomResourceOptions options)
    
    type: ibm:EnSubscriptionWebhook
    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 EnSubscriptionWebhookArgs
    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 EnSubscriptionWebhookArgs
    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 EnSubscriptionWebhookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnSubscriptionWebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnSubscriptionWebhookArgs
    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 enSubscriptionWebhookResource = new Ibm.EnSubscriptionWebhook("enSubscriptionWebhookResource", new()
    {
        DestinationId = "string",
        InstanceGuid = "string",
        TopicId = "string",
        Attributes = new Ibm.Inputs.EnSubscriptionWebhookAttributesArgs
        {
            SigningEnabled = false,
            TemplateIdNotification = "string",
        },
        Description = "string",
        EnSubscriptionWebhookId = "string",
        Name = "string",
    });
    
    example, err := ibm.NewEnSubscriptionWebhook(ctx, "enSubscriptionWebhookResource", &ibm.EnSubscriptionWebhookArgs{
    	DestinationId: pulumi.String("string"),
    	InstanceGuid:  pulumi.String("string"),
    	TopicId:       pulumi.String("string"),
    	Attributes: &ibm.EnSubscriptionWebhookAttributesArgs{
    		SigningEnabled:         pulumi.Bool(false),
    		TemplateIdNotification: pulumi.String("string"),
    	},
    	Description:             pulumi.String("string"),
    	EnSubscriptionWebhookId: pulumi.String("string"),
    	Name:                    pulumi.String("string"),
    })
    
    var enSubscriptionWebhookResource = new EnSubscriptionWebhook("enSubscriptionWebhookResource", EnSubscriptionWebhookArgs.builder()
        .destinationId("string")
        .instanceGuid("string")
        .topicId("string")
        .attributes(EnSubscriptionWebhookAttributesArgs.builder()
            .signingEnabled(false)
            .templateIdNotification("string")
            .build())
        .description("string")
        .enSubscriptionWebhookId("string")
        .name("string")
        .build());
    
    en_subscription_webhook_resource = ibm.EnSubscriptionWebhook("enSubscriptionWebhookResource",
        destination_id="string",
        instance_guid="string",
        topic_id="string",
        attributes={
            "signing_enabled": False,
            "template_id_notification": "string",
        },
        description="string",
        en_subscription_webhook_id="string",
        name="string")
    
    const enSubscriptionWebhookResource = new ibm.EnSubscriptionWebhook("enSubscriptionWebhookResource", {
        destinationId: "string",
        instanceGuid: "string",
        topicId: "string",
        attributes: {
            signingEnabled: false,
            templateIdNotification: "string",
        },
        description: "string",
        enSubscriptionWebhookId: "string",
        name: "string",
    });
    
    type: ibm:EnSubscriptionWebhook
    properties:
        attributes:
            signingEnabled: false
            templateIdNotification: string
        description: string
        destinationId: string
        enSubscriptionWebhookId: string
        instanceGuid: string
        name: string
        topicId: string
    

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

    DestinationId string
    Destination ID.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TopicId string
    Topic ID.
    Attributes EnSubscriptionWebhookAttributes
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    EnSubscriptionWebhookId string
    (String) The unique identifier of the webhook_subscription.
    Name string
    Subscription name.
    DestinationId string
    Destination ID.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TopicId string
    Topic ID.
    Attributes EnSubscriptionWebhookAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    EnSubscriptionWebhookId string
    (String) The unique identifier of the webhook_subscription.
    Name string
    Subscription name.
    destinationId String
    Destination ID.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId String
    Topic ID.
    attributes EnSubscriptionWebhookAttributes
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    enSubscriptionWebhookId String
    (String) The unique identifier of the webhook_subscription.
    name String
    Subscription name.
    destinationId string
    Destination ID.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId string
    Topic ID.
    attributes EnSubscriptionWebhookAttributes
    Subscription attributes. Nested scheme for attributes:
    description string
    Subscription description.
    enSubscriptionWebhookId string
    (String) The unique identifier of the webhook_subscription.
    name string
    Subscription name.
    destination_id str
    Destination ID.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    topic_id str
    Topic ID.
    attributes EnSubscriptionWebhookAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    description str
    Subscription description.
    en_subscription_webhook_id str
    (String) The unique identifier of the webhook_subscription.
    name str
    Subscription name.
    destinationId String
    Destination ID.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId String
    Topic ID.
    attributes Property Map
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    enSubscriptionWebhookId String
    (String) The unique identifier of the webhook_subscription.
    name String
    Subscription name.

    Outputs

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

    DestinationName string
    The Destintion name.
    DestinationType string
    The type of Destination.
    Id string
    The provider-assigned unique ID for this managed resource.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    DestinationName string
    The Destintion name.
    DestinationType string
    The type of Destination.
    Id string
    The provider-assigned unique ID for this managed resource.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    destinationName String
    The Destintion name.
    destinationType String
    The type of Destination.
    id String
    The provider-assigned unique ID for this managed resource.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.
    destinationName string
    The Destintion name.
    destinationType string
    The type of Destination.
    id string
    The provider-assigned unique ID for this managed resource.
    subscriptionId string
    (String) The unique identifier of the created subscription.
    topicName string
    Name of the topic.
    updatedAt string
    (String) Last updated time.
    destination_name str
    The Destintion name.
    destination_type str
    The type of Destination.
    id str
    The provider-assigned unique ID for this managed resource.
    subscription_id str
    (String) The unique identifier of the created subscription.
    topic_name str
    Name of the topic.
    updated_at str
    (String) Last updated time.
    destinationName String
    The Destintion name.
    destinationType String
    The type of Destination.
    id String
    The provider-assigned unique ID for this managed resource.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.

    Look up Existing EnSubscriptionWebhook Resource

    Get an existing EnSubscriptionWebhook 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?: EnSubscriptionWebhookState, opts?: CustomResourceOptions): EnSubscriptionWebhook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            attributes: Optional[EnSubscriptionWebhookAttributesArgs] = None,
            description: Optional[str] = None,
            destination_id: Optional[str] = None,
            destination_name: Optional[str] = None,
            destination_type: Optional[str] = None,
            en_subscription_webhook_id: Optional[str] = None,
            instance_guid: Optional[str] = None,
            name: Optional[str] = None,
            subscription_id: Optional[str] = None,
            topic_id: Optional[str] = None,
            topic_name: Optional[str] = None,
            updated_at: Optional[str] = None) -> EnSubscriptionWebhook
    func GetEnSubscriptionWebhook(ctx *Context, name string, id IDInput, state *EnSubscriptionWebhookState, opts ...ResourceOption) (*EnSubscriptionWebhook, error)
    public static EnSubscriptionWebhook Get(string name, Input<string> id, EnSubscriptionWebhookState? state, CustomResourceOptions? opts = null)
    public static EnSubscriptionWebhook get(String name, Output<String> id, EnSubscriptionWebhookState state, CustomResourceOptions options)
    resources:  _:    type: ibm:EnSubscriptionWebhook    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.
    The following state arguments are supported:
    Attributes EnSubscriptionWebhookAttributes
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    DestinationId string
    Destination ID.
    DestinationName string
    The Destintion name.
    DestinationType string
    The type of Destination.
    EnSubscriptionWebhookId string
    (String) The unique identifier of the webhook_subscription.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Name string
    Subscription name.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicId string
    Topic ID.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    Attributes EnSubscriptionWebhookAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    DestinationId string
    Destination ID.
    DestinationName string
    The Destintion name.
    DestinationType string
    The type of Destination.
    EnSubscriptionWebhookId string
    (String) The unique identifier of the webhook_subscription.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Name string
    Subscription name.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicId string
    Topic ID.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    attributes EnSubscriptionWebhookAttributes
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    destinationId String
    Destination ID.
    destinationName String
    The Destintion name.
    destinationType String
    The type of Destination.
    enSubscriptionWebhookId String
    (String) The unique identifier of the webhook_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    name String
    Subscription name.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicId String
    Topic ID.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.
    attributes EnSubscriptionWebhookAttributes
    Subscription attributes. Nested scheme for attributes:
    description string
    Subscription description.
    destinationId string
    Destination ID.
    destinationName string
    The Destintion name.
    destinationType string
    The type of Destination.
    enSubscriptionWebhookId string
    (String) The unique identifier of the webhook_subscription.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    name string
    Subscription name.
    subscriptionId string
    (String) The unique identifier of the created subscription.
    topicId string
    Topic ID.
    topicName string
    Name of the topic.
    updatedAt string
    (String) Last updated time.
    attributes EnSubscriptionWebhookAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    description str
    Subscription description.
    destination_id str
    Destination ID.
    destination_name str
    The Destintion name.
    destination_type str
    The type of Destination.
    en_subscription_webhook_id str
    (String) The unique identifier of the webhook_subscription.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    name str
    Subscription name.
    subscription_id str
    (String) The unique identifier of the created subscription.
    topic_id str
    Topic ID.
    topic_name str
    Name of the topic.
    updated_at str
    (String) Last updated time.
    attributes Property Map
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    destinationId String
    Destination ID.
    destinationName String
    The Destintion name.
    destinationType String
    The type of Destination.
    enSubscriptionWebhookId String
    (String) The unique identifier of the webhook_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    name String
    Subscription name.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicId String
    Topic ID.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.

    Supporting Types

    EnSubscriptionWebhookAttributes, EnSubscriptionWebhookAttributesArgs

    SigningEnabled bool
    Signing enabled.
    TemplateIdNotification string
    The templete id for notification.
    SigningEnabled bool
    Signing enabled.
    TemplateIdNotification string
    The templete id for notification.
    signingEnabled Boolean
    Signing enabled.
    templateIdNotification String
    The templete id for notification.
    signingEnabled boolean
    Signing enabled.
    templateIdNotification string
    The templete id for notification.
    signing_enabled bool
    Signing enabled.
    template_id_notification str
    The templete id for notification.
    signingEnabled Boolean
    Signing enabled.
    templateIdNotification String
    The templete id for notification.

    Import

    You can import the ibm_en_subscription_webhook resource by using id.

    The id property can be formed from instance_guid, and subscription_id in the following format:

    <instance_guid>/<subscription_id>

    • instance_guid: A string. Unique identifier for IBM Cloud Event Notifications instance.

    • subscription_id: A string. Unique identifier for Subscription.

    Example

    $ pulumi import ibm:index/enSubscriptionWebhook:EnSubscriptionWebhook wehook_subscription <instance_guid>/<subscription_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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud