1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. getKibanaSecurityRole
elasticstack 0.12.1 published on Thursday, Oct 23, 2025 by elastic

elasticstack.getKibanaSecurityRole

Start a Neo task
Explain and create an elasticstack.getKibanaSecurityRole resource
elasticstack logo
elasticstack 0.12.1 published on Thursday, Oct 23, 2025 by elastic

    Retrieve a specific role. See the role management API documentation for more details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const example = elasticstack.getKibanaSecurityRole({
        name: "sample_role",
    });
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    example = elasticstack.get_kibana_security_role(name="sample_role")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := elasticstack.LookupKibanaSecurityRole(ctx, &elasticstack.LookupKibanaSecurityRoleArgs{
    			Name: "sample_role",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Elasticstack = Pulumi.Elasticstack;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Elasticstack.GetKibanaSecurityRole.Invoke(new()
        {
            Name = "sample_role",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.ElasticstackFunctions;
    import com.pulumi.elasticstack.inputs.GetKibanaSecurityRoleArgs;
    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) {
            final var example = ElasticstackFunctions.getKibanaSecurityRole(GetKibanaSecurityRoleArgs.builder()
                .name("sample_role")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: elasticstack:getKibanaSecurityRole
          arguments:
            name: sample_role
    

    Using getKibanaSecurityRole

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getKibanaSecurityRole(args: GetKibanaSecurityRoleArgs, opts?: InvokeOptions): Promise<GetKibanaSecurityRoleResult>
    function getKibanaSecurityRoleOutput(args: GetKibanaSecurityRoleOutputArgs, opts?: InvokeOptions): Output<GetKibanaSecurityRoleResult>
    def get_kibana_security_role(description: Optional[str] = None,
                                 id: Optional[str] = None,
                                 metadata: Optional[str] = None,
                                 name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetKibanaSecurityRoleResult
    def get_kibana_security_role_output(description: Optional[pulumi.Input[str]] = None,
                                 id: Optional[pulumi.Input[str]] = None,
                                 metadata: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetKibanaSecurityRoleResult]
    func LookupKibanaSecurityRole(ctx *Context, args *LookupKibanaSecurityRoleArgs, opts ...InvokeOption) (*LookupKibanaSecurityRoleResult, error)
    func LookupKibanaSecurityRoleOutput(ctx *Context, args *LookupKibanaSecurityRoleOutputArgs, opts ...InvokeOption) LookupKibanaSecurityRoleResultOutput

    > Note: This function is named LookupKibanaSecurityRole in the Go SDK.

    public static class GetKibanaSecurityRole 
    {
        public static Task<GetKibanaSecurityRoleResult> InvokeAsync(GetKibanaSecurityRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetKibanaSecurityRoleResult> Invoke(GetKibanaSecurityRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKibanaSecurityRoleResult> getKibanaSecurityRole(GetKibanaSecurityRoleArgs args, InvokeOptions options)
    public static Output<GetKibanaSecurityRoleResult> getKibanaSecurityRole(GetKibanaSecurityRoleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: elasticstack:index/getKibanaSecurityRole:getKibanaSecurityRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name for the role.
    Description string
    Description for the role
    Id string
    The ID of this resource.
    Metadata string
    Optional meta-data.
    Name string
    The name for the role.
    Description string
    Description for the role
    Id string
    The ID of this resource.
    Metadata string
    Optional meta-data.
    name String
    The name for the role.
    description String
    Description for the role
    id String
    The ID of this resource.
    metadata String
    Optional meta-data.
    name string
    The name for the role.
    description string
    Description for the role
    id string
    The ID of this resource.
    metadata string
    Optional meta-data.
    name str
    The name for the role.
    description str
    Description for the role
    id str
    The ID of this resource.
    metadata str
    Optional meta-data.
    name String
    The name for the role.
    description String
    Description for the role
    id String
    The ID of this resource.
    metadata String
    Optional meta-data.

    getKibanaSecurityRole Result

    The following output properties are available:

    Elasticsearches List<GetKibanaSecurityRoleElasticsearch>
    Elasticsearch cluster and index privileges.
    Id string
    The ID of this resource.
    Kibanas List<GetKibanaSecurityRoleKibana>
    The list of objects that specify the Kibana privileges for the role.
    Metadata string
    Optional meta-data.
    Name string
    The name for the role.
    Description string
    Description for the role
    Elasticsearches []GetKibanaSecurityRoleElasticsearch
    Elasticsearch cluster and index privileges.
    Id string
    The ID of this resource.
    Kibanas []GetKibanaSecurityRoleKibana
    The list of objects that specify the Kibana privileges for the role.
    Metadata string
    Optional meta-data.
    Name string
    The name for the role.
    Description string
    Description for the role
    elasticsearches List<GetKibanaSecurityRoleElasticsearch>
    Elasticsearch cluster and index privileges.
    id String
    The ID of this resource.
    kibanas List<GetKibanaSecurityRoleKibana>
    The list of objects that specify the Kibana privileges for the role.
    metadata String
    Optional meta-data.
    name String
    The name for the role.
    description String
    Description for the role
    elasticsearches GetKibanaSecurityRoleElasticsearch[]
    Elasticsearch cluster and index privileges.
    id string
    The ID of this resource.
    kibanas GetKibanaSecurityRoleKibana[]
    The list of objects that specify the Kibana privileges for the role.
    metadata string
    Optional meta-data.
    name string
    The name for the role.
    description string
    Description for the role
    elasticsearches Sequence[GetKibanaSecurityRoleElasticsearch]
    Elasticsearch cluster and index privileges.
    id str
    The ID of this resource.
    kibanas Sequence[GetKibanaSecurityRoleKibana]
    The list of objects that specify the Kibana privileges for the role.
    metadata str
    Optional meta-data.
    name str
    The name for the role.
    description str
    Description for the role
    elasticsearches List<Property Map>
    Elasticsearch cluster and index privileges.
    id String
    The ID of this resource.
    kibanas List<Property Map>
    The list of objects that specify the Kibana privileges for the role.
    metadata String
    Optional meta-data.
    name String
    The name for the role.
    description String
    Description for the role

    Supporting Types

    GetKibanaSecurityRoleElasticsearch

    GetKibanaSecurityRoleElasticsearchIndex

    GetKibanaSecurityRoleElasticsearchIndexFieldSecurity

    Excepts List<string>
    Grants List<string>
    Excepts []string
    Grants []string
    excepts List<String>
    grants List<String>
    excepts string[]
    grants string[]
    excepts Sequence[str]
    grants Sequence[str]
    excepts List<String>
    grants List<String>

    GetKibanaSecurityRoleElasticsearchRemoteIndex

    clusters List<String>
    fieldSecurities List<Property Map>
    names List<String>
    privileges List<String>
    query String

    GetKibanaSecurityRoleElasticsearchRemoteIndexFieldSecurity

    Excepts List<string>
    Grants List<string>
    Excepts []string
    Grants []string
    excepts List<String>
    grants List<String>
    excepts string[]
    grants string[]
    excepts Sequence[str]
    grants Sequence[str]
    excepts List<String>
    grants List<String>

    GetKibanaSecurityRoleKibana

    bases List<String>
    features List<Property Map>
    spaces List<String>

    GetKibanaSecurityRoleKibanaFeature

    Name string
    Privileges List<string>
    Name string
    Privileges []string
    name String
    privileges List<String>
    name string
    privileges string[]
    name str
    privileges Sequence[str]
    name String
    privileges List<String>

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    elasticstack logo
    elasticstack 0.12.1 published on Thursday, Oct 23, 2025 by elastic
      Meet Neo: Your AI Platform Teammate