1. Packages
  2. Incident Provider
  3. API Docs
  4. CustomField
incident 5.5.0 published on Wednesday, Apr 30, 2025 by incident-io

incident.CustomField

Explore with Pulumi AI

incident logo
incident 5.5.0 published on Wednesday, Apr 30, 2025 by incident-io

    Manage custom fields.

    Custom fields are used to attach metadata to incidents, which you can use when searching for incidents in the dashboard, triggering workflows, building announcement rules or for your own data needs.

    Each field has a type:

    • Single-select, single value selected from a predefined list of options (e.g. Detection Method)
    • Multi-select, as above but you can pick more than one option (e.g. Affected Teams)
    • Text, freeform text field (e.g. Customer ID)
    • Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)
    • Number, integer or fractional numbers (e.g. # Customers Affected)

    We may add more custom field types in the future - we’d love to hear any other types you’d like to use!

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@pulumi/incident";
    
    // Create an Affected Teams multi-select field, required always, shown at all
    // opportunities.
    const affectedTeams = new incident.CustomField("affectedTeams", {
        description: "The teams that are affected by this incident.",
        fieldType: "multi_select",
    });
    
    import pulumi
    import pulumi_incident as incident
    
    # Create an Affected Teams multi-select field, required always, shown at all
    # opportunities.
    affected_teams = incident.CustomField("affectedTeams",
        description="The teams that are affected by this incident.",
        field_type="multi_select")
    
    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 {
    		// Create an Affected Teams multi-select field, required always, shown at all
    		// opportunities.
    		_, err := incident.NewCustomField(ctx, "affectedTeams", &incident.CustomFieldArgs{
    			Description: pulumi.String("The teams that are affected by this incident."),
    			FieldType:   pulumi.String("multi_select"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incident = Pulumi.Incident;
    
    return await Deployment.RunAsync(() => 
    {
        // Create an Affected Teams multi-select field, required always, shown at all
        // opportunities.
        var affectedTeams = new Incident.CustomField("affectedTeams", new()
        {
            Description = "The teams that are affected by this incident.",
            FieldType = "multi_select",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incident.CustomField;
    import com.pulumi.incident.CustomFieldArgs;
    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) {
            // Create an Affected Teams multi-select field, required always, shown at all
            // opportunities.
            var affectedTeams = new CustomField("affectedTeams", CustomFieldArgs.builder()
                .description("The teams that are affected by this incident.")
                .fieldType("multi_select")
                .build());
    
        }
    }
    
    resources:
      # Create an Affected Teams multi-select field, required always, shown at all
      # // opportunities.
      affectedTeams:
        type: incident:CustomField
        properties:
          description: The teams that are affected by this incident.
          fieldType: multi_select
    

    Create CustomField Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CustomField(name: string, args: CustomFieldArgs, opts?: CustomResourceOptions);
    @overload
    def CustomField(resource_name: str,
                    args: CustomFieldArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomField(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    description: Optional[str] = None,
                    field_type: Optional[str] = None,
                    catalog_type_id: Optional[str] = None,
                    filter_by: Optional[CustomFieldFilterByArgs] = None,
                    group_by_catalog_attribute_id: Optional[str] = None,
                    helptext_catalog_attribute_id: Optional[str] = None,
                    name: Optional[str] = None)
    func NewCustomField(ctx *Context, name string, args CustomFieldArgs, opts ...ResourceOption) (*CustomField, error)
    public CustomField(string name, CustomFieldArgs args, CustomResourceOptions? opts = null)
    public CustomField(String name, CustomFieldArgs args)
    public CustomField(String name, CustomFieldArgs args, CustomResourceOptions options)
    
    type: incident:CustomField
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CustomFieldArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CustomFieldArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CustomFieldArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomFieldArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomFieldArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var customFieldResource = new Incident.CustomField("customFieldResource", new()
    {
        Description = "string",
        FieldType = "string",
        CatalogTypeId = "string",
        FilterBy = new Incident.Inputs.CustomFieldFilterByArgs
        {
            CatalogAttributeId = "string",
            CustomFieldId = "string",
        },
        GroupByCatalogAttributeId = "string",
        HelptextCatalogAttributeId = "string",
        Name = "string",
    });
    
    example, err := incident.NewCustomField(ctx, "customFieldResource", &incident.CustomFieldArgs{
    	Description:   pulumi.String("string"),
    	FieldType:     pulumi.String("string"),
    	CatalogTypeId: pulumi.String("string"),
    	FilterBy: &incident.CustomFieldFilterByArgs{
    		CatalogAttributeId: pulumi.String("string"),
    		CustomFieldId:      pulumi.String("string"),
    	},
    	GroupByCatalogAttributeId:  pulumi.String("string"),
    	HelptextCatalogAttributeId: pulumi.String("string"),
    	Name:                       pulumi.String("string"),
    })
    
    var customFieldResource = new CustomField("customFieldResource", CustomFieldArgs.builder()
        .description("string")
        .fieldType("string")
        .catalogTypeId("string")
        .filterBy(CustomFieldFilterByArgs.builder()
            .catalogAttributeId("string")
            .customFieldId("string")
            .build())
        .groupByCatalogAttributeId("string")
        .helptextCatalogAttributeId("string")
        .name("string")
        .build());
    
    custom_field_resource = incident.CustomField("customFieldResource",
        description="string",
        field_type="string",
        catalog_type_id="string",
        filter_by={
            "catalog_attribute_id": "string",
            "custom_field_id": "string",
        },
        group_by_catalog_attribute_id="string",
        helptext_catalog_attribute_id="string",
        name="string")
    
    const customFieldResource = new incident.CustomField("customFieldResource", {
        description: "string",
        fieldType: "string",
        catalogTypeId: "string",
        filterBy: {
            catalogAttributeId: "string",
            customFieldId: "string",
        },
        groupByCatalogAttributeId: "string",
        helptextCatalogAttributeId: "string",
        name: "string",
    });
    
    type: incident:CustomField
    properties:
        catalogTypeId: string
        description: string
        fieldType: string
        filterBy:
            catalogAttributeId: string
            customFieldId: string
        groupByCatalogAttributeId: string
        helptextCatalogAttributeId: string
        name: string
    

    CustomField Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CustomField resource accepts the following input properties:

    Description string
    Description of the custom field
    FieldType string
    Type of custom field
    CatalogTypeId string
    For catalog fields, the ID of the associated catalog type
    FilterBy CustomFieldFilterBy
    GroupByCatalogAttributeId string
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    HelptextCatalogAttributeId string
    Which catalog attribute provides helptext for the options
    Name string
    Human readable name for the custom field
    Description string
    Description of the custom field
    FieldType string
    Type of custom field
    CatalogTypeId string
    For catalog fields, the ID of the associated catalog type
    FilterBy CustomFieldFilterByArgs
    GroupByCatalogAttributeId string
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    HelptextCatalogAttributeId string
    Which catalog attribute provides helptext for the options
    Name string
    Human readable name for the custom field
    description String
    Description of the custom field
    fieldType String
    Type of custom field
    catalogTypeId String
    For catalog fields, the ID of the associated catalog type
    filterBy CustomFieldFilterBy
    groupByCatalogAttributeId String
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptextCatalogAttributeId String
    Which catalog attribute provides helptext for the options
    name String
    Human readable name for the custom field
    description string
    Description of the custom field
    fieldType string
    Type of custom field
    catalogTypeId string
    For catalog fields, the ID of the associated catalog type
    filterBy CustomFieldFilterBy
    groupByCatalogAttributeId string
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptextCatalogAttributeId string
    Which catalog attribute provides helptext for the options
    name string
    Human readable name for the custom field
    description str
    Description of the custom field
    field_type str
    Type of custom field
    catalog_type_id str
    For catalog fields, the ID of the associated catalog type
    filter_by CustomFieldFilterByArgs
    group_by_catalog_attribute_id str
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptext_catalog_attribute_id str
    Which catalog attribute provides helptext for the options
    name str
    Human readable name for the custom field
    description String
    Description of the custom field
    fieldType String
    Type of custom field
    catalogTypeId String
    For catalog fields, the ID of the associated catalog type
    filterBy Property Map
    groupByCatalogAttributeId String
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptextCatalogAttributeId String
    Which catalog attribute provides helptext for the options
    name String
    Human readable name for the custom field

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CustomField resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CustomField Resource

    Get an existing CustomField resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CustomFieldState, opts?: CustomResourceOptions): CustomField
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catalog_type_id: Optional[str] = None,
            description: Optional[str] = None,
            field_type: Optional[str] = None,
            filter_by: Optional[CustomFieldFilterByArgs] = None,
            group_by_catalog_attribute_id: Optional[str] = None,
            helptext_catalog_attribute_id: Optional[str] = None,
            name: Optional[str] = None) -> CustomField
    func GetCustomField(ctx *Context, name string, id IDInput, state *CustomFieldState, opts ...ResourceOption) (*CustomField, error)
    public static CustomField Get(string name, Input<string> id, CustomFieldState? state, CustomResourceOptions? opts = null)
    public static CustomField get(String name, Output<String> id, CustomFieldState state, CustomResourceOptions options)
    resources:  _:    type: incident:CustomField    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CatalogTypeId string
    For catalog fields, the ID of the associated catalog type
    Description string
    Description of the custom field
    FieldType string
    Type of custom field
    FilterBy CustomFieldFilterBy
    GroupByCatalogAttributeId string
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    HelptextCatalogAttributeId string
    Which catalog attribute provides helptext for the options
    Name string
    Human readable name for the custom field
    CatalogTypeId string
    For catalog fields, the ID of the associated catalog type
    Description string
    Description of the custom field
    FieldType string
    Type of custom field
    FilterBy CustomFieldFilterByArgs
    GroupByCatalogAttributeId string
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    HelptextCatalogAttributeId string
    Which catalog attribute provides helptext for the options
    Name string
    Human readable name for the custom field
    catalogTypeId String
    For catalog fields, the ID of the associated catalog type
    description String
    Description of the custom field
    fieldType String
    Type of custom field
    filterBy CustomFieldFilterBy
    groupByCatalogAttributeId String
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptextCatalogAttributeId String
    Which catalog attribute provides helptext for the options
    name String
    Human readable name for the custom field
    catalogTypeId string
    For catalog fields, the ID of the associated catalog type
    description string
    Description of the custom field
    fieldType string
    Type of custom field
    filterBy CustomFieldFilterBy
    groupByCatalogAttributeId string
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptextCatalogAttributeId string
    Which catalog attribute provides helptext for the options
    name string
    Human readable name for the custom field
    catalog_type_id str
    For catalog fields, the ID of the associated catalog type
    description str
    Description of the custom field
    field_type str
    Type of custom field
    filter_by CustomFieldFilterByArgs
    group_by_catalog_attribute_id str
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptext_catalog_attribute_id str
    Which catalog attribute provides helptext for the options
    name str
    Human readable name for the custom field
    catalogTypeId String
    For catalog fields, the ID of the associated catalog type
    description String
    Description of the custom field
    fieldType String
    Type of custom field
    filterBy Property Map
    groupByCatalogAttributeId String
    For catalog fields, the ID of the attribute used to group catalog entries (if applicable)
    helptextCatalogAttributeId String
    Which catalog attribute provides helptext for the options
    name String
    Human readable name for the custom field

    Supporting Types

    CustomFieldFilterBy, CustomFieldFilterByArgs

    CatalogAttributeId string
    This must be an attribute of the catalog type of this custom field. It must be an attribute that points to another catalog type (so not a plain string, number, or boolean attribute).
    CustomFieldId string
    This must be the ID of a custom field, which must have values of the same type as the attribute you are filtering by.
    CatalogAttributeId string
    This must be an attribute of the catalog type of this custom field. It must be an attribute that points to another catalog type (so not a plain string, number, or boolean attribute).
    CustomFieldId string
    This must be the ID of a custom field, which must have values of the same type as the attribute you are filtering by.
    catalogAttributeId String
    This must be an attribute of the catalog type of this custom field. It must be an attribute that points to another catalog type (so not a plain string, number, or boolean attribute).
    customFieldId String
    This must be the ID of a custom field, which must have values of the same type as the attribute you are filtering by.
    catalogAttributeId string
    This must be an attribute of the catalog type of this custom field. It must be an attribute that points to another catalog type (so not a plain string, number, or boolean attribute).
    customFieldId string
    This must be the ID of a custom field, which must have values of the same type as the attribute you are filtering by.
    catalog_attribute_id str
    This must be an attribute of the catalog type of this custom field. It must be an attribute that points to another catalog type (so not a plain string, number, or boolean attribute).
    custom_field_id str
    This must be the ID of a custom field, which must have values of the same type as the attribute you are filtering by.
    catalogAttributeId String
    This must be an attribute of the catalog type of this custom field. It must be an attribute that points to another catalog type (so not a plain string, number, or boolean attribute).
    customFieldId String
    This must be the ID of a custom field, which must have values of the same type as the attribute you are filtering by.

    Import

    #!/bin/bash

    Import a custom field using its ID

    Replace the ID with a real ID from your incident.io organization

    $ pulumi import incident:index/customField:CustomField example 01ABC123DEF456GHI789JKL
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.5.0 published on Wednesday, Apr 30, 2025 by incident-io