UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

177 lines 5.51 kB
import * as pulumi from "@pulumi/pulumi"; /** * Use this data source to get information about a specific [ruleset](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE3MQ-list-rulesets) that you can use for managing and grouping [event rules](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE3Ng-list-event-rules). * * <div role="alert" class="alert alert-warning"> * <div class="alert-title"><i class="fa fa-warning"></i>End-of-Life</div> * <p> * Rulesets and Event Rules will end-of-life soon. We highly recommend that you * <a * href="https://support.pagerduty.com/docs/migrate-to-event-orchestration" * rel="noopener noreferrer" * target="_blank" * >migrate to Event Orchestration</a> * as soon as possible so you can take advantage of the new functionality, such * as improved UI, rule creation, REST APIs and Terraform support, advanced * conditions, and rule nesting. * </p> * </div> * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = pagerduty.getRuleset({ * name: "My Ruleset", * }); * const foo = new pagerduty.RulesetRule("foo", { * ruleset: example.then(example => example.id), * position: 0, * disabled: false, * conditions: { * operator: "and", * subconditions: [ * { * operator: "contains", * parameters: [{ * value: "disk space", * path: "payload.summary", * }], * }, * { * operator: "contains", * parameters: [{ * value: "db", * path: "payload.source", * }], * }, * ], * }, * actions: { * routes: [{ * value: "P5DTL0K", * }], * }, * }); * ``` * * ### Default Global Ruleset * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const defaultGlobal = pagerduty.getRuleset({ * name: "Default Global", * }); * ``` */ export declare function getRuleset(args: GetRulesetArgs, opts?: pulumi.InvokeOptions): Promise<GetRulesetResult>; /** * A collection of arguments for invoking getRuleset. */ export interface GetRulesetArgs { /** * The name of the ruleset to find in the PagerDuty API. */ name: string; } /** * A collection of values returned by getRuleset. */ export interface GetRulesetResult { /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The name of the found ruleset. */ readonly name: string; /** * Routing keys routed to this ruleset. */ readonly routingKeys: string[]; } /** * Use this data source to get information about a specific [ruleset](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE3MQ-list-rulesets) that you can use for managing and grouping [event rules](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE3Ng-list-event-rules). * * <div role="alert" class="alert alert-warning"> * <div class="alert-title"><i class="fa fa-warning"></i>End-of-Life</div> * <p> * Rulesets and Event Rules will end-of-life soon. We highly recommend that you * <a * href="https://support.pagerduty.com/docs/migrate-to-event-orchestration" * rel="noopener noreferrer" * target="_blank" * >migrate to Event Orchestration</a> * as soon as possible so you can take advantage of the new functionality, such * as improved UI, rule creation, REST APIs and Terraform support, advanced * conditions, and rule nesting. * </p> * </div> * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = pagerduty.getRuleset({ * name: "My Ruleset", * }); * const foo = new pagerduty.RulesetRule("foo", { * ruleset: example.then(example => example.id), * position: 0, * disabled: false, * conditions: { * operator: "and", * subconditions: [ * { * operator: "contains", * parameters: [{ * value: "disk space", * path: "payload.summary", * }], * }, * { * operator: "contains", * parameters: [{ * value: "db", * path: "payload.source", * }], * }, * ], * }, * actions: { * routes: [{ * value: "P5DTL0K", * }], * }, * }); * ``` * * ### Default Global Ruleset * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const defaultGlobal = pagerduty.getRuleset({ * name: "Default Global", * }); * ``` */ export declare function getRulesetOutput(args: GetRulesetOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRulesetResult>; /** * A collection of arguments for invoking getRuleset. */ export interface GetRulesetOutputArgs { /** * The name of the ruleset to find in the PagerDuty API. */ name: pulumi.Input<string>; } //# sourceMappingURL=getRuleset.d.ts.map