@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
111 lines (110 loc) • 4.81 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A [maintenance window](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE1OA-create-a-maintenance-window) is used to temporarily disable one or more services for a set period of time. No incidents will be triggered and no notifications will be received while a service is disabled by a maintenance window.
*
* Maintenance windows are specified to start at a certain time and end after they have begun. Once started, a maintenance window cannot be deleted; it can only be ended immediately to re-enable the service.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const example = new pagerduty.MaintenanceWindow("example", {
* startTime: "2015-11-09T20:00:00-05:00",
* endTime: "2015-11-09T22:00:00-05:00",
* services: [examplePagerdutyService.id],
* });
* ```
*
* ## Import
*
* Maintenance windows can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import pagerduty:index/maintenanceWindow:MaintenanceWindow main PLBP09X
* ```
*/
export declare class MaintenanceWindow extends pulumi.CustomResource {
/**
* Get an existing MaintenanceWindow 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?: MaintenanceWindowState, opts?: pulumi.CustomResourceOptions): MaintenanceWindow;
/**
* Returns true if the given object is an instance of MaintenanceWindow. 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 MaintenanceWindow;
/**
* A description for the maintenance window.
*/
readonly description: pulumi.Output<string>;
/**
* The maintenance window's end time. This is when the services will start creating incidents again. This date must be in the future and after the `startTime`.
*/
readonly endTime: pulumi.Output<string>;
/**
* A list of service IDs to include in the maintenance window.
*/
readonly services: pulumi.Output<string[]>;
/**
* The maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time.
*/
readonly startTime: pulumi.Output<string>;
/**
* Create a MaintenanceWindow 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: MaintenanceWindowArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering MaintenanceWindow resources.
*/
export interface MaintenanceWindowState {
/**
* A description for the maintenance window.
*/
description?: pulumi.Input<string>;
/**
* The maintenance window's end time. This is when the services will start creating incidents again. This date must be in the future and after the `startTime`.
*/
endTime?: pulumi.Input<string>;
/**
* A list of service IDs to include in the maintenance window.
*/
services?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time.
*/
startTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MaintenanceWindow resource.
*/
export interface MaintenanceWindowArgs {
/**
* A description for the maintenance window.
*/
description?: pulumi.Input<string>;
/**
* The maintenance window's end time. This is when the services will start creating incidents again. This date must be in the future and after the `startTime`.
*/
endTime: pulumi.Input<string>;
/**
* A list of service IDs to include in the maintenance window.
*/
services: pulumi.Input<pulumi.Input<string>[]>;
/**
* The maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time.
*/
startTime: pulumi.Input<string>;
}