1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getEnSource
Viewing docs for ibm 2.3.0
published on Friday, Jun 19, 2026 by ibm-cloud
Viewing docs for ibm 2.3.0
published on Friday, Jun 19, 2026 by ibm-cloud

    Provides a read-only data source for API sources. 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 enSource = ibm.getEnSource({
        instanceGuid: enTerraformTestResource.guid,
        sourceId: destination1.sourceId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    en_source = ibm.get_en_source(instance_guid=en_terraform_test_resource["guid"],
        source_id=destination1["sourceId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupEnSource(ctx, &ibm.LookupEnSourceArgs{
    			InstanceGuid: enTerraformTestResource.Guid,
    			SourceId:     destination1.SourceId,
    		}, 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 enSource = Ibm.GetEnSource.Invoke(new()
        {
            InstanceGuid = enTerraformTestResource.Guid,
            SourceId = destination1.SourceId,
        });
    
    });
    
    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.GetEnSourceArgs;
    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 enSource = IbmFunctions.getEnSource(GetEnSourceArgs.builder()
                .instanceGuid(enTerraformTestResource.guid())
                .sourceId(destination1.sourceId())
                .build());
    
        }
    }
    
    variables:
      enSource:
        fn::invoke:
          function: ibm:getEnSource
          arguments:
            instanceGuid: ${enTerraformTestResource.guid}
            sourceId: ${destination1.sourceId}
    
    Example coming soon!
    

    Using getEnSource

    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 getEnSource(args: GetEnSourceArgs, opts?: InvokeOptions): Promise<GetEnSourceResult>
    function getEnSourceOutput(args: GetEnSourceOutputArgs, opts?: InvokeOptions): Output<GetEnSourceResult>
    def get_en_source(id: Optional[str] = None,
                      instance_guid: Optional[str] = None,
                      source_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetEnSourceResult
    def get_en_source_output(id: pulumi.Input[Optional[str]] = None,
                      instance_guid: pulumi.Input[Optional[str]] = None,
                      source_id: pulumi.Input[Optional[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetEnSourceResult]
    func LookupEnSource(ctx *Context, args *LookupEnSourceArgs, opts ...InvokeOption) (*LookupEnSourceResult, error)
    func LookupEnSourceOutput(ctx *Context, args *LookupEnSourceOutputArgs, opts ...InvokeOption) LookupEnSourceResultOutput

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

    public static class GetEnSource 
    {
        public static Task<GetEnSourceResult> InvokeAsync(GetEnSourceArgs args, InvokeOptions? opts = null)
        public static Output<GetEnSourceResult> Invoke(GetEnSourceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnSourceResult> getEnSource(GetEnSourceArgs args, InvokeOptions options)
    public static Output<GetEnSourceResult> getEnSource(GetEnSourceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getEnSource:getEnSource
      arguments:
        # arguments dictionary
    data "ibm_getensource" "name" {
        # arguments
    }

    The following arguments are supported:

    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    SourceId string
    Unique identifier for API Source.
    Id string
    The unique identifier of the en_source.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    SourceId string
    Unique identifier for API Source.
    Id string
    The unique identifier of the en_source.
    instance_guid string
    Unique identifier for IBM Cloud Event Notifications instance.
    source_id string
    Unique identifier for API Source.
    id string
    The unique identifier of the en_source.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    sourceId String
    Unique identifier for API Source.
    id String
    The unique identifier of the en_source.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    sourceId string
    Unique identifier for API Source.
    id string
    The unique identifier of the en_source.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    source_id str
    Unique identifier for API Source.
    id str
    The unique identifier of the en_source.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    sourceId String
    Unique identifier for API Source.
    id String
    The unique identifier of the en_source.

    getEnSource Result

    The following output properties are available:

    Description string
    (String) Source description.
    Enabled bool
    (bool) Flag to enable/disable the api source.
    Id string
    The unique identifier of the en_source.
    InstanceGuid string
    Name string
    (String) Source name.
    SourceId string
    StoreNotifications bool
    (Optional, bool) enable to view the payload of incoming events for troubleshooting.
    UpdatedAt string
    (String) Last updated time.
    Description string
    (String) Source description.
    Enabled bool
    (bool) Flag to enable/disable the api source.
    Id string
    The unique identifier of the en_source.
    InstanceGuid string
    Name string
    (String) Source name.
    SourceId string
    StoreNotifications bool
    (Optional, bool) enable to view the payload of incoming events for troubleshooting.
    UpdatedAt string
    (String) Last updated time.
    description string
    (String) Source description.
    enabled bool
    (bool) Flag to enable/disable the api source.
    id string
    The unique identifier of the en_source.
    instance_guid string
    name string
    (String) Source name.
    source_id string
    store_notifications bool
    (Optional, bool) enable to view the payload of incoming events for troubleshooting.
    updated_at string
    (String) Last updated time.
    description String
    (String) Source description.
    enabled Boolean
    (bool) Flag to enable/disable the api source.
    id String
    The unique identifier of the en_source.
    instanceGuid String
    name String
    (String) Source name.
    sourceId String
    storeNotifications Boolean
    (Optional, bool) enable to view the payload of incoming events for troubleshooting.
    updatedAt String
    (String) Last updated time.
    description string
    (String) Source description.
    enabled boolean
    (bool) Flag to enable/disable the api source.
    id string
    The unique identifier of the en_source.
    instanceGuid string
    name string
    (String) Source name.
    sourceId string
    storeNotifications boolean
    (Optional, bool) enable to view the payload of incoming events for troubleshooting.
    updatedAt string
    (String) Last updated time.
    description str
    (String) Source description.
    enabled bool
    (bool) Flag to enable/disable the api source.
    id str
    The unique identifier of the en_source.
    instance_guid str
    name str
    (String) Source name.
    source_id str
    store_notifications bool
    (Optional, bool) enable to view the payload of incoming events for troubleshooting.
    updated_at str
    (String) Last updated time.
    description String
    (String) Source description.
    enabled Boolean
    (bool) Flag to enable/disable the api source.
    id String
    The unique identifier of the en_source.
    instanceGuid String
    name String
    (String) Source name.
    sourceId String
    storeNotifications Boolean
    (Optional, bool) enable to view the payload of incoming events for troubleshooting.
    updatedAt String
    (String) Last updated time.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    Viewing docs for ibm 2.3.0
    published on Friday, Jun 19, 2026 by ibm-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial