UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

102 lines (101 loc) 2.77 kB
import * as pulumi from "@pulumi/pulumi"; /** * Use this data source to get information about a specific [user](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIzMw-list-users) that you can use for other PagerDuty resources. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const me = pagerduty.getUser({ * email: "me@example.com", * }); * const foo = new pagerduty.EscalationPolicy("foo", { * name: "Engineering Escalation Policy", * numLoops: 2, * rules: [{ * escalationDelayInMinutes: 10, * targets: [{ * type: "user_reference", * id: me.then(me => me.id), * }], * }], * }); * ``` */ export declare function getUser(args: GetUserArgs, opts?: pulumi.InvokeOptions): Promise<GetUserResult>; /** * A collection of arguments for invoking getUser. */ export interface GetUserArgs { /** * The email to use to find a user in the PagerDuty API. */ email: string; } /** * A collection of values returned by getUser. */ export interface GetUserResult { /** * The human-friendly description of the found user. */ readonly description: string; readonly email: string; /** * The ID of the found user. */ readonly id: string; /** * The job title of the found user. */ readonly jobTitle: string; /** * The short name of the found user. */ readonly name: string; /** * The role of the found user. */ readonly role: string; /** * The timezone of the found user. */ readonly timeZone: string; } /** * Use this data source to get information about a specific [user](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIzMw-list-users) that you can use for other PagerDuty resources. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const me = pagerduty.getUser({ * email: "me@example.com", * }); * const foo = new pagerduty.EscalationPolicy("foo", { * name: "Engineering Escalation Policy", * numLoops: 2, * rules: [{ * escalationDelayInMinutes: 10, * targets: [{ * type: "user_reference", * id: me.then(me => me.id), * }], * }], * }); * ``` */ export declare function getUserOutput(args: GetUserOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetUserResult>; /** * A collection of arguments for invoking getUser. */ export interface GetUserOutputArgs { /** * The email to use to find a user in the PagerDuty API. */ email: pulumi.Input<string>; }