Viewing docs for elasticstack 0.14.3
published on Tuesday, Mar 3, 2026 by elastic
published on Tuesday, Mar 3, 2026 by elastic
Viewing docs for elasticstack 0.14.3
published on Tuesday, Mar 3, 2026 by elastic
published on Tuesday, Mar 3, 2026 by elastic
Retrieves role mappings. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const mapping = elasticstack.getElasticsearchSecurityRoleMapping({
name: "my_mapping",
});
export const user = mapping.then(mapping => mapping.name);
import pulumi
import pulumi_elasticstack as elasticstack
mapping = elasticstack.get_elasticsearch_security_role_mapping(name="my_mapping")
pulumi.export("user", mapping.name)
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 {
mapping, err := elasticstack.LookupElasticsearchSecurityRoleMapping(ctx, &elasticstack.LookupElasticsearchSecurityRoleMappingArgs{
Name: "my_mapping",
}, nil)
if err != nil {
return err
}
ctx.Export("user", mapping.Name)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
var mapping = Elasticstack.GetElasticsearchSecurityRoleMapping.Invoke(new()
{
Name = "my_mapping",
});
return new Dictionary<string, object?>
{
["user"] = mapping.Apply(getElasticsearchSecurityRoleMappingResult => getElasticsearchSecurityRoleMappingResult.Name),
};
});
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.GetElasticsearchSecurityRoleMappingArgs;
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 mapping = ElasticstackFunctions.getElasticsearchSecurityRoleMapping(GetElasticsearchSecurityRoleMappingArgs.builder()
.name("my_mapping")
.build());
ctx.export("user", mapping.name());
}
}
variables:
mapping:
fn::invoke:
function: elasticstack:getElasticsearchSecurityRoleMapping
arguments:
name: my_mapping
outputs:
user: ${mapping.name}
Using getElasticsearchSecurityRoleMapping
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 getElasticsearchSecurityRoleMapping(args: GetElasticsearchSecurityRoleMappingArgs, opts?: InvokeOptions): Promise<GetElasticsearchSecurityRoleMappingResult>
function getElasticsearchSecurityRoleMappingOutput(args: GetElasticsearchSecurityRoleMappingOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchSecurityRoleMappingResult>def get_elasticsearch_security_role_mapping(elasticsearch_connections: Optional[Sequence[GetElasticsearchSecurityRoleMappingElasticsearchConnection]] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetElasticsearchSecurityRoleMappingResult
def get_elasticsearch_security_role_mapping_output(elasticsearch_connections: Optional[pulumi.Input[Sequence[pulumi.Input[GetElasticsearchSecurityRoleMappingElasticsearchConnectionArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchSecurityRoleMappingResult]func LookupElasticsearchSecurityRoleMapping(ctx *Context, args *LookupElasticsearchSecurityRoleMappingArgs, opts ...InvokeOption) (*LookupElasticsearchSecurityRoleMappingResult, error)
func LookupElasticsearchSecurityRoleMappingOutput(ctx *Context, args *LookupElasticsearchSecurityRoleMappingOutputArgs, opts ...InvokeOption) LookupElasticsearchSecurityRoleMappingResultOutput> Note: This function is named LookupElasticsearchSecurityRoleMapping in the Go SDK.
public static class GetElasticsearchSecurityRoleMapping
{
public static Task<GetElasticsearchSecurityRoleMappingResult> InvokeAsync(GetElasticsearchSecurityRoleMappingArgs args, InvokeOptions? opts = null)
public static Output<GetElasticsearchSecurityRoleMappingResult> Invoke(GetElasticsearchSecurityRoleMappingInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetElasticsearchSecurityRoleMappingResult> getElasticsearchSecurityRoleMapping(GetElasticsearchSecurityRoleMappingArgs args, InvokeOptions options)
public static Output<GetElasticsearchSecurityRoleMappingResult> getElasticsearchSecurityRoleMapping(GetElasticsearchSecurityRoleMappingArgs args, InvokeOptions options)
fn::invoke:
function: elasticstack:index/getElasticsearchSecurityRoleMapping:getElasticsearchSecurityRoleMapping
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The distinct name that identifies the role mapping, used solely as an identifier.
- Elasticsearch
Connections List<GetElasticsearch Security Role Mapping Elasticsearch Connection> - Elasticsearch connection configuration block.
- Name string
- The distinct name that identifies the role mapping, used solely as an identifier.
- Elasticsearch
Connections []GetElasticsearch Security Role Mapping Elasticsearch Connection - Elasticsearch connection configuration block.
- name String
- The distinct name that identifies the role mapping, used solely as an identifier.
- elasticsearch
Connections List<GetElasticsearch Security Role Mapping Elasticsearch Connection> - Elasticsearch connection configuration block.
- name string
- The distinct name that identifies the role mapping, used solely as an identifier.
- elasticsearch
Connections GetElasticsearch Security Role Mapping Elasticsearch Connection[] - Elasticsearch connection configuration block.
- name str
- The distinct name that identifies the role mapping, used solely as an identifier.
- elasticsearch_
connections Sequence[GetElasticsearch Security Role Mapping Elasticsearch Connection] - Elasticsearch connection configuration block.
- name String
- The distinct name that identifies the role mapping, used solely as an identifier.
- elasticsearch
Connections List<Property Map> - Elasticsearch connection configuration block.
getElasticsearchSecurityRoleMapping Result
The following output properties are available:
- Enabled bool
- Mappings that have
enabledset tofalseare ignored when role mapping is performed. - Id string
- Internal identifier of the resource
- Metadata string
- Additional metadata that helps define which roles are assigned to each user. Keys beginning with
_are reserved for system usage. - Name string
- The distinct name that identifies the role mapping, used solely as an identifier.
- Role
Templates string - A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
- Roles List<string>
- A list of role names that are granted to the users that match the role mapping rules.
- Rules string
- The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
- Elasticsearch
Connections List<GetElasticsearch Security Role Mapping Elasticsearch Connection> - Elasticsearch connection configuration block.
- Enabled bool
- Mappings that have
enabledset tofalseare ignored when role mapping is performed. - Id string
- Internal identifier of the resource
- Metadata string
- Additional metadata that helps define which roles are assigned to each user. Keys beginning with
_are reserved for system usage. - Name string
- The distinct name that identifies the role mapping, used solely as an identifier.
- Role
Templates string - A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
- Roles []string
- A list of role names that are granted to the users that match the role mapping rules.
- Rules string
- The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
- Elasticsearch
Connections []GetElasticsearch Security Role Mapping Elasticsearch Connection - Elasticsearch connection configuration block.
- enabled Boolean
- Mappings that have
enabledset tofalseare ignored when role mapping is performed. - id String
- Internal identifier of the resource
- metadata String
- Additional metadata that helps define which roles are assigned to each user. Keys beginning with
_are reserved for system usage. - name String
- The distinct name that identifies the role mapping, used solely as an identifier.
- role
Templates String - A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
- roles List<String>
- A list of role names that are granted to the users that match the role mapping rules.
- rules String
- The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
- elasticsearch
Connections List<GetElasticsearch Security Role Mapping Elasticsearch Connection> - Elasticsearch connection configuration block.
- enabled boolean
- Mappings that have
enabledset tofalseare ignored when role mapping is performed. - id string
- Internal identifier of the resource
- metadata string
- Additional metadata that helps define which roles are assigned to each user. Keys beginning with
_are reserved for system usage. - name string
- The distinct name that identifies the role mapping, used solely as an identifier.
- role
Templates string - A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
- roles string[]
- A list of role names that are granted to the users that match the role mapping rules.
- rules string
- The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
- elasticsearch
Connections GetElasticsearch Security Role Mapping Elasticsearch Connection[] - Elasticsearch connection configuration block.
- enabled bool
- Mappings that have
enabledset tofalseare ignored when role mapping is performed. - id str
- Internal identifier of the resource
- metadata str
- Additional metadata that helps define which roles are assigned to each user. Keys beginning with
_are reserved for system usage. - name str
- The distinct name that identifies the role mapping, used solely as an identifier.
- role_
templates str - A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
- roles Sequence[str]
- A list of role names that are granted to the users that match the role mapping rules.
- rules str
- The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
- elasticsearch_
connections Sequence[GetElasticsearch Security Role Mapping Elasticsearch Connection] - Elasticsearch connection configuration block.
- enabled Boolean
- Mappings that have
enabledset tofalseare ignored when role mapping is performed. - id String
- Internal identifier of the resource
- metadata String
- Additional metadata that helps define which roles are assigned to each user. Keys beginning with
_are reserved for system usage. - name String
- The distinct name that identifies the role mapping, used solely as an identifier.
- role
Templates String - A list of mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules.
- roles List<String>
- A list of role names that are granted to the users that match the role mapping rules.
- rules String
- The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.
- elasticsearch
Connections List<Property Map> - Elasticsearch connection configuration block.
Supporting Types
GetElasticsearchSecurityRoleMappingElasticsearchConnection
- Api
Key string - API Key to use for authentication to Elasticsearch
- Bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- Ca
Data string - PEM-encoded custom Certificate Authority certificate
- Ca
File string - Path to a custom Certificate Authority certificate
- Cert
Data string - PEM encoded certificate for client auth
- Cert
File string - Path to a file containing the PEM encoded certificate for client auth
- Endpoints List<string>
- Es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- Headers Dictionary<string, string>
- A list of headers to be sent with each request to Elasticsearch.
- Insecure bool
- Disable TLS certificate validation
- Key
Data string - PEM encoded private key for client auth
- Key
File string - Path to a file containing the PEM encoded private key for client auth
- Password string
- Password to use for API authentication to Elasticsearch.
- Username string
- Username to use for API authentication to Elasticsearch.
- Api
Key string - API Key to use for authentication to Elasticsearch
- Bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- Ca
Data string - PEM-encoded custom Certificate Authority certificate
- Ca
File string - Path to a custom Certificate Authority certificate
- Cert
Data string - PEM encoded certificate for client auth
- Cert
File string - Path to a file containing the PEM encoded certificate for client auth
- Endpoints []string
- Es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- Headers map[string]string
- A list of headers to be sent with each request to Elasticsearch.
- Insecure bool
- Disable TLS certificate validation
- Key
Data string - PEM encoded private key for client auth
- Key
File string - Path to a file containing the PEM encoded private key for client auth
- Password string
- Password to use for API authentication to Elasticsearch.
- Username string
- Username to use for API authentication to Elasticsearch.
- api
Key String - API Key to use for authentication to Elasticsearch
- bearer
Token String - Bearer Token to use for authentication to Elasticsearch
- ca
Data String - PEM-encoded custom Certificate Authority certificate
- ca
File String - Path to a custom Certificate Authority certificate
- cert
Data String - PEM encoded certificate for client auth
- cert
File String - Path to a file containing the PEM encoded certificate for client auth
- endpoints List<String>
- es
Client StringAuthentication - ES Client Authentication field to be used with the JWT token
- headers Map<String,String>
- A list of headers to be sent with each request to Elasticsearch.
- insecure Boolean
- Disable TLS certificate validation
- key
Data String - PEM encoded private key for client auth
- key
File String - Path to a file containing the PEM encoded private key for client auth
- password String
- Password to use for API authentication to Elasticsearch.
- username String
- Username to use for API authentication to Elasticsearch.
- api
Key string - API Key to use for authentication to Elasticsearch
- bearer
Token string - Bearer Token to use for authentication to Elasticsearch
- ca
Data string - PEM-encoded custom Certificate Authority certificate
- ca
File string - Path to a custom Certificate Authority certificate
- cert
Data string - PEM encoded certificate for client auth
- cert
File string - Path to a file containing the PEM encoded certificate for client auth
- endpoints string[]
- es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- headers {[key: string]: string}
- A list of headers to be sent with each request to Elasticsearch.
- insecure boolean
- Disable TLS certificate validation
- key
Data string - PEM encoded private key for client auth
- key
File string - Path to a file containing the PEM encoded private key for client auth
- password string
- Password to use for API authentication to Elasticsearch.
- username string
- Username to use for API authentication to Elasticsearch.
- api_
key str - API Key to use for authentication to Elasticsearch
- bearer_
token str - Bearer Token to use for authentication to Elasticsearch
- ca_
data str - PEM-encoded custom Certificate Authority certificate
- ca_
file str - Path to a custom Certificate Authority certificate
- cert_
data str - PEM encoded certificate for client auth
- cert_
file str - Path to a file containing the PEM encoded certificate for client auth
- endpoints Sequence[str]
- es_
client_ strauthentication - ES Client Authentication field to be used with the JWT token
- headers Mapping[str, str]
- A list of headers to be sent with each request to Elasticsearch.
- insecure bool
- Disable TLS certificate validation
- key_
data str - PEM encoded private key for client auth
- key_
file str - Path to a file containing the PEM encoded private key for client auth
- password str
- Password to use for API authentication to Elasticsearch.
- username str
- Username to use for API authentication to Elasticsearch.
- api
Key String - API Key to use for authentication to Elasticsearch
- bearer
Token String - Bearer Token to use for authentication to Elasticsearch
- ca
Data String - PEM-encoded custom Certificate Authority certificate
- ca
File String - Path to a custom Certificate Authority certificate
- cert
Data String - PEM encoded certificate for client auth
- cert
File String - Path to a file containing the PEM encoded certificate for client auth
- endpoints List<String>
- es
Client StringAuthentication - ES Client Authentication field to be used with the JWT token
- headers Map<String>
- A list of headers to be sent with each request to Elasticsearch.
- insecure Boolean
- Disable TLS certificate validation
- key
Data String - PEM encoded private key for client auth
- key
File String - Path to a file containing the PEM encoded private key for client auth
- password String
- Password to use for API authentication to Elasticsearch.
- username String
- Username to use for API authentication to Elasticsearch.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstackTerraform Provider.
Viewing docs for elasticstack 0.14.3
published on Tuesday, Mar 3, 2026 by elastic
published on Tuesday, Mar 3, 2026 by elastic
