1. Packages
  2. Packages
  3. Elasticstack Provider
  4. API Docs
  5. getKibanaSecurityRole
Viewing docs for elasticstack 0.14.5
published on Thursday, Apr 23, 2026 by elastic
Viewing docs for elasticstack 0.14.5
published on Thursday, Apr 23, 2026 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,
                                 kibana_connection: Optional[GetKibanaSecurityRoleKibanaConnection] = None,
                                 metadata: Optional[str] = None,
                                 name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetKibanaSecurityRoleResult
    def get_kibana_security_role_output(description: pulumi.Input[Optional[str]] = None,
                                 id: pulumi.Input[Optional[str]] = None,
                                 kibana_connection: pulumi.Input[Optional[GetKibanaSecurityRoleKibanaConnectionArgs]] = None,
                                 metadata: pulumi.Input[Optional[str]] = None,
                                 name: pulumi.Input[Optional[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.
    KibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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.
    KibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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.
    kibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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.
    kibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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.
    kibana_connection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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.
    kibanaConnection Property Map
    Kibana connection configuration block.
    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
    KibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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
    KibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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
    kibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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
    kibanaConnection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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
    kibana_connection GetKibanaSecurityRoleKibanaConnection
    Kibana connection configuration block.
    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
    kibanaConnection Property Map
    Kibana connection configuration block.

    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>

    GetKibanaSecurityRoleKibanaConnection

    ApiKey string
    API Key to use for authentication to Kibana
    BearerToken string
    Bearer Token to use for authentication to Kibana
    CaCerts List<string>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    Endpoints List<string>
    Insecure bool
    Disable TLS certificate validation
    Password string
    Password to use for API authentication to Kibana.
    Username string
    Username to use for API authentication to Kibana.
    ApiKey string
    API Key to use for authentication to Kibana
    BearerToken string
    Bearer Token to use for authentication to Kibana
    CaCerts []string
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    Endpoints []string
    Insecure bool
    Disable TLS certificate validation
    Password string
    Password to use for API authentication to Kibana.
    Username string
    Username to use for API authentication to Kibana.
    apiKey String
    API Key to use for authentication to Kibana
    bearerToken String
    Bearer Token to use for authentication to Kibana
    caCerts List<String>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints List<String>
    insecure Boolean
    Disable TLS certificate validation
    password String
    Password to use for API authentication to Kibana.
    username String
    Username to use for API authentication to Kibana.
    apiKey string
    API Key to use for authentication to Kibana
    bearerToken string
    Bearer Token to use for authentication to Kibana
    caCerts string[]
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints string[]
    insecure boolean
    Disable TLS certificate validation
    password string
    Password to use for API authentication to Kibana.
    username string
    Username to use for API authentication to Kibana.
    api_key str
    API Key to use for authentication to Kibana
    bearer_token str
    Bearer Token to use for authentication to Kibana
    ca_certs Sequence[str]
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints Sequence[str]
    insecure bool
    Disable TLS certificate validation
    password str
    Password to use for API authentication to Kibana.
    username str
    Username to use for API authentication to Kibana.
    apiKey String
    API Key to use for authentication to Kibana
    bearerToken String
    Bearer Token to use for authentication to Kibana
    caCerts List<String>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints List<String>
    insecure Boolean
    Disable TLS certificate validation
    password String
    Password to use for API authentication to Kibana.
    username String
    Username to use for API authentication to Kibana.

    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.
    Viewing docs for elasticstack 0.14.5
    published on Thursday, Apr 23, 2026 by elastic
      Try Pulumi Cloud free. Your team will thank you.