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

splunk.GenericAcl

Explore with Pulumi AI

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as splunk from "@pulumi/splunk";
    
    const myApp = new splunk.GenericAcl("my_app", {
        path: "apps/local/my_app",
        acl: {
            app: "system",
            owner: "nobody",
            reads: ["*"],
            writes: [
                "admin",
                "power",
            ],
        },
    });
    const myDashboard = new splunk.GenericAcl("my_dashboard", {
        path: "data/ui/views/my_dashboard",
        acl: {
            app: "my_app",
            owner: "joe_user",
            reads: ["team_joe"],
            writes: ["team_joe"],
        },
    });
    
    import pulumi
    import pulumi_splunk as splunk
    
    my_app = splunk.GenericAcl("my_app",
        path="apps/local/my_app",
        acl={
            "app": "system",
            "owner": "nobody",
            "reads": ["*"],
            "writes": [
                "admin",
                "power",
            ],
        })
    my_dashboard = splunk.GenericAcl("my_dashboard",
        path="data/ui/views/my_dashboard",
        acl={
            "app": "my_app",
            "owner": "joe_user",
            "reads": ["team_joe"],
            "writes": ["team_joe"],
        })
    
    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.NewGenericAcl(ctx, "my_app", &splunk.GenericAclArgs{
    			Path: pulumi.String("apps/local/my_app"),
    			Acl: &splunk.GenericAclAclArgs{
    				App:   pulumi.String("system"),
    				Owner: pulumi.String("nobody"),
    				Reads: pulumi.StringArray{
    					pulumi.String("*"),
    				},
    				Writes: pulumi.StringArray{
    					pulumi.String("admin"),
    					pulumi.String("power"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = splunk.NewGenericAcl(ctx, "my_dashboard", &splunk.GenericAclArgs{
    			Path: pulumi.String("data/ui/views/my_dashboard"),
    			Acl: &splunk.GenericAclAclArgs{
    				App:   pulumi.String("my_app"),
    				Owner: pulumi.String("joe_user"),
    				Reads: pulumi.StringArray{
    					pulumi.String("team_joe"),
    				},
    				Writes: pulumi.StringArray{
    					pulumi.String("team_joe"),
    				},
    			},
    		})
    		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 myApp = new Splunk.GenericAcl("my_app", new()
        {
            Path = "apps/local/my_app",
            Acl = new Splunk.Inputs.GenericAclAclArgs
            {
                App = "system",
                Owner = "nobody",
                Reads = new[]
                {
                    "*",
                },
                Writes = new[]
                {
                    "admin",
                    "power",
                },
            },
        });
    
        var myDashboard = new Splunk.GenericAcl("my_dashboard", new()
        {
            Path = "data/ui/views/my_dashboard",
            Acl = new Splunk.Inputs.GenericAclAclArgs
            {
                App = "my_app",
                Owner = "joe_user",
                Reads = new[]
                {
                    "team_joe",
                },
                Writes = new[]
                {
                    "team_joe",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.splunk.GenericAcl;
    import com.pulumi.splunk.GenericAclArgs;
    import com.pulumi.splunk.inputs.GenericAclAclArgs;
    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 myApp = new GenericAcl("myApp", GenericAclArgs.builder()
                .path("apps/local/my_app")
                .acl(GenericAclAclArgs.builder()
                    .app("system")
                    .owner("nobody")
                    .reads("*")
                    .writes(                
                        "admin",
                        "power")
                    .build())
                .build());
    
            var myDashboard = new GenericAcl("myDashboard", GenericAclArgs.builder()
                .path("data/ui/views/my_dashboard")
                .acl(GenericAclAclArgs.builder()
                    .app("my_app")
                    .owner("joe_user")
                    .reads("team_joe")
                    .writes("team_joe")
                    .build())
                .build());
    
        }
    }
    
    resources:
      myApp:
        type: splunk:GenericAcl
        name: my_app
        properties:
          path: apps/local/my_app
          acl:
            app: system
            owner: nobody
            reads:
              - '*'
            writes:
              - admin
              - power
      myDashboard:
        type: splunk:GenericAcl
        name: my_dashboard
        properties:
          path: data/ui/views/my_dashboard
          acl:
            app: my_app
            owner: joe_user
            reads:
              - team_joe
            writes:
              - team_joe
    

    Create GenericAcl Resource

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

    Constructor syntax

    new GenericAcl(name: string, args: GenericAclArgs, opts?: CustomResourceOptions);
    @overload
    def GenericAcl(resource_name: str,
                   args: GenericAclArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def GenericAcl(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   path: Optional[str] = None,
                   acl: Optional[GenericAclAclArgs] = None)
    func NewGenericAcl(ctx *Context, name string, args GenericAclArgs, opts ...ResourceOption) (*GenericAcl, error)
    public GenericAcl(string name, GenericAclArgs args, CustomResourceOptions? opts = null)
    public GenericAcl(String name, GenericAclArgs args)
    public GenericAcl(String name, GenericAclArgs args, CustomResourceOptions options)
    
    type: splunk:GenericAcl
    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 GenericAclArgs
    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 GenericAclArgs
    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 GenericAclArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GenericAclArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GenericAclArgs
    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 genericAclResource = new Splunk.GenericAcl("genericAclResource", new()
    {
        Path = "string",
        Acl = new Splunk.Inputs.GenericAclAclArgs
        {
            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.NewGenericAcl(ctx, "genericAclResource", &splunk.GenericAclArgs{
    	Path: pulumi.String("string"),
    	Acl: &splunk.GenericAclAclArgs{
    		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 genericAclResource = new GenericAcl("genericAclResource", GenericAclArgs.builder()
        .path("string")
        .acl(GenericAclAclArgs.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());
    
    generic_acl_resource = splunk.GenericAcl("genericAclResource",
        path="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 genericAclResource = new splunk.GenericAcl("genericAclResource", {
        path: "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:GenericAcl
    properties:
        acl:
            app: string
            canChangePerms: false
            canShareApp: false
            canShareGlobal: false
            canShareUser: false
            canWrite: false
            owner: string
            reads:
                - string
            removable: false
            sharing: string
            writes:
                - string
        path: string
    

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

    Path string
    REST API Endpoint path to the object, relative to servicesNS//
    Acl GenericAclAcl
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    Path string
    REST API Endpoint path to the object, relative to servicesNS//
    Acl GenericAclAclArgs
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path String
    REST API Endpoint path to the object, relative to servicesNS//
    acl GenericAclAcl
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path string
    REST API Endpoint path to the object, relative to servicesNS//
    acl GenericAclAcl
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path str
    REST API Endpoint path to the object, relative to servicesNS//
    acl GenericAclAclArgs
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path String
    REST API Endpoint path to the object, relative to servicesNS//
    acl Property Map
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.

    Outputs

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

    Get an existing GenericAcl 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?: GenericAclState, opts?: CustomResourceOptions): GenericAcl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            acl: Optional[GenericAclAclArgs] = None,
            path: Optional[str] = None) -> GenericAcl
    func GetGenericAcl(ctx *Context, name string, id IDInput, state *GenericAclState, opts ...ResourceOption) (*GenericAcl, error)
    public static GenericAcl Get(string name, Input<string> id, GenericAclState? state, CustomResourceOptions? opts = null)
    public static GenericAcl get(String name, Output<String> id, GenericAclState 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:
    Acl GenericAclAcl
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    Path string
    REST API Endpoint path to the object, relative to servicesNS//
    Acl GenericAclAclArgs
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    Path string
    REST API Endpoint path to the object, relative to servicesNS//
    acl GenericAclAcl
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path String
    REST API Endpoint path to the object, relative to servicesNS//
    acl GenericAclAcl
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path string
    REST API Endpoint path to the object, relative to servicesNS//
    acl GenericAclAclArgs
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path str
    REST API Endpoint path to the object, relative to servicesNS//
    acl Property Map
    The ACL to apply to the object, including app/owner to properly identify the object. Though technically optional, it should be explicitly set for this resource to really be valid. Some objects, such as apps, require specific values for app and owner. Consult the REST API documentation regarding which values to use for app and owner for objects that don't fit in the normal namespace.
    path String
    REST API Endpoint path to the object, relative to servicesNS//

    Supporting Types

    GenericAclAcl, GenericAclAclArgs

    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
    CanChangePerms bool
    Indicates if the active user can change permissions for this object. Defaults to true.
    CanShareApp bool
    Indicates if the active user can change sharing to app level. Defaults to true.
    CanShareGlobal bool
    Indicates if the active user can change sharing to system level. Defaults to true.
    CanShareUser bool
    Indicates if the active user can change sharing to user level. Defaults to true.
    CanWrite 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.
    Sharing 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
    CanChangePerms bool
    Indicates if the active user can change permissions for this object. Defaults to true.
    CanShareApp bool
    Indicates if the active user can change sharing to app level. Defaults to true.
    CanShareGlobal bool
    Indicates if the active user can change sharing to system level. Defaults to true.
    CanShareUser bool
    Indicates if the active user can change sharing to user level. Defaults to true.
    CanWrite 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.
    Sharing 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
    canChangePerms Boolean
    Indicates if the active user can change permissions for this object. Defaults to true.
    canShareApp Boolean
    Indicates if the active user can change sharing to app level. Defaults to true.
    canShareGlobal Boolean
    Indicates if the active user can change sharing to system level. Defaults to true.
    canShareUser Boolean
    Indicates if the active user can change sharing to user level. Defaults to true.
    canWrite 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.
    sharing 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
    canChangePerms boolean
    Indicates if the active user can change permissions for this object. Defaults to true.
    canShareApp boolean
    Indicates if the active user can change sharing to app level. Defaults to true.
    canShareGlobal boolean
    Indicates if the active user can change sharing to system level. Defaults to true.
    canShareUser boolean
    Indicates if the active user can change sharing to user level. Defaults to true.
    canWrite 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.
    sharing 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_perms bool
    Indicates if the active user can change permissions for this object. Defaults to true.
    can_share_app bool
    Indicates if the active user can change sharing to app level. Defaults to true.
    can_share_global bool
    Indicates if the active user can change sharing to system level. Defaults to true.
    can_share_user 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.
    sharing 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
    canChangePerms Boolean
    Indicates if the active user can change permissions for this object. Defaults to true.
    canShareApp Boolean
    Indicates if the active user can change sharing to app level. Defaults to true.
    canShareGlobal Boolean
    Indicates if the active user can change sharing to system level. Defaults to true.
    canShareUser Boolean
    Indicates if the active user can change sharing to user level. Defaults to true.
    canWrite 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.
    sharing 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.

    Import

    Generic ACL resources can be imported by specifying their owner, app, and path with a colon-delimited string as the ID:

    $ pulumi import splunk:index/genericAcl:GenericAcl splunk_generic_acl <owner>:<app>:<path>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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