Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

DataFeed

Provides a NS1 Data Feed resource. This can be used to create, modify, and delete data feeds.

NS1 Documentation

Datafeed Api Doc

Example Usage

using Pulumi;
using Ns1 = Pulumi.Ns1;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Ns1.DataSource("example", new Ns1.DataSourceArgs
        {
            Sourcetype = "nsone_v1",
        });
        var exampleMonitoring = new Ns1.DataSource("exampleMonitoring", new Ns1.DataSourceArgs
        {
            Sourcetype = "nsone_monitoring",
        });
        var uswestFeed = new Ns1.DataFeed("uswestFeed", new Ns1.DataFeedArgs
        {
            Config = 
            {
                { "label", "uswest" },
            },
            SourceId = example.Id,
        });
        var useastFeed = new Ns1.DataFeed("useastFeed", new Ns1.DataFeedArgs
        {
            Config = 
            {
                { "label", "useast" },
            },
            SourceId = example.Id,
        });
        var useastMonitorFeed = new Ns1.DataFeed("useastMonitorFeed", new Ns1.DataFeedArgs
        {
            Config = 
            {
                { "jobid", ns1_monitoringjob.Example_job.Id },
            },
            SourceId = exampleMonitoring.Id,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-ns1/sdk/v2/go/ns1"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := ns1.NewDataSource(ctx, "example", &ns1.DataSourceArgs{
			Sourcetype: pulumi.String("nsone_v1"),
		})
		if err != nil {
			return err
		}
		exampleMonitoring, err := ns1.NewDataSource(ctx, "exampleMonitoring", &ns1.DataSourceArgs{
			Sourcetype: pulumi.String("nsone_monitoring"),
		})
		if err != nil {
			return err
		}
		_, err = ns1.NewDataFeed(ctx, "uswestFeed", &ns1.DataFeedArgs{
			Config: pulumi.AnyMap{
				"label": pulumi.Any("uswest"),
			},
			SourceId: example.ID(),
		})
		if err != nil {
			return err
		}
		_, err = ns1.NewDataFeed(ctx, "useastFeed", &ns1.DataFeedArgs{
			Config: pulumi.AnyMap{
				"label": pulumi.Any("useast"),
			},
			SourceId: example.ID(),
		})
		if err != nil {
			return err
		}
		_, err = ns1.NewDataFeed(ctx, "useastMonitorFeed", &ns1.DataFeedArgs{
			Config: pulumi.AnyMap{
				"jobid": pulumi.Any(ns1_monitoringjob.Example_job.Id),
			},
			SourceId: exampleMonitoring.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_ns1 as ns1

example = ns1.DataSource("example", sourcetype="nsone_v1")
example_monitoring = ns1.DataSource("exampleMonitoring", sourcetype="nsone_monitoring")
uswest_feed = ns1.DataFeed("uswestFeed",
    config={
        "label": "uswest",
    },
    source_id=example.id)
useast_feed = ns1.DataFeed("useastFeed",
    config={
        "label": "useast",
    },
    source_id=example.id)
useast_monitor_feed = ns1.DataFeed("useastMonitorFeed",
    config={
        "jobid": ns1_monitoringjob["example_job"]["id"],
    },
    source_id=example_monitoring.id)
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";

const example = new ns1.DataSource("example", {
    sourcetype: "nsone_v1",
});
const exampleMonitoring = new ns1.DataSource("example_monitoring", {
    sourcetype: "nsone_monitoring",
});
const uswestFeed = new ns1.DataFeed("uswest_feed", {
    config: {
        label: "uswest",
    },
    sourceId: example.id,
});
const useastFeed = new ns1.DataFeed("useast_feed", {
    config: {
        label: "useast",
    },
    sourceId: example.id,
});
const useastMonitorFeed = new ns1.DataFeed("useast_monitor_feed", {
    config: {
        jobid: ns1_monitoringjob_example_job.id,
    },
    sourceId: exampleMonitoring.id,
});

Create a DataFeed Resource

new DataFeed(name: string, args: DataFeedArgs, opts?: CustomResourceOptions);
@overload
def DataFeed(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             config: Optional[Mapping[str, Any]] = None,
             name: Optional[str] = None,
             source_id: Optional[str] = None)
@overload
def DataFeed(resource_name: str,
             args: DataFeedArgs,
             opts: Optional[ResourceOptions] = None)
func NewDataFeed(ctx *Context, name string, args DataFeedArgs, opts ...ResourceOption) (*DataFeed, error)
public DataFeed(string name, DataFeedArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DataFeedArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DataFeedArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DataFeedArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataFeedArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DataFeed Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DataFeed resource accepts the following input properties:

SourceId string
The data source id that this feed is connected to.
Config Dictionary<string, object>
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
Name string
The free form name of the data feed.
SourceId string
The data source id that this feed is connected to.
Config map[string]interface{}
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
Name string
The free form name of the data feed.
sourceId string
The data source id that this feed is connected to.
config {[key: string]: any}
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
name string
The free form name of the data feed.
source_id str
The data source id that this feed is connected to.
config Mapping[str, Any]
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
name str
The free form name of the data feed.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataFeed resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing DataFeed Resource

Get an existing DataFeed resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DataFeedState, opts?: CustomResourceOptions): DataFeed
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[Mapping[str, Any]] = None,
        name: Optional[str] = None,
        source_id: Optional[str] = None) -> DataFeed
func GetDataFeed(ctx *Context, name string, id IDInput, state *DataFeedState, opts ...ResourceOption) (*DataFeed, error)
public static DataFeed Get(string name, Input<string> id, DataFeedState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Config Dictionary<string, object>
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
Name string
The free form name of the data feed.
SourceId string
The data source id that this feed is connected to.
Config map[string]interface{}
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
Name string
The free form name of the data feed.
SourceId string
The data source id that this feed is connected to.
config {[key: string]: any}
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
name string
The free form name of the data feed.
sourceId string
The data source id that this feed is connected to.
config Mapping[str, Any]
The feeds configuration matching the specification in feed_config from /data/sourcetypes. jobid is required in the config for datafeeds connected to NS1 monitoring.
name str
The free form name of the data feed.
source_id str
The data source id that this feed is connected to.

Package Details

Repository
https://github.com/pulumi/pulumi-ns1
License
Apache-2.0
Notes
This Pulumi package is based on the ns1 Terraform Provider.