1. Packages
  2. Incident Provider
  3. API Docs
  4. getCatalogEntries
incident 5.12.0 published on Friday, Jul 25, 2025 by incident-io

incident.getCatalogEntries

Explore with Pulumi AI

incident logo
incident 5.12.0 published on Friday, Jul 25, 2025 by incident-io

    This data source provides a list of catalog entries for a specific catalog type.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@pulumi/incident";
    
    const services = incident.getCatalogEntries({
        catalogTypeId: "01FCNDV6P870EA6S7TK1DSYDG0",
    });
    export const serviceNames = services.then(services => .map(entry => (entry.name)));
    export const servicesWithExternalId = services.then(services => .filter(entry => entry.externalId != "").map(entry => ({
        name: entry.name,
        external_id: entry.externalId,
    })));
    export const serviceAliases = services.then(services => .filter(entry => entry.aliases.length > 0).reduce((__obj, entry) => ({ ...__obj, [entry.name]: entry.aliases })));
    
    import pulumi
    import pulumi_incident as incident
    
    services = incident.get_catalog_entries(catalog_type_id="01FCNDV6P870EA6S7TK1DSYDG0")
    pulumi.export("serviceNames", [entry.name for entry in services.catalog_entries])
    pulumi.export("servicesWithExternalId", [{
        "name": entry.name,
        "external_id": entry.external_id,
    } for entry in services.catalog_entries if entry.external_id != ""])
    pulumi.export("serviceAliases", {entry.name: entry.aliases for entry in services.catalog_entries if len(entry.aliases) > 0})
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v5/incident"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    services, err := incident.LookupCatalogEntries(ctx, &incident.LookupCatalogEntriesArgs{
    CatalogTypeId: "01FCNDV6P870EA6S7TK1DSYDG0",
    }, nil);
    if err != nil {
    return err
    }
    ctx.Export("serviceNames", pulumi.StringArray("TODO: For expression"))
    ctx.Export("servicesWithExternalId", pulumi.StringMapArray("TODO: For expression"))
    ctx.Export("serviceAliases", pulumi.Interface{}Map("TODO: For expression"))
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incident = Pulumi.Incident;
    
    return await Deployment.RunAsync(() => 
    {
        var services = Incident.GetCatalogEntries.Invoke(new()
        {
            CatalogTypeId = "01FCNDV6P870EA6S7TK1DSYDG0",
        });
    
        return new Dictionary<string, object?>
        {
            ["serviceNames"] = .Select(entry => 
            {
                return entry.Name;
            }).ToList(),
            ["servicesWithExternalId"] = .Where(entry => entry.ExternalId != "").Select(entry => 
            {
                return 
                {
                    { "name", entry.Name },
                    { "external_id", entry.ExternalId },
                };
            }).ToList(),
            ["serviceAliases"] = .ToDictionary(item => {
                var entry = item.Value;
                return entry.Name;
            }, item => {
                var entry = item.Value;
                return entry.Aliases;
            }),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incident.IncidentFunctions;
    import com.pulumi.incident.inputs.GetCatalogEntriesArgs;
    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 services = IncidentFunctions.getCatalogEntries(GetCatalogEntriesArgs.builder()
                .catalogTypeId("01FCNDV6P870EA6S7TK1DSYDG0")
                .build());
    
            ctx.export("serviceNames", "TODO: ForExpression");
            ctx.export("servicesWithExternalId", "TODO: ForExpression");
            ctx.export("serviceAliases", "TODO: ForExpression");
        }
    }
    
    Example coming soon!
    

    Using getCatalogEntries

    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 getCatalogEntries(args: GetCatalogEntriesArgs, opts?: InvokeOptions): Promise<GetCatalogEntriesResult>
    function getCatalogEntriesOutput(args: GetCatalogEntriesOutputArgs, opts?: InvokeOptions): Output<GetCatalogEntriesResult>
    def get_catalog_entries(catalog_type_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetCatalogEntriesResult
    def get_catalog_entries_output(catalog_type_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetCatalogEntriesResult]
    func LookupCatalogEntries(ctx *Context, args *LookupCatalogEntriesArgs, opts ...InvokeOption) (*LookupCatalogEntriesResult, error)
    func LookupCatalogEntriesOutput(ctx *Context, args *LookupCatalogEntriesOutputArgs, opts ...InvokeOption) LookupCatalogEntriesResultOutput

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

    public static class GetCatalogEntries 
    {
        public static Task<GetCatalogEntriesResult> InvokeAsync(GetCatalogEntriesArgs args, InvokeOptions? opts = null)
        public static Output<GetCatalogEntriesResult> Invoke(GetCatalogEntriesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCatalogEntriesResult> getCatalogEntries(GetCatalogEntriesArgs args, InvokeOptions options)
    public static Output<GetCatalogEntriesResult> getCatalogEntries(GetCatalogEntriesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: incident:index/getCatalogEntries:getCatalogEntries
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CatalogTypeId string
    The catalog type ID to list entries for.
    CatalogTypeId string
    The catalog type ID to list entries for.
    catalogTypeId String
    The catalog type ID to list entries for.
    catalogTypeId string
    The catalog type ID to list entries for.
    catalog_type_id str
    The catalog type ID to list entries for.
    catalogTypeId String
    The catalog type ID to list entries for.

    getCatalogEntries Result

    The following output properties are available:

    CatalogEntries List<GetCatalogEntriesCatalogEntry>
    List of catalog entries for the specified catalog type.
    CatalogTypeId string
    The catalog type ID to list entries for.
    Id string
    The provider-assigned unique ID for this managed resource.
    CatalogEntries []GetCatalogEntriesCatalogEntry
    List of catalog entries for the specified catalog type.
    CatalogTypeId string
    The catalog type ID to list entries for.
    Id string
    The provider-assigned unique ID for this managed resource.
    catalogEntries List<GetCatalogEntriesCatalogEntry>
    List of catalog entries for the specified catalog type.
    catalogTypeId String
    The catalog type ID to list entries for.
    id String
    The provider-assigned unique ID for this managed resource.
    catalogEntries GetCatalogEntriesCatalogEntry[]
    List of catalog entries for the specified catalog type.
    catalogTypeId string
    The catalog type ID to list entries for.
    id string
    The provider-assigned unique ID for this managed resource.
    catalog_entries Sequence[GetCatalogEntriesCatalogEntry]
    List of catalog entries for the specified catalog type.
    catalog_type_id str
    The catalog type ID to list entries for.
    id str
    The provider-assigned unique ID for this managed resource.
    catalogEntries List<Property Map>
    List of catalog entries for the specified catalog type.
    catalogTypeId String
    The catalog type ID to list entries for.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GetCatalogEntriesCatalogEntry

    Aliases List<string>
    Optional aliases that can be used to reference this entry
    AttributeValues List<GetCatalogEntriesCatalogEntryAttributeValue>
    CatalogTypeId string
    ID of this catalog type
    ExternalId string
    An optional alternative ID for this entry, which is ensured to be unique for the type
    Id string
    ID of this catalog entry
    Name string
    Name is the human readable name of this entry
    Rank double
    When catalog type is ranked, this is used to help order things
    Aliases []string
    Optional aliases that can be used to reference this entry
    AttributeValues []GetCatalogEntriesCatalogEntryAttributeValue
    CatalogTypeId string
    ID of this catalog type
    ExternalId string
    An optional alternative ID for this entry, which is ensured to be unique for the type
    Id string
    ID of this catalog entry
    Name string
    Name is the human readable name of this entry
    Rank float64
    When catalog type is ranked, this is used to help order things
    aliases List<String>
    Optional aliases that can be used to reference this entry
    attributeValues List<GetCatalogEntriesCatalogEntryAttributeValue>
    catalogTypeId String
    ID of this catalog type
    externalId String
    An optional alternative ID for this entry, which is ensured to be unique for the type
    id String
    ID of this catalog entry
    name String
    Name is the human readable name of this entry
    rank Double
    When catalog type is ranked, this is used to help order things
    aliases string[]
    Optional aliases that can be used to reference this entry
    attributeValues GetCatalogEntriesCatalogEntryAttributeValue[]
    catalogTypeId string
    ID of this catalog type
    externalId string
    An optional alternative ID for this entry, which is ensured to be unique for the type
    id string
    ID of this catalog entry
    name string
    Name is the human readable name of this entry
    rank number
    When catalog type is ranked, this is used to help order things
    aliases Sequence[str]
    Optional aliases that can be used to reference this entry
    attribute_values Sequence[GetCatalogEntriesCatalogEntryAttributeValue]
    catalog_type_id str
    ID of this catalog type
    external_id str
    An optional alternative ID for this entry, which is ensured to be unique for the type
    id str
    ID of this catalog entry
    name str
    Name is the human readable name of this entry
    rank float
    When catalog type is ranked, this is used to help order things
    aliases List<String>
    Optional aliases that can be used to reference this entry
    attributeValues List<Property Map>
    catalogTypeId String
    ID of this catalog type
    externalId String
    An optional alternative ID for this entry, which is ensured to be unique for the type
    id String
    ID of this catalog entry
    name String
    Name is the human readable name of this entry
    rank Number
    When catalog type is ranked, this is used to help order things

    GetCatalogEntriesCatalogEntryAttributeValue

    ArrayValues List<string>
    The value of this element of the array, in a format suitable for this attribute type.
    Attribute string
    The ID of this attribute.
    Value string
    The value of this attribute, in a format suitable for this attribute type.
    ArrayValues []string
    The value of this element of the array, in a format suitable for this attribute type.
    Attribute string
    The ID of this attribute.
    Value string
    The value of this attribute, in a format suitable for this attribute type.
    arrayValues List<String>
    The value of this element of the array, in a format suitable for this attribute type.
    attribute String
    The ID of this attribute.
    value String
    The value of this attribute, in a format suitable for this attribute type.
    arrayValues string[]
    The value of this element of the array, in a format suitable for this attribute type.
    attribute string
    The ID of this attribute.
    value string
    The value of this attribute, in a format suitable for this attribute type.
    array_values Sequence[str]
    The value of this element of the array, in a format suitable for this attribute type.
    attribute str
    The ID of this attribute.
    value str
    The value of this attribute, in a format suitable for this attribute type.
    arrayValues List<String>
    The value of this element of the array, in a format suitable for this attribute type.
    attribute String
    The ID of this attribute.
    value String
    The value of this attribute, in a format suitable for this attribute type.

    Package Details

    Repository
    incident incident-io/terraform-provider-incident
    License
    Notes
    This Pulumi package is based on the incident Terraform Provider.
    incident logo
    incident 5.12.0 published on Friday, Jul 25, 2025 by incident-io