1. Packages
  2. Pagerduty Provider
  3. API Docs
  4. getServiceCustomField
PagerDuty v4.25.1 published on Saturday, Jun 14, 2025 by Pulumi

pagerduty.getServiceCustomField

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.25.1 published on Saturday, Jun 14, 2025 by Pulumi

    Use this data source to get information about a specific Service Custom Field that has been configured in your PagerDuty account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const regions = pagerduty.getServiceCustomField({
        displayName: "AWS Regions",
    });
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    regions = pagerduty.get_service_custom_field(display_name="AWS Regions")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := pagerduty.LookupServiceCustomField(ctx, &pagerduty.LookupServiceCustomFieldArgs{
    			DisplayName: "AWS Regions",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = Pulumi.Pagerduty;
    
    return await Deployment.RunAsync(() => 
    {
        var regions = Pagerduty.GetServiceCustomField.Invoke(new()
        {
            DisplayName = "AWS Regions",
        });
    
    });
    
    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.GetServiceCustomFieldArgs;
    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 regions = PagerdutyFunctions.getServiceCustomField(GetServiceCustomFieldArgs.builder()
                .displayName("AWS Regions")
                .build());
    
        }
    }
    
    variables:
      regions:
        fn::invoke:
          function: pagerduty:getServiceCustomField
          arguments:
            displayName: AWS Regions
    

    Using getServiceCustomField

    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 getServiceCustomField(args: GetServiceCustomFieldArgs, opts?: InvokeOptions): Promise<GetServiceCustomFieldResult>
    function getServiceCustomFieldOutput(args: GetServiceCustomFieldOutputArgs, opts?: InvokeOptions): Output<GetServiceCustomFieldResult>
    def get_service_custom_field(display_name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetServiceCustomFieldResult
    def get_service_custom_field_output(display_name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetServiceCustomFieldResult]
    func LookupServiceCustomField(ctx *Context, args *LookupServiceCustomFieldArgs, opts ...InvokeOption) (*LookupServiceCustomFieldResult, error)
    func LookupServiceCustomFieldOutput(ctx *Context, args *LookupServiceCustomFieldOutputArgs, opts ...InvokeOption) LookupServiceCustomFieldResultOutput

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

    public static class GetServiceCustomField 
    {
        public static Task<GetServiceCustomFieldResult> InvokeAsync(GetServiceCustomFieldArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceCustomFieldResult> Invoke(GetServiceCustomFieldInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServiceCustomFieldResult> getServiceCustomField(GetServiceCustomFieldArgs args, InvokeOptions options)
    public static Output<GetServiceCustomFieldResult> getServiceCustomField(GetServiceCustomFieldArgs args, InvokeOptions options)
    
    fn::invoke:
      function: pagerduty:index/getServiceCustomField:getServiceCustomField
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DisplayName string
    The human-readable name of the field to look up. This must be unique across an account.
    DisplayName string
    The human-readable name of the field to look up. This must be unique across an account.
    displayName String
    The human-readable name of the field to look up. This must be unique across an account.
    displayName string
    The human-readable name of the field to look up. This must be unique across an account.
    display_name str
    The human-readable name of the field to look up. This must be unique across an account.
    displayName String
    The human-readable name of the field to look up. This must be unique across an account.

    getServiceCustomField Result

    The following output properties are available:

    DataType string
    The data type of the field option.
    DefaultValue string
    The default value for the custom field, if any.
    Description string
    A description of the data this field contains.
    DisplayName string
    Enabled bool
    Whether the field is enabled.
    FieldOptions List<GetServiceCustomFieldFieldOption>
    The options for the custom field. Only applies to single_value_fixed and multi_value_fixed field types. Each field option contains:
    FieldType string
    The type of data this field contains. In combination with the data_type field.
    Id string
    The ID of the found field.
    Name string
    The name of the field. Contains ASCII characters, specifically lowercase letters, digits, and underscores.
    Self string
    The API show URL at which the object is accessible.
    Summary string
    A short-form, server-generated string that provides succinct, important information about the field.
    Type string
    API object type.
    DataType string
    The data type of the field option.
    DefaultValue string
    The default value for the custom field, if any.
    Description string
    A description of the data this field contains.
    DisplayName string
    Enabled bool
    Whether the field is enabled.
    FieldOptions []GetServiceCustomFieldFieldOption
    The options for the custom field. Only applies to single_value_fixed and multi_value_fixed field types. Each field option contains:
    FieldType string
    The type of data this field contains. In combination with the data_type field.
    Id string
    The ID of the found field.
    Name string
    The name of the field. Contains ASCII characters, specifically lowercase letters, digits, and underscores.
    Self string
    The API show URL at which the object is accessible.
    Summary string
    A short-form, server-generated string that provides succinct, important information about the field.
    Type string
    API object type.
    dataType String
    The data type of the field option.
    defaultValue String
    The default value for the custom field, if any.
    description String
    A description of the data this field contains.
    displayName String
    enabled Boolean
    Whether the field is enabled.
    fieldOptions List<GetServiceCustomFieldFieldOption>
    The options for the custom field. Only applies to single_value_fixed and multi_value_fixed field types. Each field option contains:
    fieldType String
    The type of data this field contains. In combination with the data_type field.
    id String
    The ID of the found field.
    name String
    The name of the field. Contains ASCII characters, specifically lowercase letters, digits, and underscores.
    self String
    The API show URL at which the object is accessible.
    summary String
    A short-form, server-generated string that provides succinct, important information about the field.
    type String
    API object type.
    dataType string
    The data type of the field option.
    defaultValue string
    The default value for the custom field, if any.
    description string
    A description of the data this field contains.
    displayName string
    enabled boolean
    Whether the field is enabled.
    fieldOptions GetServiceCustomFieldFieldOption[]
    The options for the custom field. Only applies to single_value_fixed and multi_value_fixed field types. Each field option contains:
    fieldType string
    The type of data this field contains. In combination with the data_type field.
    id string
    The ID of the found field.
    name string
    The name of the field. Contains ASCII characters, specifically lowercase letters, digits, and underscores.
    self string
    The API show URL at which the object is accessible.
    summary string
    A short-form, server-generated string that provides succinct, important information about the field.
    type string
    API object type.
    data_type str
    The data type of the field option.
    default_value str
    The default value for the custom field, if any.
    description str
    A description of the data this field contains.
    display_name str
    enabled bool
    Whether the field is enabled.
    field_options Sequence[GetServiceCustomFieldFieldOption]
    The options for the custom field. Only applies to single_value_fixed and multi_value_fixed field types. Each field option contains:
    field_type str
    The type of data this field contains. In combination with the data_type field.
    id str
    The ID of the found field.
    name str
    The name of the field. Contains ASCII characters, specifically lowercase letters, digits, and underscores.
    self str
    The API show URL at which the object is accessible.
    summary str
    A short-form, server-generated string that provides succinct, important information about the field.
    type str
    API object type.
    dataType String
    The data type of the field option.
    defaultValue String
    The default value for the custom field, if any.
    description String
    A description of the data this field contains.
    displayName String
    enabled Boolean
    Whether the field is enabled.
    fieldOptions List<Property Map>
    The options for the custom field. Only applies to single_value_fixed and multi_value_fixed field types. Each field option contains:
    fieldType String
    The type of data this field contains. In combination with the data_type field.
    id String
    The ID of the found field.
    name String
    The name of the field. Contains ASCII characters, specifically lowercase letters, digits, and underscores.
    self String
    The API show URL at which the object is accessible.
    summary String
    A short-form, server-generated string that provides succinct, important information about the field.
    type String
    API object type.

    Supporting Types

    GetServiceCustomFieldFieldOption

    DataType string
    The data type of the field option.
    Id string
    The ID of the found field.
    Value string
    The value of the field option.
    DataType string
    The data type of the field option.
    Id string
    The ID of the found field.
    Value string
    The value of the field option.
    dataType String
    The data type of the field option.
    id String
    The ID of the found field.
    value String
    The value of the field option.
    dataType string
    The data type of the field option.
    id string
    The ID of the found field.
    value string
    The value of the field option.
    data_type str
    The data type of the field option.
    id str
    The ID of the found field.
    value str
    The value of the field option.
    dataType String
    The data type of the field option.
    id String
    The ID of the found field.
    value String
    The value of the field option.

    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 v4.25.1 published on Saturday, Jun 14, 2025 by Pulumi