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

ibm.getEnSlackTemplate

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 Slack template. 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 slackTemplate = ibm.getEnSlackTemplate({
        instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
        templateId: ibm_en_slack_template.en_slack_template.template_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    slack_template = ibm.get_en_slack_template(instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
        template_id=ibm_en_slack_template["en_slack_template"]["template_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.LookupEnSlackTemplate(ctx, &ibm.LookupEnSlackTemplateArgs{
    			InstanceGuid: ibm_resource_instance.En_terraform_test_resource.Guid,
    			TemplateId:   ibm_en_slack_template.En_slack_template.Template_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 slackTemplate = Ibm.GetEnSlackTemplate.Invoke(new()
        {
            InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
            TemplateId = ibm_en_slack_template.En_slack_template.Template_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.GetEnSlackTemplateArgs;
    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 slackTemplate = IbmFunctions.getEnSlackTemplate(GetEnSlackTemplateArgs.builder()
                .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
                .templateId(ibm_en_slack_template.en_slack_template().template_id())
                .build());
    
        }
    }
    
    variables:
      slackTemplate:
        fn::invoke:
          function: ibm:getEnSlackTemplate
          arguments:
            instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
            templateId: ${ibm_en_slack_template.en_slack_template.template_id}
    

    Using getEnSlackTemplate

    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 getEnSlackTemplate(args: GetEnSlackTemplateArgs, opts?: InvokeOptions): Promise<GetEnSlackTemplateResult>
    function getEnSlackTemplateOutput(args: GetEnSlackTemplateOutputArgs, opts?: InvokeOptions): Output<GetEnSlackTemplateResult>
    def get_en_slack_template(id: Optional[str] = None,
                              instance_guid: Optional[str] = None,
                              template_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetEnSlackTemplateResult
    def get_en_slack_template_output(id: Optional[pulumi.Input[str]] = None,
                              instance_guid: Optional[pulumi.Input[str]] = None,
                              template_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetEnSlackTemplateResult]
    func LookupEnSlackTemplate(ctx *Context, args *LookupEnSlackTemplateArgs, opts ...InvokeOption) (*LookupEnSlackTemplateResult, error)
    func LookupEnSlackTemplateOutput(ctx *Context, args *LookupEnSlackTemplateOutputArgs, opts ...InvokeOption) LookupEnSlackTemplateResultOutput

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

    public static class GetEnSlackTemplate 
    {
        public static Task<GetEnSlackTemplateResult> InvokeAsync(GetEnSlackTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetEnSlackTemplateResult> Invoke(GetEnSlackTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnSlackTemplateResult> getEnSlackTemplate(GetEnSlackTemplateArgs args, InvokeOptions options)
    public static Output<GetEnSlackTemplateResult> getEnSlackTemplate(GetEnSlackTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getEnSlackTemplate:getEnSlackTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TemplateId string
    Unique identifier for Template.
    Id string
    The unique identifier of the slack_template.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TemplateId string
    Unique identifier for Template.
    Id string
    The unique identifier of the slack_template.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    templateId String
    Unique identifier for Template.
    id String
    The unique identifier of the slack_template.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    templateId string
    Unique identifier for Template.
    id string
    The unique identifier of the slack_template.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    template_id str
    Unique identifier for Template.
    id str
    The unique identifier of the slack_template.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    templateId String
    Unique identifier for Template.
    id String
    The unique identifier of the slack_template.

    getEnSlackTemplate Result

    The following output properties are available:

    Description string
    (String) The template description.
    Id string
    The unique identifier of the slack_template.
    InstanceGuid string
    Name string
    (String) The Template name.
    SubscriptionCount double
    (Integer) Number of subscriptions.
    SubscriptionNames List<string>
    (List) List of subscriptions.
    TemplateId string
    Type string
    (String) Template type slack.notification.
    UpdatedAt string
    (String) Last updated time.
    Description string
    (String) The template description.
    Id string
    The unique identifier of the slack_template.
    InstanceGuid string
    Name string
    (String) The Template name.
    SubscriptionCount float64
    (Integer) Number of subscriptions.
    SubscriptionNames []string
    (List) List of subscriptions.
    TemplateId string
    Type string
    (String) Template type slack.notification.
    UpdatedAt string
    (String) Last updated time.
    description String
    (String) The template description.
    id String
    The unique identifier of the slack_template.
    instanceGuid String
    name String
    (String) The Template name.
    subscriptionCount Double
    (Integer) Number of subscriptions.
    subscriptionNames List<String>
    (List) List of subscriptions.
    templateId String
    type String
    (String) Template type slack.notification.
    updatedAt String
    (String) Last updated time.
    description string
    (String) The template description.
    id string
    The unique identifier of the slack_template.
    instanceGuid string
    name string
    (String) The Template name.
    subscriptionCount number
    (Integer) Number of subscriptions.
    subscriptionNames string[]
    (List) List of subscriptions.
    templateId string
    type string
    (String) Template type slack.notification.
    updatedAt string
    (String) Last updated time.
    description str
    (String) The template description.
    id str
    The unique identifier of the slack_template.
    instance_guid str
    name str
    (String) The Template name.
    subscription_count float
    (Integer) Number of subscriptions.
    subscription_names Sequence[str]
    (List) List of subscriptions.
    template_id str
    type str
    (String) Template type slack.notification.
    updated_at str
    (String) Last updated time.
    description String
    (String) The template description.
    id String
    The unique identifier of the slack_template.
    instanceGuid String
    name String
    (String) The Template name.
    subscriptionCount Number
    (Integer) Number of subscriptions.
    subscriptionNames List<String>
    (List) List of subscriptions.
    templateId String
    type String
    (String) Template type slack.notification.
    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