1. Packages
  2. PagerDuty
  3. API Docs
  4. CustomFieldSchemaFieldConfiguration
PagerDuty v3.11.2 published on Wednesday, Aug 30, 2023 by Pulumi

pagerduty.CustomFieldSchemaFieldConfiguration

Explore with Pulumi AI

pagerduty logo
PagerDuty v3.11.2 published on Wednesday, Aug 30, 2023 by Pulumi

    !> This Resource is no longer functional. Documentation is left here for the purpose of documenting migration steps.

    A Custom Field Configuration is a declaration of a specific Custom Field in a specific Custom Field Schema.

    Migration

    This resource has no currently functional counterpart. Custom Fields on Incidents are now applied globally to incidents within an account and have no notion of a Field Schema.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var csImpact = new Pagerduty.CustomField("csImpact", new()
        {
            Datatype = "string",
        });
    
        var mySchema = new Pagerduty.CustomFieldSchema("mySchema", new()
        {
            Title = "My Schema",
            Description = "Fields used on incidents",
        });
    
        var firstFieldConfiguration = new Pagerduty.CustomFieldSchemaFieldConfiguration("firstFieldConfiguration", new()
        {
            Schema = mySchema.Id,
            Field = csImpact.Id,
            Required = true,
            DefaultValue = "none",
            DefaultValueDatatype = "string",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v3/go/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		csImpact, err := pagerduty.NewCustomField(ctx, "csImpact", &pagerduty.CustomFieldArgs{
    			Datatype: pulumi.String("string"),
    		})
    		if err != nil {
    			return err
    		}
    		mySchema, err := pagerduty.NewCustomFieldSchema(ctx, "mySchema", &pagerduty.CustomFieldSchemaArgs{
    			Title:       pulumi.String("My Schema"),
    			Description: pulumi.String("Fields used on incidents"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewCustomFieldSchemaFieldConfiguration(ctx, "firstFieldConfiguration", &pagerduty.CustomFieldSchemaFieldConfigurationArgs{
    			Schema:               mySchema.ID(),
    			Field:                csImpact.ID(),
    			Required:             pulumi.Bool(true),
    			DefaultValue:         pulumi.String("none"),
    			DefaultValueDatatype: pulumi.String("string"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.pagerduty.CustomField;
    import com.pulumi.pagerduty.CustomFieldArgs;
    import com.pulumi.pagerduty.CustomFieldSchema;
    import com.pulumi.pagerduty.CustomFieldSchemaArgs;
    import com.pulumi.pagerduty.CustomFieldSchemaFieldConfiguration;
    import com.pulumi.pagerduty.CustomFieldSchemaFieldConfigurationArgs;
    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 CustomField("csImpact", CustomFieldArgs.builder()        
                .datatype("string")
                .build());
    
            var mySchema = new CustomFieldSchema("mySchema", CustomFieldSchemaArgs.builder()        
                .title("My Schema")
                .description("Fields used on incidents")
                .build());
    
            var firstFieldConfiguration = new CustomFieldSchemaFieldConfiguration("firstFieldConfiguration", CustomFieldSchemaFieldConfigurationArgs.builder()        
                .schema(mySchema.id())
                .field(csImpact.id())
                .required(true)
                .defaultValue("none")
                .defaultValueDatatype("string")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    cs_impact = pagerduty.CustomField("csImpact", datatype="string")
    my_schema = pagerduty.CustomFieldSchema("mySchema",
        title="My Schema",
        description="Fields used on incidents")
    first_field_configuration = pagerduty.CustomFieldSchemaFieldConfiguration("firstFieldConfiguration",
        schema=my_schema.id,
        field=cs_impact.id,
        required=True,
        default_value="none",
        default_value_datatype="string")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const csImpact = new pagerduty.CustomField("csImpact", {datatype: "string"});
    const mySchema = new pagerduty.CustomFieldSchema("mySchema", {
        title: "My Schema",
        description: "Fields used on incidents",
    });
    const firstFieldConfiguration = new pagerduty.CustomFieldSchemaFieldConfiguration("firstFieldConfiguration", {
        schema: mySchema.id,
        field: csImpact.id,
        required: true,
        defaultValue: "none",
        defaultValueDatatype: "string",
    });
    
    resources:
      csImpact:
        type: pagerduty:CustomField
        properties:
          datatype: string
      mySchema:
        type: pagerduty:CustomFieldSchema
        properties:
          title: My Schema
          description: Fields used on incidents
      firstFieldConfiguration:
        type: pagerduty:CustomFieldSchemaFieldConfiguration
        properties:
          schema: ${mySchema.id}
          field: ${csImpact.id}
          required: true
          defaultValue: none
          defaultValueDatatype: string
    

    Create CustomFieldSchemaFieldConfiguration Resource

    new CustomFieldSchemaFieldConfiguration(name: string, args: CustomFieldSchemaFieldConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def CustomFieldSchemaFieldConfiguration(resource_name: str,
                                            opts: Optional[ResourceOptions] = None,
                                            default_value: Optional[str] = None,
                                            default_value_datatype: Optional[str] = None,
                                            default_value_multi_value: Optional[bool] = None,
                                            field: Optional[str] = None,
                                            required: Optional[bool] = None,
                                            schema: Optional[str] = None)
    @overload
    def CustomFieldSchemaFieldConfiguration(resource_name: str,
                                            args: CustomFieldSchemaFieldConfigurationArgs,
                                            opts: Optional[ResourceOptions] = None)
    func NewCustomFieldSchemaFieldConfiguration(ctx *Context, name string, args CustomFieldSchemaFieldConfigurationArgs, opts ...ResourceOption) (*CustomFieldSchemaFieldConfiguration, error)
    public CustomFieldSchemaFieldConfiguration(string name, CustomFieldSchemaFieldConfigurationArgs args, CustomResourceOptions? opts = null)
    public CustomFieldSchemaFieldConfiguration(String name, CustomFieldSchemaFieldConfigurationArgs args)
    public CustomFieldSchemaFieldConfiguration(String name, CustomFieldSchemaFieldConfigurationArgs args, CustomResourceOptions options)
    
    type: pagerduty:CustomFieldSchemaFieldConfiguration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CustomFieldSchemaFieldConfigurationArgs
    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 CustomFieldSchemaFieldConfigurationArgs
    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 CustomFieldSchemaFieldConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomFieldSchemaFieldConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomFieldSchemaFieldConfigurationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Field string

    The ID of the field.

    Schema string

    The ID of the schema.

    DefaultValue string

    The default value for the field.

    DefaultValueDatatype string

    The datatype of the default value.

    DefaultValueMultiValue bool

    Whether or not the default value is multi-valued.

    Required bool

    True if the field is required

    Field string

    The ID of the field.

    Schema string

    The ID of the schema.

    DefaultValue string

    The default value for the field.

    DefaultValueDatatype string

    The datatype of the default value.

    DefaultValueMultiValue bool

    Whether or not the default value is multi-valued.

    Required bool

    True if the field is required

    field String

    The ID of the field.

    schema String

    The ID of the schema.

    defaultValue String

    The default value for the field.

    defaultValueDatatype String

    The datatype of the default value.

    defaultValueMultiValue Boolean

    Whether or not the default value is multi-valued.

    required Boolean

    True if the field is required

    field string

    The ID of the field.

    schema string

    The ID of the schema.

    defaultValue string

    The default value for the field.

    defaultValueDatatype string

    The datatype of the default value.

    defaultValueMultiValue boolean

    Whether or not the default value is multi-valued.

    required boolean

    True if the field is required

    field str

    The ID of the field.

    schema str

    The ID of the schema.

    default_value str

    The default value for the field.

    default_value_datatype str

    The datatype of the default value.

    default_value_multi_value bool

    Whether or not the default value is multi-valued.

    required bool

    True if the field is required

    field String

    The ID of the field.

    schema String

    The ID of the schema.

    defaultValue String

    The default value for the field.

    defaultValueDatatype String

    The datatype of the default value.

    defaultValueMultiValue Boolean

    Whether or not the default value is multi-valued.

    required Boolean

    True if the field is required

    Outputs

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

    Get an existing CustomFieldSchemaFieldConfiguration 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?: CustomFieldSchemaFieldConfigurationState, opts?: CustomResourceOptions): CustomFieldSchemaFieldConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            default_value: Optional[str] = None,
            default_value_datatype: Optional[str] = None,
            default_value_multi_value: Optional[bool] = None,
            field: Optional[str] = None,
            required: Optional[bool] = None,
            schema: Optional[str] = None) -> CustomFieldSchemaFieldConfiguration
    func GetCustomFieldSchemaFieldConfiguration(ctx *Context, name string, id IDInput, state *CustomFieldSchemaFieldConfigurationState, opts ...ResourceOption) (*CustomFieldSchemaFieldConfiguration, error)
    public static CustomFieldSchemaFieldConfiguration Get(string name, Input<string> id, CustomFieldSchemaFieldConfigurationState? state, CustomResourceOptions? opts = null)
    public static CustomFieldSchemaFieldConfiguration get(String name, Output<String> id, CustomFieldSchemaFieldConfigurationState 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:
    DefaultValue string

    The default value for the field.

    DefaultValueDatatype string

    The datatype of the default value.

    DefaultValueMultiValue bool

    Whether or not the default value is multi-valued.

    Field string

    The ID of the field.

    Required bool

    True if the field is required

    Schema string

    The ID of the schema.

    DefaultValue string

    The default value for the field.

    DefaultValueDatatype string

    The datatype of the default value.

    DefaultValueMultiValue bool

    Whether or not the default value is multi-valued.

    Field string

    The ID of the field.

    Required bool

    True if the field is required

    Schema string

    The ID of the schema.

    defaultValue String

    The default value for the field.

    defaultValueDatatype String

    The datatype of the default value.

    defaultValueMultiValue Boolean

    Whether or not the default value is multi-valued.

    field String

    The ID of the field.

    required Boolean

    True if the field is required

    schema String

    The ID of the schema.

    defaultValue string

    The default value for the field.

    defaultValueDatatype string

    The datatype of the default value.

    defaultValueMultiValue boolean

    Whether or not the default value is multi-valued.

    field string

    The ID of the field.

    required boolean

    True if the field is required

    schema string

    The ID of the schema.

    default_value str

    The default value for the field.

    default_value_datatype str

    The datatype of the default value.

    default_value_multi_value bool

    Whether or not the default value is multi-valued.

    field str

    The ID of the field.

    required bool

    True if the field is required

    schema str

    The ID of the schema.

    defaultValue String

    The default value for the field.

    defaultValueDatatype String

    The datatype of the default value.

    defaultValueMultiValue Boolean

    Whether or not the default value is multi-valued.

    field String

    The ID of the field.

    required Boolean

    True if the field is required

    schema String

    The ID of the schema.

    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 v3.11.2 published on Wednesday, Aug 30, 2023 by Pulumi