1. Packages
  2. Packages
  3. Pagerduty Provider
  4. API Docs
  5. IncidentCustomField
Viewing docs for PagerDuty v3.11.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
pagerduty logo
Viewing docs for PagerDuty v3.11.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    An Incident Custom Field defines a field which can be set on incidents in the target account.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var csImpact = new Pagerduty.IncidentCustomField("csImpact", new()
        {
            DataType = "string",
            FieldType = "single_value",
        });
    
        var sreEnvironment = new Pagerduty.IncidentCustomField("sreEnvironment", new()
        {
            DataType = "string",
            FieldType = "single_value_fixed",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v3/go/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := pagerduty.NewIncidentCustomField(ctx, "csImpact", &pagerduty.IncidentCustomFieldArgs{
    			DataType:  pulumi.String("string"),
    			FieldType: pulumi.String("single_value"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewIncidentCustomField(ctx, "sreEnvironment", &pagerduty.IncidentCustomFieldArgs{
    			DataType:  pulumi.String("string"),
    			FieldType: pulumi.String("single_value_fixed"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.pagerduty.IncidentCustomField;
    import com.pulumi.pagerduty.IncidentCustomFieldArgs;
    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) {
            var csImpact = new IncidentCustomField("csImpact", IncidentCustomFieldArgs.builder()        
                .dataType("string")
                .fieldType("single_value")
                .build());
    
            var sreEnvironment = new IncidentCustomField("sreEnvironment", IncidentCustomFieldArgs.builder()        
                .dataType("string")
                .fieldType("single_value_fixed")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const csImpact = new pagerduty.IncidentCustomField("csImpact", {
        dataType: "string",
        fieldType: "single_value",
    });
    const sreEnvironment = new pagerduty.IncidentCustomField("sreEnvironment", {
        dataType: "string",
        fieldType: "single_value_fixed",
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    cs_impact = pagerduty.IncidentCustomField("csImpact",
        data_type="string",
        field_type="single_value")
    sre_environment = pagerduty.IncidentCustomField("sreEnvironment",
        data_type="string",
        field_type="single_value_fixed")
    
    resources:
      csImpact:
        type: pagerduty:IncidentCustomField
        properties:
          dataType: string
          fieldType: single_value
      sreEnvironment:
        type: pagerduty:IncidentCustomField
        properties:
          dataType: string
          fieldType: single_value_fixed
    

    Create IncidentCustomField Resource

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

    Constructor syntax

    new IncidentCustomField(name: string, args: IncidentCustomFieldArgs, opts?: CustomResourceOptions);
    @overload
    def IncidentCustomField(resource_name: str,
                            args: IncidentCustomFieldArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def IncidentCustomField(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            data_type: Optional[str] = None,
                            display_name: Optional[str] = None,
                            field_type: Optional[str] = None,
                            default_value: Optional[str] = None,
                            description: Optional[str] = None,
                            name: Optional[str] = None)
    func NewIncidentCustomField(ctx *Context, name string, args IncidentCustomFieldArgs, opts ...ResourceOption) (*IncidentCustomField, error)
    public IncidentCustomField(string name, IncidentCustomFieldArgs args, CustomResourceOptions? opts = null)
    public IncidentCustomField(String name, IncidentCustomFieldArgs args)
    public IncidentCustomField(String name, IncidentCustomFieldArgs args, CustomResourceOptions options)
    
    type: pagerduty:IncidentCustomField
    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 IncidentCustomFieldArgs
    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 IncidentCustomFieldArgs
    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 IncidentCustomFieldArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IncidentCustomFieldArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IncidentCustomFieldArgs
    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 incidentCustomFieldResource = new Pagerduty.IncidentCustomField("incidentCustomFieldResource", new()
    {
        DataType = "string",
        DisplayName = "string",
        FieldType = "string",
        DefaultValue = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := pagerduty.NewIncidentCustomField(ctx, "incidentCustomFieldResource", &pagerduty.IncidentCustomFieldArgs{
    	DataType:     pulumi.String("string"),
    	DisplayName:  pulumi.String("string"),
    	FieldType:    pulumi.String("string"),
    	DefaultValue: pulumi.String("string"),
    	Description:  pulumi.String("string"),
    	Name:         pulumi.String("string"),
    })
    
    var incidentCustomFieldResource = new IncidentCustomField("incidentCustomFieldResource", IncidentCustomFieldArgs.builder()
        .dataType("string")
        .displayName("string")
        .fieldType("string")
        .defaultValue("string")
        .description("string")
        .name("string")
        .build());
    
    incident_custom_field_resource = pagerduty.IncidentCustomField("incidentCustomFieldResource",
        data_type="string",
        display_name="string",
        field_type="string",
        default_value="string",
        description="string",
        name="string")
    
    const incidentCustomFieldResource = new pagerduty.IncidentCustomField("incidentCustomFieldResource", {
        dataType: "string",
        displayName: "string",
        fieldType: "string",
        defaultValue: "string",
        description: "string",
        name: "string",
    });
    
    type: pagerduty:IncidentCustomField
    properties:
        dataType: string
        defaultValue: string
        description: string
        displayName: string
        fieldType: string
        name: string
    

    IncidentCustomField 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 IncidentCustomField resource accepts the following input properties:

    DataType string
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    DisplayName string
    FieldType string
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    DefaultValue string
    Description string
    Name string
    The name of the field.
    DataType string
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    DisplayName string
    FieldType string
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    DefaultValue string
    Description string
    Name string
    The name of the field.
    dataType String
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    displayName String
    fieldType String
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    defaultValue String
    description String
    name String
    The name of the field.
    dataType string
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    displayName string
    fieldType string
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    defaultValue string
    description string
    name string
    The name of the field.
    data_type str
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    display_name str
    field_type str
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    default_value str
    description str
    name str
    The name of the field.
    dataType String
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    displayName String
    fieldType String
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    defaultValue String
    description String
    name String
    The name of the field.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IncidentCustomField 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 IncidentCustomField Resource

    Get an existing IncidentCustomField 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?: IncidentCustomFieldState, opts?: CustomResourceOptions): IncidentCustomField
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data_type: Optional[str] = None,
            default_value: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            field_type: Optional[str] = None,
            name: Optional[str] = None) -> IncidentCustomField
    func GetIncidentCustomField(ctx *Context, name string, id IDInput, state *IncidentCustomFieldState, opts ...ResourceOption) (*IncidentCustomField, error)
    public static IncidentCustomField Get(string name, Input<string> id, IncidentCustomFieldState? state, CustomResourceOptions? opts = null)
    public static IncidentCustomField get(String name, Output<String> id, IncidentCustomFieldState state, CustomResourceOptions options)
    resources:  _:    type: pagerduty:IncidentCustomField    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:
    DataType string
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    DefaultValue string
    Description string
    DisplayName string
    FieldType string
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    Name string
    The name of the field.
    DataType string
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    DefaultValue string
    Description string
    DisplayName string
    FieldType string
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    Name string
    The name of the field.
    dataType String
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    defaultValue String
    description String
    displayName String
    fieldType String
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    name String
    The name of the field.
    dataType string
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    defaultValue string
    description string
    displayName string
    fieldType string
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    name string
    The name of the field.
    data_type str
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    default_value str
    description str
    display_name str
    field_type str
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    name str
    The name of the field.
    dataType String
    The data type of the field. Must be one of string, integer, float, boolean, datetime, or url.
    defaultValue String
    description String
    displayName String
    fieldType String
    The field type of the field. Must be one of single_value, single_value_fixed, multi_value, or multi_value_fixed.
    name String
    The name of the field.

    Import

    Fields can be imported using the id, e.g.

     $ pulumi import pagerduty:index/incidentCustomField:IncidentCustomField sre_environment PLBP09X
    

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

    Package Details

    Repository
    PagerDuty pulumi/pulumi-pagerduty
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the pagerduty Terraform Provider.
    pagerduty logo
    Viewing docs for PagerDuty v3.11.2 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.