1. Packages
  2. DataRobot
  3. API Docs
  4. DatasetFromFile
DataRobot v0.1.44 published on Monday, Sep 23, 2024 by DataRobot, Inc.

datarobot.DatasetFromFile

Explore with Pulumi AI

datarobot logo
DataRobot v0.1.44 published on Monday, Sep 23, 2024 by DataRobot, Inc.

    Data set from file

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datarobot from "@datarobot/pulumi-datarobot";
    
    const example = new datarobot.DatasetFromFile("example", {
        filePath: "[Path to file to upload]",
        useCaseIds: [datarobot_use_case.example.id],
    });
    export const exampleId = example.id;
    
    import pulumi
    import pulumi_datarobot as datarobot
    
    example = datarobot.DatasetFromFile("example",
        file_path="[Path to file to upload]",
        use_case_ids=[datarobot_use_case["example"]["id"]])
    pulumi.export("exampleId", example.id)
    
    package main
    
    import (
    	"github.com/datarobot-community/pulumi-datarobot/sdk/go/datarobot"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := datarobot.NewDatasetFromFile(ctx, "example", &datarobot.DatasetFromFileArgs{
    			FilePath: pulumi.String("[Path to file to upload]"),
    			UseCaseIds: pulumi.StringArray{
    				datarobot_use_case.Example.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("exampleId", example.ID())
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datarobot = DataRobotPulumi.Datarobot;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Datarobot.DatasetFromFile("example", new()
        {
            FilePath = "[Path to file to upload]",
            UseCaseIds = new[]
            {
                datarobot_use_case.Example.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["exampleId"] = example.Id,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datarobot.DatasetFromFile;
    import com.pulumi.datarobot.DatasetFromFileArgs;
    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 DatasetFromFile("example", DatasetFromFileArgs.builder()
                .filePath("[Path to file to upload]")
                .useCaseIds(datarobot_use_case.example().id())
                .build());
    
            ctx.export("exampleId", example.id());
        }
    }
    
    resources:
      example:
        type: datarobot:DatasetFromFile
        properties:
          filePath: '[Path to file to upload]'
          useCaseIds:
            - ${datarobot_use_case.example.id}
    outputs:
      exampleId: ${example.id}
    

    Create DatasetFromFile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DatasetFromFile(name: string, args: DatasetFromFileArgs, opts?: CustomResourceOptions);
    @overload
    def DatasetFromFile(resource_name: str,
                        args: DatasetFromFileArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatasetFromFile(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        file_path: Optional[str] = None,
                        name: Optional[str] = None,
                        use_case_ids: Optional[Sequence[str]] = None)
    func NewDatasetFromFile(ctx *Context, name string, args DatasetFromFileArgs, opts ...ResourceOption) (*DatasetFromFile, error)
    public DatasetFromFile(string name, DatasetFromFileArgs args, CustomResourceOptions? opts = null)
    public DatasetFromFile(String name, DatasetFromFileArgs args)
    public DatasetFromFile(String name, DatasetFromFileArgs args, CustomResourceOptions options)
    
    type: datarobot:DatasetFromFile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var datasetFromFileResource = new Datarobot.DatasetFromFile("datasetFromFileResource", new()
    {
        FilePath = "string",
        Name = "string",
        UseCaseIds = new[]
        {
            "string",
        },
    });
    
    example, err := datarobot.NewDatasetFromFile(ctx, "datasetFromFileResource", &datarobot.DatasetFromFileArgs{
    	FilePath: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	UseCaseIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var datasetFromFileResource = new DatasetFromFile("datasetFromFileResource", DatasetFromFileArgs.builder()
        .filePath("string")
        .name("string")
        .useCaseIds("string")
        .build());
    
    dataset_from_file_resource = datarobot.DatasetFromFile("datasetFromFileResource",
        file_path="string",
        name="string",
        use_case_ids=["string"])
    
    const datasetFromFileResource = new datarobot.DatasetFromFile("datasetFromFileResource", {
        filePath: "string",
        name: "string",
        useCaseIds: ["string"],
    });
    
    type: datarobot:DatasetFromFile
    properties:
        filePath: string
        name: string
        useCaseIds:
            - string
    

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

    FilePath string
    The path to the file to upload.
    Name string
    The name of the Dataset. Defaults to the file name.
    UseCaseIds List<string>
    The list of Use Case IDs to add the Dataset to.
    FilePath string
    The path to the file to upload.
    Name string
    The name of the Dataset. Defaults to the file name.
    UseCaseIds []string
    The list of Use Case IDs to add the Dataset to.
    filePath String
    The path to the file to upload.
    name String
    The name of the Dataset. Defaults to the file name.
    useCaseIds List<String>
    The list of Use Case IDs to add the Dataset to.
    filePath string
    The path to the file to upload.
    name string
    The name of the Dataset. Defaults to the file name.
    useCaseIds string[]
    The list of Use Case IDs to add the Dataset to.
    file_path str
    The path to the file to upload.
    name str
    The name of the Dataset. Defaults to the file name.
    use_case_ids Sequence[str]
    The list of Use Case IDs to add the Dataset to.
    filePath String
    The path to the file to upload.
    name String
    The name of the Dataset. Defaults to the file name.
    useCaseIds List<String>
    The list of Use Case IDs to add the Dataset to.

    Outputs

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

    Get an existing DatasetFromFile 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?: DatasetFromFileState, opts?: CustomResourceOptions): DatasetFromFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            file_path: Optional[str] = None,
            name: Optional[str] = None,
            use_case_ids: Optional[Sequence[str]] = None) -> DatasetFromFile
    func GetDatasetFromFile(ctx *Context, name string, id IDInput, state *DatasetFromFileState, opts ...ResourceOption) (*DatasetFromFile, error)
    public static DatasetFromFile Get(string name, Input<string> id, DatasetFromFileState? state, CustomResourceOptions? opts = null)
    public static DatasetFromFile get(String name, Output<String> id, DatasetFromFileState 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:
    FilePath string
    The path to the file to upload.
    Name string
    The name of the Dataset. Defaults to the file name.
    UseCaseIds List<string>
    The list of Use Case IDs to add the Dataset to.
    FilePath string
    The path to the file to upload.
    Name string
    The name of the Dataset. Defaults to the file name.
    UseCaseIds []string
    The list of Use Case IDs to add the Dataset to.
    filePath String
    The path to the file to upload.
    name String
    The name of the Dataset. Defaults to the file name.
    useCaseIds List<String>
    The list of Use Case IDs to add the Dataset to.
    filePath string
    The path to the file to upload.
    name string
    The name of the Dataset. Defaults to the file name.
    useCaseIds string[]
    The list of Use Case IDs to add the Dataset to.
    file_path str
    The path to the file to upload.
    name str
    The name of the Dataset. Defaults to the file name.
    use_case_ids Sequence[str]
    The list of Use Case IDs to add the Dataset to.
    filePath String
    The path to the file to upload.
    name String
    The name of the Dataset. Defaults to the file name.
    useCaseIds List<String>
    The list of Use Case IDs to add the Dataset to.

    Package Details

    Repository
    datarobot datarobot-community/pulumi-datarobot
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datarobot Terraform Provider.
    datarobot logo
    DataRobot v0.1.44 published on Monday, Sep 23, 2024 by DataRobot, Inc.