1. Packages
  2. Ibm Provider
  3. API Docs
  4. getEnPreDefinedTemplates
ibm 1.83.0-beta0 published on Monday, Sep 15, 2025 by ibm-cloud

ibm.getEnPreDefinedTemplates

Explore with Pulumi AI

ibm logo
ibm 1.83.0-beta0 published on Monday, Sep 15, 2025 by ibm-cloud

    Provides a read-only data source for Pre Defined templates. 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 preDefinedTemplates = ibm.getEnPreDefinedTemplates({
        instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
        source: "logs",
        type: "slack.notification",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    pre_defined_templates = ibm.get_en_pre_defined_templates(instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
        source="logs",
        type="slack.notification")
    
    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.GetEnPreDefinedTemplates(ctx, &ibm.GetEnPreDefinedTemplatesArgs{
    			InstanceGuid: ibm_resource_instance.En_terraform_test_resource.Guid,
    			Source:       "logs",
    			Type:         "slack.notification",
    		}, 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 preDefinedTemplates = Ibm.GetEnPreDefinedTemplates.Invoke(new()
        {
            InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
            Source = "logs",
            Type = "slack.notification",
        });
    
    });
    
    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.GetEnPreDefinedTemplatesArgs;
    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 preDefinedTemplates = IbmFunctions.getEnPreDefinedTemplates(GetEnPreDefinedTemplatesArgs.builder()
                .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
                .source("logs")
                .type("slack.notification")
                .build());
    
        }
    }
    
    variables:
      preDefinedTemplates:
        fn::invoke:
          function: ibm:getEnPreDefinedTemplates
          arguments:
            instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
            source: logs
            type: slack.notification
    

    Using getEnPreDefinedTemplates

    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 getEnPreDefinedTemplates(args: GetEnPreDefinedTemplatesArgs, opts?: InvokeOptions): Promise<GetEnPreDefinedTemplatesResult>
    function getEnPreDefinedTemplatesOutput(args: GetEnPreDefinedTemplatesOutputArgs, opts?: InvokeOptions): Output<GetEnPreDefinedTemplatesResult>
    def get_en_pre_defined_templates(id: Optional[str] = None,
                                     instance_guid: Optional[str] = None,
                                     search_key: Optional[str] = None,
                                     source: Optional[str] = None,
                                     type: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetEnPreDefinedTemplatesResult
    def get_en_pre_defined_templates_output(id: Optional[pulumi.Input[str]] = None,
                                     instance_guid: Optional[pulumi.Input[str]] = None,
                                     search_key: Optional[pulumi.Input[str]] = None,
                                     source: Optional[pulumi.Input[str]] = None,
                                     type: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetEnPreDefinedTemplatesResult]
    func GetEnPreDefinedTemplates(ctx *Context, args *GetEnPreDefinedTemplatesArgs, opts ...InvokeOption) (*GetEnPreDefinedTemplatesResult, error)
    func GetEnPreDefinedTemplatesOutput(ctx *Context, args *GetEnPreDefinedTemplatesOutputArgs, opts ...InvokeOption) GetEnPreDefinedTemplatesResultOutput

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

    public static class GetEnPreDefinedTemplates 
    {
        public static Task<GetEnPreDefinedTemplatesResult> InvokeAsync(GetEnPreDefinedTemplatesArgs args, InvokeOptions? opts = null)
        public static Output<GetEnPreDefinedTemplatesResult> Invoke(GetEnPreDefinedTemplatesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnPreDefinedTemplatesResult> getEnPreDefinedTemplates(GetEnPreDefinedTemplatesArgs args, InvokeOptions options)
    public static Output<GetEnPreDefinedTemplatesResult> getEnPreDefinedTemplates(GetEnPreDefinedTemplatesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getEnPreDefinedTemplates:getEnPreDefinedTemplates
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Source string
    Source Type.
    Type string
    Template type.
    Id string
    The unique identifier of the pre_defined_templates.
    SearchKey string
    Filter the template by name or type.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Source string
    Source Type.
    Type string
    Template type.
    Id string
    The unique identifier of the pre_defined_templates.
    SearchKey string
    Filter the template by name or type.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    source String
    Source Type.
    type String
    Template type.
    id String
    The unique identifier of the pre_defined_templates.
    searchKey String
    Filter the template by name or type.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    source string
    Source Type.
    type string
    Template type.
    id string
    The unique identifier of the pre_defined_templates.
    searchKey string
    Filter the template by name or type.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    source str
    Source Type.
    type str
    Template type.
    id str
    The unique identifier of the pre_defined_templates.
    search_key str
    Filter the template by name or type.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    source String
    Source Type.
    type String
    Template type.
    id String
    The unique identifier of the pre_defined_templates.
    searchKey String
    Filter the template by name or type.

    getEnPreDefinedTemplates Result

    The following output properties are available:

    Id string
    The unique identifier of the pre_defined_templates.
    InstanceGuid string
    Source string
    (String) Source Type.
    Templates List<GetEnPreDefinedTemplatesTemplate>
    (List) List of templates.
    TotalCount double
    (Integer) Total number of destinations.
    Type string
    (String) Template type.
    SearchKey string
    Id string
    The unique identifier of the pre_defined_templates.
    InstanceGuid string
    Source string
    (String) Source Type.
    Templates []GetEnPreDefinedTemplatesTemplate
    (List) List of templates.
    TotalCount float64
    (Integer) Total number of destinations.
    Type string
    (String) Template type.
    SearchKey string
    id String
    The unique identifier of the pre_defined_templates.
    instanceGuid String
    source String
    (String) Source Type.
    templates List<GetEnPreDefinedTemplatesTemplate>
    (List) List of templates.
    totalCount Double
    (Integer) Total number of destinations.
    type String
    (String) Template type.
    searchKey String
    id string
    The unique identifier of the pre_defined_templates.
    instanceGuid string
    source string
    (String) Source Type.
    templates GetEnPreDefinedTemplatesTemplate[]
    (List) List of templates.
    totalCount number
    (Integer) Total number of destinations.
    type string
    (String) Template type.
    searchKey string
    id str
    The unique identifier of the pre_defined_templates.
    instance_guid str
    source str
    (String) Source Type.
    templates Sequence[GetEnPreDefinedTemplatesTemplate]
    (List) List of templates.
    total_count float
    (Integer) Total number of destinations.
    type str
    (String) Template type.
    search_key str
    id String
    The unique identifier of the pre_defined_templates.
    instanceGuid String
    source String
    (String) Source Type.
    templates List<Property Map>
    (List) List of templates.
    totalCount Number
    (Integer) Total number of destinations.
    type String
    (String) Template type.
    searchKey String

    Supporting Types

    GetEnPreDefinedTemplatesTemplate

    Description string
    (String) The template description.
    Id string
    The unique identifier of the pre_defined_templates.
    Name string
    (String) The Template name.
    Source string
    Source Type.
    Type string
    Template type.
    UpdatedAt string
    (String) Last updated time.
    Description string
    (String) The template description.
    Id string
    The unique identifier of the pre_defined_templates.
    Name string
    (String) The Template name.
    Source string
    Source Type.
    Type string
    Template type.
    UpdatedAt string
    (String) Last updated time.
    description String
    (String) The template description.
    id String
    The unique identifier of the pre_defined_templates.
    name String
    (String) The Template name.
    source String
    Source Type.
    type String
    Template type.
    updatedAt String
    (String) Last updated time.
    description string
    (String) The template description.
    id string
    The unique identifier of the pre_defined_templates.
    name string
    (String) The Template name.
    source string
    Source Type.
    type string
    Template type.
    updatedAt string
    (String) Last updated time.
    description str
    (String) The template description.
    id str
    The unique identifier of the pre_defined_templates.
    name str
    (String) The Template name.
    source str
    Source Type.
    type str
    Template type.
    updated_at str
    (String) Last updated time.
    description String
    (String) The template description.
    id String
    The unique identifier of the pre_defined_templates.
    name String
    (String) The Template name.
    source String
    Source Type.
    type String
    Template type.
    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.
    ibm logo
    ibm 1.83.0-beta0 published on Monday, Sep 15, 2025 by ibm-cloud