@pulumi/ns1
Version:
A Pulumi package for creating and managing ns1 cloud resources.
89 lines • 2.97 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotifyList = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a NS1 Notify List resource. This can be used to create, modify, and delete notify lists.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as ns1 from "@pulumi/ns1";
*
* const nl = new ns1.NotifyList("nl", {
* name: "my notify list",
* notifications: [
* {
* type: "webhook",
* config: {
* url: "http://www.mywebhook.com",
* },
* },
* {
* type: "email",
* config: {
* email: "test@test.com",
* },
* },
* ],
* });
* ```
*
* ## NS1 Documentation
*
* [NotifyList Api Doc](https://ns1.com/api#notification-lists)
*
* ## Import
*
* ```sh
* $ pulumi import ns1:index/notifyList:NotifyList <name> <notifylist_id>`
* ```
*/
class NotifyList extends pulumi.CustomResource {
/**
* Get an existing NotifyList 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, id, state, opts) {
return new NotifyList(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of NotifyList. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === NotifyList.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["name"] = state?.name;
resourceInputs["notifications"] = state?.notifications;
}
else {
const args = argsOrState;
resourceInputs["name"] = args?.name;
resourceInputs["notifications"] = args?.notifications;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(NotifyList.__pulumiType, name, resourceInputs, opts);
}
}
exports.NotifyList = NotifyList;
/** @internal */
NotifyList.__pulumiType = 'ns1:index/notifyList:NotifyList';
//# sourceMappingURL=notifyList.js.map