1. Packages
  2. NS1
  3. API Docs
  4. DataFeed
NS1 v3.1.5 published on Friday, Jan 19, 2024 by Pulumi

ns1.DataFeed

Explore with Pulumi AI

ns1 logo
NS1 v3.1.5 published on Friday, Jan 19, 2024 by Pulumi

    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 System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ns1 = Pulumi.Ns1;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ns1.DataSource("example", new()
        {
            Sourcetype = "nsone_v1",
        });
    
        var exampleMonitoring = new Ns1.DataSource("exampleMonitoring", new()
        {
            Sourcetype = "nsone_monitoring",
        });
    
        var uswestFeed = new Ns1.DataFeed("uswestFeed", new()
        {
            SourceId = example.Id,
            Config = 
            {
                { "label", "uswest" },
            },
        });
    
        var useastFeed = new Ns1.DataFeed("useastFeed", new()
        {
            SourceId = example.Id,
            Config = 
            {
                { "label", "useast" },
            },
        });
    
        var useastMonitorFeed = new Ns1.DataFeed("useastMonitorFeed", new()
        {
            SourceId = exampleMonitoring.Id,
            Config = 
            {
                { "jobid", ns1_monitoringjob.Example_job.Id },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-ns1/sdk/v3/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{
    			SourceId: example.ID(),
    			Config: pulumi.Map{
    				"label": pulumi.Any("uswest"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ns1.NewDataFeed(ctx, "useastFeed", &ns1.DataFeedArgs{
    			SourceId: example.ID(),
    			Config: pulumi.Map{
    				"label": pulumi.Any("useast"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ns1.NewDataFeed(ctx, "useastMonitorFeed", &ns1.DataFeedArgs{
    			SourceId: exampleMonitoring.ID(),
    			Config: pulumi.Map{
    				"jobid": pulumi.Any(ns1_monitoringjob.Example_job.Id),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ns1.DataSource;
    import com.pulumi.ns1.DataSourceArgs;
    import com.pulumi.ns1.DataFeed;
    import com.pulumi.ns1.DataFeedArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new DataSource("example", DataSourceArgs.builder()        
                .sourcetype("nsone_v1")
                .build());
    
            var exampleMonitoring = new DataSource("exampleMonitoring", DataSourceArgs.builder()        
                .sourcetype("nsone_monitoring")
                .build());
    
            var uswestFeed = new DataFeed("uswestFeed", DataFeedArgs.builder()        
                .sourceId(example.id())
                .config(Map.of("label", "uswest"))
                .build());
    
            var useastFeed = new DataFeed("useastFeed", DataFeedArgs.builder()        
                .sourceId(example.id())
                .config(Map.of("label", "useast"))
                .build());
    
            var useastMonitorFeed = new DataFeed("useastMonitorFeed", DataFeedArgs.builder()        
                .sourceId(exampleMonitoring.id())
                .config(Map.of("jobid", ns1_monitoringjob.example_job().id()))
                .build());
    
        }
    }
    
    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",
        source_id=example.id,
        config={
            "label": "uswest",
        })
    useast_feed = ns1.DataFeed("useastFeed",
        source_id=example.id,
        config={
            "label": "useast",
        })
    useast_monitor_feed = ns1.DataFeed("useastMonitorFeed",
        source_id=example_monitoring.id,
        config={
            "jobid": ns1_monitoringjob["example_job"]["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("exampleMonitoring", {sourcetype: "nsone_monitoring"});
    const uswestFeed = new ns1.DataFeed("uswestFeed", {
        sourceId: example.id,
        config: {
            label: "uswest",
        },
    });
    const useastFeed = new ns1.DataFeed("useastFeed", {
        sourceId: example.id,
        config: {
            label: "useast",
        },
    });
    const useastMonitorFeed = new ns1.DataFeed("useastMonitorFeed", {
        sourceId: exampleMonitoring.id,
        config: {
            jobid: ns1_monitoringjob.example_job.id,
        },
    });
    
    resources:
      example:
        type: ns1:DataSource
        properties:
          sourcetype: nsone_v1
      exampleMonitoring:
        type: ns1:DataSource
        properties:
          sourcetype: nsone_monitoring
      uswestFeed:
        type: ns1:DataFeed
        properties:
          sourceId: ${example.id}
          config:
            label: uswest
      useastFeed:
        type: ns1:DataFeed
        properties:
          sourceId: ${example.id}
          config:
            label: useast
      useastMonitorFeed:
        type: ns1:DataFeed
        properties:
          sourceId: ${exampleMonitoring.id}
          config:
            jobid: ${ns1_monitoringjob.example_job.id}
    

    Create 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)
    public DataFeed(String name, DataFeedArgs args)
    public DataFeed(String name, DataFeedArgs args, CustomResourceOptions options)
    
    type: ns1:DataFeed
    properties: # The arguments to resource properties.
    options: # 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.
    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.
    name String
    The unique name of the resource.
    args DataFeedArgs
    The arguments to resource properties.
    options 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 Map<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 {[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.
    sourceId String
    The data source id that this feed is connected to.
    config Map<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.

    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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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)
    public static DataFeed get(String name, Output<String> id, DataFeedState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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 Map<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 {[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.
    config Map<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.

    Import

     $ pulumi import ns1:index/dataFeed:DataFeed <name> <datasource_id>/<datafeed_id>`
    

    Package Details

    Repository
    NS1 pulumi/pulumi-ns1
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ns1 Terraform Provider.
    ns1 logo
    NS1 v3.1.5 published on Friday, Jan 19, 2024 by Pulumi