Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community
published on Monday, Apr 27, 2026 by akeyless-community
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community
published on Monday, Apr 27, 2026 by akeyless-community
Role data source
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as akeyless from "@pulumi/akeyless";
const demo_role = akeyless.getRole({
name: "terraform/demo-role",
});
import pulumi
import pulumi_akeyless as akeyless
demo_role = akeyless.get_role(name="terraform/demo-role")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/akeyless/v2/akeyless"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := akeyless.LookupRole(ctx, &akeyless.LookupRoleArgs{
Name: "terraform/demo-role",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Akeyless = Pulumi.Akeyless;
return await Deployment.RunAsync(() =>
{
var demo_role = Akeyless.GetRole.Invoke(new()
{
Name = "terraform/demo-role",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akeyless.AkeylessFunctions;
import com.pulumi.akeyless.inputs.GetRoleArgs;
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 demo-role = AkeylessFunctions.getRole(GetRoleArgs.builder()
.name("terraform/demo-role")
.build());
}
}
variables:
demo-role:
fn::invoke:
function: akeyless:getRole
arguments:
name: terraform/demo-role
Using getRole
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 getRole(args: GetRoleArgs, opts?: InvokeOptions): Promise<GetRoleResult>
function getRoleOutput(args: GetRoleOutputArgs, opts?: InvokeOptions): Output<GetRoleResult>def get_role(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRoleResult
def get_role_output(id: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRoleResult]func LookupRole(ctx *Context, args *LookupRoleArgs, opts ...InvokeOption) (*LookupRoleResult, error)
func LookupRoleOutput(ctx *Context, args *LookupRoleOutputArgs, opts ...InvokeOption) LookupRoleResultOutput> Note: This function is named LookupRole in the Go SDK.
public static class GetRole
{
public static Task<GetRoleResult> InvokeAsync(GetRoleArgs args, InvokeOptions? opts = null)
public static Output<GetRoleResult> Invoke(GetRoleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
public static Output<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
fn::invoke:
function: akeyless:index/getRole:getRole
arguments:
# arguments dictionaryThe following arguments are supported:
getRole Result
The following output properties are available:
- Access
Date string - Access date of the role
- Access
Date stringDisplay - Access date display format
- Assoc
Auth stringMethod With Rules - Association between auth method and role with rules (JSON format)
- Client
Permissions List<string> - Client permissions associated with the role
- Creation
Date string - Creation date of the role
- Delete
Protection bool - Protection from accidental deletion
- Description string
- Description of the role
- Id string
- The ID of this resource.
- Modification
Date string - Last modification date of the role
- Name string
- The Role name
- Role
Auth stringMethods Assoc - Role auth methods association (JSON format)
- Role
Id double - Role ID
- Role
Name string - Role name
- Rules string
- Role rules (JSON format)
- Access
Date string - Access date of the role
- Access
Date stringDisplay - Access date display format
- Assoc
Auth stringMethod With Rules - Association between auth method and role with rules (JSON format)
- Client
Permissions []string - Client permissions associated with the role
- Creation
Date string - Creation date of the role
- Delete
Protection bool - Protection from accidental deletion
- Description string
- Description of the role
- Id string
- The ID of this resource.
- Modification
Date string - Last modification date of the role
- Name string
- The Role name
- Role
Auth stringMethods Assoc - Role auth methods association (JSON format)
- Role
Id float64 - Role ID
- Role
Name string - Role name
- Rules string
- Role rules (JSON format)
- access
Date String - Access date of the role
- access
Date StringDisplay - Access date display format
- assoc
Auth StringMethod With Rules - Association between auth method and role with rules (JSON format)
- client
Permissions List<String> - Client permissions associated with the role
- creation
Date String - Creation date of the role
- delete
Protection Boolean - Protection from accidental deletion
- description String
- Description of the role
- id String
- The ID of this resource.
- modification
Date String - Last modification date of the role
- name String
- The Role name
- role
Auth StringMethods Assoc - Role auth methods association (JSON format)
- role
Id Double - Role ID
- role
Name String - Role name
- rules String
- Role rules (JSON format)
- access
Date string - Access date of the role
- access
Date stringDisplay - Access date display format
- assoc
Auth stringMethod With Rules - Association between auth method and role with rules (JSON format)
- client
Permissions string[] - Client permissions associated with the role
- creation
Date string - Creation date of the role
- delete
Protection boolean - Protection from accidental deletion
- description string
- Description of the role
- id string
- The ID of this resource.
- modification
Date string - Last modification date of the role
- name string
- The Role name
- role
Auth stringMethods Assoc - Role auth methods association (JSON format)
- role
Id number - Role ID
- role
Name string - Role name
- rules string
- Role rules (JSON format)
- access_
date str - Access date of the role
- access_
date_ strdisplay - Access date display format
- assoc_
auth_ strmethod_ with_ rules - Association between auth method and role with rules (JSON format)
- client_
permissions Sequence[str] - Client permissions associated with the role
- creation_
date str - Creation date of the role
- delete_
protection bool - Protection from accidental deletion
- description str
- Description of the role
- id str
- The ID of this resource.
- modification_
date str - Last modification date of the role
- name str
- The Role name
- role_
auth_ strmethods_ assoc - Role auth methods association (JSON format)
- role_
id float - Role ID
- role_
name str - Role name
- rules str
- Role rules (JSON format)
- access
Date String - Access date of the role
- access
Date StringDisplay - Access date display format
- assoc
Auth StringMethod With Rules - Association between auth method and role with rules (JSON format)
- client
Permissions List<String> - Client permissions associated with the role
- creation
Date String - Creation date of the role
- delete
Protection Boolean - Protection from accidental deletion
- description String
- Description of the role
- id String
- The ID of this resource.
- modification
Date String - Last modification date of the role
- name String
- The Role name
- role
Auth StringMethods Assoc - Role auth methods association (JSON format)
- role
Id Number - Role ID
- role
Name String - Role name
- rules String
- Role rules (JSON format)
Package Details
- Repository
- akeyless akeyless-community/terraform-provider-akeyless
- License
- Notes
- This Pulumi package is based on the
akeylessTerraform Provider.
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community
published on Monday, Apr 27, 2026 by akeyless-community
