incident.CustomFieldOption
Explore with Pulumi AI
Manage custom field options.
Single- and multi-select custom fields have a list of all available options, which have a value, and a sort key. The value must be unique to the custom field. For example, you might have an Incident Type custom field, with options “Data breach”, “Performance degradation”, “API downtime”, etc.
Create CustomFieldOption Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomFieldOption(name: string, args: CustomFieldOptionArgs, opts?: CustomResourceOptions);
@overload
def CustomFieldOption(resource_name: str,
args: CustomFieldOptionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomFieldOption(resource_name: str,
opts: Optional[ResourceOptions] = None,
custom_field_id: Optional[str] = None,
value: Optional[str] = None,
sort_key: Optional[float] = None)
func NewCustomFieldOption(ctx *Context, name string, args CustomFieldOptionArgs, opts ...ResourceOption) (*CustomFieldOption, error)
public CustomFieldOption(string name, CustomFieldOptionArgs args, CustomResourceOptions? opts = null)
public CustomFieldOption(String name, CustomFieldOptionArgs args)
public CustomFieldOption(String name, CustomFieldOptionArgs args, CustomResourceOptions options)
type: incident:CustomFieldOption
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 CustomFieldOptionArgs
- 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 CustomFieldOptionArgs
- 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 CustomFieldOptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomFieldOptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomFieldOptionArgs
- 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 customFieldOptionResource = new Incident.CustomFieldOption("customFieldOptionResource", new()
{
CustomFieldId = "string",
Value = "string",
SortKey = 0,
});
example, err := incident.NewCustomFieldOption(ctx, "customFieldOptionResource", &incident.CustomFieldOptionArgs{
CustomFieldId: pulumi.String("string"),
Value: pulumi.String("string"),
SortKey: pulumi.Float64(0),
})
var customFieldOptionResource = new CustomFieldOption("customFieldOptionResource", CustomFieldOptionArgs.builder()
.customFieldId("string")
.value("string")
.sortKey(0)
.build());
custom_field_option_resource = incident.CustomFieldOption("customFieldOptionResource",
custom_field_id="string",
value="string",
sort_key=0)
const customFieldOptionResource = new incident.CustomFieldOption("customFieldOptionResource", {
customFieldId: "string",
value: "string",
sortKey: 0,
});
type: incident:CustomFieldOption
properties:
customFieldId: string
sortKey: 0
value: string
CustomFieldOption 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 CustomFieldOption resource accepts the following input properties:
- Custom
Field stringId - ID of the custom field this option belongs to
- Value string
- Human readable name for the custom field option
- Sort
Key double - Sort key used to order the custom field options correctly
- Custom
Field stringId - ID of the custom field this option belongs to
- Value string
- Human readable name for the custom field option
- Sort
Key float64 - Sort key used to order the custom field options correctly
- custom
Field StringId - ID of the custom field this option belongs to
- value String
- Human readable name for the custom field option
- sort
Key Double - Sort key used to order the custom field options correctly
- custom
Field stringId - ID of the custom field this option belongs to
- value string
- Human readable name for the custom field option
- sort
Key number - Sort key used to order the custom field options correctly
- custom_
field_ strid - ID of the custom field this option belongs to
- value str
- Human readable name for the custom field option
- sort_
key float - Sort key used to order the custom field options correctly
- custom
Field StringId - ID of the custom field this option belongs to
- value String
- Human readable name for the custom field option
- sort
Key Number - Sort key used to order the custom field options correctly
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomFieldOption 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 CustomFieldOption Resource
Get an existing CustomFieldOption 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?: CustomFieldOptionState, opts?: CustomResourceOptions): CustomFieldOption
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
custom_field_id: Optional[str] = None,
sort_key: Optional[float] = None,
value: Optional[str] = None) -> CustomFieldOption
func GetCustomFieldOption(ctx *Context, name string, id IDInput, state *CustomFieldOptionState, opts ...ResourceOption) (*CustomFieldOption, error)
public static CustomFieldOption Get(string name, Input<string> id, CustomFieldOptionState? state, CustomResourceOptions? opts = null)
public static CustomFieldOption get(String name, Output<String> id, CustomFieldOptionState state, CustomResourceOptions options)
resources: _: type: incident:CustomFieldOption 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.
- Custom
Field stringId - ID of the custom field this option belongs to
- Sort
Key double - Sort key used to order the custom field options correctly
- Value string
- Human readable name for the custom field option
- Custom
Field stringId - ID of the custom field this option belongs to
- Sort
Key float64 - Sort key used to order the custom field options correctly
- Value string
- Human readable name for the custom field option
- custom
Field StringId - ID of the custom field this option belongs to
- sort
Key Double - Sort key used to order the custom field options correctly
- value String
- Human readable name for the custom field option
- custom
Field stringId - ID of the custom field this option belongs to
- sort
Key number - Sort key used to order the custom field options correctly
- value string
- Human readable name for the custom field option
- custom_
field_ strid - ID of the custom field this option belongs to
- sort_
key float - Sort key used to order the custom field options correctly
- value str
- Human readable name for the custom field option
- custom
Field StringId - ID of the custom field this option belongs to
- sort
Key Number - Sort key used to order the custom field options correctly
- value String
- Human readable name for the custom field option
Import
#!/bin/bash
Import a custom field option using its ID
Replace the ID with a real ID from your incident.io organization
$ pulumi import incident:index/customFieldOption:CustomFieldOption 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.