pagerduty logo
PagerDuty v3.9.0, Mar 14 23

pagerduty.getCustomField

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

The Custom Fields feature is currently available in Early Access.

Example Usage

Coming soon!

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());

    }
}

Coming soon!

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)
// Output-based functions aren't available in Java yet
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.