ibm.EnSubscriptionEventStreams
Explore with Pulumi AI
Create, update, or delete a Event Streams subscription by using IBM Cloud™ Event Notifications.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const esSubscription = new ibm.EnSubscriptionEventStreams("esSubscription", {
instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
description: "Subscription for event streams destination in Event Notifications",
destinationId: ibm_en_destination_event_streams.destination1.destination_id,
topicId: ibm_en_topic.topic1.topic_id,
attributes: {
templateIdNotification: "e40843c8-hgft-4717-8ee4-f923f2786a34",
},
});
import pulumi
import pulumi_ibm as ibm
es_subscription = ibm.EnSubscriptionEventStreams("esSubscription",
instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
description="Subscription for event streams destination in Event Notifications",
destination_id=ibm_en_destination_event_streams["destination1"]["destination_id"],
topic_id=ibm_en_topic["topic1"]["topic_id"],
attributes={
"template_id_notification": "e40843c8-hgft-4717-8ee4-f923f2786a34",
})
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.NewEnSubscriptionEventStreams(ctx, "esSubscription", &ibm.EnSubscriptionEventStreamsArgs{
InstanceGuid: pulumi.Any(ibm_resource_instance.En_terraform_test_resource.Guid),
Description: pulumi.String("Subscription for event streams destination in Event Notifications"),
DestinationId: pulumi.Any(ibm_en_destination_event_streams.Destination1.Destination_id),
TopicId: pulumi.Any(ibm_en_topic.Topic1.Topic_id),
Attributes: &ibm.EnSubscriptionEventStreamsAttributesArgs{
TemplateIdNotification: pulumi.String("e40843c8-hgft-4717-8ee4-f923f2786a34"),
},
})
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 esSubscription = new Ibm.EnSubscriptionEventStreams("esSubscription", new()
{
InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
Description = "Subscription for event streams destination in Event Notifications",
DestinationId = ibm_en_destination_event_streams.Destination1.Destination_id,
TopicId = ibm_en_topic.Topic1.Topic_id,
Attributes = new Ibm.Inputs.EnSubscriptionEventStreamsAttributesArgs
{
TemplateIdNotification = "e40843c8-hgft-4717-8ee4-f923f2786a34",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.EnSubscriptionEventStreams;
import com.pulumi.ibm.EnSubscriptionEventStreamsArgs;
import com.pulumi.ibm.inputs.EnSubscriptionEventStreamsAttributesArgs;
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 esSubscription = new EnSubscriptionEventStreams("esSubscription", EnSubscriptionEventStreamsArgs.builder()
.instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
.description("Subscription for event streams destination in Event Notifications")
.destinationId(ibm_en_destination_event_streams.destination1().destination_id())
.topicId(ibm_en_topic.topic1().topic_id())
.attributes(EnSubscriptionEventStreamsAttributesArgs.builder()
.templateIdNotification("e40843c8-hgft-4717-8ee4-f923f2786a34")
.build())
.build());
}
}
resources:
esSubscription:
type: ibm:EnSubscriptionEventStreams
properties:
instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
description: Subscription for event streams destination in Event Notifications
destinationId: ${ibm_en_destination_event_streams.destination1.destination_id}
topicId: ${ibm_en_topic.topic1.topic_id}
attributes:
templateIdNotification: e40843c8-hgft-4717-8ee4-f923f2786a34
Create EnSubscriptionEventStreams Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EnSubscriptionEventStreams(name: string, args: EnSubscriptionEventStreamsArgs, opts?: CustomResourceOptions);
@overload
def EnSubscriptionEventStreams(resource_name: str,
args: EnSubscriptionEventStreamsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EnSubscriptionEventStreams(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_id: Optional[str] = None,
instance_guid: Optional[str] = None,
topic_id: Optional[str] = None,
attributes: Optional[EnSubscriptionEventStreamsAttributesArgs] = None,
description: Optional[str] = None,
en_subscription_event_streams_id: Optional[str] = None,
name: Optional[str] = None)
func NewEnSubscriptionEventStreams(ctx *Context, name string, args EnSubscriptionEventStreamsArgs, opts ...ResourceOption) (*EnSubscriptionEventStreams, error)
public EnSubscriptionEventStreams(string name, EnSubscriptionEventStreamsArgs args, CustomResourceOptions? opts = null)
public EnSubscriptionEventStreams(String name, EnSubscriptionEventStreamsArgs args)
public EnSubscriptionEventStreams(String name, EnSubscriptionEventStreamsArgs args, CustomResourceOptions options)
type: ibm:EnSubscriptionEventStreams
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 EnSubscriptionEventStreamsArgs
- 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 EnSubscriptionEventStreamsArgs
- 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 EnSubscriptionEventStreamsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnSubscriptionEventStreamsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnSubscriptionEventStreamsArgs
- 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 enSubscriptionEventStreamsResource = new Ibm.EnSubscriptionEventStreams("enSubscriptionEventStreamsResource", new()
{
DestinationId = "string",
InstanceGuid = "string",
TopicId = "string",
Attributes = new Ibm.Inputs.EnSubscriptionEventStreamsAttributesArgs
{
TemplateIdNotification = "string",
},
Description = "string",
EnSubscriptionEventStreamsId = "string",
Name = "string",
});
example, err := ibm.NewEnSubscriptionEventStreams(ctx, "enSubscriptionEventStreamsResource", &ibm.EnSubscriptionEventStreamsArgs{
DestinationId: pulumi.String("string"),
InstanceGuid: pulumi.String("string"),
TopicId: pulumi.String("string"),
Attributes: &ibm.EnSubscriptionEventStreamsAttributesArgs{
TemplateIdNotification: pulumi.String("string"),
},
Description: pulumi.String("string"),
EnSubscriptionEventStreamsId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var enSubscriptionEventStreamsResource = new EnSubscriptionEventStreams("enSubscriptionEventStreamsResource", EnSubscriptionEventStreamsArgs.builder()
.destinationId("string")
.instanceGuid("string")
.topicId("string")
.attributes(EnSubscriptionEventStreamsAttributesArgs.builder()
.templateIdNotification("string")
.build())
.description("string")
.enSubscriptionEventStreamsId("string")
.name("string")
.build());
en_subscription_event_streams_resource = ibm.EnSubscriptionEventStreams("enSubscriptionEventStreamsResource",
destination_id="string",
instance_guid="string",
topic_id="string",
attributes={
"template_id_notification": "string",
},
description="string",
en_subscription_event_streams_id="string",
name="string")
const enSubscriptionEventStreamsResource = new ibm.EnSubscriptionEventStreams("enSubscriptionEventStreamsResource", {
destinationId: "string",
instanceGuid: "string",
topicId: "string",
attributes: {
templateIdNotification: "string",
},
description: "string",
enSubscriptionEventStreamsId: "string",
name: "string",
});
type: ibm:EnSubscriptionEventStreams
properties:
attributes:
templateIdNotification: string
description: string
destinationId: string
enSubscriptionEventStreamsId: string
instanceGuid: string
name: string
topicId: string
EnSubscriptionEventStreams 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 EnSubscriptionEventStreams resource accepts the following input properties:
- Destination
Id string - Destination ID.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Topic
Id string - Topic ID.
- Attributes
En
Subscription Event Streams Attributes - Subscription attributes. Nested scheme for attributes:
- Description string
- Subscription description.
- En
Subscription stringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - Name string
- Subscription name.
- Destination
Id string - Destination ID.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Topic
Id string - Topic ID.
- Attributes
En
Subscription Event Streams Attributes Args - Subscription attributes. Nested scheme for attributes:
- Description string
- Subscription description.
- En
Subscription stringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - Name string
- Subscription name.
- destination
Id String - Destination ID.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- topic
Id String - Topic ID.
- attributes
En
Subscription Event Streams Attributes - Subscription attributes. Nested scheme for attributes:
- description String
- Subscription description.
- en
Subscription StringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - name String
- Subscription name.
- destination
Id string - Destination ID.
- instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- topic
Id string - Topic ID.
- attributes
En
Subscription Event Streams Attributes - Subscription attributes. Nested scheme for attributes:
- description string
- Subscription description.
- en
Subscription stringEvent Streams Id - (String) The unique identifier of the
es_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
En
Subscription Event Streams Attributes Args - Subscription attributes. Nested scheme for attributes:
- description str
- Subscription description.
- en_
subscription_ strevent_ streams_ id - (String) The unique identifier of the
es_subscription
. - name str
- Subscription name.
- destination
Id String - Destination ID.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- topic
Id String - Topic ID.
- attributes Property Map
- Subscription attributes. Nested scheme for attributes:
- description String
- Subscription description.
- en
Subscription StringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - name String
- Subscription name.
Outputs
All input properties are implicitly available as output properties. Additionally, the EnSubscriptionEventStreams resource produces the following output properties:
- Destination
Name string - The Destintion name.
- Destination
Type string - The type of Destination.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subscription
Id string - (String) The unique identifier of the created subscription.
- Topic
Name string - Name of the topic.
- Updated
At string - (String) Last updated time.
- Destination
Name string - The Destintion name.
- Destination
Type string - The type of Destination.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subscription
Id string - (String) The unique identifier of the created subscription.
- Topic
Name string - Name of the topic.
- Updated
At string - (String) Last updated time.
- destination
Name String - The Destintion name.
- destination
Type String - The type of Destination.
- id String
- The provider-assigned unique ID for this managed resource.
- subscription
Id String - (String) The unique identifier of the created subscription.
- topic
Name String - Name of the topic.
- updated
At String - (String) Last updated time.
- destination
Name string - The Destintion name.
- destination
Type string - The type of Destination.
- id string
- The provider-assigned unique ID for this managed resource.
- subscription
Id string - (String) The unique identifier of the created subscription.
- topic
Name string - Name of the topic.
- updated
At 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.
- destination
Name String - The Destintion name.
- destination
Type String - The type of Destination.
- id String
- The provider-assigned unique ID for this managed resource.
- subscription
Id String - (String) The unique identifier of the created subscription.
- topic
Name String - Name of the topic.
- updated
At String - (String) Last updated time.
Look up Existing EnSubscriptionEventStreams Resource
Get an existing EnSubscriptionEventStreams 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?: EnSubscriptionEventStreamsState, opts?: CustomResourceOptions): EnSubscriptionEventStreams
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
attributes: Optional[EnSubscriptionEventStreamsAttributesArgs] = None,
description: Optional[str] = None,
destination_id: Optional[str] = None,
destination_name: Optional[str] = None,
destination_type: Optional[str] = None,
en_subscription_event_streams_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) -> EnSubscriptionEventStreams
func GetEnSubscriptionEventStreams(ctx *Context, name string, id IDInput, state *EnSubscriptionEventStreamsState, opts ...ResourceOption) (*EnSubscriptionEventStreams, error)
public static EnSubscriptionEventStreams Get(string name, Input<string> id, EnSubscriptionEventStreamsState? state, CustomResourceOptions? opts = null)
public static EnSubscriptionEventStreams get(String name, Output<String> id, EnSubscriptionEventStreamsState state, CustomResourceOptions options)
resources: _: type: ibm:EnSubscriptionEventStreams 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.
- Attributes
En
Subscription Event Streams Attributes - Subscription attributes. Nested scheme for attributes:
- Description string
- Subscription description.
- Destination
Id string - Destination ID.
- Destination
Name string - The Destintion name.
- Destination
Type string - The type of Destination.
- En
Subscription stringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- Subscription name.
- Subscription
Id string - (String) The unique identifier of the created subscription.
- Topic
Id string - Topic ID.
- Topic
Name string - Name of the topic.
- Updated
At string - (String) Last updated time.
- Attributes
En
Subscription Event Streams Attributes Args - Subscription attributes. Nested scheme for attributes:
- Description string
- Subscription description.
- Destination
Id string - Destination ID.
- Destination
Name string - The Destintion name.
- Destination
Type string - The type of Destination.
- En
Subscription stringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- Subscription name.
- Subscription
Id string - (String) The unique identifier of the created subscription.
- Topic
Id string - Topic ID.
- Topic
Name string - Name of the topic.
- Updated
At string - (String) Last updated time.
- attributes
En
Subscription Event Streams Attributes - Subscription attributes. Nested scheme for attributes:
- description String
- Subscription description.
- destination
Id String - Destination ID.
- destination
Name String - The Destintion name.
- destination
Type String - The type of Destination.
- en
Subscription StringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- Subscription name.
- subscription
Id String - (String) The unique identifier of the created subscription.
- topic
Id String - Topic ID.
- topic
Name String - Name of the topic.
- updated
At String - (String) Last updated time.
- attributes
En
Subscription Event Streams Attributes - Subscription attributes. Nested scheme for attributes:
- description string
- Subscription description.
- destination
Id string - Destination ID.
- destination
Name string - The Destintion name.
- destination
Type string - The type of Destination.
- en
Subscription stringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- name string
- Subscription name.
- subscription
Id string - (String) The unique identifier of the created subscription.
- topic
Id string - Topic ID.
- topic
Name string - Name of the topic.
- updated
At string - (String) Last updated time.
- attributes
En
Subscription Event Streams Attributes Args - 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_ strevent_ streams_ id - (String) The unique identifier of the
es_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.
- destination
Id String - Destination ID.
- destination
Name String - The Destintion name.
- destination
Type String - The type of Destination.
- en
Subscription StringEvent Streams Id - (String) The unique identifier of the
es_subscription
. - instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- Subscription name.
- subscription
Id String - (String) The unique identifier of the created subscription.
- topic
Id String - Topic ID.
- topic
Name String - Name of the topic.
- updated
At String - (String) Last updated time.
Supporting Types
EnSubscriptionEventStreamsAttributes, EnSubscriptionEventStreamsAttributesArgs
- Template
Id stringNotification - The templete id for notification.
- Template
Id stringNotification - The templete id for notification.
- template
Id StringNotification - The templete id for notification.
- template
Id stringNotification - The templete id for notification.
- template_
id_ strnotification - The templete id for notification.
- template
Id StringNotification - The templete id for notification.
Import
You can import the ibm_en_subscription_event_streams
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/enSubscriptionEventStreams:EnSubscriptionEventStreams es_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.