NS1

v2.3.3 published on Tuesday, Oct 18, 2022 by Pulumi

DataSource

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 Pulumi;
using Ns1 = Pulumi.Ns1;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Ns1.DataSource("example", new Ns1.DataSourceArgs
        {
            Sourcetype = "nsone_v1",
        });
    }

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

Coming soon!

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",
});

Coming soon!

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.

Package Details

Repository
https://github.com/pulumi/pulumi-ns1
License
Apache-2.0
Notes

This Pulumi package is based on the ns1 Terraform Provider.