1. Packages
  2. Splunk Provider
  3. API Docs
  4. LookupTableFile
Splunk v1.2.17 published on Wednesday, Apr 9, 2025 by Pulumi

splunk.LookupTableFile

Explore with Pulumi AI

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

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. LookupTableFileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. LookupTableFileArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LookupTableFileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var lookupTableFileResource = new LookupTableFile("lookupTableFileResource", LookupTableFileArgs.builder()
    .app("string")
    .fileContents("string")
    .fileName("string")
    .owner("string")
    .build());
Copy
lookup_table_file_resource = splunk.LookupTableFile("lookupTableFileResource",
    app="string",
    file_contents=[["string"]],
    file_name="string",
    owner="string")
Copy
const lookupTableFileResource = new splunk.LookupTableFile("lookupTableFileResource", {
    app: "string",
    fileContents: [["string"]],
    fileName: "string",
    owner: "string",
});
Copy
type: splunk:LookupTableFile
properties:
    app: string
    fileContents:
        - - string
    fileName: string
    owner: string
Copy

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
This property is required.
Changes to this property will trigger replacement.
string
The app context for the resource.
FileContents This property is required. List<ImmutableArray<string>>
The column header and row value contents for the lookup table file.
FileName
This property is required.
Changes to this property will trigger replacement.
string
A name for the lookup table file. Generally ends with ".csv"
Owner
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The app context for the resource.
FileContents This property is required. [][]string
The column header and row value contents for the lookup table file.
FileName
This property is required.
Changes to this property will trigger replacement.
string
A name for the lookup table file. Generally ends with ".csv"
Owner
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The app context for the resource.
fileContents This property is required. List<List<String>>
The column header and row value contents for the lookup table file.
fileName
This property is required.
Changes to this property will trigger replacement.
String
A name for the lookup table file. Generally ends with ".csv"
owner
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The app context for the resource.
fileContents This property is required. string[][]
The column header and row value contents for the lookup table file.
fileName
This property is required.
Changes to this property will trigger replacement.
string
A name for the lookup table file. Generally ends with ".csv"
owner
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
str
The app context for the resource.
file_contents This property is required. Sequence[Sequence[str]]
The column header and row value contents for the lookup table file.
file_name
This property is required.
Changes to this property will trigger replacement.
str
A name for the lookup table file. Generally ends with ".csv"
owner
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The app context for the resource.
fileContents This property is required. List<List<String>>
The column header and row value contents for the lookup table file.
fileName
This property is required.
Changes to this property will trigger replacement.
String
A name for the lookup table file. Generally ends with ".csv"
owner
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: splunk:LookupTableFile    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
The app context for the resource.
FileContents List<ImmutableArray<string>>
The column header and row value contents for the lookup table file.
FileName Changes to this property will trigger replacement. string
A name for the lookup table file. Generally ends with ".csv"
Owner Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The app context for the resource.
FileContents [][]string
The column header and row value contents for the lookup table file.
FileName Changes to this property will trigger replacement. string
A name for the lookup table file. Generally ends with ".csv"
Owner Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The app context for the resource.
fileContents List<List<String>>
The column header and row value contents for the lookup table file.
fileName Changes to this property will trigger replacement. String
A name for the lookup table file. Generally ends with ".csv"
owner Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The app context for the resource.
fileContents string[][]
The column header and row value contents for the lookup table file.
fileName Changes to this property will trigger replacement. string
A name for the lookup table file. Generally ends with ".csv"
owner Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
A name for the lookup table file. Generally ends with ".csv"
owner Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The app context for the resource.
fileContents List<List<String>>
The column header and row value contents for the lookup table file.
fileName Changes to this property will trigger replacement. String
A name for the lookup table file. Generally ends with ".csv"
owner Changes to this property will trigger replacement. 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.