@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
182 lines • 7.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* An [extension](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODEzMw-create-an-extension) can be associated with a service.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const webhook = pagerduty.getExtensionSchema({
* name: "Generic V2 Webhook",
* });
* const example = new pagerduty.User("example", {
* name: "Howard James",
* email: "howard.james@example.domain",
* });
* const exampleEscalationPolicy = new pagerduty.EscalationPolicy("example", {
* name: "Engineering Escalation Policy",
* numLoops: 2,
* rules: [{
* escalationDelayInMinutes: 10,
* targets: [{
* type: "user",
* id: example.id,
* }],
* }],
* });
* const exampleService = new pagerduty.Service("example", {
* name: "My Web App",
* autoResolveTimeout: "14400",
* acknowledgementTimeout: "600",
* escalationPolicy: exampleEscalationPolicy.id,
* });
* const slack = new pagerduty.Extension("slack", {
* name: "My Web App Extension",
* endpointUrl: "https://generic_webhook_url/XXXXXX/BBBBBB",
* extensionSchema: webhook.then(webhook => webhook.id),
* extensionObjects: [exampleService.id],
* config: `{
* \\t\\"restrict\\": \\"any\\",
* \\t\\"notify_types\\": {
* \\t\\t\\t\\"resolve\\": false,
* \\t\\t\\t\\"acknowledge\\": false,
* \\t\\t\\t\\"assignments\\": false
* \\t},
* \\t\\"access_token\\": \\"XXX\\"
* }
* `,
* });
* ```
*
* ## Import
*
* Extensions can be imported using the id.e.g.
*
* ```sh
* $ pulumi import pagerduty:index/extension:Extension main PLBP09X
* ```
*/
export declare class Extension extends pulumi.CustomResource {
/**
* Get an existing Extension 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?: ExtensionState, opts?: pulumi.CustomResourceOptions): Extension;
/**
* Returns true if the given object is an instance of Extension. 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 Extension;
/**
* The configuration of the service extension as string containing plain JSON-encoded data.
*/
readonly config: pulumi.Output<string>;
/**
* The url of the extension.
* **Note:** The [endpoint URL is Optional API wise](https://api-reference.pagerduty.com/#!/Extensions/post_extensions) in most cases. But in some cases it is a _Required_ parameter. For example, `pagerduty.getExtensionSchema` named `Generic V2 Webhook` doesn't accept `pagerduty.Extension` with no `endpointUrl`, but one with named `Slack` accepts.
*/
readonly endpointUrl: pulumi.Output<string>;
/**
* This is the objects for which the extension applies (An array of service ids).
*/
readonly extensionObjects: pulumi.Output<string[]>;
/**
* This is the schema for this extension.
*/
readonly extensionSchema: pulumi.Output<string>;
/**
* URL at which the entity is uniquely displayed in the Web app
*/
readonly htmlUrl: pulumi.Output<string>;
/**
* The name of the service extension.
*/
readonly name: 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.
*
* **Note:** You can use the `pagerduty.getExtensionSchema` data source to locate the appropriate extension vendor ID.
*/
readonly summary: pulumi.Output<string>;
readonly type: pulumi.Output<string>;
/**
* Create a Extension 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: ExtensionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Extension resources.
*/
export interface ExtensionState {
/**
* The configuration of the service extension as string containing plain JSON-encoded data.
*/
config?: pulumi.Input<string | undefined>;
/**
* The url of the extension.
* **Note:** The [endpoint URL is Optional API wise](https://api-reference.pagerduty.com/#!/Extensions/post_extensions) in most cases. But in some cases it is a _Required_ parameter. For example, `pagerduty.getExtensionSchema` named `Generic V2 Webhook` doesn't accept `pagerduty.Extension` with no `endpointUrl`, but one with named `Slack` accepts.
*/
endpointUrl?: pulumi.Input<string | undefined>;
/**
* This is the objects for which the extension applies (An array of service ids).
*/
extensionObjects?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* This is the schema for this extension.
*/
extensionSchema?: pulumi.Input<string | undefined>;
/**
* URL at which the entity is uniquely displayed in the Web app
*/
htmlUrl?: pulumi.Input<string | undefined>;
/**
* The name of the service extension.
*/
name?: pulumi.Input<string | undefined>;
/**
* 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.
*
* **Note:** You can use the `pagerduty.getExtensionSchema` data source to locate the appropriate extension vendor ID.
*/
summary?: pulumi.Input<string | undefined>;
type?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Extension resource.
*/
export interface ExtensionArgs {
/**
* The configuration of the service extension as string containing plain JSON-encoded data.
*/
config?: pulumi.Input<string | undefined>;
/**
* The url of the extension.
* **Note:** The [endpoint URL is Optional API wise](https://api-reference.pagerduty.com/#!/Extensions/post_extensions) in most cases. But in some cases it is a _Required_ parameter. For example, `pagerduty.getExtensionSchema` named `Generic V2 Webhook` doesn't accept `pagerduty.Extension` with no `endpointUrl`, but one with named `Slack` accepts.
*/
endpointUrl?: pulumi.Input<string | undefined>;
/**
* This is the objects for which the extension applies (An array of service ids).
*/
extensionObjects: pulumi.Input<pulumi.Input<string>[]>;
/**
* This is the schema for this extension.
*/
extensionSchema: pulumi.Input<string>;
/**
* The name of the service extension.
*/
name?: pulumi.Input<string | undefined>;
type?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=extension.d.ts.map