@pulumi/opsgenie
Version:
A Pulumi package for creating and managing opsgenie cloud resources.
166 lines (165 loc) • 6.74 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages a Schedule Rotation within Opsgenie.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as opsgenie from "@pulumi/opsgenie";
*
* const test = new opsgenie.ScheduleRotation("test", {
* scheduleId: testOpsgenieSchedule.id,
* name: "test",
* startDate: "2019-06-18T17:00:00Z",
* endDate: "2019-06-20T17:30:00Z",
* type: "hourly",
* length: 6,
* participants: [{
* type: "user",
* id: testOpsgenieUser.id,
* }],
* timeRestrictions: [{
* type: "time-of-day",
* restriction: [{
* startHour: 1,
* startMin: 1,
* endHour: 10,
* endMin: 1,
* }],
* }],
* });
* ```
*
* ## Import
*
* Schedule Rotations can be imported using the `schedule_id/rotation_id`, e.g.
*
* ```sh
* $ pulumi import opsgenie:index/scheduleRotation:ScheduleRotation * `opsgenie_schedule_rotation.test schedule_id/rotation_id`
* ```
*/
export declare class ScheduleRotation extends pulumi.CustomResource {
/**
* Get an existing ScheduleRotation 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?: ScheduleRotationState, opts?: pulumi.CustomResourceOptions): ScheduleRotation;
/**
* Returns true if the given object is an instance of ScheduleRotation. 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 ScheduleRotation;
/**
* This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00). Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically
*/
readonly endDate: pulumi.Output<string | undefined>;
/**
* Length of the rotation with default value 1.
*/
readonly length: pulumi.Output<number | undefined>;
/**
* Name of rotation.
*/
readonly name: pulumi.Output<string>;
/**
* List of escalations, teams, users or the reserved word none which will be used in schedule. Each of them can be used multiple times and will be rotated in the order they given. "user,escalation,team,none"
*/
readonly participants: pulumi.Output<outputs.ScheduleRotationParticipant[]>;
/**
* Identifier of the schedule.
*/
readonly scheduleId: pulumi.Output<string>;
/**
* This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00). Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically
*/
readonly startDate: pulumi.Output<string>;
readonly timeRestrictions: pulumi.Output<outputs.ScheduleRotationTimeRestriction[] | undefined>;
/**
* Type of rotation. May be one of daily, weekly and hourly.
*/
readonly type: pulumi.Output<string>;
/**
* Create a ScheduleRotation 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: ScheduleRotationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ScheduleRotation resources.
*/
export interface ScheduleRotationState {
/**
* This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00). Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically
*/
endDate?: pulumi.Input<string>;
/**
* Length of the rotation with default value 1.
*/
length?: pulumi.Input<number>;
/**
* Name of rotation.
*/
name?: pulumi.Input<string>;
/**
* List of escalations, teams, users or the reserved word none which will be used in schedule. Each of them can be used multiple times and will be rotated in the order they given. "user,escalation,team,none"
*/
participants?: pulumi.Input<pulumi.Input<inputs.ScheduleRotationParticipant>[]>;
/**
* Identifier of the schedule.
*/
scheduleId?: pulumi.Input<string>;
/**
* This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00). Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically
*/
startDate?: pulumi.Input<string>;
timeRestrictions?: pulumi.Input<pulumi.Input<inputs.ScheduleRotationTimeRestriction>[]>;
/**
* Type of rotation. May be one of daily, weekly and hourly.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ScheduleRotation resource.
*/
export interface ScheduleRotationArgs {
/**
* This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00). Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically
*/
endDate?: pulumi.Input<string>;
/**
* Length of the rotation with default value 1.
*/
length?: pulumi.Input<number>;
/**
* Name of rotation.
*/
name?: pulumi.Input<string>;
/**
* List of escalations, teams, users or the reserved word none which will be used in schedule. Each of them can be used multiple times and will be rotated in the order they given. "user,escalation,team,none"
*/
participants: pulumi.Input<pulumi.Input<inputs.ScheduleRotationParticipant>[]>;
/**
* Identifier of the schedule.
*/
scheduleId: pulumi.Input<string>;
/**
* This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00). Minutes may take 0 or 30 as value. Otherwise they will be converted to nearest 0 or 30 automatically
*/
startDate: pulumi.Input<string>;
timeRestrictions?: pulumi.Input<pulumi.Input<inputs.ScheduleRotationTimeRestriction>[]>;
/**
* Type of rotation. May be one of daily, weekly and hourly.
*/
type: pulumi.Input<string>;
}