splunk.LookupDefinition
Explore with Pulumi AI
Resource: splunk.LookupDefinition
Manage lookup definitions in Splunk. For more information on lookup definitions, refer to the official Splunk documentation: https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Aboutlookupsandfieldactions
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as splunk from "@pulumi/splunk";
const example = new splunk.LookupDefinition("example", {
name: "example_lookup_definition",
filename: "example_lookup_file.csv",
acl: {
owner: "admin",
app: "search",
sharing: "app",
reads: ["*"],
writes: ["admin"],
},
});
import pulumi
import pulumi_splunk as splunk
example = splunk.LookupDefinition("example",
name="example_lookup_definition",
filename="example_lookup_file.csv",
acl={
"owner": "admin",
"app": "search",
"sharing": "app",
"reads": ["*"],
"writes": ["admin"],
})
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.NewLookupDefinition(ctx, "example", &splunk.LookupDefinitionArgs{
Name: pulumi.String("example_lookup_definition"),
Filename: pulumi.String("example_lookup_file.csv"),
Acl: &splunk.LookupDefinitionAclArgs{
Owner: pulumi.String("admin"),
App: pulumi.String("search"),
Sharing: pulumi.String("app"),
Reads: pulumi.StringArray{
pulumi.String("*"),
},
Writes: pulumi.StringArray{
pulumi.String("admin"),
},
},
})
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 example = new Splunk.LookupDefinition("example", new()
{
Name = "example_lookup_definition",
Filename = "example_lookup_file.csv",
Acl = new Splunk.Inputs.LookupDefinitionAclArgs
{
Owner = "admin",
App = "search",
Sharing = "app",
Reads = new[]
{
"*",
},
Writes = new[]
{
"admin",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.splunk.LookupDefinition;
import com.pulumi.splunk.LookupDefinitionArgs;
import com.pulumi.splunk.inputs.LookupDefinitionAclArgs;
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 LookupDefinition("example", LookupDefinitionArgs.builder()
.name("example_lookup_definition")
.filename("example_lookup_file.csv")
.acl(LookupDefinitionAclArgs.builder()
.owner("admin")
.app("search")
.sharing("app")
.reads("*")
.writes("admin")
.build())
.build());
}
}
resources:
example:
type: splunk:LookupDefinition
properties:
name: example_lookup_definition
filename: example_lookup_file.csv
acl:
owner: admin
app: search
sharing: app
reads:
- '*'
writes:
- admin
Validation Rules
When acl.sharing
is set to user
, the acl.read
and acl.write
fields must not be explicitly set. Setting them will trigger a validation error.
Create LookupDefinition Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LookupDefinition(name: string, args: LookupDefinitionArgs, opts?: CustomResourceOptions);
@overload
def LookupDefinition(resource_name: str,
args: LookupDefinitionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LookupDefinition(resource_name: str,
opts: Optional[ResourceOptions] = None,
filename: Optional[str] = None,
name: Optional[str] = None,
acl: Optional[LookupDefinitionAclArgs] = None)
func NewLookupDefinition(ctx *Context, name string, args LookupDefinitionArgs, opts ...ResourceOption) (*LookupDefinition, error)
public LookupDefinition(string name, LookupDefinitionArgs args, CustomResourceOptions? opts = null)
public LookupDefinition(String name, LookupDefinitionArgs args)
public LookupDefinition(String name, LookupDefinitionArgs args, CustomResourceOptions options)
type: splunk:LookupDefinition
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 LookupDefinitionArgs
- 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 LookupDefinitionArgs
- 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 LookupDefinitionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LookupDefinitionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LookupDefinitionArgs
- 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 lookupDefinitionResource = new Splunk.LookupDefinition("lookupDefinitionResource", new()
{
Filename = "string",
Name = "string",
Acl = new Splunk.Inputs.LookupDefinitionAclArgs
{
App = "string",
CanChangePerms = false,
CanShareApp = false,
CanShareGlobal = false,
CanShareUser = false,
CanWrite = false,
Owner = "string",
Reads = new[]
{
"string",
},
Removable = false,
Sharing = "string",
Writes = new[]
{
"string",
},
},
});
example, err := splunk.NewLookupDefinition(ctx, "lookupDefinitionResource", &splunk.LookupDefinitionArgs{
Filename: pulumi.String("string"),
Name: pulumi.String("string"),
Acl: &splunk.LookupDefinitionAclArgs{
App: pulumi.String("string"),
CanChangePerms: pulumi.Bool(false),
CanShareApp: pulumi.Bool(false),
CanShareGlobal: pulumi.Bool(false),
CanShareUser: pulumi.Bool(false),
CanWrite: pulumi.Bool(false),
Owner: pulumi.String("string"),
Reads: pulumi.StringArray{
pulumi.String("string"),
},
Removable: pulumi.Bool(false),
Sharing: pulumi.String("string"),
Writes: pulumi.StringArray{
pulumi.String("string"),
},
},
})
var lookupDefinitionResource = new LookupDefinition("lookupDefinitionResource", LookupDefinitionArgs.builder()
.filename("string")
.name("string")
.acl(LookupDefinitionAclArgs.builder()
.app("string")
.canChangePerms(false)
.canShareApp(false)
.canShareGlobal(false)
.canShareUser(false)
.canWrite(false)
.owner("string")
.reads("string")
.removable(false)
.sharing("string")
.writes("string")
.build())
.build());
lookup_definition_resource = splunk.LookupDefinition("lookupDefinitionResource",
filename="string",
name="string",
acl={
"app": "string",
"can_change_perms": False,
"can_share_app": False,
"can_share_global": False,
"can_share_user": False,
"can_write": False,
"owner": "string",
"reads": ["string"],
"removable": False,
"sharing": "string",
"writes": ["string"],
})
const lookupDefinitionResource = new splunk.LookupDefinition("lookupDefinitionResource", {
filename: "string",
name: "string",
acl: {
app: "string",
canChangePerms: false,
canShareApp: false,
canShareGlobal: false,
canShareUser: false,
canWrite: false,
owner: "string",
reads: ["string"],
removable: false,
sharing: "string",
writes: ["string"],
},
});
type: splunk:LookupDefinition
properties:
acl:
app: string
canChangePerms: false
canShareApp: false
canShareGlobal: false
canShareUser: false
canWrite: false
owner: string
reads:
- string
removable: false
sharing: string
writes:
- string
filename: string
name: string
LookupDefinition 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 LookupDefinition resource accepts the following input properties:
- Filename string
- The filename for the lookup table, usually ending in
.csv
. - Name string
- A unique name for the lookup definition within the app context.
- Acl
Lookup
Definition Acl - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- Filename string
- The filename for the lookup table, usually ending in
.csv
. - Name string
- A unique name for the lookup definition within the app context.
- Acl
Lookup
Definition Acl Args - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename String
- The filename for the lookup table, usually ending in
.csv
. - name String
- A unique name for the lookup definition within the app context.
- acl
Lookup
Definition Acl - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename string
- The filename for the lookup table, usually ending in
.csv
. - name string
- A unique name for the lookup definition within the app context.
- acl
Lookup
Definition Acl - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename str
- The filename for the lookup table, usually ending in
.csv
. - name str
- A unique name for the lookup definition within the app context.
- acl
Lookup
Definition Acl Args - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename String
- The filename for the lookup table, usually ending in
.csv
. - name String
- A unique name for the lookup definition within the app context.
- acl Property Map
- Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
Outputs
All input properties are implicitly available as output properties. Additionally, the LookupDefinition 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 LookupDefinition Resource
Get an existing LookupDefinition 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?: LookupDefinitionState, opts?: CustomResourceOptions): LookupDefinition
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl: Optional[LookupDefinitionAclArgs] = None,
filename: Optional[str] = None,
name: Optional[str] = None) -> LookupDefinition
func GetLookupDefinition(ctx *Context, name string, id IDInput, state *LookupDefinitionState, opts ...ResourceOption) (*LookupDefinition, error)
public static LookupDefinition Get(string name, Input<string> id, LookupDefinitionState? state, CustomResourceOptions? opts = null)
public static LookupDefinition get(String name, Output<String> id, LookupDefinitionState 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.
- Acl
Lookup
Definition Acl - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- Filename string
- The filename for the lookup table, usually ending in
.csv
. - Name string
- A unique name for the lookup definition within the app context.
- Acl
Lookup
Definition Acl Args - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- Filename string
- The filename for the lookup table, usually ending in
.csv
. - Name string
- A unique name for the lookup definition within the app context.
- acl
Lookup
Definition Acl - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename String
- The filename for the lookup table, usually ending in
.csv
. - name String
- A unique name for the lookup definition within the app context.
- acl
Lookup
Definition Acl - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename string
- The filename for the lookup table, usually ending in
.csv
. - name string
- A unique name for the lookup definition within the app context.
- acl
Lookup
Definition Acl Args - Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename str
- The filename for the lookup table, usually ending in
.csv
. - name str
- A unique name for the lookup definition within the app context.
- acl Property Map
- Defines the access control list (ACL) for the lookup definition. See acl.md for more details.
- filename String
- The filename for the lookup table, usually ending in
.csv
. - name String
- A unique name for the lookup definition within the app context.
Supporting Types
LookupDefinitionAcl, LookupDefinitionAclArgs
- App string
- The app context for the resource. Required for updating saved search ACL properties. Allowed values are:The name of an app and system
- Can
Change boolPerms - Indicates if the active user can change permissions for this object. Defaults to true.
- bool
- Indicates if the active user can change sharing to app level. Defaults to true.
- bool
- Indicates if the active user can change sharing to system level. Defaults to true.
- bool
- Indicates if the active user can change sharing to user level. Defaults to true.
- Can
Write bool - Indicates if the active user can edit this object. Defaults to true.
- 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.
- Reads List<string>
- Properties that indicate resource read permissions.
- Removable bool
- Indicates whether an admin or user with sufficient permissions can delete the entity.
- string
- Indicates how the resource is shared. Required for updating any knowledge object ACL properties.app: Shared within a specific appglobal: (Default) Shared globally to all apps.user: Private to a user
- Writes List<string>
- Properties that indicate resource write permissions.
- App string
- The app context for the resource. Required for updating saved search ACL properties. Allowed values are:The name of an app and system
- Can
Change boolPerms - Indicates if the active user can change permissions for this object. Defaults to true.
- bool
- Indicates if the active user can change sharing to app level. Defaults to true.
- bool
- Indicates if the active user can change sharing to system level. Defaults to true.
- bool
- Indicates if the active user can change sharing to user level. Defaults to true.
- Can
Write bool - Indicates if the active user can edit this object. Defaults to true.
- 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.
- Reads []string
- Properties that indicate resource read permissions.
- Removable bool
- Indicates whether an admin or user with sufficient permissions can delete the entity.
- string
- Indicates how the resource is shared. Required for updating any knowledge object ACL properties.app: Shared within a specific appglobal: (Default) Shared globally to all apps.user: Private to a user
- Writes []string
- Properties that indicate resource write permissions.
- app String
- The app context for the resource. Required for updating saved search ACL properties. Allowed values are:The name of an app and system
- can
Change BooleanPerms - Indicates if the active user can change permissions for this object. Defaults to true.
- Boolean
- Indicates if the active user can change sharing to app level. Defaults to true.
- Boolean
- Indicates if the active user can change sharing to system level. Defaults to true.
- Boolean
- Indicates if the active user can change sharing to user level. Defaults to true.
- can
Write Boolean - Indicates if the active user can edit this object. Defaults to true.
- 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.
- reads List<String>
- Properties that indicate resource read permissions.
- removable Boolean
- Indicates whether an admin or user with sufficient permissions can delete the entity.
- String
- Indicates how the resource is shared. Required for updating any knowledge object ACL properties.app: Shared within a specific appglobal: (Default) Shared globally to all apps.user: Private to a user
- writes List<String>
- Properties that indicate resource write permissions.
- app string
- The app context for the resource. Required for updating saved search ACL properties. Allowed values are:The name of an app and system
- can
Change booleanPerms - Indicates if the active user can change permissions for this object. Defaults to true.
- boolean
- Indicates if the active user can change sharing to app level. Defaults to true.
- boolean
- Indicates if the active user can change sharing to system level. Defaults to true.
- boolean
- Indicates if the active user can change sharing to user level. Defaults to true.
- can
Write boolean - Indicates if the active user can edit this object. Defaults to true.
- 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.
- reads string[]
- Properties that indicate resource read permissions.
- removable boolean
- Indicates whether an admin or user with sufficient permissions can delete the entity.
- string
- Indicates how the resource is shared. Required for updating any knowledge object ACL properties.app: Shared within a specific appglobal: (Default) Shared globally to all apps.user: Private to a user
- writes string[]
- Properties that indicate resource write permissions.
- app str
- The app context for the resource. Required for updating saved search ACL properties. Allowed values are:The name of an app and system
- can_
change_ boolperms - Indicates if the active user can change permissions for this object. Defaults to true.
- bool
- Indicates if the active user can change sharing to app level. Defaults to true.
- bool
- Indicates if the active user can change sharing to system level. Defaults to true.
- bool
- Indicates if the active user can change sharing to user level. Defaults to true.
- can_
write bool - Indicates if the active user can edit this object. Defaults to true.
- 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.
- reads Sequence[str]
- Properties that indicate resource read permissions.
- removable bool
- Indicates whether an admin or user with sufficient permissions can delete the entity.
- str
- Indicates how the resource is shared. Required for updating any knowledge object ACL properties.app: Shared within a specific appglobal: (Default) Shared globally to all apps.user: Private to a user
- writes Sequence[str]
- Properties that indicate resource write permissions.
- app String
- The app context for the resource. Required for updating saved search ACL properties. Allowed values are:The name of an app and system
- can
Change BooleanPerms - Indicates if the active user can change permissions for this object. Defaults to true.
- Boolean
- Indicates if the active user can change sharing to app level. Defaults to true.
- Boolean
- Indicates if the active user can change sharing to system level. Defaults to true.
- Boolean
- Indicates if the active user can change sharing to user level. Defaults to true.
- can
Write Boolean - Indicates if the active user can edit this object. Defaults to true.
- 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.
- reads List<String>
- Properties that indicate resource read permissions.
- removable Boolean
- Indicates whether an admin or user with sufficient permissions can delete the entity.
- String
- Indicates how the resource is shared. Required for updating any knowledge object ACL properties.app: Shared within a specific appglobal: (Default) Shared globally to all apps.user: Private to a user
- writes List<String>
- Properties that indicate resource write permissions.
Package Details
- Repository
- Splunk pulumi/pulumi-splunk
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
splunk
Terraform Provider.