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

ibm.getEnEmailTemplates

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 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 emailTemplates = ibm.getEnEmailTemplates({
        instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    email_templates = ibm.get_en_email_templates(instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"])
    
    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.GetEnEmailTemplates(ctx, &ibm.GetEnEmailTemplatesArgs{
    			InstanceGuid: ibm_resource_instance.En_terraform_test_resource.Guid,
    		}, 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 emailTemplates = Ibm.GetEnEmailTemplates.Invoke(new()
        {
            InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
        });
    
    });
    
    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.GetEnEmailTemplatesArgs;
    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 emailTemplates = IbmFunctions.getEnEmailTemplates(GetEnEmailTemplatesArgs.builder()
                .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
                .build());
    
        }
    }
    
    variables:
      emailTemplates:
        fn::invoke:
          function: ibm:getEnEmailTemplates
          arguments:
            instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
    

    Using getEnEmailTemplates

    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 getEnEmailTemplates(args: GetEnEmailTemplatesArgs, opts?: InvokeOptions): Promise<GetEnEmailTemplatesResult>
    function getEnEmailTemplatesOutput(args: GetEnEmailTemplatesOutputArgs, opts?: InvokeOptions): Output<GetEnEmailTemplatesResult>
    def get_en_email_templates(id: Optional[str] = None,
                               instance_guid: Optional[str] = None,
                               search_key: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetEnEmailTemplatesResult
    def get_en_email_templates_output(id: Optional[pulumi.Input[str]] = None,
                               instance_guid: Optional[pulumi.Input[str]] = None,
                               search_key: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetEnEmailTemplatesResult]
    func GetEnEmailTemplates(ctx *Context, args *GetEnEmailTemplatesArgs, opts ...InvokeOption) (*GetEnEmailTemplatesResult, error)
    func GetEnEmailTemplatesOutput(ctx *Context, args *GetEnEmailTemplatesOutputArgs, opts ...InvokeOption) GetEnEmailTemplatesResultOutput

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

    public static class GetEnEmailTemplates 
    {
        public static Task<GetEnEmailTemplatesResult> InvokeAsync(GetEnEmailTemplatesArgs args, InvokeOptions? opts = null)
        public static Output<GetEnEmailTemplatesResult> Invoke(GetEnEmailTemplatesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnEmailTemplatesResult> getEnEmailTemplates(GetEnEmailTemplatesArgs args, InvokeOptions options)
    public static Output<GetEnEmailTemplatesResult> getEnEmailTemplates(GetEnEmailTemplatesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getEnEmailTemplates:getEnEmailTemplates
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getEnEmailTemplates Result

    The following output properties are available:

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

    Supporting Types

    GetEnEmailTemplatesTemplate

    Description string
    (String) The template description.
    Id string
    The unique identifier of the email_templates.
    Name string
    (String) The Template name.
    SubscriptionCount double
    (Integer) Number of subscriptions.
    SubscriptionNames List<string>
    (List) List of subscriptions.
    Type string
    (String) Template type smtp_custom.notification/smtp_custom.invitation.
    UpdatedAt string
    (String) Last updated time.
    Description string
    (String) The template description.
    Id string
    The unique identifier of the email_templates.
    Name string
    (String) The Template name.
    SubscriptionCount float64
    (Integer) Number of subscriptions.
    SubscriptionNames []string
    (List) List of subscriptions.
    Type string
    (String) Template type smtp_custom.notification/smtp_custom.invitation.
    UpdatedAt string
    (String) Last updated time.
    description String
    (String) The template description.
    id String
    The unique identifier of the email_templates.
    name String
    (String) The Template name.
    subscriptionCount Double
    (Integer) Number of subscriptions.
    subscriptionNames List<String>
    (List) List of subscriptions.
    type String
    (String) Template type smtp_custom.notification/smtp_custom.invitation.
    updatedAt String
    (String) Last updated time.
    description string
    (String) The template description.
    id string
    The unique identifier of the email_templates.
    name string
    (String) The Template name.
    subscriptionCount number
    (Integer) Number of subscriptions.
    subscriptionNames string[]
    (List) List of subscriptions.
    type string
    (String) Template type smtp_custom.notification/smtp_custom.invitation.
    updatedAt string
    (String) Last updated time.
    description str
    (String) The template description.
    id str
    The unique identifier of the email_templates.
    name str
    (String) The Template name.
    subscription_count float
    (Integer) Number of subscriptions.
    subscription_names Sequence[str]
    (List) List of subscriptions.
    type str
    (String) Template type smtp_custom.notification/smtp_custom.invitation.
    updated_at str
    (String) Last updated time.
    description String
    (String) The template description.
    id String
    The unique identifier of the email_templates.
    name String
    (String) The Template name.
    subscriptionCount Number
    (Integer) Number of subscriptions.
    subscriptionNames List<String>
    (List) List of subscriptions.
    type String
    (String) Template type smtp_custom.notification/smtp_custom.invitation.
    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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud