1. Packages
  2. PagerDuty
  3. API Docs
  4. IncidentCustomField
PagerDuty v4.11.4 published on Wednesday, Apr 17, 2024 by Pulumi

pagerduty.IncidentCustomField

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.11.4 published on Wednesday, Apr 17, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const csImpact = new pagerduty.IncidentCustomField("csImpact", {
        dataType: "string",
        displayName: "Customer Impact",
        fieldType: "single_value",
    });
    const sreEnvironment = new pagerduty.IncidentCustomField("sreEnvironment", {
        dataType: "string",
        displayName: "Environment",
        fieldType: "single_value_fixed",
    });
    const falseAlarm = new pagerduty.IncidentCustomField("falseAlarm", {
        dataType: "boolean",
        defaultValue: "false",
        displayName: "False Alarm",
        fieldType: "single_value",
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    cs_impact = pagerduty.IncidentCustomField("csImpact",
        data_type="string",
        display_name="Customer Impact",
        field_type="single_value")
    sre_environment = pagerduty.IncidentCustomField("sreEnvironment",
        data_type="string",
        display_name="Environment",
        field_type="single_value_fixed")
    false_alarm = pagerduty.IncidentCustomField("falseAlarm",
        data_type="boolean",
        default_value="false",
        display_name="False Alarm",
        field_type="single_value")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v4/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"),
    			DisplayName: pulumi.String("Customer Impact"),
    			FieldType:   pulumi.String("single_value"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewIncidentCustomField(ctx, "sreEnvironment", &pagerduty.IncidentCustomFieldArgs{
    			DataType:    pulumi.String("string"),
    			DisplayName: pulumi.String("Environment"),
    			FieldType:   pulumi.String("single_value_fixed"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewIncidentCustomField(ctx, "falseAlarm", &pagerduty.IncidentCustomFieldArgs{
    			DataType:     pulumi.String("boolean"),
    			DefaultValue: pulumi.String("false"),
    			DisplayName:  pulumi.String("False Alarm"),
    			FieldType:    pulumi.String("single_value"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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",
            DisplayName = "Customer Impact",
            FieldType = "single_value",
        });
    
        var sreEnvironment = new Pagerduty.IncidentCustomField("sreEnvironment", new()
        {
            DataType = "string",
            DisplayName = "Environment",
            FieldType = "single_value_fixed",
        });
    
        var falseAlarm = new Pagerduty.IncidentCustomField("falseAlarm", new()
        {
            DataType = "boolean",
            DefaultValue = "false",
            DisplayName = "False Alarm",
            FieldType = "single_value",
        });
    
    });
    
    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")
                .displayName("Customer Impact")
                .fieldType("single_value")
                .build());
    
            var sreEnvironment = new IncidentCustomField("sreEnvironment", IncidentCustomFieldArgs.builder()        
                .dataType("string")
                .displayName("Environment")
                .fieldType("single_value_fixed")
                .build());
    
            var falseAlarm = new IncidentCustomField("falseAlarm", IncidentCustomFieldArgs.builder()        
                .dataType("boolean")
                .defaultValue("false")
                .displayName("False Alarm")
                .fieldType("single_value")
                .build());
    
        }
    }
    
    resources:
      csImpact:
        type: pagerduty:IncidentCustomField
        properties:
          dataType: string
          displayName: Customer Impact
          fieldType: single_value
      sreEnvironment:
        type: pagerduty:IncidentCustomField
        properties:
          dataType: string
          displayName: Environment
          fieldType: single_value_fixed
      falseAlarm:
        type: pagerduty:IncidentCustomField
        properties:
          dataType: boolean
          defaultValue: 'false'
          displayName: False Alarm
          fieldType: single_value
    

    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.

    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

    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
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    Description string
    The description of the field.
    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
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    Description string
    The description of the field.
    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
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description String
    The description of the field.
    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
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description string
    The description of the field.
    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
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description str
    The description of the field.
    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
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description String
    The description of the field.
    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)
    Resource lookup is not supported in YAML
    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
    The default value to set when new incidents are created. Always specified as a string.
    Description string
    The description of the field.
    DisplayName string
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    Description string
    The description of the field.
    DisplayName string
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description String
    The description of the field.
    displayName String
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description string
    The description of the field.
    displayName string
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description str
    The description of the field.
    display_name str
    The display name of the field.
    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
    The default value to set when new incidents are created. Always specified as a string.
    description String
    The description of the field.
    displayName String
    The display name of the field.
    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
    PagerDuty v4.11.4 published on Wednesday, Apr 17, 2024 by Pulumi