@pulumi/ns1
Version:
A Pulumi package for creating and managing ns1 cloud resources.
86 lines • 3.05 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.AccountWhitelist = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a NS1 Global IP Whitelist resource.
*
* This can be used to create, modify, and delete Global IP Whitelists.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as ns1 from "@pulumi/ns1";
*
* const example = new ns1.AccountWhitelist("example", {
* name: "Example Whitelist",
* values: [
* "1.1.1.1",
* "2.2.2.2",
* ],
* });
* ```
*
* > You current source IP must be present in one of the whitelists to prevent locking yourself out.
*
* ## NS1 Documentation
*
* [Global IP Whitelist Doc](https://ns1.com/api?docId=2282)
*
* ## Import
*
* ```sh
* $ pulumi import ns1:index/accountWhitelist:AccountWhitelist example <ID>`
* ```
*/
class AccountWhitelist extends pulumi.CustomResource {
/**
* Get an existing AccountWhitelist 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 AccountWhitelist(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AccountWhitelist. 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'] === AccountWhitelist.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["name"] = state?.name;
resourceInputs["values"] = state?.values;
}
else {
const args = argsOrState;
if (args?.values === undefined && !opts.urn) {
throw new Error("Missing required property 'values'");
}
resourceInputs["name"] = args?.name;
resourceInputs["values"] = args?.values;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AccountWhitelist.__pulumiType, name, resourceInputs, opts);
}
}
exports.AccountWhitelist = AccountWhitelist;
/** @internal */
AccountWhitelist.__pulumiType = 'ns1:index/accountWhitelist:AccountWhitelist';
//# sourceMappingURL=accountWhitelist.js.map