getRealm
This data source can be used to fetch properties of a Keycloak realm for usage with other resources.
Example Usage
using Pulumi;
using Keycloak = Pulumi.Keycloak;
class MyStack : Stack
{
public MyStack()
{
var realm = Output.Create(Keycloak.GetRealm.InvokeAsync(new Keycloak.GetRealmArgs
{
Realm = "my-realm",
}));
var @group = new Keycloak.Role("group", new Keycloak.RoleArgs
{
RealmId = realm.Apply(realm => realm.Id),
});
}
}
package main
import (
"github.com/pulumi/pulumi-keycloak/sdk/v4/go/keycloak"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
realm, err := keycloak.LookupRealm(ctx, &keycloak.LookupRealmArgs{
Realm: "my-realm",
}, nil)
if err != nil {
return err
}
_, err = keycloak.NewRole(ctx, "group", &keycloak.RoleArgs{
RealmId: pulumi.String(realm.Id),
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_keycloak as keycloak
realm = keycloak.get_realm(realm="my-realm")
group = keycloak.Role("group", realm_id=realm.id)
import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";
const realm = keycloak.getRealm({
realm: "my-realm",
});
const group = new keycloak.Role("group", {realmId: realm.then(realm => realm.id)});
Using getRealm
function getRealm(args: GetRealmArgs, opts?: InvokeOptions): Promise<GetRealmResult>
def get_realm(attributes: Optional[Mapping[str, Any]] = None,
default_default_client_scopes: Optional[Sequence[str]] = None,
default_optional_client_scopes: Optional[Sequence[str]] = None,
display_name_html: Optional[str] = None,
internationalizations: Optional[Sequence[GetRealmInternationalization]] = None,
realm: Optional[str] = None,
security_defenses: Optional[Sequence[GetRealmSecurityDefense]] = None,
smtp_servers: Optional[Sequence[GetRealmSmtpServer]] = None,
web_authn_passwordless_policy: Optional[GetRealmWebAuthnPasswordlessPolicy] = None,
web_authn_policy: Optional[GetRealmWebAuthnPolicy] = None,
opts: Optional[InvokeOptions] = None) -> GetRealmResult
func LookupRealm(ctx *Context, args *LookupRealmArgs, opts ...InvokeOption) (*LookupRealmResult, error)
Note: This function is named
LookupRealm
in the Go SDK.
public static class GetRealm {
public static Task<GetRealmResult> InvokeAsync(GetRealmArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- Realm string
- The realm name.
- Attributes Dictionary<string, object>
- Default
Default List<string>Client Scopes - Default
Optional List<string>Client Scopes - Display
Name stringHtml - Internationalizations
List<Get
Realm Internationalization> - Security
Defenses List<GetRealm Security Defense> - Smtp
Servers List<GetRealm Smtp Server> - Web
Authn GetPasswordless Policy Realm Web Authn Passwordless Policy - Web
Authn GetPolicy Realm Web Authn Policy
- Realm string
- The realm name.
- Attributes map[string]interface{}
- Default
Default []stringClient Scopes - Default
Optional []stringClient Scopes - Display
Name stringHtml - Internationalizations
[]Get
Realm Internationalization - Security
Defenses []GetRealm Security Defense - Smtp
Servers []GetRealm Smtp Server - Web
Authn GetPasswordless Policy Realm Web Authn Passwordless Policy - Web
Authn GetPolicy Realm Web Authn Policy
- realm string
- The realm name.
- attributes {[key: string]: any}
- default
Default string[]Client Scopes - default
Optional string[]Client Scopes - display
Name stringHtml - internationalizations
Get
Realm Internationalization[] - security
Defenses GetRealm Security Defense[] - smtp
Servers GetRealm Smtp Server[] - web
Authn GetPasswordless Policy Realm Web Authn Passwordless Policy - web
Authn GetPolicy Realm Web Authn Policy
- realm str
- The realm name.
- attributes Mapping[str, Any]
- default_
default_ Sequence[str]client_ scopes - default_
optional_ Sequence[str]client_ scopes - display_
name_ strhtml - internationalizations
Sequence[Get
Realm Internationalization] - security_
defenses Sequence[GetRealm Security Defense] - smtp_
servers Sequence[GetRealm Smtp Server] - web_
authn_ Getpasswordless_ policy Realm Web Authn Passwordless Policy - web_
authn_ Getpolicy Realm Web Authn Policy
getRealm Result
The following output properties are available:
- Access
Code stringLifespan - Access
Code stringLifespan Login - Access
Code stringLifespan User Action - Access
Token stringLifespan - Access
Token stringLifespan For Implicit Flow - Account
Theme string - Action
Token stringGenerated By Admin Lifespan - Action
Token stringGenerated By User Lifespan - Admin
Theme string - Attributes Dictionary<string, object>
- Browser
Flow string - Client
Authentication stringFlow - Default
Default List<string>Client Scopes - Default
Optional List<string>Client Scopes - Default
Signature stringAlgorithm - Direct
Grant stringFlow - Display
Name string - Docker
Authentication stringFlow - Duplicate
Emails boolAllowed - Edit
Username boolAllowed - Email
Theme string - Enabled bool
- Id string
- The provider-assigned unique ID for this managed resource.
- Internal
Id string - Internationalizations
List<Get
Realm Internationalization> - Login
Theme string - Login
With boolEmail Allowed - Offline
Session stringIdle Timeout - Offline
Session stringMax Lifespan - Offline
Session boolMax Lifespan Enabled - Password
Policy string - Realm string
- Refresh
Token intMax Reuse - Registration
Allowed bool - Registration
Email boolAs Username - Registration
Flow string - Remember
Me bool - Reset
Credentials stringFlow - Reset
Password boolAllowed - Revoke
Refresh boolToken - Security
Defenses List<GetRealm Security Defense> - Smtp
Servers List<GetRealm Smtp Server> - Ssl
Required string - Sso
Session stringIdle Timeout - Sso
Session stringIdle Timeout Remember Me - Sso
Session stringMax Lifespan - Sso
Session stringMax Lifespan Remember Me - User
Managed boolAccess - Verify
Email bool - Web
Authn GetPasswordless Policy Realm Web Authn Passwordless Policy - Web
Authn GetPolicy Realm Web Authn Policy - Display
Name stringHtml
- Access
Code stringLifespan - Access
Code stringLifespan Login - Access
Code stringLifespan User Action - Access
Token stringLifespan - Access
Token stringLifespan For Implicit Flow - Account
Theme string - Action
Token stringGenerated By Admin Lifespan - Action
Token stringGenerated By User Lifespan - Admin
Theme string - Attributes map[string]interface{}
- Browser
Flow string - Client
Authentication stringFlow - Default
Default []stringClient Scopes - Default
Optional []stringClient Scopes - Default
Signature stringAlgorithm - Direct
Grant stringFlow - Display
Name string - Docker
Authentication stringFlow - Duplicate
Emails boolAllowed - Edit
Username boolAllowed - Email
Theme string - Enabled bool
- Id string
- The provider-assigned unique ID for this managed resource.
- Internal
Id string - Internationalizations
[]Get
Realm Internationalization - Login
Theme string - Login
With boolEmail Allowed - Offline
Session stringIdle Timeout - Offline
Session stringMax Lifespan - Offline
Session boolMax Lifespan Enabled - Password
Policy string - Realm string
- Refresh
Token intMax Reuse - Registration
Allowed bool - Registration
Email boolAs Username - Registration
Flow string - Remember
Me bool - Reset
Credentials stringFlow - Reset
Password boolAllowed - Revoke
Refresh boolToken - Security
Defenses []GetRealm Security Defense - Smtp
Servers []GetRealm Smtp Server - Ssl
Required string - Sso
Session stringIdle Timeout - Sso
Session stringIdle Timeout Remember Me - Sso
Session stringMax Lifespan - Sso
Session stringMax Lifespan Remember Me - User
Managed boolAccess - Verify
Email bool - Web
Authn GetPasswordless Policy Realm Web Authn Passwordless Policy - Web
Authn GetPolicy Realm Web Authn Policy - Display
Name stringHtml
- access
Code stringLifespan - access
Code stringLifespan Login - access
Code stringLifespan User Action - access
Token stringLifespan - access
Token stringLifespan For Implicit Flow - account
Theme string - action
Token stringGenerated By Admin Lifespan - action
Token stringGenerated By User Lifespan - admin
Theme string - attributes {[key: string]: any}
- browser
Flow string - client
Authentication stringFlow - default
Default string[]Client Scopes - default
Optional string[]Client Scopes - default
Signature stringAlgorithm - direct
Grant stringFlow - display
Name string - docker
Authentication stringFlow - duplicate
Emails booleanAllowed - edit
Username booleanAllowed - email
Theme string - enabled boolean
- id string
- The provider-assigned unique ID for this managed resource.
- internal
Id string - internationalizations
Get
Realm Internationalization[] - login
Theme string - login
With booleanEmail Allowed - offline
Session stringIdle Timeout - offline
Session stringMax Lifespan - offline
Session booleanMax Lifespan Enabled - password
Policy string - realm string
- refresh
Token numberMax Reuse - registration
Allowed boolean - registration
Email booleanAs Username - registration
Flow string - remember
Me boolean - reset
Credentials stringFlow - reset
Password booleanAllowed - revoke
Refresh booleanToken - security
Defenses GetRealm Security Defense[] - smtp
Servers GetRealm Smtp Server[] - ssl
Required string - sso
Session stringIdle Timeout - sso
Session stringIdle Timeout Remember Me - sso
Session stringMax Lifespan - sso
Session stringMax Lifespan Remember Me - user
Managed booleanAccess - verify
Email boolean - web
Authn GetPasswordless Policy Realm Web Authn Passwordless Policy - web
Authn GetPolicy Realm Web Authn Policy - display
Name stringHtml
- access_
code_ strlifespan - access_
code_ strlifespan_ login - access_
code_ strlifespan_ user_ action - access_
token_ strlifespan - access_
token_ strlifespan_ for_ implicit_ flow - account_
theme str - action_
token_ strgenerated_ by_ admin_ lifespan - action_
token_ strgenerated_ by_ user_ lifespan - admin_
theme str - attributes Mapping[str, Any]
- browser_
flow str - client_
authentication_ strflow - default_
default_ Sequence[str]client_ scopes - default_
optional_ Sequence[str]client_ scopes - default_
signature_ stralgorithm - direct_
grant_ strflow - display_
name str - docker_
authentication_ strflow - duplicate_
emails_ boolallowed - edit_
username_ boolallowed - email_
theme str - enabled bool
- id str
- The provider-assigned unique ID for this managed resource.
- internal_
id str - internationalizations
Sequence[Get
Realm Internationalization] - login_
theme str - login_
with_ boolemail_ allowed - offline_
session_ stridle_ timeout - offline_
session_ strmax_ lifespan - offline_
session_ boolmax_ lifespan_ enabled - password_
policy str - realm str
- refresh_
token_ intmax_ reuse - registration_
allowed bool - registration_
email_ boolas_ username - registration_
flow str - remember_
me bool - reset_
credentials_ strflow - reset_
password_ boolallowed - revoke_
refresh_ booltoken - security_
defenses Sequence[GetRealm Security Defense] - smtp_
servers Sequence[GetRealm Smtp Server] - ssl_
required str - sso_
session_ stridle_ timeout - sso_
session_ stridle_ timeout_ remember_ me - sso_
session_ strmax_ lifespan - sso_
session_ strmax_ lifespan_ remember_ me - user_
managed_ boolaccess - verify_
email bool - web_
authn_ Getpasswordless_ policy Realm Web Authn Passwordless Policy - web_
authn_ Getpolicy Realm Web Authn Policy - display_
name_ strhtml
Supporting Types
GetRealmInternationalization
- Default
Locale string - Supported
Locales List<string>
- Default
Locale string - Supported
Locales []string
- default
Locale string - supported
Locales string[]
- default_
locale str - supported_
locales Sequence[str]
GetRealmSecurityDefense
GetRealmSecurityDefenseBruteForceDetection
- failure
Reset numberTime Seconds - max
Failure numberWait Seconds - max
Login numberFailures - minimum
Quick numberLogin Wait Seconds - permanent
Lockout boolean - quick
Login numberCheck Milli Seconds - wait
Increment numberSeconds
GetRealmSecurityDefenseHeader
- Content
Security stringPolicy - Content
Security stringPolicy Report Only - Strict
Transport stringSecurity - XContent
Type stringOptions - XFrame
Options string - XRobots
Tag string - XXss
Protection string
- Content
Security stringPolicy - Content
Security stringPolicy Report Only - Strict
Transport stringSecurity - XContent
Type stringOptions - XFrame
Options string - XRobots
Tag string - XXss
Protection string
- content
Security stringPolicy - content
Security stringPolicy Report Only - strict
Transport stringSecurity - x
Content stringType Options - x
Frame stringOptions - x
Robots stringTag - x
Xss stringProtection
GetRealmSmtpServer
- Auths
List<Get
Realm Smtp Server Auth> - Envelope
From string - From string
- From
Display stringName - Host string
- Port string
- Reply
To string - Reply
To stringDisplay Name - Ssl bool
- Starttls bool
- Auths
[]Get
Realm Smtp Server Auth - Envelope
From string - From string
- From
Display stringName - Host string
- Port string
- Reply
To string - Reply
To stringDisplay Name - Ssl bool
- Starttls bool
- auths
Get
Realm Smtp Server Auth[] - envelope
From string - from string
- from
Display stringName - host string
- port string
- reply
To string - reply
To stringDisplay Name - ssl boolean
- starttls boolean
- auths
Sequence[Get
Realm Smtp Server Auth] - envelope_
from str - from_ str
- from_
display_ strname - host str
- port str
- reply_
to str - reply_
to_ strdisplay_ name - ssl bool
- starttls bool
GetRealmSmtpServerAuth
GetRealmWebAuthnPasswordlessPolicy
- Acceptable
Aaguids List<string> - Attestation
Conveyance stringPreference - Authenticator
Attachment string - Avoid
Same boolAuthenticator Register - Create
Timeout int - Relying
Party stringEntity Name - Relying
Party stringId - Require
Resident stringKey - Signature
Algorithms List<string> - User
Verification stringRequirement
- Acceptable
Aaguids []string - Attestation
Conveyance stringPreference - Authenticator
Attachment string - Avoid
Same boolAuthenticator Register - Create
Timeout int - Relying
Party stringEntity Name - Relying
Party stringId - Require
Resident stringKey - Signature
Algorithms []string - User
Verification stringRequirement
- acceptable
Aaguids string[] - attestation
Conveyance stringPreference - authenticator
Attachment string - avoid
Same booleanAuthenticator Register - create
Timeout number - relying
Party stringEntity Name - relying
Party stringId - require
Resident stringKey - signature
Algorithms string[] - user
Verification stringRequirement
- acceptable_
aaguids Sequence[str] - attestation_
conveyance_ strpreference - authenticator_
attachment str - avoid_
same_ boolauthenticator_ register - create_
timeout int - relying_
party_ strentity_ name - relying_
party_ strid - require_
resident_ strkey - signature_
algorithms Sequence[str] - user_
verification_ strrequirement
GetRealmWebAuthnPolicy
- Acceptable
Aaguids List<string> - Attestation
Conveyance stringPreference - Authenticator
Attachment string - Avoid
Same boolAuthenticator Register - Create
Timeout int - Relying
Party stringEntity Name - Relying
Party stringId - Require
Resident stringKey - Signature
Algorithms List<string> - User
Verification stringRequirement
- Acceptable
Aaguids []string - Attestation
Conveyance stringPreference - Authenticator
Attachment string - Avoid
Same boolAuthenticator Register - Create
Timeout int - Relying
Party stringEntity Name - Relying
Party stringId - Require
Resident stringKey - Signature
Algorithms []string - User
Verification stringRequirement
- acceptable
Aaguids string[] - attestation
Conveyance stringPreference - authenticator
Attachment string - avoid
Same booleanAuthenticator Register - create
Timeout number - relying
Party stringEntity Name - relying
Party stringId - require
Resident stringKey - signature
Algorithms string[] - user
Verification stringRequirement
- acceptable_
aaguids Sequence[str] - attestation_
conveyance_ strpreference - authenticator_
attachment str - avoid_
same_ boolauthenticator_ register - create_
timeout int - relying_
party_ strentity_ name - relying_
party_ strid - require_
resident_ strkey - signature_
algorithms Sequence[str] - user_
verification_ strrequirement
Package Details
- Repository
- https://github.com/pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
keycloak
Terraform Provider.