pagerduty.IncidentCustomField
Explore with Pulumi AI
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("cs_impact", {
name: "impact",
displayName: "Customer Impact",
dataType: "string",
fieldType: "single_value",
});
const sreEnvironment = new pagerduty.IncidentCustomField("sre_environment", {
name: "environment",
displayName: "Environment",
dataType: "string",
fieldType: "single_value_fixed",
});
const falseAlarm = new pagerduty.IncidentCustomField("false_alarm", {
name: "false_alarm",
displayName: "False Alarm",
dataType: "boolean",
fieldType: "single_value",
defaultValue: "false",
});
import pulumi
import pulumi_pagerduty as pagerduty
cs_impact = pagerduty.IncidentCustomField("cs_impact",
name="impact",
display_name="Customer Impact",
data_type="string",
field_type="single_value")
sre_environment = pagerduty.IncidentCustomField("sre_environment",
name="environment",
display_name="Environment",
data_type="string",
field_type="single_value_fixed")
false_alarm = pagerduty.IncidentCustomField("false_alarm",
name="false_alarm",
display_name="False Alarm",
data_type="boolean",
field_type="single_value",
default_value="false")
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, "cs_impact", &pagerduty.IncidentCustomFieldArgs{
Name: pulumi.String("impact"),
DisplayName: pulumi.String("Customer Impact"),
DataType: pulumi.String("string"),
FieldType: pulumi.String("single_value"),
})
if err != nil {
return err
}
_, err = pagerduty.NewIncidentCustomField(ctx, "sre_environment", &pagerduty.IncidentCustomFieldArgs{
Name: pulumi.String("environment"),
DisplayName: pulumi.String("Environment"),
DataType: pulumi.String("string"),
FieldType: pulumi.String("single_value_fixed"),
})
if err != nil {
return err
}
_, err = pagerduty.NewIncidentCustomField(ctx, "false_alarm", &pagerduty.IncidentCustomFieldArgs{
Name: pulumi.String("false_alarm"),
DisplayName: pulumi.String("False Alarm"),
DataType: pulumi.String("boolean"),
FieldType: pulumi.String("single_value"),
DefaultValue: pulumi.String("false"),
})
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("cs_impact", new()
{
Name = "impact",
DisplayName = "Customer Impact",
DataType = "string",
FieldType = "single_value",
});
var sreEnvironment = new Pagerduty.IncidentCustomField("sre_environment", new()
{
Name = "environment",
DisplayName = "Environment",
DataType = "string",
FieldType = "single_value_fixed",
});
var falseAlarm = new Pagerduty.IncidentCustomField("false_alarm", new()
{
Name = "false_alarm",
DisplayName = "False Alarm",
DataType = "boolean",
FieldType = "single_value",
DefaultValue = "false",
});
});
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()
.name("impact")
.displayName("Customer Impact")
.dataType("string")
.fieldType("single_value")
.build());
var sreEnvironment = new IncidentCustomField("sreEnvironment", IncidentCustomFieldArgs.builder()
.name("environment")
.displayName("Environment")
.dataType("string")
.fieldType("single_value_fixed")
.build());
var falseAlarm = new IncidentCustomField("falseAlarm", IncidentCustomFieldArgs.builder()
.name("false_alarm")
.displayName("False Alarm")
.dataType("boolean")
.fieldType("single_value")
.defaultValue("false")
.build());
}
}
resources:
csImpact:
type: pagerduty:IncidentCustomField
name: cs_impact
properties:
name: impact
displayName: Customer Impact
dataType: string
fieldType: single_value
sreEnvironment:
type: pagerduty:IncidentCustomField
name: sre_environment
properties:
name: environment
displayName: Environment
dataType: string
fieldType: single_value_fixed
falseAlarm:
type: pagerduty:IncidentCustomField
name: false_alarm
properties:
name: false_alarm
displayName: False Alarm
dataType: boolean
fieldType: single_value
defaultValue: 'false'
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:
- Data
Type string - Display
Name string - Field
Type string - Default
Value string - Description string
- Name string
- Data
Type string - Display
Name string - Field
Type string - Default
Value string - Description string
- Name string
- data
Type String - display
Name String - field
Type String - default
Value String - description String
- name String
- data
Type string - display
Name string - field
Type string - default
Value string - description string
- name string
- data_
type str - display_
name str - field_
type str - default_
value str - description str
- name str
- data
Type String - display
Name String - field
Type String - default
Value String - description String
- name String
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.
- Data
Type string - Default
Value string - Description string
- Display
Name string - Field
Type string - Name string
- Data
Type string - Default
Value string - Description string
- Display
Name string - Field
Type string - Name string
- data
Type String - default
Value String - description String
- display
Name String - field
Type String - name String
- data
Type string - default
Value string - description string
- display
Name string - field
Type string - name string
- data_
type str - default_
value str - description str
- display_
name str - field_
type str - name str
- data
Type String - default
Value String - description String
- display
Name String - field
Type String - name String
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.