@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
220 lines (219 loc) • 9.07 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* An [incident type custom fields](https://developer.pagerduty.com/api-reference/423b6701f3f1b-create-a-custom-field-for-an-incident-type)
* are a feature which will allow customers to extend Incidents with their own
* custom data, to provide additional context and support features such as
* customized filtering, search and analytics. Custom Fields can be applied to
* different incident types. Child types will inherit custom fields from their
* parent types.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const alarmTime = new pagerduty.IncidentTypeCustomField("alarm_time", {
* name: "alarm_time_minutes",
* displayName: "Alarm Time",
* dataType: "integer",
* fieldType: "single_value",
* defaultValue: JSON.stringify(5),
* incidentType: "incident_default",
* });
* const foo = pagerduty.getIncidentType({
* displayName: "Foo",
* });
* const level = new pagerduty.IncidentTypeCustomField("level", {
* name: "level",
* incidentType: foo.then(foo => foo.id),
* displayName: "Level",
* dataType: "string",
* fieldType: "single_value_fixed",
* fieldOptions: [
* "Trace",
* "Debug",
* "Info",
* "Warn",
* "Error",
* "Fatal",
* ],
* });
* const csImpact = new pagerduty.IncidentTypeCustomField("cs_impact", {
* name: "impact",
* incidentType: foo.then(foo => foo.id),
* displayName: "Customer Impact",
* dataType: "string",
* fieldType: "multi_value",
* });
* ```
*
* ## Import
*
* Fields can be imported using the combination of `incident_type_id` and `field_id`, e.g.
*
* ```sh
* $ pulumi import pagerduty:index/incidentTypeCustomField:IncidentTypeCustomField cs_impact PT1234:PF1234
* ```
*/
export declare class IncidentTypeCustomField extends pulumi.CustomResource {
/**
* Get an existing IncidentTypeCustomField resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IncidentTypeCustomFieldState, opts?: pulumi.CustomResourceOptions): IncidentTypeCustomField;
/**
* Returns true if the given object is an instance of IncidentTypeCustomField. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is IncidentTypeCustomField;
/**
* [Updating causes resource replacement] The type of the data of this custom field. Can be one of `string`, `integer`, `float`, `boolean`, `datetime`, or `url` when `dataType` is `singleValue`, otherwise must be `string`. Update
*/
readonly dataType: pulumi.Output<string>;
/**
* The default value to set when new incidents are created. Always specified as a string.
*/
readonly defaultValue: pulumi.Output<string | undefined>;
/**
* The description of the custom field.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The display name of the custom Type.
*/
readonly displayName: pulumi.Output<string>;
/**
* Whether the custom field is enabled. Defaults to true if not provided.
*/
readonly enabled: pulumi.Output<boolean>;
/**
* The options for the custom field. Can only be applied to fields with a type of `singleValueFixed` or `multiValueFixed`.
*/
readonly fieldOptions: pulumi.Output<string[] | undefined>;
/**
* [Updating causes resource replacement] The field type of the field. Must be one of `singleValue`, `singleValueFixed`, `multiValue`, or `multiValueFixed`.
*/
readonly fieldType: pulumi.Output<string | undefined>;
/**
* [Updating causes resource replacement] The id of the incident type the custom field is associated with.
*/
readonly incidentType: pulumi.Output<string>;
/**
* [Updating causes resource replacement] The name of the custom field.
*/
readonly name: pulumi.Output<string>;
/**
* The API show URL at which the object is accessible.
*/
readonly self: pulumi.Output<string>;
/**
* A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
*/
readonly summary: pulumi.Output<string>;
readonly type: pulumi.Output<string>;
/**
* Create a IncidentTypeCustomField resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: IncidentTypeCustomFieldArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering IncidentTypeCustomField resources.
*/
export interface IncidentTypeCustomFieldState {
/**
* [Updating causes resource replacement] The type of the data of this custom field. Can be one of `string`, `integer`, `float`, `boolean`, `datetime`, or `url` when `dataType` is `singleValue`, otherwise must be `string`. Update
*/
dataType?: pulumi.Input<string>;
/**
* The default value to set when new incidents are created. Always specified as a string.
*/
defaultValue?: pulumi.Input<string>;
/**
* The description of the custom field.
*/
description?: pulumi.Input<string>;
/**
* The display name of the custom Type.
*/
displayName?: pulumi.Input<string>;
/**
* Whether the custom field is enabled. Defaults to true if not provided.
*/
enabled?: pulumi.Input<boolean>;
/**
* The options for the custom field. Can only be applied to fields with a type of `singleValueFixed` or `multiValueFixed`.
*/
fieldOptions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* [Updating causes resource replacement] The field type of the field. Must be one of `singleValue`, `singleValueFixed`, `multiValue`, or `multiValueFixed`.
*/
fieldType?: pulumi.Input<string>;
/**
* [Updating causes resource replacement] The id of the incident type the custom field is associated with.
*/
incidentType?: pulumi.Input<string>;
/**
* [Updating causes resource replacement] The name of the custom field.
*/
name?: pulumi.Input<string>;
/**
* The API show URL at which the object is accessible.
*/
self?: pulumi.Input<string>;
/**
* A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
*/
summary?: pulumi.Input<string>;
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a IncidentTypeCustomField resource.
*/
export interface IncidentTypeCustomFieldArgs {
/**
* [Updating causes resource replacement] The type of the data of this custom field. Can be one of `string`, `integer`, `float`, `boolean`, `datetime`, or `url` when `dataType` is `singleValue`, otherwise must be `string`. Update
*/
dataType: pulumi.Input<string>;
/**
* The default value to set when new incidents are created. Always specified as a string.
*/
defaultValue?: pulumi.Input<string>;
/**
* The description of the custom field.
*/
description?: pulumi.Input<string>;
/**
* The display name of the custom Type.
*/
displayName: pulumi.Input<string>;
/**
* Whether the custom field is enabled. Defaults to true if not provided.
*/
enabled?: pulumi.Input<boolean>;
/**
* The options for the custom field. Can only be applied to fields with a type of `singleValueFixed` or `multiValueFixed`.
*/
fieldOptions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* [Updating causes resource replacement] The field type of the field. Must be one of `singleValue`, `singleValueFixed`, `multiValue`, or `multiValueFixed`.
*/
fieldType?: pulumi.Input<string>;
/**
* [Updating causes resource replacement] The id of the incident type the custom field is associated with.
*/
incidentType: pulumi.Input<string>;
/**
* [Updating causes resource replacement] The name of the custom field.
*/
name?: pulumi.Input<string>;
}