1. Packages
  2. Rootly
  3. API Docs
  4. FormField
Rootly v1.5.0 published on Thursday, Apr 25, 2024 by Rootly

rootly.FormField

Explore with Pulumi AI

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rootly = Pulumi.Rootly;

return await Deployment.RunAsync(() => 
{
    var regionsAffected = new Rootly.FormField("regionsAffected", new()
    {
        Kind = "custom",
        InputKind = "multi_select",
        Showns = new[]
        {
            "web_new_incident_form",
            "web_update_incident_form",
        },
        Requireds = new[]
        {
            "web_new_incident_form",
            "web_update_incident_form",
        },
    });

    var asia = new Rootly.FormFieldOption("asia", new()
    {
        FormFieldId = regionsAffected.Id,
        Value = "Asia",
    });

    var europe = new Rootly.FormFieldOption("europe", new()
    {
        FormFieldId = regionsAffected.Id,
        Value = "Europe",
    });

    var northAmerica = new Rootly.FormFieldOption("northAmerica", new()
    {
        FormFieldId = regionsAffected.Id,
        Value = "North America",
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-rootly/sdk/go/rootly"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		regionsAffected, err := rootly.NewFormField(ctx, "regionsAffected", &rootly.FormFieldArgs{
			Kind:      pulumi.String("custom"),
			InputKind: pulumi.String("multi_select"),
			Showns: pulumi.StringArray{
				pulumi.String("web_new_incident_form"),
				pulumi.String("web_update_incident_form"),
			},
			Requireds: pulumi.StringArray{
				pulumi.String("web_new_incident_form"),
				pulumi.String("web_update_incident_form"),
			},
		})
		if err != nil {
			return err
		}
		_, err = rootly.NewFormFieldOption(ctx, "asia", &rootly.FormFieldOptionArgs{
			FormFieldId: regionsAffected.ID(),
			Value:       pulumi.String("Asia"),
		})
		if err != nil {
			return err
		}
		_, err = rootly.NewFormFieldOption(ctx, "europe", &rootly.FormFieldOptionArgs{
			FormFieldId: regionsAffected.ID(),
			Value:       pulumi.String("Europe"),
		})
		if err != nil {
			return err
		}
		_, err = rootly.NewFormFieldOption(ctx, "northAmerica", &rootly.FormFieldOptionArgs{
			FormFieldId: regionsAffected.ID(),
			Value:       pulumi.String("North America"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rootly.FormField;
import com.pulumi.rootly.FormFieldArgs;
import com.pulumi.rootly.FormFieldOption;
import com.pulumi.rootly.FormFieldOptionArgs;
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 regionsAffected = new FormField("regionsAffected", FormFieldArgs.builder()        
            .kind("custom")
            .inputKind("multi_select")
            .showns(            
                "web_new_incident_form",
                "web_update_incident_form")
            .requireds(            
                "web_new_incident_form",
                "web_update_incident_form")
            .build());

        var asia = new FormFieldOption("asia", FormFieldOptionArgs.builder()        
            .formFieldId(regionsAffected.id())
            .value("Asia")
            .build());

        var europe = new FormFieldOption("europe", FormFieldOptionArgs.builder()        
            .formFieldId(regionsAffected.id())
            .value("Europe")
            .build());

        var northAmerica = new FormFieldOption("northAmerica", FormFieldOptionArgs.builder()        
            .formFieldId(regionsAffected.id())
            .value("North America")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as rootly from "@pulumi/rootly";

const regionsAffected = new rootly.FormField("regionsAffected", {
    kind: "custom",
    inputKind: "multi_select",
    showns: [
        "web_new_incident_form",
        "web_update_incident_form",
    ],
    requireds: [
        "web_new_incident_form",
        "web_update_incident_form",
    ],
});
const asia = new rootly.FormFieldOption("asia", {
    formFieldId: regionsAffected.id,
    value: "Asia",
});
const europe = new rootly.FormFieldOption("europe", {
    formFieldId: regionsAffected.id,
    value: "Europe",
});
const northAmerica = new rootly.FormFieldOption("northAmerica", {
    formFieldId: regionsAffected.id,
    value: "North America",
});
Copy
import pulumi
import pulumi_rootly as rootly

regions_affected = rootly.FormField("regionsAffected",
    kind="custom",
    input_kind="multi_select",
    showns=[
        "web_new_incident_form",
        "web_update_incident_form",
    ],
    requireds=[
        "web_new_incident_form",
        "web_update_incident_form",
    ])
asia = rootly.FormFieldOption("asia",
    form_field_id=regions_affected.id,
    value="Asia")
europe = rootly.FormFieldOption("europe",
    form_field_id=regions_affected.id,
    value="Europe")
north_america = rootly.FormFieldOption("northAmerica",
    form_field_id=regions_affected.id,
    value="North America")
Copy
resources:
  regionsAffected:
    type: rootly:FormField
    properties:
      kind: custom
      inputKind: multi_select
      showns:
        - web_new_incident_form
        - web_update_incident_form
      requireds:
        - web_new_incident_form
        - web_update_incident_form
  asia:
    type: rootly:FormFieldOption
    properties:
      formFieldId: ${regionsAffected.id}
      value: Asia
  europe:
    type: rootly:FormFieldOption
    properties:
      formFieldId: ${regionsAffected.id}
      value: Europe
  northAmerica:
    type: rootly:FormFieldOption
    properties:
      formFieldId: ${regionsAffected.id}
      value: North America
Copy

Create FormField Resource

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

Constructor syntax

new FormField(name: string, args?: FormFieldArgs, opts?: CustomResourceOptions);
@overload
def FormField(resource_name: str,
              args: Optional[FormFieldArgs] = None,
              opts: Optional[ResourceOptions] = None)

@overload
def FormField(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              default_values: Optional[Sequence[str]] = None,
              description: Optional[str] = None,
              enabled: Optional[bool] = None,
              input_kind: Optional[str] = None,
              kind: Optional[str] = None,
              name: Optional[str] = None,
              requireds: Optional[Sequence[str]] = None,
              show_on_incident_details: Optional[bool] = None,
              showns: Optional[Sequence[str]] = None,
              slug: Optional[str] = None,
              value_kind: Optional[str] = None)
func NewFormField(ctx *Context, name string, args *FormFieldArgs, opts ...ResourceOption) (*FormField, error)
public FormField(string name, FormFieldArgs? args = null, CustomResourceOptions? opts = null)
public FormField(String name, FormFieldArgs args)
public FormField(String name, FormFieldArgs args, CustomResourceOptions options)
type: rootly:FormField
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args FormFieldArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args FormFieldArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args FormFieldArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args FormFieldArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FormFieldArgs
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 formFieldResource = new Rootly.FormField("formFieldResource", new()
{
    DefaultValues = new[]
    {
        "string",
    },
    Description = "string",
    Enabled = false,
    InputKind = "string",
    Kind = "string",
    Name = "string",
    Requireds = new[]
    {
        "string",
    },
    ShowOnIncidentDetails = false,
    Showns = new[]
    {
        "string",
    },
    Slug = "string",
    ValueKind = "string",
});
Copy
example, err := rootly.NewFormField(ctx, "formFieldResource", &rootly.FormFieldArgs{
	DefaultValues: pulumi.StringArray{
		pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Enabled:     pulumi.Bool(false),
	InputKind:   pulumi.String("string"),
	Kind:        pulumi.String("string"),
	Name:        pulumi.String("string"),
	Requireds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ShowOnIncidentDetails: pulumi.Bool(false),
	Showns: pulumi.StringArray{
		pulumi.String("string"),
	},
	Slug:      pulumi.String("string"),
	ValueKind: pulumi.String("string"),
})
Copy
var formFieldResource = new FormField("formFieldResource", FormFieldArgs.builder()
    .defaultValues("string")
    .description("string")
    .enabled(false)
    .inputKind("string")
    .kind("string")
    .name("string")
    .requireds("string")
    .showOnIncidentDetails(false)
    .showns("string")
    .slug("string")
    .valueKind("string")
    .build());
Copy
form_field_resource = rootly.FormField("formFieldResource",
    default_values=["string"],
    description="string",
    enabled=False,
    input_kind="string",
    kind="string",
    name="string",
    requireds=["string"],
    show_on_incident_details=False,
    showns=["string"],
    slug="string",
    value_kind="string")
Copy
const formFieldResource = new rootly.FormField("formFieldResource", {
    defaultValues: ["string"],
    description: "string",
    enabled: false,
    inputKind: "string",
    kind: "string",
    name: "string",
    requireds: ["string"],
    showOnIncidentDetails: false,
    showns: ["string"],
    slug: "string",
    valueKind: "string",
});
Copy
type: rootly:FormField
properties:
    defaultValues:
        - string
    description: string
    enabled: false
    inputKind: string
    kind: string
    name: string
    requireds:
        - string
    showOnIncidentDetails: false
    showns:
        - string
    slug: string
    valueKind: string
Copy

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

DefaultValues List<string>
Description string
The description of the form field
Enabled bool
InputKind string
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
Kind string
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
Name string
The name of the form field
Requireds List<string>
ShowOnIncidentDetails bool
Whether the form field is shown on the incident details panel. Value must be one of true or false
Showns List<string>
Slug string
The slug of the form field
ValueKind string
The value kind of the form field. Value must be one of inherit, group, service, user.
DefaultValues []string
Description string
The description of the form field
Enabled bool
InputKind string
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
Kind string
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
Name string
The name of the form field
Requireds []string
ShowOnIncidentDetails bool
Whether the form field is shown on the incident details panel. Value must be one of true or false
Showns []string
Slug string
The slug of the form field
ValueKind string
The value kind of the form field. Value must be one of inherit, group, service, user.
defaultValues List<String>
description String
The description of the form field
enabled Boolean
inputKind String
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind String
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name String
The name of the form field
requireds List<String>
showOnIncidentDetails Boolean
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns List<String>
slug String
The slug of the form field
valueKind String
The value kind of the form field. Value must be one of inherit, group, service, user.
defaultValues string[]
description string
The description of the form field
enabled boolean
inputKind string
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind string
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name string
The name of the form field
requireds string[]
showOnIncidentDetails boolean
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns string[]
slug string
The slug of the form field
valueKind string
The value kind of the form field. Value must be one of inherit, group, service, user.
default_values Sequence[str]
description str
The description of the form field
enabled bool
input_kind str
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind str
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name str
The name of the form field
requireds Sequence[str]
show_on_incident_details bool
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns Sequence[str]
slug str
The slug of the form field
value_kind str
The value kind of the form field. Value must be one of inherit, group, service, user.
defaultValues List<String>
description String
The description of the form field
enabled Boolean
inputKind String
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind String
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name String
The name of the form field
requireds List<String>
showOnIncidentDetails Boolean
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns List<String>
slug String
The slug of the form field
valueKind String
The value kind of the form field. Value must be one of inherit, group, service, user.

Outputs

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

Get an existing FormField 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?: FormFieldState, opts?: CustomResourceOptions): FormField
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        default_values: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        enabled: Optional[bool] = None,
        input_kind: Optional[str] = None,
        kind: Optional[str] = None,
        name: Optional[str] = None,
        requireds: Optional[Sequence[str]] = None,
        show_on_incident_details: Optional[bool] = None,
        showns: Optional[Sequence[str]] = None,
        slug: Optional[str] = None,
        value_kind: Optional[str] = None) -> FormField
func GetFormField(ctx *Context, name string, id IDInput, state *FormFieldState, opts ...ResourceOption) (*FormField, error)
public static FormField Get(string name, Input<string> id, FormFieldState? state, CustomResourceOptions? opts = null)
public static FormField get(String name, Output<String> id, FormFieldState state, CustomResourceOptions options)
resources:  _:    type: rootly:FormField    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DefaultValues List<string>
Description string
The description of the form field
Enabled bool
InputKind string
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
Kind string
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
Name string
The name of the form field
Requireds List<string>
ShowOnIncidentDetails bool
Whether the form field is shown on the incident details panel. Value must be one of true or false
Showns List<string>
Slug string
The slug of the form field
ValueKind string
The value kind of the form field. Value must be one of inherit, group, service, user.
DefaultValues []string
Description string
The description of the form field
Enabled bool
InputKind string
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
Kind string
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
Name string
The name of the form field
Requireds []string
ShowOnIncidentDetails bool
Whether the form field is shown on the incident details panel. Value must be one of true or false
Showns []string
Slug string
The slug of the form field
ValueKind string
The value kind of the form field. Value must be one of inherit, group, service, user.
defaultValues List<String>
description String
The description of the form field
enabled Boolean
inputKind String
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind String
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name String
The name of the form field
requireds List<String>
showOnIncidentDetails Boolean
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns List<String>
slug String
The slug of the form field
valueKind String
The value kind of the form field. Value must be one of inherit, group, service, user.
defaultValues string[]
description string
The description of the form field
enabled boolean
inputKind string
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind string
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name string
The name of the form field
requireds string[]
showOnIncidentDetails boolean
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns string[]
slug string
The slug of the form field
valueKind string
The value kind of the form field. Value must be one of inherit, group, service, user.
default_values Sequence[str]
description str
The description of the form field
enabled bool
input_kind str
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind str
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name str
The name of the form field
requireds Sequence[str]
show_on_incident_details bool
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns Sequence[str]
slug str
The slug of the form field
value_kind str
The value kind of the form field. Value must be one of inherit, group, service, user.
defaultValues List<String>
description String
The description of the form field
enabled Boolean
inputKind String
The input kind of the form field. Value must be one of text, textarea, select, multi_select, date, datetime, number, checkbox, tags, rich_text.
kind String
The kind of the form field. Value must be one of custom, title, summary, severity, environments, types, services, causes, functionalities, teams, visibility, mark_as_test, mark_as_backfilled, labels, notify_emails, trigger_manual_workflows, show_ongoing_incidents, attach_alerts, mark_as_in_triage, manual_starting_datetime_field.
name String
The name of the form field
requireds List<String>
showOnIncidentDetails Boolean
Whether the form field is shown on the incident details panel. Value must be one of true or false
showns List<String>
slug String
The slug of the form field
valueKind String
The value kind of the form field. Value must be one of inherit, group, service, user.

Package Details

Repository
rootly rootlyhq/pulumi-rootly
License
Apache-2.0
Notes
This Pulumi package is based on the rootly Terraform Provider.