UNPKG

@pulumi/ns1

Version:

A Pulumi package for creating and managing ns1 cloud resources.

106 lines 3.59 kB
"use strict"; // *** 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.DataFeed = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a NS1 Data Feed resource. This can be used to create, modify, and delete data feeds. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ns1 from "@pulumi/ns1"; * * const example = new ns1.DataSource("example", { * name: "example", * sourcetype: "nsone_v1", * }); * const exampleMonitoring = new ns1.DataSource("example_monitoring", { * name: "example_monitoring", * sourcetype: "nsone_monitoring", * }); * const uswestFeed = new ns1.DataFeed("uswest_feed", { * name: "uswest_feed", * sourceId: example.id, * config: { * label: "uswest", * }, * }); * const useastFeed = new ns1.DataFeed("useast_feed", { * name: "useast_feed", * sourceId: example.id, * config: { * label: "useast", * }, * }); * const useastMonitorFeed = new ns1.DataFeed("useast_monitor_feed", { * name: "useast_monitor_feed", * sourceId: exampleMonitoring.id, * config: { * jobid: exampleJob.id, * }, * }); * ``` * * ## NS1 Documentation * * [Datafeed Api Doc](https://ns1.com/api#data-feeds) * * ## Import * * ```sh * $ pulumi import ns1:index/dataFeed:DataFeed <name> <datasource_id>/<datafeed_id>` * ``` */ class DataFeed extends pulumi.CustomResource { /** * Get an existing DataFeed 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 DataFeed(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DataFeed. 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'] === DataFeed.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["config"] = state?.config; resourceInputs["name"] = state?.name; resourceInputs["sourceId"] = state?.sourceId; } else { const args = argsOrState; if (args?.sourceId === undefined && !opts.urn) { throw new Error("Missing required property 'sourceId'"); } resourceInputs["config"] = args?.config; resourceInputs["name"] = args?.name; resourceInputs["sourceId"] = args?.sourceId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DataFeed.__pulumiType, name, resourceInputs, opts); } } exports.DataFeed = DataFeed; /** @internal */ DataFeed.__pulumiType = 'ns1:index/dataFeed:DataFeed'; //# sourceMappingURL=dataFeed.js.map