Keycloak v5.3.4 published on Friday, Sep 20, 2024 by Pulumi
keycloak.getRole
Explore with Pulumi AI
# keycloak.Role data source
This data source can be used to fetch properties of a Keycloak role for
usage with other resources, such as keycloak.GroupRoles
.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
realm:
type: keycloak:Realm
properties:
realm: my-realm
enabled: true
# use the data source
group:
type: keycloak:Group
properties:
realmId: ${realm.id}
name: group
groupRoles:
type: keycloak:GroupRoles
name: group_roles
properties:
realmId: ${realm.id}
groupId: ${group.id}
roles:
- ${offlineAccess.id}
variables:
offlineAccess:
fn::invoke:
Function: keycloak:getRole
Arguments:
realmId: ${realm.id}
name: offline_access
Argument Reference
The following arguments are supported:
realm_id
- (Required) The realm this role exists within.client_id
- (Optional) When specified, this role is assumed to be a client role belonging to the client with the provided IDname
- (Required) The name of the role
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
id
- The unique ID of the role, which can be used as an argument to other resources supported by this provider.description
- The description of the 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(client_id: Optional[str] = None,
name: Optional[str] = None,
realm_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRoleResult
def get_role_output(client_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
realm_id: Optional[pulumi.Input[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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: keycloak:index/getRole:getRole
arguments:
# arguments dictionary
The following arguments are supported:
getRole Result
The following output properties are available:
- Attributes Dictionary<string, string>
- Composite
Roles List<string> - Description string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Realm
Id string - Client
Id string
- Attributes map[string]string
- Composite
Roles []string - Description string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Realm
Id string - Client
Id string
- attributes Map<String,String>
- composite
Roles List<String> - description String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- realm
Id String - client
Id String
- attributes {[key: string]: string}
- composite
Roles string[] - description string
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- realm
Id string - client
Id string
- attributes Mapping[str, str]
- composite_
roles Sequence[str] - description str
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- realm_
id str - client_
id str
- attributes Map<String>
- composite
Roles List<String> - description String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- realm
Id String - client
Id String
Package Details
- Repository
- Keycloak pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
keycloak
Terraform Provider.