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

ibm.getEnTopic

Explore with Pulumi AI

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

    Provides a read-only data source for topic. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const enTopic = ibm.getEnTopic({
        instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
        topicId: ibm_en_topic.topic1.topic_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    en_topic = ibm.get_en_topic(instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
        topic_id=ibm_en_topic["topic1"]["topic_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.LookupEnTopic(ctx, &ibm.LookupEnTopicArgs{
    			InstanceGuid: ibm_resource_instance.En_terraform_test_resource.Guid,
    			TopicId:      ibm_en_topic.Topic1.Topic_id,
    		}, nil)
    		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 enTopic = Ibm.GetEnTopic.Invoke(new()
        {
            InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
            TopicId = ibm_en_topic.Topic1.Topic_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetEnTopicArgs;
    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) {
            final var enTopic = IbmFunctions.getEnTopic(GetEnTopicArgs.builder()
                .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
                .topicId(ibm_en_topic.topic1().topic_id())
                .build());
    
        }
    }
    
    variables:
      enTopic:
        fn::invoke:
          function: ibm:getEnTopic
          arguments:
            instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
            topicId: ${ibm_en_topic.topic1.topic_id}
    

    Using getEnTopic

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getEnTopic(args: GetEnTopicArgs, opts?: InvokeOptions): Promise<GetEnTopicResult>
    function getEnTopicOutput(args: GetEnTopicOutputArgs, opts?: InvokeOptions): Output<GetEnTopicResult>
    def get_en_topic(id: Optional[str] = None,
                     instance_guid: Optional[str] = None,
                     topic_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetEnTopicResult
    def get_en_topic_output(id: Optional[pulumi.Input[str]] = None,
                     instance_guid: Optional[pulumi.Input[str]] = None,
                     topic_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetEnTopicResult]
    func LookupEnTopic(ctx *Context, args *LookupEnTopicArgs, opts ...InvokeOption) (*LookupEnTopicResult, error)
    func LookupEnTopicOutput(ctx *Context, args *LookupEnTopicOutputArgs, opts ...InvokeOption) LookupEnTopicResultOutput

    > Note: This function is named LookupEnTopic in the Go SDK.

    public static class GetEnTopic 
    {
        public static Task<GetEnTopicResult> InvokeAsync(GetEnTopicArgs args, InvokeOptions? opts = null)
        public static Output<GetEnTopicResult> Invoke(GetEnTopicInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnTopicResult> getEnTopic(GetEnTopicArgs args, InvokeOptions options)
    public static Output<GetEnTopicResult> getEnTopic(GetEnTopicArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getEnTopic:getEnTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TopicId string
    Unique identifier for Topic.
    Id string
    (String) Subscription ID.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TopicId string
    Unique identifier for Topic.
    Id string
    (String) Subscription ID.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId String
    Unique identifier for Topic.
    id String
    (String) Subscription ID.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId string
    Unique identifier for Topic.
    id string
    (String) Subscription ID.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    topic_id str
    Unique identifier for Topic.
    id str
    (String) Subscription ID.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId String
    Unique identifier for Topic.
    id String
    (String) Subscription ID.

    getEnTopic Result

    The following output properties are available:

    Description string
    (String) Subscription description.
    Id string
    (String) Subscription ID.
    InstanceGuid string
    Name string
    (String) Subscription name.
    SourceCount double
    (Integer) Number of sources.
    Sources List<GetEnTopicSource>
    SubscriptionCount double
    (Integer) Number of subscriptions.
    Subscriptions List<GetEnTopicSubscription>
    (List) List of subscriptions.
    TopicId string
    (String) Topic ID.
    UpdatedAt string
    (String) Last time the topic was updated.
    Description string
    (String) Subscription description.
    Id string
    (String) Subscription ID.
    InstanceGuid string
    Name string
    (String) Subscription name.
    SourceCount float64
    (Integer) Number of sources.
    Sources []GetEnTopicSource
    SubscriptionCount float64
    (Integer) Number of subscriptions.
    Subscriptions []GetEnTopicSubscription
    (List) List of subscriptions.
    TopicId string
    (String) Topic ID.
    UpdatedAt string
    (String) Last time the topic was updated.
    description String
    (String) Subscription description.
    id String
    (String) Subscription ID.
    instanceGuid String
    name String
    (String) Subscription name.
    sourceCount Double
    (Integer) Number of sources.
    sources List<GetEnTopicSource>
    subscriptionCount Double
    (Integer) Number of subscriptions.
    subscriptions List<GetEnTopicSubscription>
    (List) List of subscriptions.
    topicId String
    (String) Topic ID.
    updatedAt String
    (String) Last time the topic was updated.
    description string
    (String) Subscription description.
    id string
    (String) Subscription ID.
    instanceGuid string
    name string
    (String) Subscription name.
    sourceCount number
    (Integer) Number of sources.
    sources GetEnTopicSource[]
    subscriptionCount number
    (Integer) Number of subscriptions.
    subscriptions GetEnTopicSubscription[]
    (List) List of subscriptions.
    topicId string
    (String) Topic ID.
    updatedAt string
    (String) Last time the topic was updated.
    description str
    (String) Subscription description.
    id str
    (String) Subscription ID.
    instance_guid str
    name str
    (String) Subscription name.
    source_count float
    (Integer) Number of sources.
    sources Sequence[GetEnTopicSource]
    subscription_count float
    (Integer) Number of subscriptions.
    subscriptions Sequence[GetEnTopicSubscription]
    (List) List of subscriptions.
    topic_id str
    (String) Topic ID.
    updated_at str
    (String) Last time the topic was updated.
    description String
    (String) Subscription description.
    id String
    (String) Subscription ID.
    instanceGuid String
    name String
    (String) Subscription name.
    sourceCount Number
    (Integer) Number of sources.
    sources List<Property Map>
    subscriptionCount Number
    (Integer) Number of subscriptions.
    subscriptions List<Property Map>
    (List) List of subscriptions.
    topicId String
    (String) Topic ID.
    updatedAt String
    (String) Last time the topic was updated.

    Supporting Types

    GetEnTopicSource

    Id string
    (String) Subscription ID.
    Name string
    (String) Subscription name.
    Rules List<GetEnTopicSourceRule>
    Id string
    (String) Subscription ID.
    Name string
    (String) Subscription name.
    Rules []GetEnTopicSourceRule
    id String
    (String) Subscription ID.
    name String
    (String) Subscription name.
    rules List<GetEnTopicSourceRule>
    id string
    (String) Subscription ID.
    name string
    (String) Subscription name.
    rules GetEnTopicSourceRule[]
    id str
    (String) Subscription ID.
    name str
    (String) Subscription name.
    rules Sequence[GetEnTopicSourceRule]
    id String
    (String) Subscription ID.
    name String
    (String) Subscription name.
    rules List<Property Map>

    GetEnTopicSourceRule

    Enabled bool
    EventScheduleFilters List<GetEnTopicSourceRuleEventScheduleFilter>
    EventTypeFilter string
    Id string
    (String) Subscription ID.
    NotificationFilter string
    UpdatedAt string
    (String) Last time the topic was updated.
    Enabled bool
    EventScheduleFilters []GetEnTopicSourceRuleEventScheduleFilter
    EventTypeFilter string
    Id string
    (String) Subscription ID.
    NotificationFilter string
    UpdatedAt string
    (String) Last time the topic was updated.
    enabled Boolean
    eventScheduleFilters List<GetEnTopicSourceRuleEventScheduleFilter>
    eventTypeFilter String
    id String
    (String) Subscription ID.
    notificationFilter String
    updatedAt String
    (String) Last time the topic was updated.
    enabled boolean
    eventScheduleFilters GetEnTopicSourceRuleEventScheduleFilter[]
    eventTypeFilter string
    id string
    (String) Subscription ID.
    notificationFilter string
    updatedAt string
    (String) Last time the topic was updated.
    enabled bool
    event_schedule_filters Sequence[GetEnTopicSourceRuleEventScheduleFilter]
    event_type_filter str
    id str
    (String) Subscription ID.
    notification_filter str
    updated_at str
    (String) Last time the topic was updated.
    enabled Boolean
    eventScheduleFilters List<Property Map>
    eventTypeFilter String
    id String
    (String) Subscription ID.
    notificationFilter String
    updatedAt String
    (String) Last time the topic was updated.

    GetEnTopicSourceRuleEventScheduleFilter

    EndsAt string
    Expression string
    StartsAt string
    EndsAt string
    Expression string
    StartsAt string
    endsAt String
    expression String
    startsAt String
    endsAt string
    expression string
    startsAt string
    endsAt String
    expression String
    startsAt String

    GetEnTopicSubscription

    Description string
    (String) Subscription description.
    DestinationId string
    (String) The destination ID.
    DestinationType string
    (String) The type of destination.
    Id string
    (String) Subscription ID.
    Name string
    (String) Subscription name.
    TopicId string
    Unique identifier for Topic.
    UpdatedAt string
    (String) Last time the topic was updated.
    Description string
    (String) Subscription description.
    DestinationId string
    (String) The destination ID.
    DestinationType string
    (String) The type of destination.
    Id string
    (String) Subscription ID.
    Name string
    (String) Subscription name.
    TopicId string
    Unique identifier for Topic.
    UpdatedAt string
    (String) Last time the topic was updated.
    description String
    (String) Subscription description.
    destinationId String
    (String) The destination ID.
    destinationType String
    (String) The type of destination.
    id String
    (String) Subscription ID.
    name String
    (String) Subscription name.
    topicId String
    Unique identifier for Topic.
    updatedAt String
    (String) Last time the topic was updated.
    description string
    (String) Subscription description.
    destinationId string
    (String) The destination ID.
    destinationType string
    (String) The type of destination.
    id string
    (String) Subscription ID.
    name string
    (String) Subscription name.
    topicId string
    Unique identifier for Topic.
    updatedAt string
    (String) Last time the topic was updated.
    description str
    (String) Subscription description.
    destination_id str
    (String) The destination ID.
    destination_type str
    (String) The type of destination.
    id str
    (String) Subscription ID.
    name str
    (String) Subscription name.
    topic_id str
    Unique identifier for Topic.
    updated_at str
    (String) Last time the topic was updated.
    description String
    (String) Subscription description.
    destinationId String
    (String) The destination ID.
    destinationType String
    (String) The type of destination.
    id String
    (String) Subscription ID.
    name String
    (String) Subscription name.
    topicId String
    Unique identifier for Topic.
    updatedAt String
    (String) Last time the topic was updated.

    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