ibm 1.83.0-beta0 published on Monday, Sep 15, 2025 by ibm-cloud
ibm.getEnPreDefinedTemplates
Explore with Pulumi AI
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:
- Instance
Guid 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
. - Search
Key string - Filter the template by name or type.
- Instance
Guid 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
. - Search
Key string - Filter the template by name or type.
- instance
Guid 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
. - search
Key String - Filter the template by name or type.
- instance
Guid 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
. - search
Key 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.
- instance
Guid 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
. - search
Key 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
. - Instance
Guid string - Source string
- (String) Source Type.
- Templates
List<Get
En Pre Defined Templates Template> - (List) List of templates.
- Total
Count double - (Integer) Total number of destinations.
- Type string
- (String) Template type.
- Search
Key string
- Id string
- The unique identifier of the
pre_defined_templates
. - Instance
Guid string - Source string
- (String) Source Type.
- Templates
[]Get
En Pre Defined Templates Template - (List) List of templates.
- Total
Count float64 - (Integer) Total number of destinations.
- Type string
- (String) Template type.
- Search
Key string
- id String
- The unique identifier of the
pre_defined_templates
. - instance
Guid String - source String
- (String) Source Type.
- templates
List<Get
En Pre Defined Templates Template> - (List) List of templates.
- total
Count Double - (Integer) Total number of destinations.
- type String
- (String) Template type.
- search
Key String
- id string
- The unique identifier of the
pre_defined_templates
. - instance
Guid string - source string
- (String) Source Type.
- templates
Get
En Pre Defined Templates Template[] - (List) List of templates.
- total
Count number - (Integer) Total number of destinations.
- type string
- (String) Template type.
- search
Key string
- id str
- The unique identifier of the
pre_defined_templates
. - instance_
guid str - source str
- (String) Source Type.
- templates
Sequence[Get
En Pre Defined Templates Template] - (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
. - instance
Guid String - source String
- (String) Source Type.
- templates List<Property Map>
- (List) List of templates.
- total
Count Number - (Integer) Total number of destinations.
- type String
- (String) Template type.
- search
Key String
Supporting Types
GetEnPreDefinedTemplatesTemplate
- 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.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.