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

rootly.FormFieldOption

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 FormFieldOption Resource

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

Constructor syntax

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

@overload
def FormFieldOption(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    form_field_id: Optional[str] = None,
                    value: Optional[str] = None,
                    color: Optional[str] = None,
                    default: Optional[bool] = None,
                    position: Optional[int] = None)
func NewFormFieldOption(ctx *Context, name string, args FormFieldOptionArgs, opts ...ResourceOption) (*FormFieldOption, error)
public FormFieldOption(string name, FormFieldOptionArgs args, CustomResourceOptions? opts = null)
public FormFieldOption(String name, FormFieldOptionArgs args)
public FormFieldOption(String name, FormFieldOptionArgs args, CustomResourceOptions options)
type: rootly:FormFieldOption
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 This property is required. FormFieldOptionArgs
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 This property is required. FormFieldOptionArgs
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 This property is required. FormFieldOptionArgs
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 This property is required. FormFieldOptionArgs
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. FormFieldOptionArgs
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 formFieldOptionResource = new Rootly.FormFieldOption("formFieldOptionResource", new()
{
    FormFieldId = "string",
    Value = "string",
    Color = "string",
    Default = false,
    Position = 0,
});
Copy
example, err := rootly.NewFormFieldOption(ctx, "formFieldOptionResource", &rootly.FormFieldOptionArgs{
	FormFieldId: pulumi.String("string"),
	Value:       pulumi.String("string"),
	Color:       pulumi.String("string"),
	Default:     pulumi.Bool(false),
	Position:    pulumi.Int(0),
})
Copy
var formFieldOptionResource = new FormFieldOption("formFieldOptionResource", FormFieldOptionArgs.builder()
    .formFieldId("string")
    .value("string")
    .color("string")
    .default_(false)
    .position(0)
    .build());
Copy
form_field_option_resource = rootly.FormFieldOption("formFieldOptionResource",
    form_field_id="string",
    value="string",
    color="string",
    default=False,
    position=0)
Copy
const formFieldOptionResource = new rootly.FormFieldOption("formFieldOptionResource", {
    formFieldId: "string",
    value: "string",
    color: "string",
    "default": false,
    position: 0,
});
Copy
type: rootly:FormFieldOption
properties:
    color: string
    default: false
    formFieldId: string
    position: 0
    value: string
Copy

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

FormFieldId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the parent custom field
Value This property is required. string
The value of the formfieldoption
Color string
The hex color of the formfieldoption
Default bool
Value must be one of true or false
Position int
The position of the formfieldoption
FormFieldId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the parent custom field
Value This property is required. string
The value of the formfieldoption
Color string
The hex color of the formfieldoption
Default bool
Value must be one of true or false
Position int
The position of the formfieldoption
formFieldId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the parent custom field
value This property is required. String
The value of the formfieldoption
color String
The hex color of the formfieldoption
default_ Boolean
Value must be one of true or false
position Integer
The position of the formfieldoption
formFieldId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the parent custom field
value This property is required. string
The value of the formfieldoption
color string
The hex color of the formfieldoption
default boolean
Value must be one of true or false
position number
The position of the formfieldoption
form_field_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the parent custom field
value This property is required. str
The value of the formfieldoption
color str
The hex color of the formfieldoption
default bool
Value must be one of true or false
position int
The position of the formfieldoption
formFieldId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the parent custom field
value This property is required. String
The value of the formfieldoption
color String
The hex color of the formfieldoption
default Boolean
Value must be one of true or false
position Number
The position of the formfieldoption

Outputs

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

Get an existing FormFieldOption 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?: FormFieldOptionState, opts?: CustomResourceOptions): FormFieldOption
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        color: Optional[str] = None,
        default: Optional[bool] = None,
        form_field_id: Optional[str] = None,
        position: Optional[int] = None,
        value: Optional[str] = None) -> FormFieldOption
func GetFormFieldOption(ctx *Context, name string, id IDInput, state *FormFieldOptionState, opts ...ResourceOption) (*FormFieldOption, error)
public static FormFieldOption Get(string name, Input<string> id, FormFieldOptionState? state, CustomResourceOptions? opts = null)
public static FormFieldOption get(String name, Output<String> id, FormFieldOptionState state, CustomResourceOptions options)
resources:  _:    type: rootly:FormFieldOption    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:
Color string
The hex color of the formfieldoption
Default bool
Value must be one of true or false
FormFieldId Changes to this property will trigger replacement. string
The ID of the parent custom field
Position int
The position of the formfieldoption
Value string
The value of the formfieldoption
Color string
The hex color of the formfieldoption
Default bool
Value must be one of true or false
FormFieldId Changes to this property will trigger replacement. string
The ID of the parent custom field
Position int
The position of the formfieldoption
Value string
The value of the formfieldoption
color String
The hex color of the formfieldoption
default_ Boolean
Value must be one of true or false
formFieldId Changes to this property will trigger replacement. String
The ID of the parent custom field
position Integer
The position of the formfieldoption
value String
The value of the formfieldoption
color string
The hex color of the formfieldoption
default boolean
Value must be one of true or false
formFieldId Changes to this property will trigger replacement. string
The ID of the parent custom field
position number
The position of the formfieldoption
value string
The value of the formfieldoption
color str
The hex color of the formfieldoption
default bool
Value must be one of true or false
form_field_id Changes to this property will trigger replacement. str
The ID of the parent custom field
position int
The position of the formfieldoption
value str
The value of the formfieldoption
color String
The hex color of the formfieldoption
default Boolean
Value must be one of true or false
formFieldId Changes to this property will trigger replacement. String
The ID of the parent custom field
position Number
The position of the formfieldoption
value String
The value of the formfieldoption

Package Details

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