UNPKG

@pulumi/opsgenie

Version:

A Pulumi package for creating and managing opsgenie cloud resources.

194 lines (193 loc) 7.67 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Manages a Team Routing Rule within Opsgenie. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as opsgenie from "@pulumi/opsgenie"; * * const test = new opsgenie.Schedule("test", { * name: "genieschedule", * description: "schedule test", * timezone: "Europe/Rome", * enabled: false, * }); * const testTeam = new opsgenie.Team("test", { * name: "example team", * description: "This team deals with all the things", * }); * const testTeamRoutingRule = new opsgenie.TeamRoutingRule("test", { * name: "routing rule example", * teamId: testTeam.id, * order: 0, * timezone: "America/Los_Angeles", * criterias: [{ * type: "match-any-condition", * conditions: [{ * field: "message", * operation: "contains", * expectedValue: "expected1", * not: false, * }], * }], * timeRestrictions: [{ * type: "weekday-and-time-of-day", * restrictionList: [{ * startDay: "monday", * startHour: 8, * startMin: 0, * endDay: "tuesday", * endHour: 18, * endMin: 30, * }], * }], * notifies: [{ * name: test.name, * type: "schedule", * }], * }); * ``` * * ## Import * * Team Routing Rules can be imported using the `team_id/routing_rule_id`, e.g. * * ```sh * $ pulumi import opsgenie:index/teamRoutingRule:TeamRoutingRule ruletest team_id/routing_rule_id` * ``` */ export declare class TeamRoutingRule extends pulumi.CustomResource { /** * Get an existing TeamRoutingRule 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?: TeamRoutingRuleState, opts?: pulumi.CustomResourceOptions): TeamRoutingRule; /** * Returns true if the given object is an instance of TeamRoutingRule. 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 TeamRoutingRule; /** * You can refer Criteria for detailed information about criteria and its fields */ readonly criterias: pulumi.Output<outputs.TeamRoutingRuleCriteria[] | undefined>; /** * Only use when importing default routing rule */ readonly isDefault: pulumi.Output<boolean | undefined>; /** * Name of the team routing rule */ readonly name: pulumi.Output<string>; /** * Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: `schedule`, `escalation`, `none` */ readonly notifies: pulumi.Output<outputs.TeamRoutingRuleNotify[]>; /** * The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n) */ readonly order: pulumi.Output<number | undefined>; /** * Id of the team owning the routing rule */ readonly teamId: pulumi.Output<string>; /** * You can refer Time Restriction for detailed information about time restriction and its fields. */ readonly timeRestrictions: pulumi.Output<outputs.TeamRoutingRuleTimeRestriction[] | undefined>; /** * Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones */ readonly timezone: pulumi.Output<string | undefined>; /** * Create a TeamRoutingRule 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: TeamRoutingRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TeamRoutingRule resources. */ export interface TeamRoutingRuleState { /** * You can refer Criteria for detailed information about criteria and its fields */ criterias?: pulumi.Input<pulumi.Input<inputs.TeamRoutingRuleCriteria>[]>; /** * Only use when importing default routing rule */ isDefault?: pulumi.Input<boolean>; /** * Name of the team routing rule */ name?: pulumi.Input<string>; /** * Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: `schedule`, `escalation`, `none` */ notifies?: pulumi.Input<pulumi.Input<inputs.TeamRoutingRuleNotify>[]>; /** * The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n) */ order?: pulumi.Input<number>; /** * Id of the team owning the routing rule */ teamId?: pulumi.Input<string>; /** * You can refer Time Restriction for detailed information about time restriction and its fields. */ timeRestrictions?: pulumi.Input<pulumi.Input<inputs.TeamRoutingRuleTimeRestriction>[]>; /** * Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones */ timezone?: pulumi.Input<string>; } /** * The set of arguments for constructing a TeamRoutingRule resource. */ export interface TeamRoutingRuleArgs { /** * You can refer Criteria for detailed information about criteria and its fields */ criterias?: pulumi.Input<pulumi.Input<inputs.TeamRoutingRuleCriteria>[]>; /** * Only use when importing default routing rule */ isDefault?: pulumi.Input<boolean>; /** * Name of the team routing rule */ name?: pulumi.Input<string>; /** * Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: `schedule`, `escalation`, `none` */ notifies: pulumi.Input<pulumi.Input<inputs.TeamRoutingRuleNotify>[]>; /** * The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n) */ order?: pulumi.Input<number>; /** * Id of the team owning the routing rule */ teamId: pulumi.Input<string>; /** * You can refer Time Restriction for detailed information about time restriction and its fields. */ timeRestrictions?: pulumi.Input<pulumi.Input<inputs.TeamRoutingRuleTimeRestriction>[]>; /** * Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones */ timezone?: pulumi.Input<string>; }