1. Registry
  2. Packages
  3. Incident Provider
  4. API Docs
  5. getIncidentType
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@pulumi/incident";
    
    // Look up an incident type by name. Incident types are configured in your
    // settings rather than created from Terraform, so this is how you get hold of
    // one's ID.
    const productionOutage = incident.getIncidentType({
        name: "Production Outage",
    });
    // Or by ID, if you already have one.
    const byId = incident.getIncidentType({
        id: "01FCNDV6P870EA6S7TK1DSYDG0",
    });
    export const productionOutageId = productionOutage.then(productionOutage => productionOutage.id);
    
    import pulumi
    import pulumi_incident as incident
    
    # Look up an incident type by name. Incident types are configured in your
    # settings rather than created from Terraform, so this is how you get hold of
    # one's ID.
    production_outage = incident.get_incident_type(name="Production Outage")
    # Or by ID, if you already have one.
    by_id = incident.get_incident_type(id="01FCNDV6P870EA6S7TK1DSYDG0")
    pulumi.export("productionOutageId", production_outage.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v7/incident"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Look up an incident type by name. Incident types are configured in your
    		// settings rather than created from Terraform, so this is how you get hold of
    		// one's ID.
    		productionOutage, err := incident.GetIncidentType(ctx, &incident.GetIncidentTypeArgs{
    			Name: pulumi.StringRef("Production Outage"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Or by ID, if you already have one.
    		_, err = incident.GetIncidentType(ctx, &incident.GetIncidentTypeArgs{
    			Id: pulumi.StringRef("01FCNDV6P870EA6S7TK1DSYDG0"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("productionOutageId", productionOutage.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incident = Pulumi.Incident;
    
    return await Deployment.RunAsync(() => 
    {
        // Look up an incident type by name. Incident types are configured in your
        // settings rather than created from Terraform, so this is how you get hold of
        // one's ID.
        var productionOutage = Incident.GetIncidentType.Invoke(new()
        {
            Name = "Production Outage",
        });
    
        // Or by ID, if you already have one.
        var byId = Incident.GetIncidentType.Invoke(new()
        {
            Id = "01FCNDV6P870EA6S7TK1DSYDG0",
        });
    
        return new Dictionary<string, object?>
        {
            ["productionOutageId"] = productionOutage.Apply(getIncidentTypeResult => getIncidentTypeResult.Id),
        };
    });
    
    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.GetIncidentTypeArgs;
    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) {
            // Look up an incident type by name. Incident types are configured in your
            // settings rather than created from Terraform, so this is how you get hold of
            // one's ID.
            final var productionOutage = IncidentFunctions.getIncidentType(GetIncidentTypeArgs.builder()
                .name("Production Outage")
                .build());
    
            // Or by ID, if you already have one.
            final var byId = IncidentFunctions.getIncidentType(GetIncidentTypeArgs.builder()
                .id("01FCNDV6P870EA6S7TK1DSYDG0")
                .build());
    
            ctx.export("productionOutageId", productionOutage.id());
        }
    }
    
    variables:
      # Look up an incident type by name. Incident types are configured in your
      # settings rather than created from Terraform, so this is how you get hold of
      # one's ID.
      productionOutage:
        fn::invoke:
          function: incident:getIncidentType
          arguments:
            name: Production Outage
      # Or by ID, if you already have one.
      byId:
        fn::invoke:
          function: incident:getIncidentType
          arguments:
            id: 01FCNDV6P870EA6S7TK1DSYDG0
    outputs:
      productionOutageId: ${productionOutage.id}
    
    Example coming soon!
    

    Using getIncidentType

    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 getIncidentType(args: GetIncidentTypeArgs, opts?: InvokeOptions): Promise<GetIncidentTypeResult>
    function getIncidentTypeOutput(args: GetIncidentTypeOutputArgs, opts?: InvokeOutputOptions): Output<GetIncidentTypeResult>
    def get_incident_type(id: Optional[str] = None,
                          name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetIncidentTypeResult
    def get_incident_type_output(id: pulumi.Input[Optional[str]] = None,
                          name: pulumi.Input[Optional[str]] = None,
                          opts: Optional[InvokeOutputOptions] = None) -> Output[GetIncidentTypeResult]
    func GetIncidentType(ctx *Context, args *GetIncidentTypeArgs, opts ...InvokeOption) (*GetIncidentTypeResult, error)
    func GetIncidentTypeOutput(ctx *Context, args *GetIncidentTypeOutputArgs, opts ...InvokeOption) GetIncidentTypeResultOutput

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

    public static class GetIncidentType 
    {
        public static Task<GetIncidentTypeResult> InvokeAsync(GetIncidentTypeArgs args, InvokeOptions? opts = null)
        public static Output<GetIncidentTypeResult> Invoke(GetIncidentTypeInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetIncidentTypeResult> Invoke(GetIncidentTypeInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetIncidentTypeResult> getIncidentType(GetIncidentTypeArgs args, InvokeOptions options)
    public static Output<GetIncidentTypeResult> getIncidentType(GetIncidentTypeArgs args, InvokeOptions options)
    public static Output<GetIncidentTypeResult> getIncidentType(GetIncidentTypeArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: incident:index/getIncidentType:getIncidentType
      arguments:
        # arguments dictionary
    data "incident_get_incident_type" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    Unique identifier for this Incident Type
    Name string
    The name of this Incident Type
    Id string
    Unique identifier for this Incident Type
    Name string
    The name of this Incident Type
    id string
    Unique identifier for this Incident Type
    name string
    The name of this Incident Type
    id String
    Unique identifier for this Incident Type
    name String
    The name of this Incident Type
    id string
    Unique identifier for this Incident Type
    name string
    The name of this Incident Type
    id str
    Unique identifier for this Incident Type
    name str
    The name of this Incident Type
    id String
    Unique identifier for this Incident Type
    name String
    The name of this Incident Type

    getIncidentType Result

    The following output properties are available:

    CreateInTriage string
    Whether incidents of this must always, or can optionally, be created in triage. Possible values are: always, optional.
    Description string
    What is this incident type for?
    Id string
    Unique identifier for this Incident Type
    IsDefault bool
    The default Incident Type is used when no other type is explicitly specified
    Name string
    The name of this Incident Type
    OwningTeamIds List<string>
    IDs of the teams that own this incident type
    PrivateIncidentsOnly bool
    Should all incidents created with this Incident Type be private?
    CreateInTriage string
    Whether incidents of this must always, or can optionally, be created in triage. Possible values are: always, optional.
    Description string
    What is this incident type for?
    Id string
    Unique identifier for this Incident Type
    IsDefault bool
    The default Incident Type is used when no other type is explicitly specified
    Name string
    The name of this Incident Type
    OwningTeamIds []string
    IDs of the teams that own this incident type
    PrivateIncidentsOnly bool
    Should all incidents created with this Incident Type be private?
    create_in_triage string
    Whether incidents of this must always, or can optionally, be created in triage. Possible values are: always, optional.
    description string
    What is this incident type for?
    id string
    Unique identifier for this Incident Type
    is_default bool
    The default Incident Type is used when no other type is explicitly specified
    name string
    The name of this Incident Type
    owning_team_ids list(string)
    IDs of the teams that own this incident type
    private_incidents_only bool
    Should all incidents created with this Incident Type be private?
    createInTriage String
    Whether incidents of this must always, or can optionally, be created in triage. Possible values are: always, optional.
    description String
    What is this incident type for?
    id String
    Unique identifier for this Incident Type
    isDefault Boolean
    The default Incident Type is used when no other type is explicitly specified
    name String
    The name of this Incident Type
    owningTeamIds List<String>
    IDs of the teams that own this incident type
    privateIncidentsOnly Boolean
    Should all incidents created with this Incident Type be private?
    createInTriage string
    Whether incidents of this must always, or can optionally, be created in triage. Possible values are: always, optional.
    description string
    What is this incident type for?
    id string
    Unique identifier for this Incident Type
    isDefault boolean
    The default Incident Type is used when no other type is explicitly specified
    name string
    The name of this Incident Type
    owningTeamIds string[]
    IDs of the teams that own this incident type
    privateIncidentsOnly boolean
    Should all incidents created with this Incident Type be private?
    create_in_triage str
    Whether incidents of this must always, or can optionally, be created in triage. Possible values are: always, optional.
    description str
    What is this incident type for?
    id str
    Unique identifier for this Incident Type
    is_default bool
    The default Incident Type is used when no other type is explicitly specified
    name str
    The name of this Incident Type
    owning_team_ids Sequence[str]
    IDs of the teams that own this incident type
    private_incidents_only bool
    Should all incidents created with this Incident Type be private?
    createInTriage String
    Whether incidents of this must always, or can optionally, be created in triage. Possible values are: always, optional.
    description String
    What is this incident type for?
    id String
    Unique identifier for this Incident Type
    isDefault Boolean
    The default Incident Type is used when no other type is explicitly specified
    name String
    The name of this Incident Type
    owningTeamIds List<String>
    IDs of the teams that own this incident type
    privateIncidentsOnly Boolean
    Should all incidents created with this Incident Type be private?

    Package Details

    Repository
    incident incident-io/terraform-provider-incident
    License
    Notes
    This Pulumi package is based on the incident Terraform Provider.
    Viewing docs for incident 7.0.0
    published on Friday, Sep 11, 2026 by incident-io

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial