ns1 logo
NS1 v3.0.0, Mar 17 23

ns1.DataSource

Explore with Pulumi AI

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

NS1 Documentation

Datasource Api Doc

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ns1 = Pulumi.Ns1;

return await Deployment.RunAsync(() => 
{
    var example = new Ns1.DataSource("example", new()
    {
        Sourcetype = "nsone_v1",
    });

});
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 {
		_, err := ns1.NewDataSource(ctx, "example", &ns1.DataSourceArgs{
			Sourcetype: pulumi.String("nsone_v1"),
		})
		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 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());

    }
}
import pulumi
import pulumi_ns1 as ns1

example = ns1.DataSource("example", sourcetype="nsone_v1")
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";

const example = new ns1.DataSource("example", {sourcetype: "nsone_v1"});
resources:
  example:
    type: ns1:DataSource
    properties:
      sourcetype: nsone_v1

Create DataSource Resource

new DataSource(name: string, args: DataSourceArgs, opts?: CustomResourceOptions);
@overload
def DataSource(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               config: Optional[Mapping[str, Any]] = None,
               name: Optional[str] = None,
               sourcetype: Optional[str] = None)
@overload
def DataSource(resource_name: str,
               args: DataSourceArgs,
               opts: Optional[ResourceOptions] = None)
func NewDataSource(ctx *Context, name string, args DataSourceArgs, opts ...ResourceOption) (*DataSource, error)
public DataSource(string name, DataSourceArgs args, CustomResourceOptions? opts = null)
public DataSource(String name, DataSourceArgs args)
public DataSource(String name, DataSourceArgs args, CustomResourceOptions options)
type: ns1:DataSource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DataSourceArgs
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 DataSourceArgs
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 DataSourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DataSource 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 DataSource resource accepts the following input properties:

Sourcetype string

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

Config Dictionary<string, object>

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

Name string

The free form name of the data source.

Sourcetype string

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

Config map[string]interface{}

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

Name string

The free form name of the data source.

sourcetype String

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config Map<String,Object>

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name String

The free form name of the data source.

sourcetype string

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config {[key: string]: any}

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name string

The free form name of the data source.

sourcetype str

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config Mapping[str, Any]

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name str

The free form name of the data source.

sourcetype String

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config Map<Any>

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name String

The free form name of the data source.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataSource 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 DataSource Resource

Get an existing DataSource 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?: DataSourceState, opts?: CustomResourceOptions): DataSource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[Mapping[str, Any]] = None,
        name: Optional[str] = None,
        sourcetype: Optional[str] = None) -> DataSource
func GetDataSource(ctx *Context, name string, id IDInput, state *DataSourceState, opts ...ResourceOption) (*DataSource, error)
public static DataSource Get(string name, Input<string> id, DataSourceState? state, CustomResourceOptions? opts = null)
public static DataSource get(String name, Output<String> id, DataSourceState 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 data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

Name string

The free form name of the data source.

Sourcetype string

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

Config map[string]interface{}

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

Name string

The free form name of the data source.

Sourcetype string

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config Map<String,Object>

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name String

The free form name of the data source.

sourcetype String

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config {[key: string]: any}

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name string

The free form name of the data source.

sourcetype string

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config Mapping[str, Any]

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name str

The free form name of the data source.

sourcetype str

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

config Map<Any>

The data source configuration, determined by its type, matching the specification in config from /data/sourcetypes.

name String

The free form name of the data source.

sourcetype String

The data sources type, listed in API endpoint https://api.nsone.net/v1/data/sourcetypes.

Import

 $ pulumi import ns1:index/dataSource:DataSource <name> <datasource_id>`

Package Details

Repository
NS1 pulumi/pulumi-ns1
License
Apache-2.0
Notes

This Pulumi package is based on the ns1 Terraform Provider.