pagerduty.CustomField
A Custom Field is a resuable element which can be added to Custom Field Schemas.
The Custom Fields feature is currently available in Early Access.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
return await Deployment.RunAsync(() =>
{
var csImpact = new Pagerduty.CustomField("csImpact", new()
{
Datatype = "string",
});
var sreEnvironment = new Pagerduty.CustomField("sreEnvironment", new()
{
Datatype = "string",
FixedOptions = true,
});
});
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
}
_, err = pagerduty.NewCustomField(ctx, "sreEnvironment", &pagerduty.CustomFieldArgs{
Datatype: pulumi.String("string"),
FixedOptions: pulumi.Bool(true),
})
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 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 sreEnvironment = new CustomField("sreEnvironment", CustomFieldArgs.builder()
.datatype("string")
.fixedOptions(true)
.build());
}
}
import pulumi
import pulumi_pagerduty as pagerduty
cs_impact = pagerduty.CustomField("csImpact", datatype="string")
sre_environment = pagerduty.CustomField("sreEnvironment",
datatype="string",
fixed_options=True)
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const csImpact = new pagerduty.CustomField("csImpact", {datatype: "string"});
const sreEnvironment = new pagerduty.CustomField("sreEnvironment", {
datatype: "string",
fixedOptions: true,
});
resources:
csImpact:
type: pagerduty:CustomField
properties:
datatype: string
sreEnvironment:
type: pagerduty:CustomField
properties:
datatype: string
fixedOptions: true
Create CustomField Resource
new CustomField(name: string, args: CustomFieldArgs, opts?: CustomResourceOptions);
@overload
def CustomField(resource_name: str,
opts: Optional[ResourceOptions] = None,
datatype: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
fixed_options: Optional[bool] = None,
multi_value: Optional[bool] = None,
name: Optional[str] = None)
@overload
def CustomField(resource_name: str,
args: CustomFieldArgs,
opts: Optional[ResourceOptions] = None)
func NewCustomField(ctx *Context, name string, args CustomFieldArgs, opts ...ResourceOption) (*CustomField, error)
public CustomField(string name, CustomFieldArgs args, CustomResourceOptions? opts = null)
public CustomField(String name, CustomFieldArgs args)
public CustomField(String name, CustomFieldArgs args, CustomResourceOptions options)
type: pagerduty:CustomField
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomFieldArgs
- 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 CustomFieldArgs
- 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 CustomFieldArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomFieldArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomFieldArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CustomField 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 CustomField resource accepts the following input properties:
- Datatype string
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- Display
Name string - Description string
- Fixed
Options bool True if the field can only accept values from a set of options.
- Multi
Value bool True if the field can accept multiple values.
- Name string
The name of the field.
- Datatype string
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- Display
Name string - Description string
- Fixed
Options bool True if the field can only accept values from a set of options.
- Multi
Value bool True if the field can accept multiple values.
- Name string
The name of the field.
- datatype String
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- display
Name String - description String
- fixed
Options Boolean True if the field can only accept values from a set of options.
- multi
Value Boolean True if the field can accept multiple values.
- name String
The name of the field.
- datatype string
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- display
Name string - description string
- fixed
Options boolean True if the field can only accept values from a set of options.
- multi
Value boolean True if the field can accept multiple values.
- name string
The name of the field.
- datatype str
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- display_
name str - description str
- fixed_
options bool True if the field can only accept values from a set of options.
- multi_
value bool True if the field can accept multiple values.
- name str
The name of the field.
- datatype String
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- display
Name String - description String
- fixed
Options Boolean True if the field can only accept values from a set of options.
- multi
Value Boolean True if the field can accept multiple values.
- name String
The name of the field.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomField 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 CustomField Resource
Get an existing CustomField 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?: CustomFieldState, opts?: CustomResourceOptions): CustomField
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
datatype: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
fixed_options: Optional[bool] = None,
multi_value: Optional[bool] = None,
name: Optional[str] = None) -> CustomField
func GetCustomField(ctx *Context, name string, id IDInput, state *CustomFieldState, opts ...ResourceOption) (*CustomField, error)
public static CustomField Get(string name, Input<string> id, CustomFieldState? state, CustomResourceOptions? opts = null)
public static CustomField get(String name, Output<String> id, CustomFieldState 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.
- Datatype string
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- Description string
- Display
Name string - Fixed
Options bool True if the field can only accept values from a set of options.
- Multi
Value bool True if the field can accept multiple values.
- Name string
The name of the field.
- Datatype string
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- Description string
- Display
Name string - Fixed
Options bool True if the field can only accept values from a set of options.
- Multi
Value bool True if the field can accept multiple values.
- Name string
The name of the field.
- datatype String
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- description String
- display
Name String - fixed
Options Boolean True if the field can only accept values from a set of options.
- multi
Value Boolean True if the field can accept multiple values.
- name String
The name of the field.
- datatype string
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- description string
- display
Name string - fixed
Options boolean True if the field can only accept values from a set of options.
- multi
Value boolean True if the field can accept multiple values.
- name string
The name of the field.
- datatype str
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- description str
- display_
name str - fixed_
options bool True if the field can only accept values from a set of options.
- multi_
value bool True if the field can accept multiple values.
- name str
The name of the field.
- datatype String
The datatype of the field. Must be one of
string
,integer
,float
,boolean
,datetime
, orurl
.- description String
- display
Name String - fixed
Options Boolean True if the field can only accept values from a set of options.
- multi
Value Boolean True if the field can accept multiple values.
- name String
The name of the field.
Import
Fields can be imported using the id
, e.g.
$ pulumi import pagerduty:index/customField:CustomField sre_environment PLBP09X
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
pagerduty
Terraform Provider.