1. Packages
  2. Packages
  3. Pagerduty Provider
  4. API Docs
  5. getCustomField
Viewing docs for PagerDuty v3.11.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
pagerduty logo
Viewing docs for PagerDuty v3.11.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

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

    Use this data source to get information about a specific Custom Field that you can add to a custom field schema.

    Migration

    The incident_custom_field data source provides similar functionality with the same arguments and attributes. The key distinction is that while custom fields returned by this data source may have only applied to a subset of incidents within the account, custom fields returned by the incident_custom_field data source are applied to all incidents in the account.

    Example Usage

    Example coming soon!

    Example coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.pagerduty.PagerdutyFunctions;
    import com.pulumi.pagerduty.inputs.GetCustomFieldArgs;
    import com.pulumi.pagerduty.CustomFieldSchema;
    import com.pulumi.pagerduty.CustomFieldSchemaArgs;
    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) {
            final var sreEnvironment = PagerdutyFunctions.getCustomField(GetCustomFieldArgs.builder()
                .name("environment")
                .build());
    
            var foo = new CustomFieldSchema("foo", CustomFieldSchemaArgs.builder()        
                .title("myschema")
                .description("some description")
                .field(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .build());
    
        }
    }
    

    Example coming soon!

    Example coming soon!

    resources:
      foo:
        type: pagerduty:CustomFieldSchema
        properties:
          title: myschema
          description: some description
          field:
            - field: ${sreEnvironment.id}
    variables:
      sreEnvironment:
        fn::invoke:
          Function: pagerduty:getCustomField
          Arguments:
            name: environment
    

    Using getCustomField

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCustomField(args: GetCustomFieldArgs, opts?: InvokeOptions): Promise<GetCustomFieldResult>
    function getCustomFieldOutput(args: GetCustomFieldOutputArgs, opts?: InvokeOptions): Output<GetCustomFieldResult>
    def get_custom_field(name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCustomFieldResult
    def get_custom_field_output(name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCustomFieldResult]
    func LookupCustomField(ctx *Context, args *LookupCustomFieldArgs, opts ...InvokeOption) (*LookupCustomFieldResult, error)
    func LookupCustomFieldOutput(ctx *Context, args *LookupCustomFieldOutputArgs, opts ...InvokeOption) LookupCustomFieldResultOutput

    > Note: This function is named LookupCustomField in the Go SDK.

    public static class GetCustomField 
    {
        public static Task<GetCustomFieldResult> InvokeAsync(GetCustomFieldArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomFieldResult> Invoke(GetCustomFieldInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomFieldResult> getCustomField(GetCustomFieldArgs args, InvokeOptions options)
    public static Output<GetCustomFieldResult> getCustomField(GetCustomFieldArgs args, InvokeOptions options)
    
    fn::invoke:
      function: pagerduty:index/getCustomField:getCustomField
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the field.
    Name string
    The name of the field.
    name String
    The name of the field.
    name string
    The name of the field.
    name str
    The name of the field.
    name String
    The name of the field.

    getCustomField Result

    The following output properties are available:

    Datatype string
    Description string
    DisplayName string
    FixedOptions bool
    Id string
    The provider-assigned unique ID for this managed resource.
    MultiValue bool
    Name string
    Datatype string
    Description string
    DisplayName string
    FixedOptions bool
    Id string
    The provider-assigned unique ID for this managed resource.
    MultiValue bool
    Name string
    datatype String
    description String
    displayName String
    fixedOptions Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    multiValue Boolean
    name String
    datatype string
    description string
    displayName string
    fixedOptions boolean
    id string
    The provider-assigned unique ID for this managed resource.
    multiValue boolean
    name string
    datatype str
    description str
    display_name str
    fixed_options bool
    id str
    The provider-assigned unique ID for this managed resource.
    multi_value bool
    name str
    datatype String
    description String
    displayName String
    fixedOptions Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    multiValue Boolean
    name String

    Package Details

    Repository
    PagerDuty pulumi/pulumi-pagerduty
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the pagerduty Terraform Provider.
    pagerduty logo
    Viewing docs for PagerDuty v3.11.2 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.