published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
!> This Resource is no longer functional. Documentation is left here for the purpose of documenting migration steps.
A Custom Field Schema Assignment is a relationship between a Custom Field Schema and a Service.
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 firstService = Pagerduty.GetService.Invoke(new()
{
Name = "My First Service",
});
var assignment = new Pagerduty.CustomFieldSchemaAssignment("assignment", new()
{
Schema = mySchema.Id,
Service = firstService.Apply(getServiceResult => getServiceResult.Id),
});
});
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 {
_, 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
}
firstService, err := pagerduty.LookupService(ctx, &pagerduty.LookupServiceArgs{
Name: "My First Service",
}, nil)
if err != nil {
return err
}
_, err = pagerduty.NewCustomFieldSchemaAssignment(ctx, "assignment", &pagerduty.CustomFieldSchemaAssignmentArgs{
Schema: mySchema.ID(),
Service: *pulumi.String(firstService.Id),
})
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.PagerdutyFunctions;
import com.pulumi.pagerduty.inputs.GetServiceArgs;
import com.pulumi.pagerduty.CustomFieldSchemaAssignment;
import com.pulumi.pagerduty.CustomFieldSchemaAssignmentArgs;
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());
final var firstService = PagerdutyFunctions.getService(GetServiceArgs.builder()
.name("My First Service")
.build());
var assignment = new CustomFieldSchemaAssignment("assignment", CustomFieldSchemaAssignmentArgs.builder()
.schema(mySchema.id())
.service(firstService.applyValue(getServiceResult -> getServiceResult.id()))
.build());
}
}
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 firstService = pagerduty.getService({
name: "My First Service",
});
const assignment = new pagerduty.CustomFieldSchemaAssignment("assignment", {
schema: mySchema.id,
service: firstService.then(firstService => firstService.id),
});
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_service = pagerduty.get_service(name="My First Service")
assignment = pagerduty.CustomFieldSchemaAssignment("assignment",
schema=my_schema.id,
service=first_service.id)
resources:
csImpact:
type: pagerduty:CustomField
properties:
datatype: string
mySchema:
type: pagerduty:CustomFieldSchema
properties:
title: My Schema
description: Fields used on incidents
assignment:
type: pagerduty:CustomFieldSchemaAssignment
properties:
schema: ${mySchema.id}
service: ${firstService.id}
variables:
firstService:
fn::invoke:
Function: pagerduty:getService
Arguments:
name: My First Service
Create CustomFieldSchemaAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomFieldSchemaAssignment(name: string, args: CustomFieldSchemaAssignmentArgs, opts?: CustomResourceOptions);@overload
def CustomFieldSchemaAssignment(resource_name: str,
args: CustomFieldSchemaAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomFieldSchemaAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
schema: Optional[str] = None,
service: Optional[str] = None)func NewCustomFieldSchemaAssignment(ctx *Context, name string, args CustomFieldSchemaAssignmentArgs, opts ...ResourceOption) (*CustomFieldSchemaAssignment, error)public CustomFieldSchemaAssignment(string name, CustomFieldSchemaAssignmentArgs args, CustomResourceOptions? opts = null)
public CustomFieldSchemaAssignment(String name, CustomFieldSchemaAssignmentArgs args)
public CustomFieldSchemaAssignment(String name, CustomFieldSchemaAssignmentArgs args, CustomResourceOptions options)
type: pagerduty:CustomFieldSchemaAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CustomFieldSchemaAssignmentArgs
- 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 CustomFieldSchemaAssignmentArgs
- 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 CustomFieldSchemaAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomFieldSchemaAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomFieldSchemaAssignmentArgs
- 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 customFieldSchemaAssignmentResource = new Pagerduty.CustomFieldSchemaAssignment("customFieldSchemaAssignmentResource", new()
{
Schema = "string",
Service = "string",
});
example, err := pagerduty.NewCustomFieldSchemaAssignment(ctx, "customFieldSchemaAssignmentResource", &pagerduty.CustomFieldSchemaAssignmentArgs{
Schema: pulumi.String("string"),
Service: pulumi.String("string"),
})
var customFieldSchemaAssignmentResource = new CustomFieldSchemaAssignment("customFieldSchemaAssignmentResource", CustomFieldSchemaAssignmentArgs.builder()
.schema("string")
.service("string")
.build());
custom_field_schema_assignment_resource = pagerduty.CustomFieldSchemaAssignment("customFieldSchemaAssignmentResource",
schema="string",
service="string")
const customFieldSchemaAssignmentResource = new pagerduty.CustomFieldSchemaAssignment("customFieldSchemaAssignmentResource", {
schema: "string",
service: "string",
});
type: pagerduty:CustomFieldSchemaAssignment
properties:
schema: string
service: string
CustomFieldSchemaAssignment 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 CustomFieldSchemaAssignment resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomFieldSchemaAssignment 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 CustomFieldSchemaAssignment Resource
Get an existing CustomFieldSchemaAssignment 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?: CustomFieldSchemaAssignmentState, opts?: CustomResourceOptions): CustomFieldSchemaAssignment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
schema: Optional[str] = None,
service: Optional[str] = None) -> CustomFieldSchemaAssignmentfunc GetCustomFieldSchemaAssignment(ctx *Context, name string, id IDInput, state *CustomFieldSchemaAssignmentState, opts ...ResourceOption) (*CustomFieldSchemaAssignment, error)public static CustomFieldSchemaAssignment Get(string name, Input<string> id, CustomFieldSchemaAssignmentState? state, CustomResourceOptions? opts = null)public static CustomFieldSchemaAssignment get(String name, Output<String> id, CustomFieldSchemaAssignmentState state, CustomResourceOptions options)resources: _: type: pagerduty:CustomFieldSchemaAssignment get: id: ${id}- 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.
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerdutyTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
