1. Packages
  2. Splunk Provider
  3. API Docs
  4. LookupTableFile
Splunk v1.2.14 published on Monday, Nov 18, 2024 by Pulumi

splunk.LookupTableFile

Explore with Pulumi AI

splunk logo
Splunk v1.2.14 published on Monday, Nov 18, 2024 by Pulumi

    # Resource: splunk.LookupTableFile

    Create and manage lookup table files.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as splunk from "@pulumi/splunk";
    
    const lookupTableFile = new splunk.LookupTableFile("lookup_table_file", {
        app: "search",
        owner: "nobody",
        fileName: "lookup.csv",
        fileContents: [
            [
                "status",
                "status_description",
                "status_type",
            ],
            [
                "100",
                "Continue",
                "Informational",
            ],
            [
                "101",
                "Switching Protocols",
                "Informational",
            ],
            [
                "200",
                "OK",
                "Successful",
            ],
        ],
    });
    
    import pulumi
    import pulumi_splunk as splunk
    
    lookup_table_file = splunk.LookupTableFile("lookup_table_file",
        app="search",
        owner="nobody",
        file_name="lookup.csv",
        file_contents=[
            [
                "status",
                "status_description",
                "status_type",
            ],
            [
                "100",
                "Continue",
                "Informational",
            ],
            [
                "101",
                "Switching Protocols",
                "Informational",
            ],
            [
                "200",
                "OK",
                "Successful",
            ],
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-splunk/sdk/go/splunk"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := splunk.NewLookupTableFile(ctx, "lookup_table_file", &splunk.LookupTableFileArgs{
    			App:      pulumi.String("search"),
    			Owner:    pulumi.String("nobody"),
    			FileName: pulumi.String("lookup.csv"),
    			FileContents: pulumi.StringArrayArray{
    				pulumi.StringArray{
    					pulumi.String("status"),
    					pulumi.String("status_description"),
    					pulumi.String("status_type"),
    				},
    				pulumi.StringArray{
    					pulumi.String("100"),
    					pulumi.String("Continue"),
    					pulumi.String("Informational"),
    				},
    				pulumi.StringArray{
    					pulumi.String("101"),
    					pulumi.String("Switching Protocols"),
    					pulumi.String("Informational"),
    				},
    				pulumi.StringArray{
    					pulumi.String("200"),
    					pulumi.String("OK"),
    					pulumi.String("Successful"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Splunk = Pulumi.Splunk;
    
    return await Deployment.RunAsync(() => 
    {
        var lookupTableFile = new Splunk.LookupTableFile("lookup_table_file", new()
        {
            App = "search",
            Owner = "nobody",
            FileName = "lookup.csv",
            FileContents = new[]
            {
                new[]
                {
                    "status",
                    "status_description",
                    "status_type",
                },
                new[]
                {
                    "100",
                    "Continue",
                    "Informational",
                },
                new[]
                {
                    "101",
                    "Switching Protocols",
                    "Informational",
                },
                new[]
                {
                    "200",
                    "OK",
                    "Successful",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.splunk.LookupTableFile;
    import com.pulumi.splunk.LookupTableFileArgs;
    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 lookupTableFile = new LookupTableFile("lookupTableFile", LookupTableFileArgs.builder()
                .app("search")
                .owner("nobody")
                .fileName("lookup.csv")
                .fileContents(            
                                    
                        "status",
                        "status_description",
                        "status_type",
                                    
                        "100",
                        "Continue",
                        "Informational",
                                    
                        "101",
                        "Switching Protocols",
                        "Informational",
                                    
                        "200",
                        "OK",
                        "Successful")
                .build());
    
        }
    }
    
    resources:
      lookupTableFile:
        type: splunk:LookupTableFile
        name: lookup_table_file
        properties:
          app: search
          owner: nobody
          fileName: lookup.csv
          fileContents:
            - - status
              - status_description
              - status_type
            - - '100'
              - Continue
              - Informational
            - - '101'
              - Switching Protocols
              - Informational
            - - '200'
              - OK
              - Successful
    

    Create LookupTableFile Resource

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

    Constructor syntax

    new LookupTableFile(name: string, args: LookupTableFileArgs, opts?: CustomResourceOptions);
    @overload
    def LookupTableFile(resource_name: str,
                        args: LookupTableFileArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def LookupTableFile(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        app: Optional[str] = None,
                        file_contents: Optional[Sequence[Sequence[str]]] = None,
                        file_name: Optional[str] = None,
                        owner: Optional[str] = None)
    func NewLookupTableFile(ctx *Context, name string, args LookupTableFileArgs, opts ...ResourceOption) (*LookupTableFile, error)
    public LookupTableFile(string name, LookupTableFileArgs args, CustomResourceOptions? opts = null)
    public LookupTableFile(String name, LookupTableFileArgs args)
    public LookupTableFile(String name, LookupTableFileArgs args, CustomResourceOptions options)
    
    type: splunk:LookupTableFile
    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 LookupTableFileArgs
    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 LookupTableFileArgs
    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 LookupTableFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LookupTableFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LookupTableFileArgs
    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 lookupTableFileResource = new Splunk.LookupTableFile("lookupTableFileResource", new()
    {
        App = "string",
        FileContents = new[]
        {
            new[]
            {
                "string",
            },
        },
        FileName = "string",
        Owner = "string",
    });
    
    example, err := splunk.NewLookupTableFile(ctx, "lookupTableFileResource", &splunk.LookupTableFileArgs{
    	App: pulumi.String("string"),
    	FileContents: pulumi.StringArrayArray{
    		pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	FileName: pulumi.String("string"),
    	Owner:    pulumi.String("string"),
    })
    
    var lookupTableFileResource = new LookupTableFile("lookupTableFileResource", LookupTableFileArgs.builder()
        .app("string")
        .fileContents("string")
        .fileName("string")
        .owner("string")
        .build());
    
    lookup_table_file_resource = splunk.LookupTableFile("lookupTableFileResource",
        app="string",
        file_contents=[["string"]],
        file_name="string",
        owner="string")
    
    const lookupTableFileResource = new splunk.LookupTableFile("lookupTableFileResource", {
        app: "string",
        fileContents: [["string"]],
        fileName: "string",
        owner: "string",
    });
    
    type: splunk:LookupTableFile
    properties:
        app: string
        fileContents:
            - - string
        fileName: string
        owner: string
    

    LookupTableFile Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The LookupTableFile resource accepts the following input properties:

    App string
    The app context for the resource.
    FileContents List<ImmutableArray<string>>
    The column header and row value contents for the lookup table file.
    FileName string
    A name for the lookup table file. Generally ends with ".csv"
    Owner string
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    App string
    The app context for the resource.
    FileContents [][]string
    The column header and row value contents for the lookup table file.
    FileName string
    A name for the lookup table file. Generally ends with ".csv"
    Owner string
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app String
    The app context for the resource.
    fileContents List<List<String>>
    The column header and row value contents for the lookup table file.
    fileName String
    A name for the lookup table file. Generally ends with ".csv"
    owner String
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app string
    The app context for the resource.
    fileContents string[][]
    The column header and row value contents for the lookup table file.
    fileName string
    A name for the lookup table file. Generally ends with ".csv"
    owner string
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app str
    The app context for the resource.
    file_contents Sequence[Sequence[str]]
    The column header and row value contents for the lookup table file.
    file_name str
    A name for the lookup table file. Generally ends with ".csv"
    owner str
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app String
    The app context for the resource.
    fileContents List<List<String>>
    The column header and row value contents for the lookup table file.
    fileName String
    A name for the lookup table file. Generally ends with ".csv"
    owner String
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.

    Outputs

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

    Get an existing LookupTableFile 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?: LookupTableFileState, opts?: CustomResourceOptions): LookupTableFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app: Optional[str] = None,
            file_contents: Optional[Sequence[Sequence[str]]] = None,
            file_name: Optional[str] = None,
            owner: Optional[str] = None) -> LookupTableFile
    func GetLookupTableFile(ctx *Context, name string, id IDInput, state *LookupTableFileState, opts ...ResourceOption) (*LookupTableFile, error)
    public static LookupTableFile Get(string name, Input<string> id, LookupTableFileState? state, CustomResourceOptions? opts = null)
    public static LookupTableFile get(String name, Output<String> id, LookupTableFileState 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:
    App string
    The app context for the resource.
    FileContents List<ImmutableArray<string>>
    The column header and row value contents for the lookup table file.
    FileName string
    A name for the lookup table file. Generally ends with ".csv"
    Owner string
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    App string
    The app context for the resource.
    FileContents [][]string
    The column header and row value contents for the lookup table file.
    FileName string
    A name for the lookup table file. Generally ends with ".csv"
    Owner string
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app String
    The app context for the resource.
    fileContents List<List<String>>
    The column header and row value contents for the lookup table file.
    fileName String
    A name for the lookup table file. Generally ends with ".csv"
    owner String
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app string
    The app context for the resource.
    fileContents string[][]
    The column header and row value contents for the lookup table file.
    fileName string
    A name for the lookup table file. Generally ends with ".csv"
    owner string
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app str
    The app context for the resource.
    file_contents Sequence[Sequence[str]]
    The column header and row value contents for the lookup table file.
    file_name str
    A name for the lookup table file. Generally ends with ".csv"
    owner str
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.
    app String
    The app context for the resource.
    fileContents List<List<String>>
    The column header and row value contents for the lookup table file.
    fileName String
    A name for the lookup table file. Generally ends with ".csv"
    owner String
    User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.

    Package Details

    Repository
    Splunk pulumi/pulumi-splunk
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the splunk Terraform Provider.
    splunk logo
    Splunk v1.2.14 published on Monday, Nov 18, 2024 by Pulumi