UNPKG

@pulumi/ns1

Version:

A Pulumi package for creating and managing ns1 cloud resources.

195 lines (194 loc) 6.25 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a NS1 Alert resource. This can be used to create, modify, and delete alerts. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ns1 from "@pulumi/ns1"; * * const exampleZoneAlert = new ns1.Alert("example_zone_alert", { * name: "Example Zone Alert", * type: "zone", * subtype: "transfer_failed", * notificationLists: [], * zoneNames: [ * "a.b.c.com", * "myzone", * ], * recordIds: [], * }); * const exampleUsageAlert = new ns1.Alert("example_usage_alert", { * name: "Example Usage Alert", * type: "account", * subtype: "record_usage", * datas: [{ * alertAtPercent: 80, * }], * }); * ``` * * ## NS1 Documentation * * [Alerts Api Doc](https://ns1.com/api#alerts) * * ## Import * * ```sh * $ pulumi import ns1:index/alert:Alert <name> <alert_id>` * ``` */ export declare class Alert extends pulumi.CustomResource { /** * Get an existing Alert 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?: AlertState, opts?: pulumi.CustomResourceOptions): Alert; /** * Returns true if the given object is an instance of Alert. 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 Alert; /** * (Read Only) The Unix timestamp representing when the alert configuration was created. */ readonly createdAt: pulumi.Output<number>; /** * (Read Only) The user or apikey that created this alert. */ readonly createdBy: pulumi.Output<string>; /** * A resource block with additional settings: the name and type of them vary based on the alert type. */ readonly datas: pulumi.Output<outputs.AlertData[] | undefined>; /** * The free-form display name for the alert. */ readonly name: pulumi.Output<string>; /** * A list of id's for notification lists whose notifiers will be triggered by the alert. */ readonly notificationLists: pulumi.Output<string[] | undefined>; /** * A list of record id's this alert applies to. */ readonly recordIds: pulumi.Output<string[] | undefined>; /** * The type of the alert. */ readonly subtype: pulumi.Output<string>; /** * The type of the alert. */ readonly type: pulumi.Output<string>; /** * (Read Only) The Unix timestamp representing when the alert configuration was last modified. */ readonly updatedAt: pulumi.Output<number>; /** * (Read Only) The user or apikey that last modified this alert. */ readonly updatedBy: pulumi.Output<string>; /** * A list of zones this alert applies to. */ readonly zoneNames: pulumi.Output<string[] | undefined>; /** * Create a Alert 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: AlertArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Alert resources. */ export interface AlertState { /** * (Read Only) The Unix timestamp representing when the alert configuration was created. */ createdAt?: pulumi.Input<number>; /** * (Read Only) The user or apikey that created this alert. */ createdBy?: pulumi.Input<string>; /** * A resource block with additional settings: the name and type of them vary based on the alert type. */ datas?: pulumi.Input<pulumi.Input<inputs.AlertData>[]>; /** * The free-form display name for the alert. */ name?: pulumi.Input<string>; /** * A list of id's for notification lists whose notifiers will be triggered by the alert. */ notificationLists?: pulumi.Input<pulumi.Input<string>[]>; /** * A list of record id's this alert applies to. */ recordIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The type of the alert. */ subtype?: pulumi.Input<string>; /** * The type of the alert. */ type?: pulumi.Input<string>; /** * (Read Only) The Unix timestamp representing when the alert configuration was last modified. */ updatedAt?: pulumi.Input<number>; /** * (Read Only) The user or apikey that last modified this alert. */ updatedBy?: pulumi.Input<string>; /** * A list of zones this alert applies to. */ zoneNames?: pulumi.Input<pulumi.Input<string>[]>; } /** * The set of arguments for constructing a Alert resource. */ export interface AlertArgs { /** * A resource block with additional settings: the name and type of them vary based on the alert type. */ datas?: pulumi.Input<pulumi.Input<inputs.AlertData>[]>; /** * The free-form display name for the alert. */ name?: pulumi.Input<string>; /** * A list of id's for notification lists whose notifiers will be triggered by the alert. */ notificationLists?: pulumi.Input<pulumi.Input<string>[]>; /** * A list of record id's this alert applies to. */ recordIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The type of the alert. */ subtype: pulumi.Input<string>; /** * The type of the alert. */ type: pulumi.Input<string>; /** * A list of zones this alert applies to. */ zoneNames?: pulumi.Input<pulumi.Input<string>[]>; }